mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-10-14 14:27:58 +00:00
IDs are now deterministic hashes based on request content, and timestamps are normalized to constants, eliminating spurious changes when re-recording tests. ## Changes - Updated `inference_recorder.py` to normalize IDs and timestamps during recording - Added `scripts/normalize_recordings.py` utility to re-normalize existing recordings - Created documentation in `tests/integration/recordings/README.md` - Normalized 350 existing recording files
168 lines
4.7 KiB
JSON
168 lines
4.7 KiB
JSON
{
|
|
"request": {
|
|
"method": "POST",
|
|
"url": "__databricks__/serving-endpoints/v1/chat/completions",
|
|
"headers": {},
|
|
"body": {
|
|
"model": "databricks-meta-llama-3-3-70b-instruct",
|
|
"messages": [
|
|
{
|
|
"role": "user",
|
|
"content": "What's the weather in Tokyo? Use the get_weather function to get the weather."
|
|
}
|
|
],
|
|
"stream": true,
|
|
"tools": [
|
|
{
|
|
"type": "function",
|
|
"function": {
|
|
"name": "get_weather",
|
|
"description": "Get the weather in a given city",
|
|
"parameters": {
|
|
"type": "object",
|
|
"properties": {
|
|
"city": {
|
|
"type": "string",
|
|
"description": "The city to get the weather for"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"endpoint": "/v1/chat/completions",
|
|
"model": "databricks-meta-llama-3-3-70b-instruct"
|
|
},
|
|
"response": {
|
|
"body": [
|
|
{
|
|
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
|
|
"__data__": {
|
|
"id": "rec-e509387fc329",
|
|
"choices": [
|
|
{
|
|
"delta": {
|
|
"content": null,
|
|
"function_call": null,
|
|
"refusal": null,
|
|
"role": "assistant",
|
|
"tool_calls": [
|
|
{
|
|
"index": 0,
|
|
"id": "call_87aed80e-f856-468f-9523-52db3018d83d",
|
|
"function": {
|
|
"arguments": "",
|
|
"name": "get_weather"
|
|
},
|
|
"type": "function"
|
|
}
|
|
]
|
|
},
|
|
"finish_reason": null,
|
|
"index": 0,
|
|
"logprobs": null
|
|
}
|
|
],
|
|
"created": 0,
|
|
"model": "meta-llama-3.3-70b-instruct-121024",
|
|
"object": "chat.completion.chunk",
|
|
"service_tier": null,
|
|
"system_fingerprint": null,
|
|
"usage": {
|
|
"completion_tokens": 15,
|
|
"prompt_tokens": 682,
|
|
"total_tokens": 697,
|
|
"completion_tokens_details": null,
|
|
"prompt_tokens_details": null
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
|
|
"__data__": {
|
|
"id": "rec-e509387fc329",
|
|
"choices": [
|
|
{
|
|
"delta": {
|
|
"content": null,
|
|
"function_call": null,
|
|
"refusal": null,
|
|
"role": null,
|
|
"tool_calls": [
|
|
{
|
|
"index": 0,
|
|
"id": null,
|
|
"function": {
|
|
"arguments": "{ \"city\": \"Tokyo\" }",
|
|
"name": null
|
|
},
|
|
"type": null
|
|
}
|
|
]
|
|
},
|
|
"finish_reason": null,
|
|
"index": 0,
|
|
"logprobs": null
|
|
}
|
|
],
|
|
"created": 0,
|
|
"model": "meta-llama-3.3-70b-instruct-121024",
|
|
"object": "chat.completion.chunk",
|
|
"service_tier": null,
|
|
"system_fingerprint": null,
|
|
"usage": {
|
|
"completion_tokens": 15,
|
|
"prompt_tokens": 682,
|
|
"total_tokens": 697,
|
|
"completion_tokens_details": null,
|
|
"prompt_tokens_details": null
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
|
|
"__data__": {
|
|
"id": "rec-e509387fc329",
|
|
"choices": [
|
|
{
|
|
"delta": {
|
|
"content": null,
|
|
"function_call": null,
|
|
"refusal": null,
|
|
"role": null,
|
|
"tool_calls": [
|
|
{
|
|
"index": 0,
|
|
"id": null,
|
|
"function": {
|
|
"arguments": "",
|
|
"name": null
|
|
},
|
|
"type": null
|
|
}
|
|
]
|
|
},
|
|
"finish_reason": "tool_calls",
|
|
"index": 0,
|
|
"logprobs": null
|
|
}
|
|
],
|
|
"created": 0,
|
|
"model": "meta-llama-3.3-70b-instruct-121024",
|
|
"object": "chat.completion.chunk",
|
|
"service_tier": null,
|
|
"system_fingerprint": null,
|
|
"usage": {
|
|
"completion_tokens": 15,
|
|
"prompt_tokens": 682,
|
|
"total_tokens": 697,
|
|
"completion_tokens_details": null,
|
|
"prompt_tokens_details": null
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"is_streaming": true
|
|
}
|
|
}
|