mirror of
https://github.com/trycua/computer.git
synced 2026-01-10 07:20:10 -06:00
Added function types
This commit is contained in:
@@ -47,7 +47,9 @@ export type AgentMessage =
|
||||
| AssistantMessage
|
||||
| ReasoningMessage
|
||||
| ComputerCallMessage
|
||||
| ComputerCallOutputMessage;
|
||||
| ComputerCallOutputMessage
|
||||
| FunctionCallMesssage
|
||||
| FunctionCallOutputMessage;
|
||||
// Input message
|
||||
export interface UserMessage {
|
||||
type?: 'message';
|
||||
@@ -78,6 +80,20 @@ export interface ComputerCallOutputMessage {
|
||||
call_id: string;
|
||||
output: ComputerResultContent;
|
||||
}
|
||||
// Output function call
|
||||
export interface FunctionCallMessage {
|
||||
type: 'function_call';
|
||||
call_id: string;
|
||||
status: 'completed' | 'failed' | 'pending';
|
||||
name: string;
|
||||
arguments: string; // JSON dict of kwargs
|
||||
}
|
||||
// Output function call result (always text)
|
||||
export interface FunctionCallOutputMessage {
|
||||
type: 'function_call_output';
|
||||
call_id: string;
|
||||
output: string;
|
||||
}
|
||||
// #endregion
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user