You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
User selects a vulnerability to discuss (e.g., SQL Injection)
Enters a message/question
POST /chat
Headers:
Authorization: Bearer <jwt_token>
Form Data:
Field
Type
Required
Description
user_id
string
✅
User identifier
session_id
string
✅
Session under which the chat is taking place
vulnerability
string
✅
Name of the vulnerability (e.g., SQL Injection)
message
string
✅
The user’s question or input for the bot
Response (200 OK):
{
"response": "The SQL Injection occurs on line 45 due to unsanitized input. Use parameterized queries to fix it.",
"chat_history": [
{ "role": "user", "content": "How to fix this?" },
{ "role": "assistant", "content": "Use parameterized queries..." }
]
}