Skip to content

Fix tool_call_accuracy evaluator sample format causing "Tool definition not found" error #41620

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -458,33 +458,32 @@ def evaluation_evaluate_classes_methods(self):
tool_call_accuracy_evaluator(
query="How is the weather in New York?",
response="The weather in New York is sunny.",
tool_calls={
"type": "tool_call",
"tool_call": {
"id": "call_eYtq7fMyHxDWIgeG2s26h0lJ",
"type": "function",
"function": {
"name": "fetch_weather",
"arguments": {
"location": "New York"
}
tool_calls=[
{
"type": "tool_call",
"tool_call_id": "call_eYtq7fMyHxDWIgeG2s26h0lJ",
"name": "fetch_weather",
"arguments": {
"location": "New York"
}
}
},
tool_definitions={
"id": "fetch_weather",
"name": "fetch_weather",
"description": "Fetches the weather information for the specified location.",
"parameters": {
"type": "object",
"properties": {
"location": {
"type": "string",
"description": "The location to fetch weather for."
],
tool_definitions=[
{
"name": "fetch_weather",
"type": "function",
"description": "Fetches the weather information for the specified location.",
"parameters": {
"type": "object",
"properties": {
"location": {
"type": "string",
"description": "The location to fetch weather for."
}
}
}
}
}
]
)
# [END tool_call_accuracy_evaluator]

Expand Down