alexhancock/mcp-crate-cleanup (#4885)
This commit is contained in:
@@ -151,7 +151,7 @@ impl AsyncTokenCounter {
|
||||
let tool_call = tool_request.tool_call.as_ref().unwrap();
|
||||
// Note: separators are tokenized with adjacent tokens, keep original for accuracy
|
||||
let text = format!(
|
||||
"{}:{}:{}",
|
||||
"{}:{}:{:?}",
|
||||
tool_request.id, tool_call.name, tool_call.arguments
|
||||
);
|
||||
num_tokens += self.count_tokens(&text);
|
||||
@@ -299,7 +299,7 @@ impl TokenCounter {
|
||||
} else if let Some(tool_request) = content.as_tool_request() {
|
||||
let tool_call = tool_request.tool_call.as_ref().unwrap();
|
||||
let text = format!(
|
||||
"{}:{}:{}",
|
||||
"{}:{}:{:?}",
|
||||
tool_request.id, tool_call.name, tool_call.arguments
|
||||
);
|
||||
num_tokens += self.count_tokens(&text);
|
||||
|
||||
Reference in New Issue
Block a user