Skip to content

Commit b020b1c

Browse files
authored
Update token_estimator.py
1 parent 7ce9108 commit b020b1c

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

python_agent_harness/token_estimator.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77

88
from __future__ import annotations
99

10+
import json
11+
1012
from . import config
1113

1214

@@ -116,7 +118,7 @@ def payload_text(system: object, messages: list[dict], tools: list[dict]) -> str
116118
if isinstance(args, str):
117119
buf.append(args)
118120
for tool in tools:
119-
buf.append(str(tool))
121+
buf.append(json.dumps(tool, separators=(",", ":")))
120122
return "\n".join(buf)
121123

122124

0 commit comments

Comments
 (0)