Ask follow-up questions of your data
https://{your-workspace-slug}.{region}.xata.sh/db/db_branch_name/tables/table_name/ask/session_id
Continue a conversation with your data. This endpoint lets you continue a question started via the /ask endpoint in order to dive deeper into your context or ask clarifying questions.
Expected Parameters
Name | Description | In | Required | Schema |
---|---|---|---|---|
db_branch_name | The DBBranchName matches the pattern `{db_name}:{branch_name}`. | path | ✅ | string |
table_name | The Table name | path | ✅ | string |
session_id | path | ✅ | string |
Ask Follow-Up Questions of Your Data
POSThttps://{your-workspace-slug}.{region}.xata.sh/db/db_branch_name/tables/table_name/ask/session_id
Ask a follow-up question. If the Accept
header is set to text/event-stream
, Xata will stream the results back as SSE's.
Request Body Type Definition
1 2 3 4 5 6 7 8
type ChatSessionMessage = { /* * The question you'd like to ask. * * @minLength 3 */ message?: string; };
Status Code | Description | Example Response/Type Definition |
---|---|---|
200 | Response to the question |
|
400 | Bad Request |
|
401 | Authentication Error |
|
404 | Example response |
|
429 | Rate limit exceeded |
|
503 | ServiceUnavailable |
|
5XX | Unexpected Error |