@@ -1536,9 +1536,10 @@ export interface ResponseCustomToolCallOutput {
1536
1536
call_id : string ;
1537
1537
1538
1538
/**
1539
- * The output from the custom tool call generated by your code.
1539
+ * The output from the custom tool call generated by your code. Can be a string or
1540
+ * an list of output content.
1540
1541
*/
1541
- output : string ;
1542
+ output : string | Array < ResponseInputText | ResponseInputImage | ResponseInputFile > ;
1542
1543
1543
1544
/**
1544
1545
* The type of the custom tool call output. Always `custom_tool_call_output`.
@@ -1878,6 +1879,11 @@ export interface ResponseFunctionCallArgumentsDoneEvent {
1878
1879
*/
1879
1880
item_id : string ;
1880
1881
1882
+ /**
1883
+ * The name of the function that was called.
1884
+ */
1885
+ name : string ;
1886
+
1881
1887
/**
1882
1888
* The index of the output item.
1883
1889
*/
@@ -1891,6 +1897,16 @@ export interface ResponseFunctionCallArgumentsDoneEvent {
1891
1897
type : 'response.function_call_arguments.done' ;
1892
1898
}
1893
1899
1900
+ /**
1901
+ * A text input to the model.
1902
+ */
1903
+ export type ResponseFunctionCallOutputItem =
1904
+ | ResponseInputTextContent
1905
+ | ResponseInputImageContent
1906
+ | ResponseInputFileContent ;
1907
+
1908
+ export type ResponseFunctionCallOutputItemList = Array < ResponseFunctionCallOutputItem > ;
1909
+
1894
1910
/**
1895
1911
* A tool call to run a function. See the
1896
1912
* [function calling guide](https://platform.openai.com/docs/guides/function-calling)
@@ -1953,9 +1969,10 @@ export interface ResponseFunctionToolCallOutputItem {
1953
1969
call_id : string ;
1954
1970
1955
1971
/**
1956
- * A JSON string of the output of the function tool call.
1972
+ * The output from the function call generated by your code. Can be a string or an
1973
+ * list of output content.
1957
1974
*/
1958
- output : string ;
1975
+ output : string | Array < ResponseInputText | ResponseInputImage | ResponseInputFile > ;
1959
1976
1960
1977
/**
1961
1978
* The type of the function tool call output. Always `function_call_output`.
@@ -2319,6 +2336,36 @@ export interface ResponseInputFile {
2319
2336
filename ?: string ;
2320
2337
}
2321
2338
2339
+ /**
2340
+ * A file input to the model.
2341
+ */
2342
+ export interface ResponseInputFileContent {
2343
+ /**
2344
+ * The type of the input item. Always `input_file`.
2345
+ */
2346
+ type : 'input_file' ;
2347
+
2348
+ /**
2349
+ * The base64-encoded data of the file to be sent to the model.
2350
+ */
2351
+ file_data ?: string | null ;
2352
+
2353
+ /**
2354
+ * The ID of the file to be sent to the model.
2355
+ */
2356
+ file_id ?: string | null ;
2357
+
2358
+ /**
2359
+ * The URL of the file to be sent to the model.
2360
+ */
2361
+ file_url ?: string | null ;
2362
+
2363
+ /**
2364
+ * The name of the file to be sent to the model.
2365
+ */
2366
+ filename ?: string | null ;
2367
+ }
2368
+
2322
2369
/**
2323
2370
* An image input to the model. Learn about
2324
2371
* [image inputs](https://platform.openai.com/docs/guides/vision).
@@ -2347,6 +2394,34 @@ export interface ResponseInputImage {
2347
2394
image_url ?: string | null ;
2348
2395
}
2349
2396
2397
+ /**
2398
+ * An image input to the model. Learn about
2399
+ * [image inputs](https://platform.openai.com/docs/guides/vision)
2400
+ */
2401
+ export interface ResponseInputImageContent {
2402
+ /**
2403
+ * The type of the input item. Always `input_image`.
2404
+ */
2405
+ type : 'input_image' ;
2406
+
2407
+ /**
2408
+ * The detail level of the image to be sent to the model. One of `high`, `low`, or
2409
+ * `auto`. Defaults to `auto`.
2410
+ */
2411
+ detail ?: 'low' | 'high' | 'auto' | null ;
2412
+
2413
+ /**
2414
+ * The ID of the file to be sent to the model.
2415
+ */
2416
+ file_id ?: string | null ;
2417
+
2418
+ /**
2419
+ * The URL of the image to be sent to the model. A fully qualified URL or base64
2420
+ * encoded image in a data URL.
2421
+ */
2422
+ image_url ?: string | null ;
2423
+ }
2424
+
2350
2425
/**
2351
2426
* A message input to the model with a role indicating instruction following
2352
2427
* hierarchy. Instructions given with the `developer` or `system` role take
@@ -2476,9 +2551,9 @@ export namespace ResponseInputItem {
2476
2551
call_id : string ;
2477
2552
2478
2553
/**
2479
- * A JSON string of the output of the function tool call.
2554
+ * Text, image, or file output of the function tool call.
2480
2555
*/
2481
- output : string ;
2556
+ output : string | ResponsesAPI . ResponseFunctionCallOutputItemList ;
2482
2557
2483
2558
/**
2484
2559
* The type of the function tool call output. Always `function_call_output`.
@@ -2838,6 +2913,21 @@ export interface ResponseInputText {
2838
2913
type : 'input_text' ;
2839
2914
}
2840
2915
2916
+ /**
2917
+ * A text input to the model.
2918
+ */
2919
+ export interface ResponseInputTextContent {
2920
+ /**
2921
+ * The text input to the model.
2922
+ */
2923
+ text : string ;
2924
+
2925
+ /**
2926
+ * The type of the input item. Always `input_text`.
2927
+ */
2928
+ type : 'input_text' ;
2929
+ }
2930
+
2841
2931
/**
2842
2932
* Content item used to generate a response.
2843
2933
*/
@@ -5684,6 +5774,8 @@ export declare namespace Responses {
5684
5774
type ResponseFormatTextJSONSchemaConfig as ResponseFormatTextJSONSchemaConfig ,
5685
5775
type ResponseFunctionCallArgumentsDeltaEvent as ResponseFunctionCallArgumentsDeltaEvent ,
5686
5776
type ResponseFunctionCallArgumentsDoneEvent as ResponseFunctionCallArgumentsDoneEvent ,
5777
+ type ResponseFunctionCallOutputItem as ResponseFunctionCallOutputItem ,
5778
+ type ResponseFunctionCallOutputItemList as ResponseFunctionCallOutputItemList ,
5687
5779
type ResponseFunctionToolCall as ResponseFunctionToolCall ,
5688
5780
type ResponseFunctionToolCallItem as ResponseFunctionToolCallItem ,
5689
5781
type ResponseFunctionToolCallOutputItem as ResponseFunctionToolCallOutputItem ,
@@ -5699,11 +5791,14 @@ export declare namespace Responses {
5699
5791
type ResponseInputAudio as ResponseInputAudio ,
5700
5792
type ResponseInputContent as ResponseInputContent ,
5701
5793
type ResponseInputFile as ResponseInputFile ,
5794
+ type ResponseInputFileContent as ResponseInputFileContent ,
5702
5795
type ResponseInputImage as ResponseInputImage ,
5796
+ type ResponseInputImageContent as ResponseInputImageContent ,
5703
5797
type ResponseInputItem as ResponseInputItem ,
5704
5798
type ResponseInputMessageContentList as ResponseInputMessageContentList ,
5705
5799
type ResponseInputMessageItem as ResponseInputMessageItem ,
5706
5800
type ResponseInputText as ResponseInputText ,
5801
+ type ResponseInputTextContent as ResponseInputTextContent ,
5707
5802
type ResponseItem as ResponseItem ,
5708
5803
type ResponseMcpCallArgumentsDeltaEvent as ResponseMcpCallArgumentsDeltaEvent ,
5709
5804
type ResponseMcpCallArgumentsDoneEvent as ResponseMcpCallArgumentsDoneEvent ,
0 commit comments