mirror of
				https://github.com/meta-llama/llama-stack.git
				synced 2025-10-25 09:05:37 +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
		
			
				
	
	
		
			93 lines
		
	
	
	
		
			2.5 KiB
		
	
	
	
		
			JSON
		
	
	
	
	
		
			Generated
		
	
	
			
		
		
	
	
			93 lines
		
	
	
	
		
			2.5 KiB
		
	
	
	
		
			JSON
		
	
	
	
	
		
			Generated
		
	
	
| {
 | |
|   "request": {
 | |
|     "method": "POST",
 | |
|     "url": "https://api.cerebras.ai/v1/v1/chat/completions",
 | |
|     "headers": {},
 | |
|     "body": {
 | |
|       "model": "llama-3.3-70b",
 | |
|       "messages": [
 | |
|         {
 | |
|           "role": "user",
 | |
|           "content": "What's the weather in Tokyo? Use the get_weather function to get the weather."
 | |
|         }
 | |
|       ],
 | |
|       "stream": false,
 | |
|       "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": "llama-3.3-70b"
 | |
|   },
 | |
|   "response": {
 | |
|     "body": {
 | |
|       "__type__": "openai.types.chat.chat_completion.ChatCompletion",
 | |
|       "__data__": {
 | |
|         "id": "rec-0d3290adae1d",
 | |
|         "choices": [
 | |
|           {
 | |
|             "finish_reason": "tool_calls",
 | |
|             "index": 0,
 | |
|             "logprobs": null,
 | |
|             "message": {
 | |
|               "content": null,
 | |
|               "refusal": null,
 | |
|               "role": "assistant",
 | |
|               "annotations": null,
 | |
|               "audio": null,
 | |
|               "function_call": null,
 | |
|               "tool_calls": [
 | |
|                 {
 | |
|                   "id": "1c40cbc30",
 | |
|                   "function": {
 | |
|                     "arguments": "{\"city\": \"Tokyo\"}",
 | |
|                     "name": "get_weather"
 | |
|                   },
 | |
|                   "type": "function"
 | |
|                 }
 | |
|               ]
 | |
|             }
 | |
|           }
 | |
|         ],
 | |
|         "created": 0,
 | |
|         "model": "llama-3.3-70b",
 | |
|         "object": "chat.completion",
 | |
|         "service_tier": null,
 | |
|         "system_fingerprint": "fp_c5ec625e72d41732d8fd",
 | |
|         "usage": {
 | |
|           "completion_tokens": 12,
 | |
|           "prompt_tokens": 248,
 | |
|           "total_tokens": 260,
 | |
|           "completion_tokens_details": null,
 | |
|           "prompt_tokens_details": {
 | |
|             "audio_tokens": null,
 | |
|             "cached_tokens": 0
 | |
|           }
 | |
|         },
 | |
|         "time_info": {
 | |
|           "queue_time": 0.00041449,
 | |
|           "prompt_time": 0.007237483,
 | |
|           "completion_time": 0.003803105,
 | |
|           "total_time": 0.013348102569580078,
 | |
|           "created": 1758191364
 | |
|         }
 | |
|       }
 | |
|     },
 | |
|     "is_streaming": false
 | |
|   }
 | |
| }
 |