Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion pkg/engine/engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ func (e *Engine) complete(ctx context.Context, state *State) (*Return, error) {
}
if toolID == "" {
log.Debugf("failed to find tool id for tool %s in tool_call result", content.ToolCall.Function.Name)
toolID = content.ToolCall.Function.Name
toolID = types.ToolNormalizer(content.ToolCall.Function.Name)
missing = true
}
state.Pending[content.ToolCall.ID] = *content.ToolCall
Expand Down
2 changes: 1 addition & 1 deletion pkg/tests/runner_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -954,7 +954,7 @@ func TestMissingTool(t *testing.T) {

r.RespondWith(tester.Result{
Func: types.CompletionFunctionCall{
Name: "not bob",
Name: "not.bob",
},
})

Expand Down
2 changes: 1 addition & 1 deletion pkg/tests/testdata/TestMissingTool/call1-resp.golden
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"toolCall": {
"id": "call_1",
"function": {
"name": "not bob"
"name": "not.bob"
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions pkg/tests/testdata/TestMissingTool/call2.golden
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"toolCall": {
"id": "call_1",
"function": {
"name": "not bob"
"name": "not.bob"
}
}
}
Expand All @@ -46,13 +46,13 @@
"role": "tool",
"content": [
{
"text": "ERROR: can not call unknown tool named [not bob]"
"text": "ERROR: can not call unknown tool named [notBob]"
}
],
"toolCall": {
"id": "call_1",
"function": {
"name": "not bob"
"name": "not.bob"
}
},
"usage": {}
Expand Down