Thanks for your thoughts here. For clarity I’ve included the entire request body (transcript excluded) below. The results are the same as described above.
- I’ve fixed inconsistencies in how the transcript is referred to. I stick to transcript text
- I added a function description
- I’ve included the redacted responses, which shows the empty title and categories fields
Request body
{
"model": "gpt-3.5-turbo-0613",
"temperature": 0,
"function_call": "auto",
"functions": [
{
"name": "saveVoiceTranscriptDetails",
"description": "Takes voice transcript text, title, categories, and action items and saves them to the database",
"parameters": {
"type": "object",
"properties": {
"transcript": {"type": "string", "description": "The transcript text separated into paragraphs by two `\n\n` newline"},
"title": {"type": "string", "description": "The title generated from the transcript text"},
"action_items": {"type": "array", "items": {"type": "string"}},
"categories": {"type": "array", "items": {"type": "string"}, "description": "Categories describing the transcript"}
},
"required": ["transcript", "title", "categories"]
}
}
],
"messages": [
{
"role": "user",
"content":
"You are a text processing and classification AI assistant.
Perform these 4 tasks to process the user voice transcript included below.
Tasks:\n\n
1. Generate a title from the transcript's raw text.\n
2. Split the raw transcript text into logical paragraphs based on it's contents. Separate paragraphs with two `\\n` newline characters.\n
3. Generate up to three one-word descriptive categories based on the transcript text.\n.
4. If there are tasks to be remembered in the transcript, extract those as action items.\n
You MUST ALWAYS return the results as a json object.\n\n
Transcript:[TRANSCRIPT]"
}
]
}
Response
{
"id": "chatcmpl-7T5KdICDvLCNa8O4VjuTZ6HXxDyC6",
"object": "chat.completion",
"created": 1687166363,
"model": "gpt-3.5-turbo-0613",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": null,
"function_call": {
"name": "saveTranscriptMetadata",
"arguments": "{\n \"transcript\": \"[TRANSCRIPT]\",\n \"title\": \"\",\n \"categories\": []\n}"
}
},
"finish_reason": "function_call"
}
],
"usage": {
"prompt_tokens": 600,
"completion_tokens": 414,
"total_tokens": 1014
}
}