mirror of
				https://github.com/meta-llama/llama-stack.git
				synced 2025-10-29 18:04:09 +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
		
			
				
	
	
		
			89 lines
		
	
	
	
		
			2.4 KiB
		
	
	
	
		
			JSON
		
	
	
	
	
		
			Generated
		
	
	
			
		
		
	
	
			89 lines
		
	
	
	
		
			2.4 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. Michael Jordan was born in 1963. He played basketball for the Chicago Bulls for 15 seasons."
 | |
|         },
 | |
|         {
 | |
|           "role": "user",
 | |
|           "content": "Please give me information about Michael Jordan."
 | |
|         }
 | |
|       ],
 | |
|       "response_format": {
 | |
|         "type": "json_schema",
 | |
|         "json_schema": {
 | |
|           "name": "AnswerFormat",
 | |
|           "schema": {
 | |
|             "properties": {
 | |
|               "first_name": {
 | |
|                 "title": "First Name",
 | |
|                 "type": "string"
 | |
|               },
 | |
|               "last_name": {
 | |
|                 "title": "Last Name",
 | |
|                 "type": "string"
 | |
|               },
 | |
|               "year_of_birth": {
 | |
|                 "title": "Year Of Birth",
 | |
|                 "type": "integer"
 | |
|               }
 | |
|             },
 | |
|             "required": [
 | |
|               "first_name",
 | |
|               "last_name",
 | |
|               "year_of_birth"
 | |
|             ],
 | |
|             "title": "AnswerFormat",
 | |
|             "type": "object"
 | |
|           }
 | |
|         }
 | |
|       },
 | |
|       "stream": false
 | |
|     },
 | |
|     "endpoint": "/v1/chat/completions",
 | |
|     "model": "llama3.2:3b-instruct-fp16"
 | |
|   },
 | |
|   "response": {
 | |
|     "body": {
 | |
|       "__type__": "openai.types.chat.chat_completion.ChatCompletion",
 | |
|       "__data__": {
 | |
|         "id": "rec-239f4768f5aa",
 | |
|         "choices": [
 | |
|           {
 | |
|             "finish_reason": "stop",
 | |
|             "index": 0,
 | |
|             "logprobs": null,
 | |
|             "message": {
 | |
|               "content": "{\"first_name\": \"Michael\", \"last_name\": \"Jordan\", \"year_of_birth\": 1963}",
 | |
|               "refusal": null,
 | |
|               "role": "assistant",
 | |
|               "annotations": null,
 | |
|               "audio": null,
 | |
|               "function_call": null,
 | |
|               "tool_calls": null
 | |
|             }
 | |
|           }
 | |
|         ],
 | |
|         "created": 0,
 | |
|         "model": "llama3.2:3b-instruct-fp16",
 | |
|         "object": "chat.completion",
 | |
|         "service_tier": null,
 | |
|         "system_fingerprint": "fp_ollama",
 | |
|         "usage": {
 | |
|           "completion_tokens": 26,
 | |
|           "prompt_tokens": 60,
 | |
|           "total_tokens": 86,
 | |
|           "completion_tokens_details": null,
 | |
|           "prompt_tokens_details": null
 | |
|         }
 | |
|       }
 | |
|     },
 | |
|     "is_streaming": false
 | |
|   }
 | |
| }
 |