llama-stack-client 0.2.18-rc1 → 0.2.19-rc1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +26 -0
- package/index.d.mts +12 -11
- package/index.d.ts +12 -11
- package/index.d.ts.map +1 -1
- package/index.js +3 -0
- package/index.js.map +1 -1
- package/index.mjs +6 -3
- package/index.mjs.map +1 -1
- package/package.json +4 -1
- package/pagination.d.ts +19 -0
- package/pagination.d.ts.map +1 -1
- package/pagination.js +42 -1
- package/pagination.js.map +1 -1
- package/pagination.mjs +40 -0
- package/pagination.mjs.map +1 -1
- package/resources/chat/chat.d.ts +2 -2
- package/resources/chat/chat.d.ts.map +1 -1
- package/resources/chat/chat.js +1 -0
- package/resources/chat/chat.js.map +1 -1
- package/resources/chat/chat.mjs +2 -1
- package/resources/chat/chat.mjs.map +1 -1
- package/resources/chat/completions.d.ts +414 -446
- package/resources/chat/completions.d.ts.map +1 -1
- package/resources/chat/completions.js +7 -2
- package/resources/chat/completions.js.map +1 -1
- package/resources/chat/completions.mjs +5 -1
- package/resources/chat/completions.mjs.map +1 -1
- package/resources/chat/index.d.ts +1 -1
- package/resources/chat/index.d.ts.map +1 -1
- package/resources/chat/index.js +2 -1
- package/resources/chat/index.js.map +1 -1
- package/resources/chat/index.mjs +1 -1
- package/resources/chat/index.mjs.map +1 -1
- package/resources/files.d.ts +10 -19
- package/resources/files.d.ts.map +1 -1
- package/resources/files.js +7 -2
- package/resources/files.js.map +1 -1
- package/resources/files.mjs +5 -1
- package/resources/files.mjs.map +1 -1
- package/resources/index.d.ts +4 -4
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +4 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +3 -3
- package/resources/index.mjs.map +1 -1
- package/resources/inference.d.ts +2 -38
- package/resources/inference.d.ts.map +1 -1
- package/resources/moderations.d.ts +1 -5
- package/resources/moderations.d.ts.map +1 -1
- package/resources/responses/index.d.ts +1 -1
- package/resources/responses/index.d.ts.map +1 -1
- package/resources/responses/index.js +2 -1
- package/resources/responses/index.js.map +1 -1
- package/resources/responses/index.mjs +1 -1
- package/resources/responses/index.mjs.map +1 -1
- package/resources/responses/input-items.d.ts +30 -3
- package/resources/responses/input-items.d.ts.map +1 -1
- package/resources/responses/responses.d.ts +604 -470
- package/resources/responses/responses.d.ts.map +1 -1
- package/resources/responses/responses.js +10 -2
- package/resources/responses/responses.js.map +1 -1
- package/resources/responses/responses.mjs +8 -1
- package/resources/responses/responses.mjs.map +1 -1
- package/resources/scoring-functions.d.ts +12 -3
- package/resources/scoring-functions.d.ts.map +1 -1
- package/resources/scoring-functions.js.map +1 -1
- package/resources/scoring-functions.mjs.map +1 -1
- package/resources/shared.d.ts +19 -28
- package/resources/shared.d.ts.map +1 -1
- package/resources/telemetry.d.ts +98 -1
- package/resources/telemetry.d.ts.map +1 -1
- package/resources/telemetry.js +6 -0
- package/resources/telemetry.js.map +1 -1
- package/resources/telemetry.mjs +6 -0
- package/resources/telemetry.mjs.map +1 -1
- package/resources/vector-stores/files.d.ts +7 -39
- package/resources/vector-stores/files.d.ts.map +1 -1
- package/resources/vector-stores/files.js +7 -2
- package/resources/vector-stores/files.js.map +1 -1
- package/resources/vector-stores/files.mjs +5 -1
- package/resources/vector-stores/files.mjs.map +1 -1
- package/resources/vector-stores/index.d.ts +2 -2
- package/resources/vector-stores/index.d.ts.map +1 -1
- package/resources/vector-stores/index.js +3 -1
- package/resources/vector-stores/index.js.map +1 -1
- package/resources/vector-stores/index.mjs +2 -2
- package/resources/vector-stores/index.mjs.map +1 -1
- package/resources/vector-stores/vector-stores.d.ts +9 -16
- package/resources/vector-stores/vector-stores.d.ts.map +1 -1
- package/resources/vector-stores/vector-stores.js +11 -2
- package/resources/vector-stores/vector-stores.js.map +1 -1
- package/resources/vector-stores/vector-stores.mjs +10 -2
- package/resources/vector-stores/vector-stores.mjs.map +1 -1
- package/src/index.ts +27 -3
- package/src/pagination.ts +70 -0
- package/src/resources/chat/chat.ts +3 -0
- package/src/resources/chat/completions.ts +483 -510
- package/src/resources/chat/index.ts +1 -0
- package/src/resources/files.ts +14 -22
- package/src/resources/index.ts +5 -0
- package/src/resources/inference.ts +2 -44
- package/src/resources/moderations.ts +1 -5
- package/src/resources/responses/index.ts +1 -0
- package/src/resources/responses/input-items.ts +33 -1
- package/src/resources/responses/responses.ts +700 -532
- package/src/resources/scoring-functions.ts +34 -3
- package/src/resources/shared.ts +22 -43
- package/src/resources/telemetry.ts +128 -0
- package/src/resources/vector-stores/files.ts +18 -48
- package/src/resources/vector-stores/index.ts +2 -1
- package/src/resources/vector-stores/vector-stores.ts +16 -19
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -7,6 +7,7 @@ import * as Core from '../../core';
|
|
|
7
7
|
import * as ResponsesAPI from './responses';
|
|
8
8
|
import * as InputItemsAPI from './input-items';
|
|
9
9
|
import { InputItemListParams, InputItemListResponse, InputItems } from './input-items';
|
|
10
|
+
import { OpenAICursorPage, type OpenAICursorPageParams } from '../../pagination';
|
|
10
11
|
import { Stream } from '../../streaming';
|
|
11
12
|
|
|
12
13
|
export class Responses extends APIResource {
|
|
@@ -45,19 +46,29 @@ export class Responses extends APIResource {
|
|
|
45
46
|
/**
|
|
46
47
|
* List all OpenAI responses.
|
|
47
48
|
*/
|
|
48
|
-
list(
|
|
49
|
-
|
|
49
|
+
list(
|
|
50
|
+
query?: ResponseListParams,
|
|
51
|
+
options?: Core.RequestOptions,
|
|
52
|
+
): Core.PagePromise<ResponseListResponsesOpenAICursorPage, ResponseListResponse>;
|
|
53
|
+
list(
|
|
54
|
+
options?: Core.RequestOptions,
|
|
55
|
+
): Core.PagePromise<ResponseListResponsesOpenAICursorPage, ResponseListResponse>;
|
|
50
56
|
list(
|
|
51
57
|
query: ResponseListParams | Core.RequestOptions = {},
|
|
52
58
|
options?: Core.RequestOptions,
|
|
53
|
-
): Core.
|
|
59
|
+
): Core.PagePromise<ResponseListResponsesOpenAICursorPage, ResponseListResponse> {
|
|
54
60
|
if (isRequestOptions(query)) {
|
|
55
61
|
return this.list({}, query);
|
|
56
62
|
}
|
|
57
|
-
return this._client.
|
|
63
|
+
return this._client.getAPIList('/v1/openai/v1/responses', ResponseListResponsesOpenAICursorPage, {
|
|
64
|
+
query,
|
|
65
|
+
...options,
|
|
66
|
+
});
|
|
58
67
|
}
|
|
59
68
|
}
|
|
60
69
|
|
|
70
|
+
export class ResponseListResponsesOpenAICursorPage extends OpenAICursorPage<ResponseListResponse> {}
|
|
71
|
+
|
|
61
72
|
/**
|
|
62
73
|
* Complete OpenAI response object containing generation results and metadata.
|
|
63
74
|
*/
|
|
@@ -340,7 +351,39 @@ export namespace ResponseObject {
|
|
|
340
351
|
/**
|
|
341
352
|
* (Optional) Search results returned by the file search operation
|
|
342
353
|
*/
|
|
343
|
-
results?: Array<
|
|
354
|
+
results?: Array<OpenAIResponseOutputMessageFileSearchToolCall.Result>;
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
export namespace OpenAIResponseOutputMessageFileSearchToolCall {
|
|
358
|
+
/**
|
|
359
|
+
* Search results returned by the file search operation.
|
|
360
|
+
*/
|
|
361
|
+
export interface Result {
|
|
362
|
+
/**
|
|
363
|
+
* (Optional) Key-value attributes associated with the file
|
|
364
|
+
*/
|
|
365
|
+
attributes: { [key: string]: boolean | number | string | Array<unknown> | unknown | null };
|
|
366
|
+
|
|
367
|
+
/**
|
|
368
|
+
* Unique identifier of the file containing the result
|
|
369
|
+
*/
|
|
370
|
+
file_id: string;
|
|
371
|
+
|
|
372
|
+
/**
|
|
373
|
+
* Name of the file containing the result
|
|
374
|
+
*/
|
|
375
|
+
filename: string;
|
|
376
|
+
|
|
377
|
+
/**
|
|
378
|
+
* Relevance score for this search result (between 0 and 1)
|
|
379
|
+
*/
|
|
380
|
+
score: number;
|
|
381
|
+
|
|
382
|
+
/**
|
|
383
|
+
* Text content of the search result
|
|
384
|
+
*/
|
|
385
|
+
text: string;
|
|
386
|
+
}
|
|
344
387
|
}
|
|
345
388
|
|
|
346
389
|
/**
|
|
@@ -803,7 +846,39 @@ export namespace ResponseObjectStream {
|
|
|
803
846
|
/**
|
|
804
847
|
* (Optional) Search results returned by the file search operation
|
|
805
848
|
*/
|
|
806
|
-
results?: Array<
|
|
849
|
+
results?: Array<OpenAIResponseOutputMessageFileSearchToolCall.Result>;
|
|
850
|
+
}
|
|
851
|
+
|
|
852
|
+
export namespace OpenAIResponseOutputMessageFileSearchToolCall {
|
|
853
|
+
/**
|
|
854
|
+
* Search results returned by the file search operation.
|
|
855
|
+
*/
|
|
856
|
+
export interface Result {
|
|
857
|
+
/**
|
|
858
|
+
* (Optional) Key-value attributes associated with the file
|
|
859
|
+
*/
|
|
860
|
+
attributes: { [key: string]: boolean | number | string | Array<unknown> | unknown | null };
|
|
861
|
+
|
|
862
|
+
/**
|
|
863
|
+
* Unique identifier of the file containing the result
|
|
864
|
+
*/
|
|
865
|
+
file_id: string;
|
|
866
|
+
|
|
867
|
+
/**
|
|
868
|
+
* Name of the file containing the result
|
|
869
|
+
*/
|
|
870
|
+
filename: string;
|
|
871
|
+
|
|
872
|
+
/**
|
|
873
|
+
* Relevance score for this search result (between 0 and 1)
|
|
874
|
+
*/
|
|
875
|
+
score: number;
|
|
876
|
+
|
|
877
|
+
/**
|
|
878
|
+
* Text content of the search result
|
|
879
|
+
*/
|
|
880
|
+
text: string;
|
|
881
|
+
}
|
|
807
882
|
}
|
|
808
883
|
|
|
809
884
|
/**
|
|
@@ -1165,7 +1240,39 @@ export namespace ResponseObjectStream {
|
|
|
1165
1240
|
/**
|
|
1166
1241
|
* (Optional) Search results returned by the file search operation
|
|
1167
1242
|
*/
|
|
1168
|
-
results?: Array<
|
|
1243
|
+
results?: Array<OpenAIResponseOutputMessageFileSearchToolCall.Result>;
|
|
1244
|
+
}
|
|
1245
|
+
|
|
1246
|
+
export namespace OpenAIResponseOutputMessageFileSearchToolCall {
|
|
1247
|
+
/**
|
|
1248
|
+
* Search results returned by the file search operation.
|
|
1249
|
+
*/
|
|
1250
|
+
export interface Result {
|
|
1251
|
+
/**
|
|
1252
|
+
* (Optional) Key-value attributes associated with the file
|
|
1253
|
+
*/
|
|
1254
|
+
attributes: { [key: string]: boolean | number | string | Array<unknown> | unknown | null };
|
|
1255
|
+
|
|
1256
|
+
/**
|
|
1257
|
+
* Unique identifier of the file containing the result
|
|
1258
|
+
*/
|
|
1259
|
+
file_id: string;
|
|
1260
|
+
|
|
1261
|
+
/**
|
|
1262
|
+
* Name of the file containing the result
|
|
1263
|
+
*/
|
|
1264
|
+
filename: string;
|
|
1265
|
+
|
|
1266
|
+
/**
|
|
1267
|
+
* Relevance score for this search result (between 0 and 1)
|
|
1268
|
+
*/
|
|
1269
|
+
score: number;
|
|
1270
|
+
|
|
1271
|
+
/**
|
|
1272
|
+
* Text content of the search result
|
|
1273
|
+
*/
|
|
1274
|
+
text: string;
|
|
1275
|
+
}
|
|
1169
1276
|
}
|
|
1170
1277
|
|
|
1171
1278
|
/**
|
|
@@ -1687,765 +1794,797 @@ export namespace ResponseObjectStream {
|
|
|
1687
1794
|
}
|
|
1688
1795
|
|
|
1689
1796
|
/**
|
|
1690
|
-
*
|
|
1797
|
+
* OpenAI response object extended with input context information.
|
|
1691
1798
|
*/
|
|
1692
1799
|
export interface ResponseListResponse {
|
|
1693
1800
|
/**
|
|
1694
|
-
*
|
|
1801
|
+
* Unique identifier for this response
|
|
1802
|
+
*/
|
|
1803
|
+
id: string;
|
|
1804
|
+
|
|
1805
|
+
/**
|
|
1806
|
+
* Unix timestamp when the response was created
|
|
1807
|
+
*/
|
|
1808
|
+
created_at: number;
|
|
1809
|
+
|
|
1810
|
+
/**
|
|
1811
|
+
* List of input items that led to this response
|
|
1812
|
+
*/
|
|
1813
|
+
input: Array<
|
|
1814
|
+
| ResponseListResponse.OpenAIResponseOutputMessageWebSearchToolCall
|
|
1815
|
+
| ResponseListResponse.OpenAIResponseOutputMessageFileSearchToolCall
|
|
1816
|
+
| ResponseListResponse.OpenAIResponseOutputMessageFunctionToolCall
|
|
1817
|
+
| ResponseListResponse.OpenAIResponseInputFunctionToolCallOutput
|
|
1818
|
+
| ResponseListResponse.OpenAIResponseMessage
|
|
1819
|
+
>;
|
|
1820
|
+
|
|
1821
|
+
/**
|
|
1822
|
+
* Model identifier used for generation
|
|
1823
|
+
*/
|
|
1824
|
+
model: string;
|
|
1825
|
+
|
|
1826
|
+
/**
|
|
1827
|
+
* Object type identifier, always "response"
|
|
1828
|
+
*/
|
|
1829
|
+
object: 'response';
|
|
1830
|
+
|
|
1831
|
+
/**
|
|
1832
|
+
* List of generated output items (messages, tool calls, etc.)
|
|
1833
|
+
*/
|
|
1834
|
+
output: Array<
|
|
1835
|
+
| ResponseListResponse.OpenAIResponseMessage
|
|
1836
|
+
| ResponseListResponse.OpenAIResponseOutputMessageWebSearchToolCall
|
|
1837
|
+
| ResponseListResponse.OpenAIResponseOutputMessageFileSearchToolCall
|
|
1838
|
+
| ResponseListResponse.OpenAIResponseOutputMessageFunctionToolCall
|
|
1839
|
+
| ResponseListResponse.OpenAIResponseOutputMessageMcpCall
|
|
1840
|
+
| ResponseListResponse.OpenAIResponseOutputMessageMcpListTools
|
|
1841
|
+
>;
|
|
1842
|
+
|
|
1843
|
+
/**
|
|
1844
|
+
* Whether tool calls can be executed in parallel
|
|
1845
|
+
*/
|
|
1846
|
+
parallel_tool_calls: boolean;
|
|
1847
|
+
|
|
1848
|
+
/**
|
|
1849
|
+
* Current status of the response generation
|
|
1850
|
+
*/
|
|
1851
|
+
status: string;
|
|
1852
|
+
|
|
1853
|
+
/**
|
|
1854
|
+
* Text formatting configuration for the response
|
|
1855
|
+
*/
|
|
1856
|
+
text: ResponseListResponse.Text;
|
|
1857
|
+
|
|
1858
|
+
/**
|
|
1859
|
+
* (Optional) Error details if the response generation failed
|
|
1860
|
+
*/
|
|
1861
|
+
error?: ResponseListResponse.Error;
|
|
1862
|
+
|
|
1863
|
+
/**
|
|
1864
|
+
* (Optional) ID of the previous response in a conversation
|
|
1695
1865
|
*/
|
|
1696
|
-
|
|
1866
|
+
previous_response_id?: string;
|
|
1697
1867
|
|
|
1698
1868
|
/**
|
|
1699
|
-
*
|
|
1869
|
+
* (Optional) Sampling temperature used for generation
|
|
1700
1870
|
*/
|
|
1701
|
-
|
|
1871
|
+
temperature?: number;
|
|
1702
1872
|
|
|
1703
1873
|
/**
|
|
1704
|
-
*
|
|
1874
|
+
* (Optional) Nucleus sampling parameter used for generation
|
|
1705
1875
|
*/
|
|
1706
|
-
|
|
1876
|
+
top_p?: number;
|
|
1707
1877
|
|
|
1708
1878
|
/**
|
|
1709
|
-
*
|
|
1879
|
+
* (Optional) Truncation strategy applied to the response
|
|
1710
1880
|
*/
|
|
1711
|
-
|
|
1881
|
+
truncation?: string;
|
|
1712
1882
|
|
|
1713
1883
|
/**
|
|
1714
|
-
*
|
|
1884
|
+
* (Optional) User identifier associated with the request
|
|
1715
1885
|
*/
|
|
1716
|
-
|
|
1886
|
+
user?: string;
|
|
1717
1887
|
}
|
|
1718
1888
|
|
|
1719
1889
|
export namespace ResponseListResponse {
|
|
1720
1890
|
/**
|
|
1721
|
-
*
|
|
1891
|
+
* Web search tool call output message for OpenAI responses.
|
|
1722
1892
|
*/
|
|
1723
|
-
export interface
|
|
1893
|
+
export interface OpenAIResponseOutputMessageWebSearchToolCall {
|
|
1724
1894
|
/**
|
|
1725
|
-
* Unique identifier for this
|
|
1895
|
+
* Unique identifier for this tool call
|
|
1726
1896
|
*/
|
|
1727
1897
|
id: string;
|
|
1728
1898
|
|
|
1729
1899
|
/**
|
|
1730
|
-
*
|
|
1900
|
+
* Current status of the web search operation
|
|
1731
1901
|
*/
|
|
1732
|
-
|
|
1902
|
+
status: string;
|
|
1733
1903
|
|
|
1734
1904
|
/**
|
|
1735
|
-
*
|
|
1905
|
+
* Tool call type identifier, always "web_search_call"
|
|
1736
1906
|
*/
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
| Data.OpenAIResponseOutputMessageFileSearchToolCall
|
|
1740
|
-
| Data.OpenAIResponseOutputMessageFunctionToolCall
|
|
1741
|
-
| Data.OpenAIResponseInputFunctionToolCallOutput
|
|
1742
|
-
| Data.OpenAIResponseMessage
|
|
1743
|
-
>;
|
|
1907
|
+
type: 'web_search_call';
|
|
1908
|
+
}
|
|
1744
1909
|
|
|
1910
|
+
/**
|
|
1911
|
+
* File search tool call output message for OpenAI responses.
|
|
1912
|
+
*/
|
|
1913
|
+
export interface OpenAIResponseOutputMessageFileSearchToolCall {
|
|
1745
1914
|
/**
|
|
1746
|
-
*
|
|
1915
|
+
* Unique identifier for this tool call
|
|
1747
1916
|
*/
|
|
1748
|
-
|
|
1917
|
+
id: string;
|
|
1749
1918
|
|
|
1750
1919
|
/**
|
|
1751
|
-
*
|
|
1920
|
+
* List of search queries executed
|
|
1752
1921
|
*/
|
|
1753
|
-
|
|
1922
|
+
queries: Array<string>;
|
|
1754
1923
|
|
|
1755
1924
|
/**
|
|
1756
|
-
*
|
|
1925
|
+
* Current status of the file search operation
|
|
1757
1926
|
*/
|
|
1758
|
-
|
|
1759
|
-
| Data.OpenAIResponseMessage
|
|
1760
|
-
| Data.OpenAIResponseOutputMessageWebSearchToolCall
|
|
1761
|
-
| Data.OpenAIResponseOutputMessageFileSearchToolCall
|
|
1762
|
-
| Data.OpenAIResponseOutputMessageFunctionToolCall
|
|
1763
|
-
| Data.OpenAIResponseOutputMessageMcpCall
|
|
1764
|
-
| Data.OpenAIResponseOutputMessageMcpListTools
|
|
1765
|
-
>;
|
|
1927
|
+
status: string;
|
|
1766
1928
|
|
|
1767
1929
|
/**
|
|
1768
|
-
*
|
|
1930
|
+
* Tool call type identifier, always "file_search_call"
|
|
1769
1931
|
*/
|
|
1770
|
-
|
|
1932
|
+
type: 'file_search_call';
|
|
1771
1933
|
|
|
1772
1934
|
/**
|
|
1773
|
-
*
|
|
1935
|
+
* (Optional) Search results returned by the file search operation
|
|
1774
1936
|
*/
|
|
1775
|
-
|
|
1937
|
+
results?: Array<OpenAIResponseOutputMessageFileSearchToolCall.Result>;
|
|
1938
|
+
}
|
|
1776
1939
|
|
|
1940
|
+
export namespace OpenAIResponseOutputMessageFileSearchToolCall {
|
|
1777
1941
|
/**
|
|
1778
|
-
*
|
|
1942
|
+
* Search results returned by the file search operation.
|
|
1779
1943
|
*/
|
|
1780
|
-
|
|
1944
|
+
export interface Result {
|
|
1945
|
+
/**
|
|
1946
|
+
* (Optional) Key-value attributes associated with the file
|
|
1947
|
+
*/
|
|
1948
|
+
attributes: { [key: string]: boolean | number | string | Array<unknown> | unknown | null };
|
|
1949
|
+
|
|
1950
|
+
/**
|
|
1951
|
+
* Unique identifier of the file containing the result
|
|
1952
|
+
*/
|
|
1953
|
+
file_id: string;
|
|
1954
|
+
|
|
1955
|
+
/**
|
|
1956
|
+
* Name of the file containing the result
|
|
1957
|
+
*/
|
|
1958
|
+
filename: string;
|
|
1959
|
+
|
|
1960
|
+
/**
|
|
1961
|
+
* Relevance score for this search result (between 0 and 1)
|
|
1962
|
+
*/
|
|
1963
|
+
score: number;
|
|
1964
|
+
|
|
1965
|
+
/**
|
|
1966
|
+
* Text content of the search result
|
|
1967
|
+
*/
|
|
1968
|
+
text: string;
|
|
1969
|
+
}
|
|
1970
|
+
}
|
|
1781
1971
|
|
|
1972
|
+
/**
|
|
1973
|
+
* Function tool call output message for OpenAI responses.
|
|
1974
|
+
*/
|
|
1975
|
+
export interface OpenAIResponseOutputMessageFunctionToolCall {
|
|
1782
1976
|
/**
|
|
1783
|
-
*
|
|
1977
|
+
* JSON string containing the function arguments
|
|
1784
1978
|
*/
|
|
1785
|
-
|
|
1979
|
+
arguments: string;
|
|
1786
1980
|
|
|
1787
1981
|
/**
|
|
1788
|
-
*
|
|
1982
|
+
* Unique identifier for the function call
|
|
1789
1983
|
*/
|
|
1790
|
-
|
|
1984
|
+
call_id: string;
|
|
1791
1985
|
|
|
1792
1986
|
/**
|
|
1793
|
-
*
|
|
1987
|
+
* Name of the function being called
|
|
1794
1988
|
*/
|
|
1795
|
-
|
|
1989
|
+
name: string;
|
|
1796
1990
|
|
|
1797
1991
|
/**
|
|
1798
|
-
*
|
|
1992
|
+
* Tool call type identifier, always "function_call"
|
|
1799
1993
|
*/
|
|
1800
|
-
|
|
1994
|
+
type: 'function_call';
|
|
1801
1995
|
|
|
1802
1996
|
/**
|
|
1803
|
-
* (Optional)
|
|
1997
|
+
* (Optional) Additional identifier for the tool call
|
|
1804
1998
|
*/
|
|
1805
|
-
|
|
1999
|
+
id?: string;
|
|
1806
2000
|
|
|
1807
2001
|
/**
|
|
1808
|
-
* (Optional)
|
|
2002
|
+
* (Optional) Current status of the function call execution
|
|
1809
2003
|
*/
|
|
1810
|
-
|
|
2004
|
+
status?: string;
|
|
2005
|
+
}
|
|
2006
|
+
|
|
2007
|
+
/**
|
|
2008
|
+
* This represents the output of a function call that gets passed back to the
|
|
2009
|
+
* model.
|
|
2010
|
+
*/
|
|
2011
|
+
export interface OpenAIResponseInputFunctionToolCallOutput {
|
|
2012
|
+
call_id: string;
|
|
2013
|
+
|
|
2014
|
+
output: string;
|
|
2015
|
+
|
|
2016
|
+
type: 'function_call_output';
|
|
2017
|
+
|
|
2018
|
+
id?: string;
|
|
2019
|
+
|
|
2020
|
+
status?: string;
|
|
2021
|
+
}
|
|
2022
|
+
|
|
2023
|
+
/**
|
|
2024
|
+
* Corresponds to the various Message types in the Responses API. They are all
|
|
2025
|
+
* under one type because the Responses API gives them all the same "type" value,
|
|
2026
|
+
* and there is no way to tell them apart in certain scenarios.
|
|
2027
|
+
*/
|
|
2028
|
+
export interface OpenAIResponseMessage {
|
|
2029
|
+
content:
|
|
2030
|
+
| string
|
|
2031
|
+
| Array<
|
|
2032
|
+
| OpenAIResponseMessage.OpenAIResponseInputMessageContentText
|
|
2033
|
+
| OpenAIResponseMessage.OpenAIResponseInputMessageContentImage
|
|
2034
|
+
>
|
|
2035
|
+
| Array<OpenAIResponseMessage.UnionMember2>;
|
|
2036
|
+
|
|
2037
|
+
role: 'system' | 'developer' | 'user' | 'assistant';
|
|
2038
|
+
|
|
2039
|
+
type: 'message';
|
|
2040
|
+
|
|
2041
|
+
id?: string;
|
|
2042
|
+
|
|
2043
|
+
status?: string;
|
|
1811
2044
|
}
|
|
1812
2045
|
|
|
1813
|
-
export namespace
|
|
2046
|
+
export namespace OpenAIResponseMessage {
|
|
1814
2047
|
/**
|
|
1815
|
-
*
|
|
2048
|
+
* Text content for input messages in OpenAI response format.
|
|
1816
2049
|
*/
|
|
1817
|
-
export interface
|
|
1818
|
-
/**
|
|
1819
|
-
* Unique identifier for this tool call
|
|
1820
|
-
*/
|
|
1821
|
-
id: string;
|
|
1822
|
-
|
|
2050
|
+
export interface OpenAIResponseInputMessageContentText {
|
|
1823
2051
|
/**
|
|
1824
|
-
*
|
|
2052
|
+
* The text content of the input message
|
|
1825
2053
|
*/
|
|
1826
|
-
|
|
2054
|
+
text: string;
|
|
1827
2055
|
|
|
1828
2056
|
/**
|
|
1829
|
-
*
|
|
2057
|
+
* Content type identifier, always "input_text"
|
|
1830
2058
|
*/
|
|
1831
|
-
type: '
|
|
2059
|
+
type: 'input_text';
|
|
1832
2060
|
}
|
|
1833
2061
|
|
|
1834
2062
|
/**
|
|
1835
|
-
*
|
|
2063
|
+
* Image content for input messages in OpenAI response format.
|
|
1836
2064
|
*/
|
|
1837
|
-
export interface
|
|
2065
|
+
export interface OpenAIResponseInputMessageContentImage {
|
|
1838
2066
|
/**
|
|
1839
|
-
*
|
|
2067
|
+
* Level of detail for image processing, can be "low", "high", or "auto"
|
|
1840
2068
|
*/
|
|
1841
|
-
|
|
2069
|
+
detail: 'low' | 'high' | 'auto';
|
|
1842
2070
|
|
|
1843
2071
|
/**
|
|
1844
|
-
*
|
|
2072
|
+
* Content type identifier, always "input_image"
|
|
1845
2073
|
*/
|
|
1846
|
-
|
|
2074
|
+
type: 'input_image';
|
|
1847
2075
|
|
|
1848
2076
|
/**
|
|
1849
|
-
*
|
|
2077
|
+
* (Optional) URL of the image content
|
|
1850
2078
|
*/
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
/**
|
|
1854
|
-
* Tool call type identifier, always "file_search_call"
|
|
1855
|
-
*/
|
|
1856
|
-
type: 'file_search_call';
|
|
1857
|
-
|
|
1858
|
-
/**
|
|
1859
|
-
* (Optional) Search results returned by the file search operation
|
|
1860
|
-
*/
|
|
1861
|
-
results?: Array<{ [key: string]: boolean | number | string | Array<unknown> | unknown | null }>;
|
|
2079
|
+
image_url?: string;
|
|
1862
2080
|
}
|
|
1863
2081
|
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
arguments: string;
|
|
1872
|
-
|
|
1873
|
-
/**
|
|
1874
|
-
* Unique identifier for the function call
|
|
1875
|
-
*/
|
|
1876
|
-
call_id: string;
|
|
1877
|
-
|
|
1878
|
-
/**
|
|
1879
|
-
* Name of the function being called
|
|
1880
|
-
*/
|
|
1881
|
-
name: string;
|
|
2082
|
+
export interface UnionMember2 {
|
|
2083
|
+
annotations: Array<
|
|
2084
|
+
| UnionMember2.OpenAIResponseAnnotationFileCitation
|
|
2085
|
+
| UnionMember2.OpenAIResponseAnnotationCitation
|
|
2086
|
+
| UnionMember2.OpenAIResponseAnnotationContainerFileCitation
|
|
2087
|
+
| UnionMember2.OpenAIResponseAnnotationFilePath
|
|
2088
|
+
>;
|
|
1882
2089
|
|
|
1883
|
-
|
|
1884
|
-
* Tool call type identifier, always "function_call"
|
|
1885
|
-
*/
|
|
1886
|
-
type: 'function_call';
|
|
2090
|
+
text: string;
|
|
1887
2091
|
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
*/
|
|
1891
|
-
id?: string;
|
|
2092
|
+
type: 'output_text';
|
|
2093
|
+
}
|
|
1892
2094
|
|
|
2095
|
+
export namespace UnionMember2 {
|
|
1893
2096
|
/**
|
|
1894
|
-
*
|
|
2097
|
+
* File citation annotation for referencing specific files in response content.
|
|
1895
2098
|
*/
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
* model.
|
|
1902
|
-
*/
|
|
1903
|
-
export interface OpenAIResponseInputFunctionToolCallOutput {
|
|
1904
|
-
call_id: string;
|
|
1905
|
-
|
|
1906
|
-
output: string;
|
|
1907
|
-
|
|
1908
|
-
type: 'function_call_output';
|
|
1909
|
-
|
|
1910
|
-
id?: string;
|
|
1911
|
-
|
|
1912
|
-
status?: string;
|
|
1913
|
-
}
|
|
1914
|
-
|
|
1915
|
-
/**
|
|
1916
|
-
* Corresponds to the various Message types in the Responses API. They are all
|
|
1917
|
-
* under one type because the Responses API gives them all the same "type" value,
|
|
1918
|
-
* and there is no way to tell them apart in certain scenarios.
|
|
1919
|
-
*/
|
|
1920
|
-
export interface OpenAIResponseMessage {
|
|
1921
|
-
content:
|
|
1922
|
-
| string
|
|
1923
|
-
| Array<
|
|
1924
|
-
| OpenAIResponseMessage.OpenAIResponseInputMessageContentText
|
|
1925
|
-
| OpenAIResponseMessage.OpenAIResponseInputMessageContentImage
|
|
1926
|
-
>
|
|
1927
|
-
| Array<OpenAIResponseMessage.UnionMember2>;
|
|
1928
|
-
|
|
1929
|
-
role: 'system' | 'developer' | 'user' | 'assistant';
|
|
1930
|
-
|
|
1931
|
-
type: 'message';
|
|
1932
|
-
|
|
1933
|
-
id?: string;
|
|
2099
|
+
export interface OpenAIResponseAnnotationFileCitation {
|
|
2100
|
+
/**
|
|
2101
|
+
* Unique identifier of the referenced file
|
|
2102
|
+
*/
|
|
2103
|
+
file_id: string;
|
|
1934
2104
|
|
|
1935
|
-
|
|
1936
|
-
|
|
2105
|
+
/**
|
|
2106
|
+
* Name of the referenced file
|
|
2107
|
+
*/
|
|
2108
|
+
filename: string;
|
|
1937
2109
|
|
|
1938
|
-
export namespace OpenAIResponseMessage {
|
|
1939
|
-
/**
|
|
1940
|
-
* Text content for input messages in OpenAI response format.
|
|
1941
|
-
*/
|
|
1942
|
-
export interface OpenAIResponseInputMessageContentText {
|
|
1943
2110
|
/**
|
|
1944
|
-
*
|
|
2111
|
+
* Position index of the citation within the content
|
|
1945
2112
|
*/
|
|
1946
|
-
|
|
2113
|
+
index: number;
|
|
1947
2114
|
|
|
1948
2115
|
/**
|
|
1949
|
-
*
|
|
2116
|
+
* Annotation type identifier, always "file_citation"
|
|
1950
2117
|
*/
|
|
1951
|
-
type: '
|
|
2118
|
+
type: 'file_citation';
|
|
1952
2119
|
}
|
|
1953
2120
|
|
|
1954
2121
|
/**
|
|
1955
|
-
*
|
|
2122
|
+
* URL citation annotation for referencing external web resources.
|
|
1956
2123
|
*/
|
|
1957
|
-
export interface
|
|
2124
|
+
export interface OpenAIResponseAnnotationCitation {
|
|
1958
2125
|
/**
|
|
1959
|
-
*
|
|
2126
|
+
* End position of the citation span in the content
|
|
1960
2127
|
*/
|
|
1961
|
-
|
|
2128
|
+
end_index: number;
|
|
1962
2129
|
|
|
1963
2130
|
/**
|
|
1964
|
-
*
|
|
2131
|
+
* Start position of the citation span in the content
|
|
1965
2132
|
*/
|
|
1966
|
-
|
|
2133
|
+
start_index: number;
|
|
1967
2134
|
|
|
1968
2135
|
/**
|
|
1969
|
-
*
|
|
2136
|
+
* Title of the referenced web resource
|
|
1970
2137
|
*/
|
|
1971
|
-
|
|
1972
|
-
}
|
|
1973
|
-
|
|
1974
|
-
export interface UnionMember2 {
|
|
1975
|
-
annotations: Array<
|
|
1976
|
-
| UnionMember2.OpenAIResponseAnnotationFileCitation
|
|
1977
|
-
| UnionMember2.OpenAIResponseAnnotationCitation
|
|
1978
|
-
| UnionMember2.OpenAIResponseAnnotationContainerFileCitation
|
|
1979
|
-
| UnionMember2.OpenAIResponseAnnotationFilePath
|
|
1980
|
-
>;
|
|
1981
|
-
|
|
1982
|
-
text: string;
|
|
1983
|
-
|
|
1984
|
-
type: 'output_text';
|
|
1985
|
-
}
|
|
2138
|
+
title: string;
|
|
1986
2139
|
|
|
1987
|
-
export namespace UnionMember2 {
|
|
1988
2140
|
/**
|
|
1989
|
-
*
|
|
2141
|
+
* Annotation type identifier, always "url_citation"
|
|
1990
2142
|
*/
|
|
1991
|
-
|
|
1992
|
-
/**
|
|
1993
|
-
* Unique identifier of the referenced file
|
|
1994
|
-
*/
|
|
1995
|
-
file_id: string;
|
|
2143
|
+
type: 'url_citation';
|
|
1996
2144
|
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2145
|
+
/**
|
|
2146
|
+
* URL of the referenced web resource
|
|
2147
|
+
*/
|
|
2148
|
+
url: string;
|
|
2149
|
+
}
|
|
2001
2150
|
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
*/
|
|
2005
|
-
index: number;
|
|
2151
|
+
export interface OpenAIResponseAnnotationContainerFileCitation {
|
|
2152
|
+
container_id: string;
|
|
2006
2153
|
|
|
2007
|
-
|
|
2008
|
-
* Annotation type identifier, always "file_citation"
|
|
2009
|
-
*/
|
|
2010
|
-
type: 'file_citation';
|
|
2011
|
-
}
|
|
2154
|
+
end_index: number;
|
|
2012
2155
|
|
|
2013
|
-
|
|
2014
|
-
* URL citation annotation for referencing external web resources.
|
|
2015
|
-
*/
|
|
2016
|
-
export interface OpenAIResponseAnnotationCitation {
|
|
2017
|
-
/**
|
|
2018
|
-
* End position of the citation span in the content
|
|
2019
|
-
*/
|
|
2020
|
-
end_index: number;
|
|
2156
|
+
file_id: string;
|
|
2021
2157
|
|
|
2022
|
-
|
|
2023
|
-
* Start position of the citation span in the content
|
|
2024
|
-
*/
|
|
2025
|
-
start_index: number;
|
|
2158
|
+
filename: string;
|
|
2026
2159
|
|
|
2027
|
-
|
|
2028
|
-
* Title of the referenced web resource
|
|
2029
|
-
*/
|
|
2030
|
-
title: string;
|
|
2160
|
+
start_index: number;
|
|
2031
2161
|
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
*/
|
|
2035
|
-
type: 'url_citation';
|
|
2162
|
+
type: 'container_file_citation';
|
|
2163
|
+
}
|
|
2036
2164
|
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
*/
|
|
2040
|
-
url: string;
|
|
2041
|
-
}
|
|
2165
|
+
export interface OpenAIResponseAnnotationFilePath {
|
|
2166
|
+
file_id: string;
|
|
2042
2167
|
|
|
2043
|
-
|
|
2044
|
-
container_id: string;
|
|
2168
|
+
index: number;
|
|
2045
2169
|
|
|
2046
|
-
|
|
2170
|
+
type: 'file_path';
|
|
2171
|
+
}
|
|
2172
|
+
}
|
|
2173
|
+
}
|
|
2047
2174
|
|
|
2048
|
-
|
|
2175
|
+
/**
|
|
2176
|
+
* Corresponds to the various Message types in the Responses API. They are all
|
|
2177
|
+
* under one type because the Responses API gives them all the same "type" value,
|
|
2178
|
+
* and there is no way to tell them apart in certain scenarios.
|
|
2179
|
+
*/
|
|
2180
|
+
export interface OpenAIResponseMessage {
|
|
2181
|
+
content:
|
|
2182
|
+
| string
|
|
2183
|
+
| Array<
|
|
2184
|
+
| OpenAIResponseMessage.OpenAIResponseInputMessageContentText
|
|
2185
|
+
| OpenAIResponseMessage.OpenAIResponseInputMessageContentImage
|
|
2186
|
+
>
|
|
2187
|
+
| Array<OpenAIResponseMessage.UnionMember2>;
|
|
2049
2188
|
|
|
2050
|
-
|
|
2189
|
+
role: 'system' | 'developer' | 'user' | 'assistant';
|
|
2051
2190
|
|
|
2052
|
-
|
|
2191
|
+
type: 'message';
|
|
2053
2192
|
|
|
2054
|
-
|
|
2055
|
-
}
|
|
2193
|
+
id?: string;
|
|
2056
2194
|
|
|
2057
|
-
|
|
2058
|
-
|
|
2195
|
+
status?: string;
|
|
2196
|
+
}
|
|
2059
2197
|
|
|
2060
|
-
|
|
2198
|
+
export namespace OpenAIResponseMessage {
|
|
2199
|
+
/**
|
|
2200
|
+
* Text content for input messages in OpenAI response format.
|
|
2201
|
+
*/
|
|
2202
|
+
export interface OpenAIResponseInputMessageContentText {
|
|
2203
|
+
/**
|
|
2204
|
+
* The text content of the input message
|
|
2205
|
+
*/
|
|
2206
|
+
text: string;
|
|
2061
2207
|
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2208
|
+
/**
|
|
2209
|
+
* Content type identifier, always "input_text"
|
|
2210
|
+
*/
|
|
2211
|
+
type: 'input_text';
|
|
2065
2212
|
}
|
|
2066
2213
|
|
|
2067
2214
|
/**
|
|
2068
|
-
*
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
| Array<
|
|
2076
|
-
| OpenAIResponseMessage.OpenAIResponseInputMessageContentText
|
|
2077
|
-
| OpenAIResponseMessage.OpenAIResponseInputMessageContentImage
|
|
2078
|
-
>
|
|
2079
|
-
| Array<OpenAIResponseMessage.UnionMember2>;
|
|
2215
|
+
* Image content for input messages in OpenAI response format.
|
|
2216
|
+
*/
|
|
2217
|
+
export interface OpenAIResponseInputMessageContentImage {
|
|
2218
|
+
/**
|
|
2219
|
+
* Level of detail for image processing, can be "low", "high", or "auto"
|
|
2220
|
+
*/
|
|
2221
|
+
detail: 'low' | 'high' | 'auto';
|
|
2080
2222
|
|
|
2081
|
-
|
|
2223
|
+
/**
|
|
2224
|
+
* Content type identifier, always "input_image"
|
|
2225
|
+
*/
|
|
2226
|
+
type: 'input_image';
|
|
2082
2227
|
|
|
2083
|
-
|
|
2228
|
+
/**
|
|
2229
|
+
* (Optional) URL of the image content
|
|
2230
|
+
*/
|
|
2231
|
+
image_url?: string;
|
|
2232
|
+
}
|
|
2084
2233
|
|
|
2085
|
-
|
|
2234
|
+
export interface UnionMember2 {
|
|
2235
|
+
annotations: Array<
|
|
2236
|
+
| UnionMember2.OpenAIResponseAnnotationFileCitation
|
|
2237
|
+
| UnionMember2.OpenAIResponseAnnotationCitation
|
|
2238
|
+
| UnionMember2.OpenAIResponseAnnotationContainerFileCitation
|
|
2239
|
+
| UnionMember2.OpenAIResponseAnnotationFilePath
|
|
2240
|
+
>;
|
|
2086
2241
|
|
|
2087
|
-
|
|
2242
|
+
text: string;
|
|
2243
|
+
|
|
2244
|
+
type: 'output_text';
|
|
2088
2245
|
}
|
|
2089
2246
|
|
|
2090
|
-
export namespace
|
|
2247
|
+
export namespace UnionMember2 {
|
|
2091
2248
|
/**
|
|
2092
|
-
*
|
|
2249
|
+
* File citation annotation for referencing specific files in response content.
|
|
2093
2250
|
*/
|
|
2094
|
-
export interface
|
|
2251
|
+
export interface OpenAIResponseAnnotationFileCitation {
|
|
2095
2252
|
/**
|
|
2096
|
-
*
|
|
2253
|
+
* Unique identifier of the referenced file
|
|
2097
2254
|
*/
|
|
2098
|
-
|
|
2255
|
+
file_id: string;
|
|
2099
2256
|
|
|
2100
2257
|
/**
|
|
2101
|
-
*
|
|
2258
|
+
* Name of the referenced file
|
|
2102
2259
|
*/
|
|
2103
|
-
|
|
2260
|
+
filename: string;
|
|
2261
|
+
|
|
2262
|
+
/**
|
|
2263
|
+
* Position index of the citation within the content
|
|
2264
|
+
*/
|
|
2265
|
+
index: number;
|
|
2266
|
+
|
|
2267
|
+
/**
|
|
2268
|
+
* Annotation type identifier, always "file_citation"
|
|
2269
|
+
*/
|
|
2270
|
+
type: 'file_citation';
|
|
2104
2271
|
}
|
|
2105
2272
|
|
|
2106
2273
|
/**
|
|
2107
|
-
*
|
|
2274
|
+
* URL citation annotation for referencing external web resources.
|
|
2108
2275
|
*/
|
|
2109
|
-
export interface
|
|
2276
|
+
export interface OpenAIResponseAnnotationCitation {
|
|
2110
2277
|
/**
|
|
2111
|
-
*
|
|
2278
|
+
* End position of the citation span in the content
|
|
2112
2279
|
*/
|
|
2113
|
-
|
|
2280
|
+
end_index: number;
|
|
2114
2281
|
|
|
2115
2282
|
/**
|
|
2116
|
-
*
|
|
2283
|
+
* Start position of the citation span in the content
|
|
2117
2284
|
*/
|
|
2118
|
-
|
|
2285
|
+
start_index: number;
|
|
2119
2286
|
|
|
2120
2287
|
/**
|
|
2121
|
-
*
|
|
2288
|
+
* Title of the referenced web resource
|
|
2122
2289
|
*/
|
|
2123
|
-
|
|
2124
|
-
}
|
|
2125
|
-
|
|
2126
|
-
export interface UnionMember2 {
|
|
2127
|
-
annotations: Array<
|
|
2128
|
-
| UnionMember2.OpenAIResponseAnnotationFileCitation
|
|
2129
|
-
| UnionMember2.OpenAIResponseAnnotationCitation
|
|
2130
|
-
| UnionMember2.OpenAIResponseAnnotationContainerFileCitation
|
|
2131
|
-
| UnionMember2.OpenAIResponseAnnotationFilePath
|
|
2132
|
-
>;
|
|
2133
|
-
|
|
2134
|
-
text: string;
|
|
2290
|
+
title: string;
|
|
2135
2291
|
|
|
2136
|
-
|
|
2137
|
-
|
|
2292
|
+
/**
|
|
2293
|
+
* Annotation type identifier, always "url_citation"
|
|
2294
|
+
*/
|
|
2295
|
+
type: 'url_citation';
|
|
2138
2296
|
|
|
2139
|
-
export namespace UnionMember2 {
|
|
2140
2297
|
/**
|
|
2141
|
-
*
|
|
2298
|
+
* URL of the referenced web resource
|
|
2142
2299
|
*/
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
* Unique identifier of the referenced file
|
|
2146
|
-
*/
|
|
2147
|
-
file_id: string;
|
|
2300
|
+
url: string;
|
|
2301
|
+
}
|
|
2148
2302
|
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
*/
|
|
2152
|
-
filename: string;
|
|
2303
|
+
export interface OpenAIResponseAnnotationContainerFileCitation {
|
|
2304
|
+
container_id: string;
|
|
2153
2305
|
|
|
2154
|
-
|
|
2155
|
-
* Position index of the citation within the content
|
|
2156
|
-
*/
|
|
2157
|
-
index: number;
|
|
2306
|
+
end_index: number;
|
|
2158
2307
|
|
|
2159
|
-
|
|
2160
|
-
* Annotation type identifier, always "file_citation"
|
|
2161
|
-
*/
|
|
2162
|
-
type: 'file_citation';
|
|
2163
|
-
}
|
|
2308
|
+
file_id: string;
|
|
2164
2309
|
|
|
2165
|
-
|
|
2166
|
-
* URL citation annotation for referencing external web resources.
|
|
2167
|
-
*/
|
|
2168
|
-
export interface OpenAIResponseAnnotationCitation {
|
|
2169
|
-
/**
|
|
2170
|
-
* End position of the citation span in the content
|
|
2171
|
-
*/
|
|
2172
|
-
end_index: number;
|
|
2310
|
+
filename: string;
|
|
2173
2311
|
|
|
2174
|
-
|
|
2175
|
-
* Start position of the citation span in the content
|
|
2176
|
-
*/
|
|
2177
|
-
start_index: number;
|
|
2312
|
+
start_index: number;
|
|
2178
2313
|
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
*/
|
|
2182
|
-
title: string;
|
|
2314
|
+
type: 'container_file_citation';
|
|
2315
|
+
}
|
|
2183
2316
|
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
*/
|
|
2187
|
-
type: 'url_citation';
|
|
2317
|
+
export interface OpenAIResponseAnnotationFilePath {
|
|
2318
|
+
file_id: string;
|
|
2188
2319
|
|
|
2189
|
-
|
|
2190
|
-
* URL of the referenced web resource
|
|
2191
|
-
*/
|
|
2192
|
-
url: string;
|
|
2193
|
-
}
|
|
2320
|
+
index: number;
|
|
2194
2321
|
|
|
2195
|
-
|
|
2196
|
-
|
|
2322
|
+
type: 'file_path';
|
|
2323
|
+
}
|
|
2324
|
+
}
|
|
2325
|
+
}
|
|
2197
2326
|
|
|
2198
|
-
|
|
2327
|
+
/**
|
|
2328
|
+
* Web search tool call output message for OpenAI responses.
|
|
2329
|
+
*/
|
|
2330
|
+
export interface OpenAIResponseOutputMessageWebSearchToolCall {
|
|
2331
|
+
/**
|
|
2332
|
+
* Unique identifier for this tool call
|
|
2333
|
+
*/
|
|
2334
|
+
id: string;
|
|
2199
2335
|
|
|
2200
|
-
|
|
2336
|
+
/**
|
|
2337
|
+
* Current status of the web search operation
|
|
2338
|
+
*/
|
|
2339
|
+
status: string;
|
|
2201
2340
|
|
|
2202
|
-
|
|
2341
|
+
/**
|
|
2342
|
+
* Tool call type identifier, always "web_search_call"
|
|
2343
|
+
*/
|
|
2344
|
+
type: 'web_search_call';
|
|
2345
|
+
}
|
|
2203
2346
|
|
|
2204
|
-
|
|
2347
|
+
/**
|
|
2348
|
+
* File search tool call output message for OpenAI responses.
|
|
2349
|
+
*/
|
|
2350
|
+
export interface OpenAIResponseOutputMessageFileSearchToolCall {
|
|
2351
|
+
/**
|
|
2352
|
+
* Unique identifier for this tool call
|
|
2353
|
+
*/
|
|
2354
|
+
id: string;
|
|
2205
2355
|
|
|
2206
|
-
|
|
2207
|
-
|
|
2356
|
+
/**
|
|
2357
|
+
* List of search queries executed
|
|
2358
|
+
*/
|
|
2359
|
+
queries: Array<string>;
|
|
2208
2360
|
|
|
2209
|
-
|
|
2210
|
-
|
|
2361
|
+
/**
|
|
2362
|
+
* Current status of the file search operation
|
|
2363
|
+
*/
|
|
2364
|
+
status: string;
|
|
2211
2365
|
|
|
2212
|
-
|
|
2366
|
+
/**
|
|
2367
|
+
* Tool call type identifier, always "file_search_call"
|
|
2368
|
+
*/
|
|
2369
|
+
type: 'file_search_call';
|
|
2213
2370
|
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2371
|
+
/**
|
|
2372
|
+
* (Optional) Search results returned by the file search operation
|
|
2373
|
+
*/
|
|
2374
|
+
results?: Array<OpenAIResponseOutputMessageFileSearchToolCall.Result>;
|
|
2375
|
+
}
|
|
2218
2376
|
|
|
2377
|
+
export namespace OpenAIResponseOutputMessageFileSearchToolCall {
|
|
2219
2378
|
/**
|
|
2220
|
-
*
|
|
2379
|
+
* Search results returned by the file search operation.
|
|
2221
2380
|
*/
|
|
2222
|
-
export interface
|
|
2381
|
+
export interface Result {
|
|
2223
2382
|
/**
|
|
2224
|
-
*
|
|
2383
|
+
* (Optional) Key-value attributes associated with the file
|
|
2225
2384
|
*/
|
|
2226
|
-
|
|
2385
|
+
attributes: { [key: string]: boolean | number | string | Array<unknown> | unknown | null };
|
|
2227
2386
|
|
|
2228
2387
|
/**
|
|
2229
|
-
*
|
|
2388
|
+
* Unique identifier of the file containing the result
|
|
2230
2389
|
*/
|
|
2231
|
-
|
|
2390
|
+
file_id: string;
|
|
2232
2391
|
|
|
2233
2392
|
/**
|
|
2234
|
-
*
|
|
2393
|
+
* Name of the file containing the result
|
|
2235
2394
|
*/
|
|
2236
|
-
|
|
2395
|
+
filename: string;
|
|
2396
|
+
|
|
2397
|
+
/**
|
|
2398
|
+
* Relevance score for this search result (between 0 and 1)
|
|
2399
|
+
*/
|
|
2400
|
+
score: number;
|
|
2401
|
+
|
|
2402
|
+
/**
|
|
2403
|
+
* Text content of the search result
|
|
2404
|
+
*/
|
|
2405
|
+
text: string;
|
|
2237
2406
|
}
|
|
2407
|
+
}
|
|
2408
|
+
|
|
2409
|
+
/**
|
|
2410
|
+
* Function tool call output message for OpenAI responses.
|
|
2411
|
+
*/
|
|
2412
|
+
export interface OpenAIResponseOutputMessageFunctionToolCall {
|
|
2413
|
+
/**
|
|
2414
|
+
* JSON string containing the function arguments
|
|
2415
|
+
*/
|
|
2416
|
+
arguments: string;
|
|
2417
|
+
|
|
2418
|
+
/**
|
|
2419
|
+
* Unique identifier for the function call
|
|
2420
|
+
*/
|
|
2421
|
+
call_id: string;
|
|
2422
|
+
|
|
2423
|
+
/**
|
|
2424
|
+
* Name of the function being called
|
|
2425
|
+
*/
|
|
2426
|
+
name: string;
|
|
2427
|
+
|
|
2428
|
+
/**
|
|
2429
|
+
* Tool call type identifier, always "function_call"
|
|
2430
|
+
*/
|
|
2431
|
+
type: 'function_call';
|
|
2432
|
+
|
|
2433
|
+
/**
|
|
2434
|
+
* (Optional) Additional identifier for the tool call
|
|
2435
|
+
*/
|
|
2436
|
+
id?: string;
|
|
2437
|
+
|
|
2438
|
+
/**
|
|
2439
|
+
* (Optional) Current status of the function call execution
|
|
2440
|
+
*/
|
|
2441
|
+
status?: string;
|
|
2442
|
+
}
|
|
2238
2443
|
|
|
2444
|
+
/**
|
|
2445
|
+
* Model Context Protocol (MCP) call output message for OpenAI responses.
|
|
2446
|
+
*/
|
|
2447
|
+
export interface OpenAIResponseOutputMessageMcpCall {
|
|
2239
2448
|
/**
|
|
2240
|
-
*
|
|
2449
|
+
* Unique identifier for this MCP call
|
|
2241
2450
|
*/
|
|
2242
|
-
|
|
2243
|
-
/**
|
|
2244
|
-
* Unique identifier for this tool call
|
|
2245
|
-
*/
|
|
2246
|
-
id: string;
|
|
2247
|
-
|
|
2248
|
-
/**
|
|
2249
|
-
* List of search queries executed
|
|
2250
|
-
*/
|
|
2251
|
-
queries: Array<string>;
|
|
2451
|
+
id: string;
|
|
2252
2452
|
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2453
|
+
/**
|
|
2454
|
+
* JSON string containing the MCP call arguments
|
|
2455
|
+
*/
|
|
2456
|
+
arguments: string;
|
|
2257
2457
|
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2458
|
+
/**
|
|
2459
|
+
* Name of the MCP method being called
|
|
2460
|
+
*/
|
|
2461
|
+
name: string;
|
|
2262
2462
|
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
}
|
|
2463
|
+
/**
|
|
2464
|
+
* Label identifying the MCP server handling the call
|
|
2465
|
+
*/
|
|
2466
|
+
server_label: string;
|
|
2268
2467
|
|
|
2269
2468
|
/**
|
|
2270
|
-
*
|
|
2469
|
+
* Tool call type identifier, always "mcp_call"
|
|
2271
2470
|
*/
|
|
2272
|
-
|
|
2273
|
-
/**
|
|
2274
|
-
* JSON string containing the function arguments
|
|
2275
|
-
*/
|
|
2276
|
-
arguments: string;
|
|
2471
|
+
type: 'mcp_call';
|
|
2277
2472
|
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2473
|
+
/**
|
|
2474
|
+
* (Optional) Error message if the MCP call failed
|
|
2475
|
+
*/
|
|
2476
|
+
error?: string;
|
|
2282
2477
|
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2478
|
+
/**
|
|
2479
|
+
* (Optional) Output result from the successful MCP call
|
|
2480
|
+
*/
|
|
2481
|
+
output?: string;
|
|
2482
|
+
}
|
|
2287
2483
|
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2484
|
+
/**
|
|
2485
|
+
* MCP list tools output message containing available tools from an MCP server.
|
|
2486
|
+
*/
|
|
2487
|
+
export interface OpenAIResponseOutputMessageMcpListTools {
|
|
2488
|
+
/**
|
|
2489
|
+
* Unique identifier for this MCP list tools operation
|
|
2490
|
+
*/
|
|
2491
|
+
id: string;
|
|
2292
2492
|
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2493
|
+
/**
|
|
2494
|
+
* Label identifying the MCP server providing the tools
|
|
2495
|
+
*/
|
|
2496
|
+
server_label: string;
|
|
2297
2497
|
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
}
|
|
2498
|
+
/**
|
|
2499
|
+
* List of available tools provided by the MCP server
|
|
2500
|
+
*/
|
|
2501
|
+
tools: Array<OpenAIResponseOutputMessageMcpListTools.Tool>;
|
|
2303
2502
|
|
|
2304
2503
|
/**
|
|
2305
|
-
*
|
|
2504
|
+
* Tool call type identifier, always "mcp_list_tools"
|
|
2306
2505
|
*/
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
* Unique identifier for this MCP call
|
|
2310
|
-
*/
|
|
2311
|
-
id: string;
|
|
2506
|
+
type: 'mcp_list_tools';
|
|
2507
|
+
}
|
|
2312
2508
|
|
|
2509
|
+
export namespace OpenAIResponseOutputMessageMcpListTools {
|
|
2510
|
+
/**
|
|
2511
|
+
* Tool definition returned by MCP list tools operation.
|
|
2512
|
+
*/
|
|
2513
|
+
export interface Tool {
|
|
2313
2514
|
/**
|
|
2314
|
-
* JSON
|
|
2515
|
+
* JSON schema defining the tool's input parameters
|
|
2315
2516
|
*/
|
|
2316
|
-
|
|
2517
|
+
input_schema: { [key: string]: boolean | number | string | Array<unknown> | unknown | null };
|
|
2317
2518
|
|
|
2318
2519
|
/**
|
|
2319
|
-
* Name of the
|
|
2520
|
+
* Name of the tool
|
|
2320
2521
|
*/
|
|
2321
2522
|
name: string;
|
|
2322
2523
|
|
|
2323
2524
|
/**
|
|
2324
|
-
*
|
|
2325
|
-
*/
|
|
2326
|
-
server_label: string;
|
|
2327
|
-
|
|
2328
|
-
/**
|
|
2329
|
-
* Tool call type identifier, always "mcp_call"
|
|
2330
|
-
*/
|
|
2331
|
-
type: 'mcp_call';
|
|
2332
|
-
|
|
2333
|
-
/**
|
|
2334
|
-
* (Optional) Error message if the MCP call failed
|
|
2335
|
-
*/
|
|
2336
|
-
error?: string;
|
|
2337
|
-
|
|
2338
|
-
/**
|
|
2339
|
-
* (Optional) Output result from the successful MCP call
|
|
2525
|
+
* (Optional) Description of what the tool does
|
|
2340
2526
|
*/
|
|
2341
|
-
|
|
2527
|
+
description?: string;
|
|
2342
2528
|
}
|
|
2529
|
+
}
|
|
2343
2530
|
|
|
2531
|
+
/**
|
|
2532
|
+
* Text formatting configuration for the response
|
|
2533
|
+
*/
|
|
2534
|
+
export interface Text {
|
|
2344
2535
|
/**
|
|
2345
|
-
*
|
|
2536
|
+
* (Optional) Text format configuration specifying output format requirements
|
|
2346
2537
|
*/
|
|
2347
|
-
|
|
2538
|
+
format?: Text.Format;
|
|
2539
|
+
}
|
|
2540
|
+
|
|
2541
|
+
export namespace Text {
|
|
2542
|
+
/**
|
|
2543
|
+
* (Optional) Text format configuration specifying output format requirements
|
|
2544
|
+
*/
|
|
2545
|
+
export interface Format {
|
|
2348
2546
|
/**
|
|
2349
|
-
*
|
|
2547
|
+
* Must be "text", "json_schema", or "json_object" to identify the format type
|
|
2350
2548
|
*/
|
|
2351
|
-
|
|
2549
|
+
type: 'text' | 'json_schema' | 'json_object';
|
|
2352
2550
|
|
|
2353
2551
|
/**
|
|
2354
|
-
*
|
|
2552
|
+
* (Optional) A description of the response format. Only used for json_schema.
|
|
2355
2553
|
*/
|
|
2356
|
-
|
|
2554
|
+
description?: string;
|
|
2357
2555
|
|
|
2358
2556
|
/**
|
|
2359
|
-
*
|
|
2557
|
+
* The name of the response format. Only used for json_schema.
|
|
2360
2558
|
*/
|
|
2361
|
-
|
|
2559
|
+
name?: string;
|
|
2362
2560
|
|
|
2363
2561
|
/**
|
|
2364
|
-
*
|
|
2562
|
+
* The JSON schema the response should conform to. In a Python SDK, this is often a
|
|
2563
|
+
* `pydantic` model. Only used for json_schema.
|
|
2365
2564
|
*/
|
|
2366
|
-
|
|
2367
|
-
}
|
|
2565
|
+
schema?: { [key: string]: boolean | number | string | Array<unknown> | unknown | null };
|
|
2368
2566
|
|
|
2369
|
-
export namespace OpenAIResponseOutputMessageMcpListTools {
|
|
2370
2567
|
/**
|
|
2371
|
-
*
|
|
2568
|
+
* (Optional) Whether to strictly enforce the JSON schema. If true, the response
|
|
2569
|
+
* must match the schema exactly. Only used for json_schema.
|
|
2372
2570
|
*/
|
|
2373
|
-
|
|
2374
|
-
/**
|
|
2375
|
-
* JSON schema defining the tool's input parameters
|
|
2376
|
-
*/
|
|
2377
|
-
input_schema: { [key: string]: boolean | number | string | Array<unknown> | unknown | null };
|
|
2378
|
-
|
|
2379
|
-
/**
|
|
2380
|
-
* Name of the tool
|
|
2381
|
-
*/
|
|
2382
|
-
name: string;
|
|
2383
|
-
|
|
2384
|
-
/**
|
|
2385
|
-
* (Optional) Description of what the tool does
|
|
2386
|
-
*/
|
|
2387
|
-
description?: string;
|
|
2388
|
-
}
|
|
2571
|
+
strict?: boolean;
|
|
2389
2572
|
}
|
|
2573
|
+
}
|
|
2390
2574
|
|
|
2575
|
+
/**
|
|
2576
|
+
* (Optional) Error details if the response generation failed
|
|
2577
|
+
*/
|
|
2578
|
+
export interface Error {
|
|
2391
2579
|
/**
|
|
2392
|
-
*
|
|
2580
|
+
* Error code identifying the type of failure
|
|
2393
2581
|
*/
|
|
2394
|
-
|
|
2395
|
-
/**
|
|
2396
|
-
* (Optional) Text format configuration specifying output format requirements
|
|
2397
|
-
*/
|
|
2398
|
-
format?: Text.Format;
|
|
2399
|
-
}
|
|
2400
|
-
|
|
2401
|
-
export namespace Text {
|
|
2402
|
-
/**
|
|
2403
|
-
* (Optional) Text format configuration specifying output format requirements
|
|
2404
|
-
*/
|
|
2405
|
-
export interface Format {
|
|
2406
|
-
/**
|
|
2407
|
-
* Must be "text", "json_schema", or "json_object" to identify the format type
|
|
2408
|
-
*/
|
|
2409
|
-
type: 'text' | 'json_schema' | 'json_object';
|
|
2410
|
-
|
|
2411
|
-
/**
|
|
2412
|
-
* (Optional) A description of the response format. Only used for json_schema.
|
|
2413
|
-
*/
|
|
2414
|
-
description?: string;
|
|
2415
|
-
|
|
2416
|
-
/**
|
|
2417
|
-
* The name of the response format. Only used for json_schema.
|
|
2418
|
-
*/
|
|
2419
|
-
name?: string;
|
|
2420
|
-
|
|
2421
|
-
/**
|
|
2422
|
-
* The JSON schema the response should conform to. In a Python SDK, this is often a
|
|
2423
|
-
* `pydantic` model. Only used for json_schema.
|
|
2424
|
-
*/
|
|
2425
|
-
schema?: { [key: string]: boolean | number | string | Array<unknown> | unknown | null };
|
|
2426
|
-
|
|
2427
|
-
/**
|
|
2428
|
-
* (Optional) Whether to strictly enforce the JSON schema. If true, the response
|
|
2429
|
-
* must match the schema exactly. Only used for json_schema.
|
|
2430
|
-
*/
|
|
2431
|
-
strict?: boolean;
|
|
2432
|
-
}
|
|
2433
|
-
}
|
|
2582
|
+
code: string;
|
|
2434
2583
|
|
|
2435
2584
|
/**
|
|
2436
|
-
*
|
|
2585
|
+
* Human-readable error message describing the failure
|
|
2437
2586
|
*/
|
|
2438
|
-
|
|
2439
|
-
/**
|
|
2440
|
-
* Error code identifying the type of failure
|
|
2441
|
-
*/
|
|
2442
|
-
code: string;
|
|
2443
|
-
|
|
2444
|
-
/**
|
|
2445
|
-
* Human-readable error message describing the failure
|
|
2446
|
-
*/
|
|
2447
|
-
message: string;
|
|
2448
|
-
}
|
|
2587
|
+
message: string;
|
|
2449
2588
|
}
|
|
2450
2589
|
}
|
|
2451
2590
|
|
|
@@ -2470,6 +2609,11 @@ export interface ResponseCreateParamsBase {
|
|
|
2470
2609
|
*/
|
|
2471
2610
|
model: string;
|
|
2472
2611
|
|
|
2612
|
+
/**
|
|
2613
|
+
* (Optional) Additional fields to include in the response.
|
|
2614
|
+
*/
|
|
2615
|
+
include?: Array<string>;
|
|
2616
|
+
|
|
2473
2617
|
instructions?: string;
|
|
2474
2618
|
|
|
2475
2619
|
max_infer_iters?: number;
|
|
@@ -2548,7 +2692,39 @@ export namespace ResponseCreateParams {
|
|
|
2548
2692
|
/**
|
|
2549
2693
|
* (Optional) Search results returned by the file search operation
|
|
2550
2694
|
*/
|
|
2551
|
-
results?: Array<
|
|
2695
|
+
results?: Array<OpenAIResponseOutputMessageFileSearchToolCall.Result>;
|
|
2696
|
+
}
|
|
2697
|
+
|
|
2698
|
+
export namespace OpenAIResponseOutputMessageFileSearchToolCall {
|
|
2699
|
+
/**
|
|
2700
|
+
* Search results returned by the file search operation.
|
|
2701
|
+
*/
|
|
2702
|
+
export interface Result {
|
|
2703
|
+
/**
|
|
2704
|
+
* (Optional) Key-value attributes associated with the file
|
|
2705
|
+
*/
|
|
2706
|
+
attributes: { [key: string]: boolean | number | string | Array<unknown> | unknown | null };
|
|
2707
|
+
|
|
2708
|
+
/**
|
|
2709
|
+
* Unique identifier of the file containing the result
|
|
2710
|
+
*/
|
|
2711
|
+
file_id: string;
|
|
2712
|
+
|
|
2713
|
+
/**
|
|
2714
|
+
* Name of the file containing the result
|
|
2715
|
+
*/
|
|
2716
|
+
filename: string;
|
|
2717
|
+
|
|
2718
|
+
/**
|
|
2719
|
+
* Relevance score for this search result (between 0 and 1)
|
|
2720
|
+
*/
|
|
2721
|
+
score: number;
|
|
2722
|
+
|
|
2723
|
+
/**
|
|
2724
|
+
* Text content of the search result
|
|
2725
|
+
*/
|
|
2726
|
+
text: string;
|
|
2727
|
+
}
|
|
2552
2728
|
}
|
|
2553
2729
|
|
|
2554
2730
|
/**
|
|
@@ -2964,17 +3140,7 @@ export interface ResponseCreateParamsStreaming extends ResponseCreateParamsBase
|
|
|
2964
3140
|
stream: true;
|
|
2965
3141
|
}
|
|
2966
3142
|
|
|
2967
|
-
export interface ResponseListParams {
|
|
2968
|
-
/**
|
|
2969
|
-
* The ID of the last response to return.
|
|
2970
|
-
*/
|
|
2971
|
-
after?: string;
|
|
2972
|
-
|
|
2973
|
-
/**
|
|
2974
|
-
* The number of responses to return.
|
|
2975
|
-
*/
|
|
2976
|
-
limit?: number;
|
|
2977
|
-
|
|
3143
|
+
export interface ResponseListParams extends OpenAICursorPageParams {
|
|
2978
3144
|
/**
|
|
2979
3145
|
* The model to filter responses by.
|
|
2980
3146
|
*/
|
|
@@ -2986,6 +3152,7 @@ export interface ResponseListParams {
|
|
|
2986
3152
|
order?: 'asc' | 'desc';
|
|
2987
3153
|
}
|
|
2988
3154
|
|
|
3155
|
+
Responses.ResponseListResponsesOpenAICursorPage = ResponseListResponsesOpenAICursorPage;
|
|
2989
3156
|
Responses.InputItems = InputItems;
|
|
2990
3157
|
|
|
2991
3158
|
export declare namespace Responses {
|
|
@@ -2993,6 +3160,7 @@ export declare namespace Responses {
|
|
|
2993
3160
|
type ResponseObject as ResponseObject,
|
|
2994
3161
|
type ResponseObjectStream as ResponseObjectStream,
|
|
2995
3162
|
type ResponseListResponse as ResponseListResponse,
|
|
3163
|
+
ResponseListResponsesOpenAICursorPage as ResponseListResponsesOpenAICursorPage,
|
|
2996
3164
|
type ResponseCreateParams as ResponseCreateParams,
|
|
2997
3165
|
type ResponseCreateParamsNonStreaming as ResponseCreateParamsNonStreaming,
|
|
2998
3166
|
type ResponseCreateParamsStreaming as ResponseCreateParamsStreaming,
|