For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
DASHBOARDPLAYGROUNDDOCSCOMMUNITYLOG IN
Guides and conceptsAPI ReferenceRelease NotesLLMUCookbooks
Guides and conceptsAPI ReferenceRelease NotesLLMUCookbooks
LogoLogodocs
DASHBOARDPLAYGROUNDDOCSCOMMUNITYLOG IN

Release Notes

June 11, 2024
June 11, 2024
Was this page helpful?
Edit this page
Previous

Release Notes for June 10th 2024

Next
Built with

Force JSON object response format

Users can now force command-nightlyto generate outputs in JSON objects by setting the response_format parameter in the Chat API. Users can also specify a JSON schema for the output.

This feature is available across all of Cohere’s SDKs (Python, Typescript, Java, Go).

Example request for forcing JSON response format:

cURL
POST https://api.cohere.ai/v1/chat
{
"message": "Generate a JSON that represents a person, with name and age",
"model": "command-nightly",
"response_format": {
"type": "json_object"
}
}

Example request for forcing JSON response format in user defined schema:

cURL
POST https://api.cohere.ai/v1/chat
{
"message": "Generate a JSON that represents a person, with name and age",
"model": "command-nightly",
"response_format": {
"type": "json_object",
"schema": {
"type": "object",
"required": ["name", "age"],
"properties": {
"name": { "type": "string" },
"age": { "type": "integer" }
}
}
}
}

Currently only compatible with `command-nightly model.