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
		
			
				
	
	
		
			120 lines
		
	
	
	
		
			3.3 KiB
		
	
	
	
		
			JSON
		
	
	
	
	
		
			Generated
		
	
	
			
		
		
	
	
			120 lines
		
	
	
	
		
			3.3 KiB
		
	
	
	
		
			JSON
		
	
	
	
	
		
			Generated
		
	
	
| {
 | |
|   "request": {
 | |
|     "method": "POST",
 | |
|     "url": "http://0.0.0.0:11434/v1/v1/chat/completions",
 | |
|     "headers": {},
 | |
|     "body": {
 | |
|       "model": "llama3.2:3b-instruct-fp16",
 | |
|       "messages": [
 | |
|         {
 | |
|           "role": "system",
 | |
|           "content": "You are a helpful assistant"
 | |
|         },
 | |
|         {
 | |
|           "role": "user",
 | |
|           "content": "What is the boiling point of the liquid polyjuice in celsius?"
 | |
|         }
 | |
|       ],
 | |
|       "max_tokens": 512,
 | |
|       "stream": true,
 | |
|       "temperature": 0.0001,
 | |
|       "tool_choice": "auto",
 | |
|       "tools": [
 | |
|         {
 | |
|           "type": "function",
 | |
|           "function": {
 | |
|             "name": "get_boiling_point",
 | |
|             "description": "Returns the boiling point of a liquid in Celcius or Fahrenheit.",
 | |
|             "parameters": {
 | |
|               "type": "object",
 | |
|               "properties": {
 | |
|                 "liquid_name": {
 | |
|                   "type": "string",
 | |
|                   "description": "The name of the liquid"
 | |
|                 },
 | |
|                 "celcius": {
 | |
|                   "type": "boolean",
 | |
|                   "description": "Whether to return the boiling point in Celcius",
 | |
|                   "default": true
 | |
|                 }
 | |
|               },
 | |
|               "required": [
 | |
|                 "liquid_name"
 | |
|               ]
 | |
|             }
 | |
|           }
 | |
|         }
 | |
|       ],
 | |
|       "top_p": 0.9
 | |
|     },
 | |
|     "endpoint": "/v1/chat/completions",
 | |
|     "model": "llama3.2:3b-instruct-fp16"
 | |
|   },
 | |
|   "response": {
 | |
|     "body": [
 | |
|       {
 | |
|         "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
 | |
|         "__data__": {
 | |
|           "id": "rec-1dd3641034a3",
 | |
|           "choices": [
 | |
|             {
 | |
|               "delta": {
 | |
|                 "content": "",
 | |
|                 "function_call": null,
 | |
|                 "refusal": null,
 | |
|                 "role": "assistant",
 | |
|                 "tool_calls": [
 | |
|                   {
 | |
|                     "index": 0,
 | |
|                     "id": "call_88k1yds9",
 | |
|                     "function": {
 | |
|                       "arguments": "{\"celcius\":true,\"liquid_name\":\"polyjuice\"}",
 | |
|                       "name": "get_boiling_point"
 | |
|                     },
 | |
|                     "type": "function"
 | |
|                   }
 | |
|                 ]
 | |
|               },
 | |
|               "finish_reason": null,
 | |
|               "index": 0,
 | |
|               "logprobs": null
 | |
|             }
 | |
|           ],
 | |
|           "created": 0,
 | |
|           "model": "llama3.2:3b-instruct-fp16",
 | |
|           "object": "chat.completion.chunk",
 | |
|           "service_tier": null,
 | |
|           "system_fingerprint": "fp_ollama",
 | |
|           "usage": null
 | |
|         }
 | |
|       },
 | |
|       {
 | |
|         "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
 | |
|         "__data__": {
 | |
|           "id": "rec-1dd3641034a3",
 | |
|           "choices": [
 | |
|             {
 | |
|               "delta": {
 | |
|                 "content": "",
 | |
|                 "function_call": null,
 | |
|                 "refusal": null,
 | |
|                 "role": "assistant",
 | |
|                 "tool_calls": null
 | |
|               },
 | |
|               "finish_reason": "tool_calls",
 | |
|               "index": 0,
 | |
|               "logprobs": null
 | |
|             }
 | |
|           ],
 | |
|           "created": 0,
 | |
|           "model": "llama3.2:3b-instruct-fp16",
 | |
|           "object": "chat.completion.chunk",
 | |
|           "service_tier": null,
 | |
|           "system_fingerprint": "fp_ollama",
 | |
|           "usage": null
 | |
|         }
 | |
|       }
 | |
|     ],
 | |
|     "is_streaming": true
 | |
|   }
 | |
| }
 |