Creates a model response for a chat conversation with the Pet Adoption Advisor AI. Supports streaming responses using Server-Sent Events (SSE).
Our AI assistant helps users:
When stream: true, the response is sent as Server-Sent Events (SSE), with each token delivered incrementally. This provides a better user experience for longer responses.
Each chunk is sent as:
data: {"id":"chatcmpl_abc","object":"chat.completion.chunk","choices":[{"delta":{"content":"Hello"},"index":0}]}
The stream ends with:
data: [DONE]
When stream: false or omitted, returns a complete response object.
Bearer token authentication using JWT (JSON Web Token). Include the token in the Authorization header as: Authorization: Bearer <token>
A list of messages comprising the conversation so far
1ID of the model to use
PET_ADVISOR_1, PET_ADVISOR_TURBO If true, partial message deltas will be sent via Server-Sent Events
Maximum number of tokens to generate
1 <= x <= 4096Sampling temperature between 0 and 2
0 <= x <= 2Successful response. Format depends on the stream parameter.
Streaming response (when stream=true). Each line contains a JSON chunk prefixed with 'data: '