File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ ' @openai/agents-realtime ' : patch
3+ ' @openai/agents-core ' : patch
4+ ---
5+
6+ feat: Fix #412 add optional details data to function tool execution
Original file line number Diff line number Diff line change @@ -68,7 +68,7 @@ export type FunctionTool<
6868 invoke : (
6969 runContext : RunContext < Context > ,
7070 input : string ,
71- details : { toolCall : protocol . FunctionCallItem } ,
71+ details ? : { toolCall : protocol . FunctionCallItem } ,
7272 ) => Promise < string | Result > ;
7373
7474 /**
@@ -594,7 +594,7 @@ export function tool<
594594 async function _invoke (
595595 runContext : RunContext < Context > ,
596596 input : string ,
597- details : { toolCall : protocol . FunctionCallItem } ,
597+ details ? : { toolCall : protocol . FunctionCallItem } ,
598598 ) : Promise < Result > {
599599 const [ error , parsed ] = await safeExecute ( ( ) => parser ( input ) ) ;
600600 if ( error !== null ) {
@@ -627,7 +627,7 @@ export function tool<
627627 async function invoke (
628628 runContext : RunContext < Context > ,
629629 input : string ,
630- details : { toolCall : protocol . FunctionCallItem } ,
630+ details ? : { toolCall : protocol . FunctionCallItem } ,
631631 ) : Promise < string | Result > {
632632 return _invoke ( runContext , input , details ) . catch < string > ( ( error ) => {
633633 if ( toolErrorFunction ) {
You can’t perform that action at this time.
0 commit comments