Authorizations
Should follow the format Basic {credentials}. The {credentials} consists of the Base64-encoded string of the API key and the secret in the format key:secret
Body
Chat completion request.
Describes the serving ID of the request to select the right model.
A list of messages comprising the conversation so far.
- Text Content
- Multi-modal Content
A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. Only supported for OpenAI.
Controls which (if any) function is called by the model. Only supported for OpenAI.
Configuration for text completion generation.
Format that the model must output..
- RESPONSE_FORMAT_UNSPECIFIED: Response format is not specified. Defaults to "text".
- RESPONSE_FORMAT_TEXT: Text response format.
- RESPONSE_FORMAT_JSON: Only supported when stream = False. JSON response format. This guarantees that the message the model generates is valid JSON. Note that your system prompt must still instruct the model to produce JSON, and to help ensure you don't forget, the API will throw an error if the string JSON does not appear in your system message. Also note that the message content may be partial (i.e. cut off) if finish_reason="length", which indicates the generation exceeded max_tokens or the conversation exceeded the max context length. Only supported for OpenAI.
- RESPONSE_FORMAT_JSON_SCHEMA: JSON schema response format. It enables Structured Outputs which ensures the model will match your supplied JSON schema. Only supported for OpenAI.
RESPONSE_FORMAT_UNSPECIFIED, RESPONSE_FORMAT_TEXT, RESPONSE_FORMAT_JSON, RESPONSE_FORMAT_JSON_SCHEMA Request timeout in seconds. This setting applies only to selected clients and configured by a separate request to Inworld. Make sure to configure these specific requests accordingly, as this timeout will not affect others.
JSON schema configuration. Only supported for OpenAI.