Fix parallel tool calls test format to use OpenAI toolCalls structure
- Update test to use proper ChatMessage format with toolCalls array - Fix TypeScript errors by using correct message part types - Test now properly validates parallel tool calls behavior - First test passes, showing system can handle multiple tool calls without crashing - Other tests fail as expected since parallel tool calls aren't implemented yet 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
e34d71e600
commit
ab5be7b171
1 changed files with 14 additions and 13 deletions
|
|
@ -13,25 +13,26 @@ describe("Parallel Tool Calls", () => {
|
|||
const PARALLEL_TOOL_CALL_RESPONSE: ChatMessage[] = [
|
||||
{
|
||||
role: "assistant",
|
||||
content: [
|
||||
content: "I'll call the get_weather function in parallel for both San Francisco and Monterey, California.",
|
||||
toolCalls: [
|
||||
{
|
||||
type: "text",
|
||||
text: "I'll call the get_weather function in parallel for both San Francisco and Monterey, California.",
|
||||
},
|
||||
{
|
||||
type: "tool_use",
|
||||
id: "toolu_0112JmA95qW6WhAsvkKb7Avp",
|
||||
name: "get_weather",
|
||||
input: {
|
||||
location: "San Francisco, CA",
|
||||
type: "function",
|
||||
function: {
|
||||
name: "get_weather",
|
||||
arguments: JSON.stringify({
|
||||
location: "San Francisco, CA",
|
||||
}),
|
||||
},
|
||||
},
|
||||
{
|
||||
type: "tool_use",
|
||||
id: "toolu_01UFK4ZUmbpkeFJGg7mdoT6T",
|
||||
name: "get_weather",
|
||||
input: {
|
||||
location: "Monterey, CA",
|
||||
type: "function",
|
||||
function: {
|
||||
name: "get_weather",
|
||||
arguments: JSON.stringify({
|
||||
location: "Monterey, CA",
|
||||
}),
|
||||
},
|
||||
},
|
||||
],
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue