mirror of
				https://github.com/meta-llama/llama-stack.git
				synced 2025-10-25 09:05:37 +00:00 
			
		
		
		
	This PR updates the Conversation item related types and improves a couple critical parts of the implemenation: - it creates a streaming output item for the final assistant message output by the model. until now we only added content parts and included that message in the final response. - rewrites the conversation update code completely to account for items other than messages (tool calls, outputs, etc.) ## Test Plan Used the test script from https://github.com/llamastack/llama-stack-client-python/pull/281 for this ``` TEST_API_BASE_URL=http://localhost:8321/v1 \ pytest tests/integration/test_agent_turn_step_events.py::test_client_side_function_tool -xvs ```
		
			
				
	
	
		
			1172 lines
		
	
	
	
		
			34 KiB
		
	
	
	
		
			JSON
		
	
	
	
	
		
			Generated
		
	
	
			
		
		
	
	
			1172 lines
		
	
	
	
		
			34 KiB
		
	
	
	
		
			JSON
		
	
	
	
	
		
			Generated
		
	
	
| {
 | |
|   "test_id": "tests/integration/responses/test_tool_responses.py::test_response_function_call_ordering_2[openai_client-txt=openai/gpt-4o]",
 | |
|   "request": {
 | |
|     "method": "POST",
 | |
|     "url": "https://api.openai.com/v1/v1/chat/completions",
 | |
|     "headers": {},
 | |
|     "body": {
 | |
|       "model": "gpt-4o",
 | |
|       "messages": [
 | |
|         {
 | |
|           "role": "user",
 | |
|           "content": "Is the weather better in San Francisco or Los Angeles?"
 | |
|         },
 | |
|         {
 | |
|           "role": "assistant",
 | |
|           "tool_calls": [
 | |
|             {
 | |
|               "index": 0,
 | |
|               "id": "call_0vawOcyFOfS0ycnAoKeD4QOL",
 | |
|               "type": "function",
 | |
|               "function": {
 | |
|                 "name": "get_weather",
 | |
|                 "arguments": "{\"location\": \"San Francisco, USA\"}"
 | |
|               }
 | |
|             }
 | |
|           ]
 | |
|         },
 | |
|         {
 | |
|           "role": "tool",
 | |
|           "tool_call_id": "call_0vawOcyFOfS0ycnAoKeD4QOL",
 | |
|           "content": "It is raining."
 | |
|         },
 | |
|         {
 | |
|           "role": "assistant",
 | |
|           "tool_calls": [
 | |
|             {
 | |
|               "index": 0,
 | |
|               "id": "call_ZHaSYmew8eUpGlx8XRbdBzJj",
 | |
|               "type": "function",
 | |
|               "function": {
 | |
|                 "name": "get_weather",
 | |
|                 "arguments": "{\"location\": \"Los Angeles, USA\"}"
 | |
|               }
 | |
|             }
 | |
|           ]
 | |
|         },
 | |
|         {
 | |
|           "role": "tool",
 | |
|           "tool_call_id": "call_ZHaSYmew8eUpGlx8XRbdBzJj",
 | |
|           "content": "It is cloudy."
 | |
|         }
 | |
|       ],
 | |
|       "stream": true,
 | |
|       "stream_options": {
 | |
|         "include_usage": true
 | |
|       },
 | |
|       "tools": [
 | |
|         {
 | |
|           "type": "function",
 | |
|           "function": {
 | |
|             "type": "function",
 | |
|             "name": "get_weather",
 | |
|             "description": "Get current temperature for a given location.",
 | |
|             "parameters": {
 | |
|               "additionalProperties": false,
 | |
|               "properties": {
 | |
|                 "location": {
 | |
|                   "description": "City and country e.g. Bogot\u00e1, Colombia",
 | |
|                   "type": "string"
 | |
|                 }
 | |
|               },
 | |
|               "required": [
 | |
|                 "location"
 | |
|               ],
 | |
|               "type": "object"
 | |
|             },
 | |
|             "strict": null
 | |
|           }
 | |
|         }
 | |
|       ]
 | |
|     },
 | |
|     "endpoint": "/v1/chat/completions",
 | |
|     "model": "gpt-4o"
 | |
|   },
 | |
|   "response": {
 | |
|     "body": [
 | |
|       {
 | |
|         "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
 | |
|         "__data__": {
 | |
|           "id": "rec-992ee88f1e6a",
 | |
|           "choices": [
 | |
|             {
 | |
|               "delta": {
 | |
|                 "content": "",
 | |
|                 "function_call": null,
 | |
|                 "refusal": null,
 | |
|                 "role": "assistant",
 | |
|                 "tool_calls": null
 | |
|               },
 | |
|               "finish_reason": null,
 | |
|               "index": 0,
 | |
|               "logprobs": null
 | |
|             }
 | |
|           ],
 | |
|           "created": 0,
 | |
|           "model": "gpt-4o-2024-08-06",
 | |
|           "object": "chat.completion.chunk",
 | |
|           "service_tier": "default",
 | |
|           "system_fingerprint": "fp_f64f290af2",
 | |
|           "usage": null,
 | |
|           "obfuscation": "U57sbjVSff9fOt"
 | |
|         }
 | |
|       },
 | |
|       {
 | |
|         "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
 | |
|         "__data__": {
 | |
|           "id": "rec-992ee88f1e6a",
 | |
|           "choices": [
 | |
|             {
 | |
|               "delta": {
 | |
|                 "content": "Currently",
 | |
|                 "function_call": null,
 | |
|                 "refusal": null,
 | |
|                 "role": null,
 | |
|                 "tool_calls": null
 | |
|               },
 | |
|               "finish_reason": null,
 | |
|               "index": 0,
 | |
|               "logprobs": null
 | |
|             }
 | |
|           ],
 | |
|           "created": 0,
 | |
|           "model": "gpt-4o-2024-08-06",
 | |
|           "object": "chat.completion.chunk",
 | |
|           "service_tier": "default",
 | |
|           "system_fingerprint": "fp_f64f290af2",
 | |
|           "usage": null,
 | |
|           "obfuscation": "6XulmUq"
 | |
|         }
 | |
|       },
 | |
|       {
 | |
|         "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
 | |
|         "__data__": {
 | |
|           "id": "rec-992ee88f1e6a",
 | |
|           "choices": [
 | |
|             {
 | |
|               "delta": {
 | |
|                 "content": ",",
 | |
|                 "function_call": null,
 | |
|                 "refusal": null,
 | |
|                 "role": null,
 | |
|                 "tool_calls": null
 | |
|               },
 | |
|               "finish_reason": null,
 | |
|               "index": 0,
 | |
|               "logprobs": null
 | |
|             }
 | |
|           ],
 | |
|           "created": 0,
 | |
|           "model": "gpt-4o-2024-08-06",
 | |
|           "object": "chat.completion.chunk",
 | |
|           "service_tier": "default",
 | |
|           "system_fingerprint": "fp_f64f290af2",
 | |
|           "usage": null,
 | |
|           "obfuscation": "sP5fhfjTZm2XY0m"
 | |
|         }
 | |
|       },
 | |
|       {
 | |
|         "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
 | |
|         "__data__": {
 | |
|           "id": "rec-992ee88f1e6a",
 | |
|           "choices": [
 | |
|             {
 | |
|               "delta": {
 | |
|                 "content": " it",
 | |
|                 "function_call": null,
 | |
|                 "refusal": null,
 | |
|                 "role": null,
 | |
|                 "tool_calls": null
 | |
|               },
 | |
|               "finish_reason": null,
 | |
|               "index": 0,
 | |
|               "logprobs": null
 | |
|             }
 | |
|           ],
 | |
|           "created": 0,
 | |
|           "model": "gpt-4o-2024-08-06",
 | |
|           "object": "chat.completion.chunk",
 | |
|           "service_tier": "default",
 | |
|           "system_fingerprint": "fp_f64f290af2",
 | |
|           "usage": null,
 | |
|           "obfuscation": "X8zFHBUJODMuY"
 | |
|         }
 | |
|       },
 | |
|       {
 | |
|         "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
 | |
|         "__data__": {
 | |
|           "id": "rec-992ee88f1e6a",
 | |
|           "choices": [
 | |
|             {
 | |
|               "delta": {
 | |
|                 "content": " is",
 | |
|                 "function_call": null,
 | |
|                 "refusal": null,
 | |
|                 "role": null,
 | |
|                 "tool_calls": null
 | |
|               },
 | |
|               "finish_reason": null,
 | |
|               "index": 0,
 | |
|               "logprobs": null
 | |
|             }
 | |
|           ],
 | |
|           "created": 0,
 | |
|           "model": "gpt-4o-2024-08-06",
 | |
|           "object": "chat.completion.chunk",
 | |
|           "service_tier": "default",
 | |
|           "system_fingerprint": "fp_f64f290af2",
 | |
|           "usage": null,
 | |
|           "obfuscation": "mvqKWL7qlqBYC"
 | |
|         }
 | |
|       },
 | |
|       {
 | |
|         "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
 | |
|         "__data__": {
 | |
|           "id": "rec-992ee88f1e6a",
 | |
|           "choices": [
 | |
|             {
 | |
|               "delta": {
 | |
|                 "content": " raining",
 | |
|                 "function_call": null,
 | |
|                 "refusal": null,
 | |
|                 "role": null,
 | |
|                 "tool_calls": null
 | |
|               },
 | |
|               "finish_reason": null,
 | |
|               "index": 0,
 | |
|               "logprobs": null
 | |
|             }
 | |
|           ],
 | |
|           "created": 0,
 | |
|           "model": "gpt-4o-2024-08-06",
 | |
|           "object": "chat.completion.chunk",
 | |
|           "service_tier": "default",
 | |
|           "system_fingerprint": "fp_f64f290af2",
 | |
|           "usage": null,
 | |
|           "obfuscation": "GrQwrSEu"
 | |
|         }
 | |
|       },
 | |
|       {
 | |
|         "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
 | |
|         "__data__": {
 | |
|           "id": "rec-992ee88f1e6a",
 | |
|           "choices": [
 | |
|             {
 | |
|               "delta": {
 | |
|                 "content": " in",
 | |
|                 "function_call": null,
 | |
|                 "refusal": null,
 | |
|                 "role": null,
 | |
|                 "tool_calls": null
 | |
|               },
 | |
|               "finish_reason": null,
 | |
|               "index": 0,
 | |
|               "logprobs": null
 | |
|             }
 | |
|           ],
 | |
|           "created": 0,
 | |
|           "model": "gpt-4o-2024-08-06",
 | |
|           "object": "chat.completion.chunk",
 | |
|           "service_tier": "default",
 | |
|           "system_fingerprint": "fp_f64f290af2",
 | |
|           "usage": null,
 | |
|           "obfuscation": "kujUmQajxhAp3"
 | |
|         }
 | |
|       },
 | |
|       {
 | |
|         "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
 | |
|         "__data__": {
 | |
|           "id": "rec-992ee88f1e6a",
 | |
|           "choices": [
 | |
|             {
 | |
|               "delta": {
 | |
|                 "content": " San",
 | |
|                 "function_call": null,
 | |
|                 "refusal": null,
 | |
|                 "role": null,
 | |
|                 "tool_calls": null
 | |
|               },
 | |
|               "finish_reason": null,
 | |
|               "index": 0,
 | |
|               "logprobs": null
 | |
|             }
 | |
|           ],
 | |
|           "created": 0,
 | |
|           "model": "gpt-4o-2024-08-06",
 | |
|           "object": "chat.completion.chunk",
 | |
|           "service_tier": "default",
 | |
|           "system_fingerprint": "fp_f64f290af2",
 | |
|           "usage": null,
 | |
|           "obfuscation": "oCl6bFEm3CA1"
 | |
|         }
 | |
|       },
 | |
|       {
 | |
|         "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
 | |
|         "__data__": {
 | |
|           "id": "rec-992ee88f1e6a",
 | |
|           "choices": [
 | |
|             {
 | |
|               "delta": {
 | |
|                 "content": " Francisco",
 | |
|                 "function_call": null,
 | |
|                 "refusal": null,
 | |
|                 "role": null,
 | |
|                 "tool_calls": null
 | |
|               },
 | |
|               "finish_reason": null,
 | |
|               "index": 0,
 | |
|               "logprobs": null
 | |
|             }
 | |
|           ],
 | |
|           "created": 0,
 | |
|           "model": "gpt-4o-2024-08-06",
 | |
|           "object": "chat.completion.chunk",
 | |
|           "service_tier": "default",
 | |
|           "system_fingerprint": "fp_f64f290af2",
 | |
|           "usage": null,
 | |
|           "obfuscation": "3xslAk"
 | |
|         }
 | |
|       },
 | |
|       {
 | |
|         "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
 | |
|         "__data__": {
 | |
|           "id": "rec-992ee88f1e6a",
 | |
|           "choices": [
 | |
|             {
 | |
|               "delta": {
 | |
|                 "content": " while",
 | |
|                 "function_call": null,
 | |
|                 "refusal": null,
 | |
|                 "role": null,
 | |
|                 "tool_calls": null
 | |
|               },
 | |
|               "finish_reason": null,
 | |
|               "index": 0,
 | |
|               "logprobs": null
 | |
|             }
 | |
|           ],
 | |
|           "created": 0,
 | |
|           "model": "gpt-4o-2024-08-06",
 | |
|           "object": "chat.completion.chunk",
 | |
|           "service_tier": "default",
 | |
|           "system_fingerprint": "fp_f64f290af2",
 | |
|           "usage": null,
 | |
|           "obfuscation": "zaZsJVrSo4"
 | |
|         }
 | |
|       },
 | |
|       {
 | |
|         "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
 | |
|         "__data__": {
 | |
|           "id": "rec-992ee88f1e6a",
 | |
|           "choices": [
 | |
|             {
 | |
|               "delta": {
 | |
|                 "content": " it",
 | |
|                 "function_call": null,
 | |
|                 "refusal": null,
 | |
|                 "role": null,
 | |
|                 "tool_calls": null
 | |
|               },
 | |
|               "finish_reason": null,
 | |
|               "index": 0,
 | |
|               "logprobs": null
 | |
|             }
 | |
|           ],
 | |
|           "created": 0,
 | |
|           "model": "gpt-4o-2024-08-06",
 | |
|           "object": "chat.completion.chunk",
 | |
|           "service_tier": "default",
 | |
|           "system_fingerprint": "fp_f64f290af2",
 | |
|           "usage": null,
 | |
|           "obfuscation": "HnklZf5fFUz2Z"
 | |
|         }
 | |
|       },
 | |
|       {
 | |
|         "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
 | |
|         "__data__": {
 | |
|           "id": "rec-992ee88f1e6a",
 | |
|           "choices": [
 | |
|             {
 | |
|               "delta": {
 | |
|                 "content": " is",
 | |
|                 "function_call": null,
 | |
|                 "refusal": null,
 | |
|                 "role": null,
 | |
|                 "tool_calls": null
 | |
|               },
 | |
|               "finish_reason": null,
 | |
|               "index": 0,
 | |
|               "logprobs": null
 | |
|             }
 | |
|           ],
 | |
|           "created": 0,
 | |
|           "model": "gpt-4o-2024-08-06",
 | |
|           "object": "chat.completion.chunk",
 | |
|           "service_tier": "default",
 | |
|           "system_fingerprint": "fp_f64f290af2",
 | |
|           "usage": null,
 | |
|           "obfuscation": "JPmgZUbK2jSjY"
 | |
|         }
 | |
|       },
 | |
|       {
 | |
|         "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
 | |
|         "__data__": {
 | |
|           "id": "rec-992ee88f1e6a",
 | |
|           "choices": [
 | |
|             {
 | |
|               "delta": {
 | |
|                 "content": " cloudy",
 | |
|                 "function_call": null,
 | |
|                 "refusal": null,
 | |
|                 "role": null,
 | |
|                 "tool_calls": null
 | |
|               },
 | |
|               "finish_reason": null,
 | |
|               "index": 0,
 | |
|               "logprobs": null
 | |
|             }
 | |
|           ],
 | |
|           "created": 0,
 | |
|           "model": "gpt-4o-2024-08-06",
 | |
|           "object": "chat.completion.chunk",
 | |
|           "service_tier": "default",
 | |
|           "system_fingerprint": "fp_f64f290af2",
 | |
|           "usage": null,
 | |
|           "obfuscation": "E4V9q6tzV"
 | |
|         }
 | |
|       },
 | |
|       {
 | |
|         "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
 | |
|         "__data__": {
 | |
|           "id": "rec-992ee88f1e6a",
 | |
|           "choices": [
 | |
|             {
 | |
|               "delta": {
 | |
|                 "content": " in",
 | |
|                 "function_call": null,
 | |
|                 "refusal": null,
 | |
|                 "role": null,
 | |
|                 "tool_calls": null
 | |
|               },
 | |
|               "finish_reason": null,
 | |
|               "index": 0,
 | |
|               "logprobs": null
 | |
|             }
 | |
|           ],
 | |
|           "created": 0,
 | |
|           "model": "gpt-4o-2024-08-06",
 | |
|           "object": "chat.completion.chunk",
 | |
|           "service_tier": "default",
 | |
|           "system_fingerprint": "fp_f64f290af2",
 | |
|           "usage": null,
 | |
|           "obfuscation": "OU3UCtAZxyGMB"
 | |
|         }
 | |
|       },
 | |
|       {
 | |
|         "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
 | |
|         "__data__": {
 | |
|           "id": "rec-992ee88f1e6a",
 | |
|           "choices": [
 | |
|             {
 | |
|               "delta": {
 | |
|                 "content": " Los",
 | |
|                 "function_call": null,
 | |
|                 "refusal": null,
 | |
|                 "role": null,
 | |
|                 "tool_calls": null
 | |
|               },
 | |
|               "finish_reason": null,
 | |
|               "index": 0,
 | |
|               "logprobs": null
 | |
|             }
 | |
|           ],
 | |
|           "created": 0,
 | |
|           "model": "gpt-4o-2024-08-06",
 | |
|           "object": "chat.completion.chunk",
 | |
|           "service_tier": "default",
 | |
|           "system_fingerprint": "fp_f64f290af2",
 | |
|           "usage": null,
 | |
|           "obfuscation": "HM43ulOpAmxl"
 | |
|         }
 | |
|       },
 | |
|       {
 | |
|         "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
 | |
|         "__data__": {
 | |
|           "id": "rec-992ee88f1e6a",
 | |
|           "choices": [
 | |
|             {
 | |
|               "delta": {
 | |
|                 "content": " Angeles",
 | |
|                 "function_call": null,
 | |
|                 "refusal": null,
 | |
|                 "role": null,
 | |
|                 "tool_calls": null
 | |
|               },
 | |
|               "finish_reason": null,
 | |
|               "index": 0,
 | |
|               "logprobs": null
 | |
|             }
 | |
|           ],
 | |
|           "created": 0,
 | |
|           "model": "gpt-4o-2024-08-06",
 | |
|           "object": "chat.completion.chunk",
 | |
|           "service_tier": "default",
 | |
|           "system_fingerprint": "fp_f64f290af2",
 | |
|           "usage": null,
 | |
|           "obfuscation": "Hha8s4li"
 | |
|         }
 | |
|       },
 | |
|       {
 | |
|         "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
 | |
|         "__data__": {
 | |
|           "id": "rec-992ee88f1e6a",
 | |
|           "choices": [
 | |
|             {
 | |
|               "delta": {
 | |
|                 "content": ".",
 | |
|                 "function_call": null,
 | |
|                 "refusal": null,
 | |
|                 "role": null,
 | |
|                 "tool_calls": null
 | |
|               },
 | |
|               "finish_reason": null,
 | |
|               "index": 0,
 | |
|               "logprobs": null
 | |
|             }
 | |
|           ],
 | |
|           "created": 0,
 | |
|           "model": "gpt-4o-2024-08-06",
 | |
|           "object": "chat.completion.chunk",
 | |
|           "service_tier": "default",
 | |
|           "system_fingerprint": "fp_f64f290af2",
 | |
|           "usage": null,
 | |
|           "obfuscation": "CSlnuQ9ZNhnGotH"
 | |
|         }
 | |
|       },
 | |
|       {
 | |
|         "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
 | |
|         "__data__": {
 | |
|           "id": "rec-992ee88f1e6a",
 | |
|           "choices": [
 | |
|             {
 | |
|               "delta": {
 | |
|                 "content": " Generally",
 | |
|                 "function_call": null,
 | |
|                 "refusal": null,
 | |
|                 "role": null,
 | |
|                 "tool_calls": null
 | |
|               },
 | |
|               "finish_reason": null,
 | |
|               "index": 0,
 | |
|               "logprobs": null
 | |
|             }
 | |
|           ],
 | |
|           "created": 0,
 | |
|           "model": "gpt-4o-2024-08-06",
 | |
|           "object": "chat.completion.chunk",
 | |
|           "service_tier": "default",
 | |
|           "system_fingerprint": "fp_f64f290af2",
 | |
|           "usage": null,
 | |
|           "obfuscation": "l55Wlo"
 | |
|         }
 | |
|       },
 | |
|       {
 | |
|         "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
 | |
|         "__data__": {
 | |
|           "id": "rec-992ee88f1e6a",
 | |
|           "choices": [
 | |
|             {
 | |
|               "delta": {
 | |
|                 "content": ",",
 | |
|                 "function_call": null,
 | |
|                 "refusal": null,
 | |
|                 "role": null,
 | |
|                 "tool_calls": null
 | |
|               },
 | |
|               "finish_reason": null,
 | |
|               "index": 0,
 | |
|               "logprobs": null
 | |
|             }
 | |
|           ],
 | |
|           "created": 0,
 | |
|           "model": "gpt-4o-2024-08-06",
 | |
|           "object": "chat.completion.chunk",
 | |
|           "service_tier": "default",
 | |
|           "system_fingerprint": "fp_f64f290af2",
 | |
|           "usage": null,
 | |
|           "obfuscation": "tjf9zDgsyFKitFy"
 | |
|         }
 | |
|       },
 | |
|       {
 | |
|         "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
 | |
|         "__data__": {
 | |
|           "id": "rec-992ee88f1e6a",
 | |
|           "choices": [
 | |
|             {
 | |
|               "delta": {
 | |
|                 "content": " cloudy",
 | |
|                 "function_call": null,
 | |
|                 "refusal": null,
 | |
|                 "role": null,
 | |
|                 "tool_calls": null
 | |
|               },
 | |
|               "finish_reason": null,
 | |
|               "index": 0,
 | |
|               "logprobs": null
 | |
|             }
 | |
|           ],
 | |
|           "created": 0,
 | |
|           "model": "gpt-4o-2024-08-06",
 | |
|           "object": "chat.completion.chunk",
 | |
|           "service_tier": "default",
 | |
|           "system_fingerprint": "fp_f64f290af2",
 | |
|           "usage": null,
 | |
|           "obfuscation": "UIsAqmHhP"
 | |
|         }
 | |
|       },
 | |
|       {
 | |
|         "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
 | |
|         "__data__": {
 | |
|           "id": "rec-992ee88f1e6a",
 | |
|           "choices": [
 | |
|             {
 | |
|               "delta": {
 | |
|                 "content": " weather",
 | |
|                 "function_call": null,
 | |
|                 "refusal": null,
 | |
|                 "role": null,
 | |
|                 "tool_calls": null
 | |
|               },
 | |
|               "finish_reason": null,
 | |
|               "index": 0,
 | |
|               "logprobs": null
 | |
|             }
 | |
|           ],
 | |
|           "created": 0,
 | |
|           "model": "gpt-4o-2024-08-06",
 | |
|           "object": "chat.completion.chunk",
 | |
|           "service_tier": "default",
 | |
|           "system_fingerprint": "fp_f64f290af2",
 | |
|           "usage": null,
 | |
|           "obfuscation": "tePVNyr7"
 | |
|         }
 | |
|       },
 | |
|       {
 | |
|         "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
 | |
|         "__data__": {
 | |
|           "id": "rec-992ee88f1e6a",
 | |
|           "choices": [
 | |
|             {
 | |
|               "delta": {
 | |
|                 "content": " might",
 | |
|                 "function_call": null,
 | |
|                 "refusal": null,
 | |
|                 "role": null,
 | |
|                 "tool_calls": null
 | |
|               },
 | |
|               "finish_reason": null,
 | |
|               "index": 0,
 | |
|               "logprobs": null
 | |
|             }
 | |
|           ],
 | |
|           "created": 0,
 | |
|           "model": "gpt-4o-2024-08-06",
 | |
|           "object": "chat.completion.chunk",
 | |
|           "service_tier": "default",
 | |
|           "system_fingerprint": "fp_f64f290af2",
 | |
|           "usage": null,
 | |
|           "obfuscation": "m0JfC4W32t"
 | |
|         }
 | |
|       },
 | |
|       {
 | |
|         "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
 | |
|         "__data__": {
 | |
|           "id": "rec-992ee88f1e6a",
 | |
|           "choices": [
 | |
|             {
 | |
|               "delta": {
 | |
|                 "content": " be",
 | |
|                 "function_call": null,
 | |
|                 "refusal": null,
 | |
|                 "role": null,
 | |
|                 "tool_calls": null
 | |
|               },
 | |
|               "finish_reason": null,
 | |
|               "index": 0,
 | |
|               "logprobs": null
 | |
|             }
 | |
|           ],
 | |
|           "created": 0,
 | |
|           "model": "gpt-4o-2024-08-06",
 | |
|           "object": "chat.completion.chunk",
 | |
|           "service_tier": "default",
 | |
|           "system_fingerprint": "fp_f64f290af2",
 | |
|           "usage": null,
 | |
|           "obfuscation": "huaRO4DSdqNaB"
 | |
|         }
 | |
|       },
 | |
|       {
 | |
|         "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
 | |
|         "__data__": {
 | |
|           "id": "rec-992ee88f1e6a",
 | |
|           "choices": [
 | |
|             {
 | |
|               "delta": {
 | |
|                 "content": " considered",
 | |
|                 "function_call": null,
 | |
|                 "refusal": null,
 | |
|                 "role": null,
 | |
|                 "tool_calls": null
 | |
|               },
 | |
|               "finish_reason": null,
 | |
|               "index": 0,
 | |
|               "logprobs": null
 | |
|             }
 | |
|           ],
 | |
|           "created": 0,
 | |
|           "model": "gpt-4o-2024-08-06",
 | |
|           "object": "chat.completion.chunk",
 | |
|           "service_tier": "default",
 | |
|           "system_fingerprint": "fp_f64f290af2",
 | |
|           "usage": null,
 | |
|           "obfuscation": "2k7fG"
 | |
|         }
 | |
|       },
 | |
|       {
 | |
|         "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
 | |
|         "__data__": {
 | |
|           "id": "rec-992ee88f1e6a",
 | |
|           "choices": [
 | |
|             {
 | |
|               "delta": {
 | |
|                 "content": " better",
 | |
|                 "function_call": null,
 | |
|                 "refusal": null,
 | |
|                 "role": null,
 | |
|                 "tool_calls": null
 | |
|               },
 | |
|               "finish_reason": null,
 | |
|               "index": 0,
 | |
|               "logprobs": null
 | |
|             }
 | |
|           ],
 | |
|           "created": 0,
 | |
|           "model": "gpt-4o-2024-08-06",
 | |
|           "object": "chat.completion.chunk",
 | |
|           "service_tier": "default",
 | |
|           "system_fingerprint": "fp_f64f290af2",
 | |
|           "usage": null,
 | |
|           "obfuscation": "ogA5kvz8y"
 | |
|         }
 | |
|       },
 | |
|       {
 | |
|         "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
 | |
|         "__data__": {
 | |
|           "id": "rec-992ee88f1e6a",
 | |
|           "choices": [
 | |
|             {
 | |
|               "delta": {
 | |
|                 "content": " than",
 | |
|                 "function_call": null,
 | |
|                 "refusal": null,
 | |
|                 "role": null,
 | |
|                 "tool_calls": null
 | |
|               },
 | |
|               "finish_reason": null,
 | |
|               "index": 0,
 | |
|               "logprobs": null
 | |
|             }
 | |
|           ],
 | |
|           "created": 0,
 | |
|           "model": "gpt-4o-2024-08-06",
 | |
|           "object": "chat.completion.chunk",
 | |
|           "service_tier": "default",
 | |
|           "system_fingerprint": "fp_f64f290af2",
 | |
|           "usage": null,
 | |
|           "obfuscation": "WAQ0Z3YMuTq"
 | |
|         }
 | |
|       },
 | |
|       {
 | |
|         "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
 | |
|         "__data__": {
 | |
|           "id": "rec-992ee88f1e6a",
 | |
|           "choices": [
 | |
|             {
 | |
|               "delta": {
 | |
|                 "content": " rain",
 | |
|                 "function_call": null,
 | |
|                 "refusal": null,
 | |
|                 "role": null,
 | |
|                 "tool_calls": null
 | |
|               },
 | |
|               "finish_reason": null,
 | |
|               "index": 0,
 | |
|               "logprobs": null
 | |
|             }
 | |
|           ],
 | |
|           "created": 0,
 | |
|           "model": "gpt-4o-2024-08-06",
 | |
|           "object": "chat.completion.chunk",
 | |
|           "service_tier": "default",
 | |
|           "system_fingerprint": "fp_f64f290af2",
 | |
|           "usage": null,
 | |
|           "obfuscation": "X4d4j8gL8gE"
 | |
|         }
 | |
|       },
 | |
|       {
 | |
|         "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
 | |
|         "__data__": {
 | |
|           "id": "rec-992ee88f1e6a",
 | |
|           "choices": [
 | |
|             {
 | |
|               "delta": {
 | |
|                 "content": " by",
 | |
|                 "function_call": null,
 | |
|                 "refusal": null,
 | |
|                 "role": null,
 | |
|                 "tool_calls": null
 | |
|               },
 | |
|               "finish_reason": null,
 | |
|               "index": 0,
 | |
|               "logprobs": null
 | |
|             }
 | |
|           ],
 | |
|           "created": 0,
 | |
|           "model": "gpt-4o-2024-08-06",
 | |
|           "object": "chat.completion.chunk",
 | |
|           "service_tier": "default",
 | |
|           "system_fingerprint": "fp_f64f290af2",
 | |
|           "usage": null,
 | |
|           "obfuscation": "WF1Uh1L2BQ63q"
 | |
|         }
 | |
|       },
 | |
|       {
 | |
|         "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
 | |
|         "__data__": {
 | |
|           "id": "rec-992ee88f1e6a",
 | |
|           "choices": [
 | |
|             {
 | |
|               "delta": {
 | |
|                 "content": " many",
 | |
|                 "function_call": null,
 | |
|                 "refusal": null,
 | |
|                 "role": null,
 | |
|                 "tool_calls": null
 | |
|               },
 | |
|               "finish_reason": null,
 | |
|               "index": 0,
 | |
|               "logprobs": null
 | |
|             }
 | |
|           ],
 | |
|           "created": 0,
 | |
|           "model": "gpt-4o-2024-08-06",
 | |
|           "object": "chat.completion.chunk",
 | |
|           "service_tier": "default",
 | |
|           "system_fingerprint": "fp_f64f290af2",
 | |
|           "usage": null,
 | |
|           "obfuscation": "3Un60LZXB8t"
 | |
|         }
 | |
|       },
 | |
|       {
 | |
|         "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
 | |
|         "__data__": {
 | |
|           "id": "rec-992ee88f1e6a",
 | |
|           "choices": [
 | |
|             {
 | |
|               "delta": {
 | |
|                 "content": " people",
 | |
|                 "function_call": null,
 | |
|                 "refusal": null,
 | |
|                 "role": null,
 | |
|                 "tool_calls": null
 | |
|               },
 | |
|               "finish_reason": null,
 | |
|               "index": 0,
 | |
|               "logprobs": null
 | |
|             }
 | |
|           ],
 | |
|           "created": 0,
 | |
|           "model": "gpt-4o-2024-08-06",
 | |
|           "object": "chat.completion.chunk",
 | |
|           "service_tier": "default",
 | |
|           "system_fingerprint": "fp_f64f290af2",
 | |
|           "usage": null,
 | |
|           "obfuscation": "Q3kuKtbSl"
 | |
|         }
 | |
|       },
 | |
|       {
 | |
|         "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
 | |
|         "__data__": {
 | |
|           "id": "rec-992ee88f1e6a",
 | |
|           "choices": [
 | |
|             {
 | |
|               "delta": {
 | |
|                 "content": ",",
 | |
|                 "function_call": null,
 | |
|                 "refusal": null,
 | |
|                 "role": null,
 | |
|                 "tool_calls": null
 | |
|               },
 | |
|               "finish_reason": null,
 | |
|               "index": 0,
 | |
|               "logprobs": null
 | |
|             }
 | |
|           ],
 | |
|           "created": 0,
 | |
|           "model": "gpt-4o-2024-08-06",
 | |
|           "object": "chat.completion.chunk",
 | |
|           "service_tier": "default",
 | |
|           "system_fingerprint": "fp_f64f290af2",
 | |
|           "usage": null,
 | |
|           "obfuscation": "5iGcbV6BOSYZeeQ"
 | |
|         }
 | |
|       },
 | |
|       {
 | |
|         "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
 | |
|         "__data__": {
 | |
|           "id": "rec-992ee88f1e6a",
 | |
|           "choices": [
 | |
|             {
 | |
|               "delta": {
 | |
|                 "content": " but",
 | |
|                 "function_call": null,
 | |
|                 "refusal": null,
 | |
|                 "role": null,
 | |
|                 "tool_calls": null
 | |
|               },
 | |
|               "finish_reason": null,
 | |
|               "index": 0,
 | |
|               "logprobs": null
 | |
|             }
 | |
|           ],
 | |
|           "created": 0,
 | |
|           "model": "gpt-4o-2024-08-06",
 | |
|           "object": "chat.completion.chunk",
 | |
|           "service_tier": "default",
 | |
|           "system_fingerprint": "fp_f64f290af2",
 | |
|           "usage": null,
 | |
|           "obfuscation": "HicvdfCErejz"
 | |
|         }
 | |
|       },
 | |
|       {
 | |
|         "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
 | |
|         "__data__": {
 | |
|           "id": "rec-992ee88f1e6a",
 | |
|           "choices": [
 | |
|             {
 | |
|               "delta": {
 | |
|                 "content": " it",
 | |
|                 "function_call": null,
 | |
|                 "refusal": null,
 | |
|                 "role": null,
 | |
|                 "tool_calls": null
 | |
|               },
 | |
|               "finish_reason": null,
 | |
|               "index": 0,
 | |
|               "logprobs": null
 | |
|             }
 | |
|           ],
 | |
|           "created": 0,
 | |
|           "model": "gpt-4o-2024-08-06",
 | |
|           "object": "chat.completion.chunk",
 | |
|           "service_tier": "default",
 | |
|           "system_fingerprint": "fp_f64f290af2",
 | |
|           "usage": null,
 | |
|           "obfuscation": "FCh9jx1344jFs"
 | |
|         }
 | |
|       },
 | |
|       {
 | |
|         "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
 | |
|         "__data__": {
 | |
|           "id": "rec-992ee88f1e6a",
 | |
|           "choices": [
 | |
|             {
 | |
|               "delta": {
 | |
|                 "content": " depends",
 | |
|                 "function_call": null,
 | |
|                 "refusal": null,
 | |
|                 "role": null,
 | |
|                 "tool_calls": null
 | |
|               },
 | |
|               "finish_reason": null,
 | |
|               "index": 0,
 | |
|               "logprobs": null
 | |
|             }
 | |
|           ],
 | |
|           "created": 0,
 | |
|           "model": "gpt-4o-2024-08-06",
 | |
|           "object": "chat.completion.chunk",
 | |
|           "service_tier": "default",
 | |
|           "system_fingerprint": "fp_f64f290af2",
 | |
|           "usage": null,
 | |
|           "obfuscation": "CZsNptmI"
 | |
|         }
 | |
|       },
 | |
|       {
 | |
|         "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
 | |
|         "__data__": {
 | |
|           "id": "rec-992ee88f1e6a",
 | |
|           "choices": [
 | |
|             {
 | |
|               "delta": {
 | |
|                 "content": " on",
 | |
|                 "function_call": null,
 | |
|                 "refusal": null,
 | |
|                 "role": null,
 | |
|                 "tool_calls": null
 | |
|               },
 | |
|               "finish_reason": null,
 | |
|               "index": 0,
 | |
|               "logprobs": null
 | |
|             }
 | |
|           ],
 | |
|           "created": 0,
 | |
|           "model": "gpt-4o-2024-08-06",
 | |
|           "object": "chat.completion.chunk",
 | |
|           "service_tier": "default",
 | |
|           "system_fingerprint": "fp_f64f290af2",
 | |
|           "usage": null,
 | |
|           "obfuscation": "7hLvrtaCNRn1F"
 | |
|         }
 | |
|       },
 | |
|       {
 | |
|         "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
 | |
|         "__data__": {
 | |
|           "id": "rec-992ee88f1e6a",
 | |
|           "choices": [
 | |
|             {
 | |
|               "delta": {
 | |
|                 "content": " personal",
 | |
|                 "function_call": null,
 | |
|                 "refusal": null,
 | |
|                 "role": null,
 | |
|                 "tool_calls": null
 | |
|               },
 | |
|               "finish_reason": null,
 | |
|               "index": 0,
 | |
|               "logprobs": null
 | |
|             }
 | |
|           ],
 | |
|           "created": 0,
 | |
|           "model": "gpt-4o-2024-08-06",
 | |
|           "object": "chat.completion.chunk",
 | |
|           "service_tier": "default",
 | |
|           "system_fingerprint": "fp_f64f290af2",
 | |
|           "usage": null,
 | |
|           "obfuscation": "hhDgIgf"
 | |
|         }
 | |
|       },
 | |
|       {
 | |
|         "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
 | |
|         "__data__": {
 | |
|           "id": "rec-992ee88f1e6a",
 | |
|           "choices": [
 | |
|             {
 | |
|               "delta": {
 | |
|                 "content": " preference",
 | |
|                 "function_call": null,
 | |
|                 "refusal": null,
 | |
|                 "role": null,
 | |
|                 "tool_calls": null
 | |
|               },
 | |
|               "finish_reason": null,
 | |
|               "index": 0,
 | |
|               "logprobs": null
 | |
|             }
 | |
|           ],
 | |
|           "created": 0,
 | |
|           "model": "gpt-4o-2024-08-06",
 | |
|           "object": "chat.completion.chunk",
 | |
|           "service_tier": "default",
 | |
|           "system_fingerprint": "fp_f64f290af2",
 | |
|           "usage": null,
 | |
|           "obfuscation": "qcTLy"
 | |
|         }
 | |
|       },
 | |
|       {
 | |
|         "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
 | |
|         "__data__": {
 | |
|           "id": "rec-992ee88f1e6a",
 | |
|           "choices": [
 | |
|             {
 | |
|               "delta": {
 | |
|                 "content": ".",
 | |
|                 "function_call": null,
 | |
|                 "refusal": null,
 | |
|                 "role": null,
 | |
|                 "tool_calls": null
 | |
|               },
 | |
|               "finish_reason": null,
 | |
|               "index": 0,
 | |
|               "logprobs": null
 | |
|             }
 | |
|           ],
 | |
|           "created": 0,
 | |
|           "model": "gpt-4o-2024-08-06",
 | |
|           "object": "chat.completion.chunk",
 | |
|           "service_tier": "default",
 | |
|           "system_fingerprint": "fp_f64f290af2",
 | |
|           "usage": null,
 | |
|           "obfuscation": "tN9Hock2cPeTDFH"
 | |
|         }
 | |
|       },
 | |
|       {
 | |
|         "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
 | |
|         "__data__": {
 | |
|           "id": "rec-992ee88f1e6a",
 | |
|           "choices": [
 | |
|             {
 | |
|               "delta": {
 | |
|                 "content": null,
 | |
|                 "function_call": null,
 | |
|                 "refusal": null,
 | |
|                 "role": null,
 | |
|                 "tool_calls": null
 | |
|               },
 | |
|               "finish_reason": "stop",
 | |
|               "index": 0,
 | |
|               "logprobs": null
 | |
|             }
 | |
|           ],
 | |
|           "created": 0,
 | |
|           "model": "gpt-4o-2024-08-06",
 | |
|           "object": "chat.completion.chunk",
 | |
|           "service_tier": "default",
 | |
|           "system_fingerprint": "fp_f64f290af2",
 | |
|           "usage": null,
 | |
|           "obfuscation": "WP93bDpZu5"
 | |
|         }
 | |
|       },
 | |
|       {
 | |
|         "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
 | |
|         "__data__": {
 | |
|           "id": "rec-992ee88f1e6a",
 | |
|           "choices": [],
 | |
|           "created": 0,
 | |
|           "model": "gpt-4o-2024-08-06",
 | |
|           "object": "chat.completion.chunk",
 | |
|           "service_tier": "default",
 | |
|           "system_fingerprint": "fp_f64f290af2",
 | |
|           "usage": {
 | |
|             "completion_tokens": 38,
 | |
|             "prompt_tokens": 125,
 | |
|             "total_tokens": 163,
 | |
|             "completion_tokens_details": {
 | |
|               "accepted_prediction_tokens": 0,
 | |
|               "audio_tokens": 0,
 | |
|               "reasoning_tokens": 0,
 | |
|               "rejected_prediction_tokens": 0
 | |
|             },
 | |
|             "prompt_tokens_details": {
 | |
|               "audio_tokens": 0,
 | |
|               "cached_tokens": 0
 | |
|             }
 | |
|           },
 | |
|           "obfuscation": "7wU9QJodMON54"
 | |
|         }
 | |
|       }
 | |
|     ],
 | |
|     "is_streaming": true
 | |
|   },
 | |
|   "id_normalization_mapping": {}
 | |
| }
 |