forked from gptscript-ai/gptscript
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add support for tools with only a single agent line and nothin…
…g else
- Loading branch information
1 parent
4f48485
commit 476f4ae
Showing
11 changed files
with
346 additions
and
2 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
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,16 @@ | ||
`{ | ||
"role": "assistant", | ||
"content": [ | ||
{ | ||
"toolCall": { | ||
"index": 0, | ||
"id": "call_1", | ||
"function": { | ||
"name": "agent2", | ||
"arguments": "Agent 2 input" | ||
} | ||
} | ||
} | ||
], | ||
"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,42 @@ | ||
`{ | ||
"model": "gpt-4o", | ||
"internalSystemPrompt": false, | ||
"tools": [ | ||
{ | ||
"function": { | ||
"toolID": "testdata/TestAgentOnly/test.gpt:agent2", | ||
"name": "agent2", | ||
"parameters": { | ||
"properties": { | ||
"defaultPromptParameter": { | ||
"description": "Prompt to send to the assistant. This may be an instruction or question.", | ||
"type": "string" | ||
} | ||
}, | ||
"type": "object" | ||
} | ||
} | ||
} | ||
], | ||
"messages": [ | ||
{ | ||
"role": "system", | ||
"content": [ | ||
{ | ||
"text": "I am agent1" | ||
} | ||
], | ||
"usage": {} | ||
}, | ||
{ | ||
"role": "user", | ||
"content": [ | ||
{ | ||
"text": "Input 1" | ||
} | ||
], | ||
"usage": {} | ||
} | ||
], | ||
"chat": true | ||
}` |
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,57 @@ | ||
`{ | ||
"model": "gpt-4o", | ||
"internalSystemPrompt": false, | ||
"tools": [ | ||
{ | ||
"function": { | ||
"toolID": "testdata/TestAgentOnly/test.gpt:agent1", | ||
"name": "agent1", | ||
"parameters": { | ||
"properties": { | ||
"defaultPromptParameter": { | ||
"description": "Prompt to send to the assistant. This may be an instruction or question.", | ||
"type": "string" | ||
} | ||
}, | ||
"type": "object" | ||
} | ||
} | ||
}, | ||
{ | ||
"function": { | ||
"toolID": "testdata/TestAgentOnly/test.gpt:agent3", | ||
"name": "agent3", | ||
"parameters": { | ||
"properties": { | ||
"defaultPromptParameter": { | ||
"description": "Prompt to send to the assistant. This may be an instruction or question.", | ||
"type": "string" | ||
} | ||
}, | ||
"type": "object" | ||
} | ||
} | ||
} | ||
], | ||
"messages": [ | ||
{ | ||
"role": "system", | ||
"content": [ | ||
{ | ||
"text": "I am agent2" | ||
} | ||
], | ||
"usage": {} | ||
}, | ||
{ | ||
"role": "user", | ||
"content": [ | ||
{ | ||
"text": "Agent 2 input" | ||
} | ||
], | ||
"usage": {} | ||
} | ||
], | ||
"chat": true | ||
}` |
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,168 @@ | ||
`{ | ||
"done": false, | ||
"content": "TEST RESULT CALL: 2", | ||
"toolID": "testdata/TestAgentOnly/test.gpt:agent2", | ||
"state": { | ||
"continuation": { | ||
"state": { | ||
"input": "Input 1", | ||
"completion": { | ||
"model": "gpt-4o", | ||
"internalSystemPrompt": false, | ||
"tools": [ | ||
{ | ||
"function": { | ||
"toolID": "testdata/TestAgentOnly/test.gpt:agent2", | ||
"name": "agent2", | ||
"parameters": { | ||
"properties": { | ||
"defaultPromptParameter": { | ||
"description": "Prompt to send to the assistant. This may be an instruction or question.", | ||
"type": "string" | ||
} | ||
}, | ||
"type": "object" | ||
} | ||
} | ||
} | ||
], | ||
"messages": [ | ||
{ | ||
"role": "system", | ||
"content": [ | ||
{ | ||
"text": "I am agent1" | ||
} | ||
], | ||
"usage": {} | ||
}, | ||
{ | ||
"role": "user", | ||
"content": [ | ||
{ | ||
"text": "Input 1" | ||
} | ||
], | ||
"usage": {} | ||
}, | ||
{ | ||
"role": "assistant", | ||
"content": [ | ||
{ | ||
"toolCall": { | ||
"index": 0, | ||
"id": "call_1", | ||
"function": { | ||
"name": "agent2", | ||
"arguments": "Agent 2 input" | ||
} | ||
} | ||
} | ||
], | ||
"usage": {} | ||
} | ||
], | ||
"chat": true | ||
}, | ||
"pending": { | ||
"call_1": { | ||
"index": 0, | ||
"id": "call_1", | ||
"function": { | ||
"name": "agent2", | ||
"arguments": "Agent 2 input" | ||
} | ||
} | ||
} | ||
}, | ||
"calls": { | ||
"call_1": { | ||
"toolID": "testdata/TestAgentOnly/test.gpt:agent2", | ||
"input": "Agent 2 input" | ||
} | ||
} | ||
}, | ||
"subCalls": [ | ||
{ | ||
"toolId": "testdata/TestAgentOnly/test.gpt:agent2", | ||
"callId": "call_1", | ||
"state": { | ||
"continuation": { | ||
"state": { | ||
"input": "Agent 2 input", | ||
"completion": { | ||
"model": "gpt-4o", | ||
"internalSystemPrompt": false, | ||
"tools": [ | ||
{ | ||
"function": { | ||
"toolID": "testdata/TestAgentOnly/test.gpt:agent1", | ||
"name": "agent1", | ||
"parameters": { | ||
"properties": { | ||
"defaultPromptParameter": { | ||
"description": "Prompt to send to the assistant. This may be an instruction or question.", | ||
"type": "string" | ||
} | ||
}, | ||
"type": "object" | ||
} | ||
} | ||
}, | ||
{ | ||
"function": { | ||
"toolID": "testdata/TestAgentOnly/test.gpt:agent3", | ||
"name": "agent3", | ||
"parameters": { | ||
"properties": { | ||
"defaultPromptParameter": { | ||
"description": "Prompt to send to the assistant. This may be an instruction or question.", | ||
"type": "string" | ||
} | ||
}, | ||
"type": "object" | ||
} | ||
} | ||
} | ||
], | ||
"messages": [ | ||
{ | ||
"role": "system", | ||
"content": [ | ||
{ | ||
"text": "I am agent2" | ||
} | ||
], | ||
"usage": {} | ||
}, | ||
{ | ||
"role": "user", | ||
"content": [ | ||
{ | ||
"text": "Agent 2 input" | ||
} | ||
], | ||
"usage": {} | ||
}, | ||
{ | ||
"role": "assistant", | ||
"content": [ | ||
{ | ||
"text": "TEST RESULT CALL: 2" | ||
} | ||
], | ||
"usage": {} | ||
} | ||
], | ||
"chat": true | ||
} | ||
}, | ||
"result": "TEST RESULT CALL: 2" | ||
}, | ||
"continuationToolID": "testdata/TestAgentOnly/test.gpt:agent2" | ||
} | ||
} | ||
], | ||
"subCallID": "call_1" | ||
} | ||
}` |
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,20 @@ | ||
agents: agent1, agent2 | ||
|
||
---- | ||
name: agent1 | ||
chat: true | ||
|
||
I am agent1 | ||
|
||
---- | ||
name: agent2 | ||
chat: true | ||
agents: agent3 | ||
|
||
I am agent2 | ||
|
||
--- | ||
name: agent3 | ||
chat: true | ||
|
||
I am agent3 |
Oops, something went wrong.