Chat
Create a chat response
Changed onRun an assistant turn. The default response is JSON. HTTP clients request server-sent events by setting stream to true in the JSON body. An Accept: text/event-stream header does not replace stream.
post/api/chat
Request
- Base URL: https://instance-name-be.glean.com
- URL: https://instance-name-be.glean.com/api/chat
- Auth: HTTP bearer
Request body
Example request
{
"input": "Summarize our parental leave policy as JSON.",
"text": {
"format": {
"type": "JSON_SCHEMA",
"name": "policy_summary",
"schema": {
"type": "object",
"properties": {
"eligible_employees": {
"type": "string"
},
"duration_weeks": {
"type": "integer"
}
},
"required": [
"eligible_employees",
"duration_weeks"
]
},
"strict": true
}
}
}Response
Successful response.
Changes
- info
added the new optional request property
//// - info
added the optional property
////to the response with the status
- info
- info
added
subschema #1subschema #2to the///////////response propertyanyOflist for the response status - info
removed
subschema #1subschema #2from the///////////response propertyanyOflist for the response status
- info