Answer a question about an attachment
const url = 'http://localhost:11044/api/v1/chat/attachment/answer?answer=example';const options = {method: 'POST', headers: {'X-Embabel-Api-Key': '<X-Embabel-Api-Key>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url 'http://localhost:11044/api/v1/chat/attachment/answer?answer=example' \ --header 'X-Embabel-Api-Key: <X-Embabel-Api-Key>'Applies the capability the user chose. Accepts human phrasing (“yes”, “add it to my documents”) or a capability id. Omit attachmentId to answer the most recent question.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”The user’s reply, in their own words (yes, add it to my documents, a decline such as no) or a capability id from the question’s options; one that matches no option answers unclear with the options rather than guessing
The attachment whose question this answers, as attachmentId from POST /chat/attachment; omitted, the caller’s most recently asked, unexpired question is answered
Responses
Section titled “Responses”Outcome status: applied, declined, no-question, unclear, or unavailable
What became of an answer to an attachment question. status names the outcome
object
No active chat session
A refusal from the attachment endpoints: the word error and the reason, written to be shown
object
Why the file or the answer was refused: an empty or oversized file, or no active chat session
Always error
Example
error
