mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-14 08:52:37 +00:00
update normalization for tool call ids
This commit is contained in:
parent
6f1afabcdc
commit
b630988d0d
342 changed files with 8473 additions and 8476 deletions
|
|
@ -90,11 +90,8 @@ def normalize_recording_file(file_path: Path, dry_run: bool = False) -> bool:
|
|||
modified = False
|
||||
old_recording = json.dumps(recording, sort_keys=True)
|
||||
|
||||
# Normalize request body (for tool_call_ids in message history)
|
||||
if "request" in recording and "body" in recording["request"]:
|
||||
request_body = recording["request"]["body"]
|
||||
counter = {"count": 0, "tool_response_count": 0}
|
||||
normalize_tool_call_ids(request_body, request_hash, counter)
|
||||
# NOTE: We do NOT normalize request body here because that would change the request hash
|
||||
# and break recording lookups. The recorder will normalize tool_call_ids in future recordings.
|
||||
|
||||
# Normalize response body
|
||||
if "response" in recording and "body" in recording["response"]:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue