mirror of
https://github.com/ollama/ollama.git
synced 2025-05-11 18:36:41 +02:00
remove unneeded tool calls
This commit is contained in:
parent
a8388beb94
commit
5a83f79afd
3 changed files with 1 additions and 15 deletions
|
@ -181,7 +181,6 @@ The temperature in San Francisco, CA is 70°F and in Toronto, Canada is 20°C.`,
|
|||
|
||||
calls := []api.ToolCall{
|
||||
{
|
||||
Type: "function",
|
||||
Function: function{
|
||||
Name: "get_current_weather",
|
||||
Arguments: map[string]any{
|
||||
|
@ -191,7 +190,6 @@ The temperature in San Francisco, CA is 70°F and in Toronto, Canada is 20°C.`,
|
|||
},
|
||||
},
|
||||
{
|
||||
Type: "function",
|
||||
Function: function{
|
||||
Name: "get_current_weather",
|
||||
Arguments: map[string]any{
|
||||
|
@ -228,11 +226,6 @@ The temperature in San Francisco, CA is 70°F and in Toronto, Canada is 20°C.`,
|
|||
}
|
||||
|
||||
if tt.ok {
|
||||
for i := range actual {
|
||||
// ID is randomly generated so clear it for comparison
|
||||
actual[i].ID = ""
|
||||
}
|
||||
|
||||
if diff := cmp.Diff(actual, calls); diff != "" {
|
||||
t.Errorf("mismatch (-got +want):\n%s", diff)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue