-
Notifications
You must be signed in to change notification settings - Fork 282
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #647 from ibuildthecloud/toolmiss
chore: return missing tool call to LLM, don't fail
- Loading branch information
Showing
9 changed files
with
181 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
`{ | ||
"role": "assistant", | ||
"content": [ | ||
{ | ||
"toolCall": { | ||
"id": "call_1", | ||
"function": { | ||
"name": "not bob" | ||
} | ||
} | ||
} | ||
], | ||
"usage": {} | ||
}` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
`{ | ||
"model": "gpt-4o", | ||
"tools": [ | ||
{ | ||
"function": { | ||
"toolID": "testdata/TestMissingTool/test.gpt:Bob", | ||
"name": "Bob", | ||
"parameters": null | ||
} | ||
} | ||
], | ||
"messages": [ | ||
{ | ||
"role": "system", | ||
"content": [ | ||
{ | ||
"text": "Call tool Bob" | ||
} | ||
], | ||
"usage": {} | ||
}, | ||
{ | ||
"role": "user", | ||
"content": [ | ||
{ | ||
"text": "Input 1" | ||
} | ||
], | ||
"usage": {} | ||
} | ||
] | ||
}` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
`{ | ||
"role": "assistant", | ||
"content": [ | ||
{ | ||
"text": "TEST RESULT CALL: 2" | ||
} | ||
], | ||
"usage": {} | ||
}` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
`{ | ||
"model": "gpt-4o", | ||
"tools": [ | ||
{ | ||
"function": { | ||
"toolID": "testdata/TestMissingTool/test.gpt:Bob", | ||
"name": "Bob", | ||
"parameters": null | ||
} | ||
} | ||
], | ||
"messages": [ | ||
{ | ||
"role": "system", | ||
"content": [ | ||
{ | ||
"text": "Call tool Bob" | ||
} | ||
], | ||
"usage": {} | ||
}, | ||
{ | ||
"role": "user", | ||
"content": [ | ||
{ | ||
"text": "Input 1" | ||
} | ||
], | ||
"usage": {} | ||
}, | ||
{ | ||
"role": "assistant", | ||
"content": [ | ||
{ | ||
"toolCall": { | ||
"id": "call_1", | ||
"function": { | ||
"name": "not bob" | ||
} | ||
} | ||
} | ||
], | ||
"usage": {} | ||
}, | ||
{ | ||
"role": "tool", | ||
"content": [ | ||
{ | ||
"text": "ERROR: can not call unknown tool named [not bob]" | ||
} | ||
], | ||
"toolCall": { | ||
"id": "call_1", | ||
"function": { | ||
"name": "not bob" | ||
} | ||
}, | ||
"usage": {} | ||
} | ||
] | ||
}` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
tools: Bob | ||
|
||
Call tool Bob | ||
|
||
--- | ||
name: Bob | ||
|
||
#!sys.echo | ||
|
||
You called? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters