curl -X POST https://api.together.xyz/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $TOGETHER_API_KEY" \
-d '{
"messages": [
{
"role": "system",
"content": "The following is a voice message transcript. Only answer in JSON."
},
{
"role": "user",
"content": "Good morning! It'"'"'s 7:00 AM, and I'"'"'m just waking up. Today is going to be a busy day, so let'"'"'s get started. First, I need to make a quick breakfast. I think I'"'"'ll have some scrambled eggs and toast with a cup of coffee. While I'"'"'m cooking, I'"'"'ll also check my emails to see if there'"'"'s anything urgent."
}
],
"model": "meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo",
"response_format": {
"type": "json_object",
"schema": {
"$ref": "#/definitions/voiceNoteSchema",
"definitions": {
"voiceNoteSchema": {
"type": "object",
"properties": {
"title": {
"type": "string",
"description": "A title for the voice note"
},
"summary": {
"type": "string",
"description": "A short one sentence summary of the voice note."
},
"actionItems": {
"type": "array",
"items": {"type": "string"},
"description": "A list of action items from the voice note"
}
},
"required": ["title", "summary", "actionItems"],
"additionalProperties": false
}
},
"$schema": "http://json-schema.org/draft-07/schema#"
}
}
}'