Ask a question
const url = 'https://api.full-fill.ai/api/v2/chat/ask/';const options = { method: 'POST', headers: {'X-API-Key': '<X-API-Key>', 'Content-Type': 'application/json'}, body: '{"question":"example","session_id":1,"file_id":1,"offering_ids":[1]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.full-fill.ai/api/v2/chat/ask/ \ --header 'Content-Type: application/json' \ --header 'X-API-Key: <X-API-Key>' \ --data '{ "question": "example", "session_id": 1, "file_id": 1, "offering_ids": [ 1 ] }'Ask a single grounded question. Stateless by default; pass a session_id (create one with POST /chat/sessions/) to continue a persistent conversation.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Request body for the ask endpoint (stateless, or continue a persistent session).
object
Continue a persistent conversation. Create one with POST /chat/sessions/. Omit for a stateless single question.
Restrict grounding to a single file.
Restrict grounding to offerings.
Examplegenerated
{ "question": "example", "session_id": 1, "file_id": 1, "offering_ids": [ 1 ]}Request body for the ask endpoint (stateless, or continue a persistent session).
object
Continue a persistent conversation. Create one with POST /chat/sessions/. Omit for a stateless single question.
Restrict grounding to a single file.
Restrict grounding to offerings.
Examplegenerated
question=example&session_id=1&file_id=1&offering_ids=1Request body for the ask endpoint (stateless, or continue a persistent session).
object
Continue a persistent conversation. Create one with POST /chat/sessions/. Omit for a stateless single question.
Restrict grounding to a single file.
Restrict grounding to offerings.
Responses
Section titled “Responses”object
Null for a stateless answer; the persistent session id otherwise.
Examplegenerated
{ "answer": "example", "sources": [ "example" ], "session_id": 1}