llama-stack-client 0.4.4 → 0.4.5
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/.github/workflows/ci.yml +4 -4
- package/.github/workflows/release-doctor.yml +1 -1
- package/.release-please-manifest.json +1 -1
- package/.stats.yml +4 -4
- package/CHANGELOG.md +41 -0
- package/LICENSE +1 -1
- package/README.md +41 -27
- package/api.md +32 -25
- package/dist/CHANGELOG.md +41 -0
- package/dist/LICENSE +1 -1
- package/dist/README.md +41 -27
- package/dist/core.d.ts.map +1 -1
- package/dist/core.js +5 -0
- package/dist/core.js.map +1 -1
- package/dist/core.mjs +5 -0
- package/dist/core.mjs.map +1 -1
- package/dist/index.d.mts +12 -6
- package/dist/index.d.ts +12 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs.map +1 -1
- package/dist/package.json +1 -1
- package/dist/resources/alpha/admin.d.ts +41 -0
- package/dist/resources/alpha/admin.d.ts.map +1 -0
- package/dist/resources/alpha/admin.js +46 -0
- package/dist/resources/alpha/admin.js.map +1 -0
- package/dist/resources/alpha/admin.mjs +42 -0
- package/dist/resources/alpha/admin.mjs.map +1 -0
- package/dist/resources/alpha/alpha.d.ts +8 -4
- package/dist/resources/alpha/alpha.d.ts.map +1 -1
- package/dist/resources/alpha/alpha.js +6 -2
- package/dist/resources/alpha/alpha.js.map +1 -1
- package/dist/resources/alpha/alpha.mjs +6 -2
- package/dist/resources/alpha/alpha.mjs.map +1 -1
- package/dist/resources/alpha/benchmarks.d.ts +37 -1
- package/dist/resources/alpha/benchmarks.d.ts.map +1 -1
- package/dist/resources/alpha/eval/eval.d.ts +28 -7
- package/dist/resources/alpha/eval/eval.d.ts.map +1 -1
- package/dist/resources/alpha/eval/eval.js.map +1 -1
- package/dist/resources/alpha/eval/eval.mjs.map +1 -1
- package/dist/resources/alpha/index.d.ts +2 -1
- package/dist/resources/alpha/index.d.ts.map +1 -1
- package/dist/resources/alpha/index.js +3 -1
- package/dist/resources/alpha/index.js.map +1 -1
- package/dist/resources/alpha/index.mjs +1 -0
- package/dist/resources/alpha/index.mjs.map +1 -1
- package/dist/resources/alpha/inference.d.ts +58 -7
- package/dist/resources/alpha/inference.d.ts.map +1 -1
- package/dist/resources/alpha/post-training/index.d.ts +2 -2
- package/dist/resources/alpha/post-training/index.d.ts.map +1 -1
- package/dist/resources/alpha/post-training/index.js.map +1 -1
- package/dist/resources/alpha/post-training/index.mjs +1 -1
- package/dist/resources/alpha/post-training/index.mjs.map +1 -1
- package/dist/resources/alpha/post-training/job.d.ts +4 -16
- package/dist/resources/alpha/post-training/job.d.ts.map +1 -1
- package/dist/resources/alpha/post-training/job.js +5 -6
- package/dist/resources/alpha/post-training/job.js.map +1 -1
- package/dist/resources/alpha/post-training/job.mjs +5 -6
- package/dist/resources/alpha/post-training/job.mjs.map +1 -1
- package/dist/resources/alpha/post-training/post-training.d.ts +38 -11
- package/dist/resources/alpha/post-training/post-training.d.ts.map +1 -1
- package/dist/resources/alpha/post-training/post-training.js.map +1 -1
- package/dist/resources/alpha/post-training/post-training.mjs +1 -1
- package/dist/resources/alpha/post-training/post-training.mjs.map +1 -1
- package/dist/resources/beta/datasets.d.ts +102 -8
- package/dist/resources/beta/datasets.d.ts.map +1 -1
- package/dist/resources/chat/chat.d.ts +119 -17
- package/dist/resources/chat/chat.d.ts.map +1 -1
- package/dist/resources/chat/chat.js.map +1 -1
- package/dist/resources/chat/chat.mjs.map +1 -1
- package/dist/resources/chat/completions.d.ts +1130 -73
- package/dist/resources/chat/completions.d.ts.map +1 -1
- package/dist/resources/chat/completions.js +0 -2
- package/dist/resources/chat/completions.js.map +1 -1
- package/dist/resources/chat/completions.mjs +0 -2
- package/dist/resources/chat/completions.mjs.map +1 -1
- package/dist/resources/completions.d.ts +135 -26
- package/dist/resources/completions.d.ts.map +1 -1
- package/dist/resources/completions.js.map +1 -1
- package/dist/resources/completions.mjs.map +1 -1
- package/dist/resources/conversations/conversations.d.ts +56 -12
- package/dist/resources/conversations/conversations.d.ts.map +1 -1
- package/dist/resources/conversations/conversations.js +0 -8
- package/dist/resources/conversations/conversations.js.map +1 -1
- package/dist/resources/conversations/conversations.mjs +0 -8
- package/dist/resources/conversations/conversations.mjs.map +1 -1
- package/dist/resources/conversations/items.d.ts +364 -81
- package/dist/resources/conversations/items.d.ts.map +1 -1
- package/dist/resources/conversations/items.js +0 -6
- package/dist/resources/conversations/items.js.map +1 -1
- package/dist/resources/conversations/items.mjs +0 -6
- package/dist/resources/conversations/items.mjs.map +1 -1
- package/dist/resources/embeddings.d.ts +46 -8
- package/dist/resources/embeddings.d.ts.map +1 -1
- package/dist/resources/embeddings.js +0 -2
- package/dist/resources/embeddings.js.map +1 -1
- package/dist/resources/embeddings.mjs +0 -2
- package/dist/resources/embeddings.mjs.map +1 -1
- package/dist/resources/files.d.ts +58 -31
- package/dist/resources/files.d.ts.map +1 -1
- package/dist/resources/files.js +4 -16
- package/dist/resources/files.js.map +1 -1
- package/dist/resources/files.mjs +4 -16
- package/dist/resources/files.mjs.map +1 -1
- package/dist/resources/index.d.ts +3 -3
- package/dist/resources/index.d.ts.map +1 -1
- package/dist/resources/index.js.map +1 -1
- package/dist/resources/index.mjs.map +1 -1
- package/dist/resources/inspect.d.ts +3 -45
- package/dist/resources/inspect.d.ts.map +1 -1
- package/dist/resources/inspect.js +0 -4
- package/dist/resources/inspect.js.map +1 -1
- package/dist/resources/inspect.mjs +0 -4
- package/dist/resources/inspect.mjs.map +1 -1
- package/dist/resources/models/models.d.ts +21 -6
- package/dist/resources/models/models.d.ts.map +1 -1
- package/dist/resources/models/models.js +0 -6
- package/dist/resources/models/models.js.map +1 -1
- package/dist/resources/models/models.mjs +0 -6
- package/dist/resources/models/models.mjs.map +1 -1
- package/dist/resources/moderations.d.ts +38 -5
- package/dist/resources/moderations.d.ts.map +1 -1
- package/dist/resources/moderations.js +1 -3
- package/dist/resources/moderations.js.map +1 -1
- package/dist/resources/moderations.mjs +1 -3
- package/dist/resources/moderations.mjs.map +1 -1
- package/dist/resources/prompts/prompts.d.ts +24 -10
- package/dist/resources/prompts/prompts.d.ts.map +1 -1
- package/dist/resources/prompts/prompts.js +2 -10
- package/dist/resources/prompts/prompts.js.map +1 -1
- package/dist/resources/prompts/prompts.mjs +2 -10
- package/dist/resources/prompts/prompts.mjs.map +1 -1
- package/dist/resources/prompts/versions.d.ts +0 -2
- package/dist/resources/prompts/versions.d.ts.map +1 -1
- package/dist/resources/prompts/versions.js +0 -2
- package/dist/resources/prompts/versions.js.map +1 -1
- package/dist/resources/prompts/versions.mjs +0 -2
- package/dist/resources/prompts/versions.mjs.map +1 -1
- package/dist/resources/providers.d.ts +5 -12
- package/dist/resources/providers.d.ts.map +1 -1
- package/dist/resources/providers.js +0 -4
- package/dist/resources/providers.js.map +1 -1
- package/dist/resources/providers.mjs +0 -4
- package/dist/resources/providers.mjs.map +1 -1
- package/dist/resources/responses/input-items.d.ts +108 -9
- package/dist/resources/responses/input-items.d.ts.map +1 -1
- package/dist/resources/responses/responses.d.ts +881 -124
- package/dist/resources/responses/responses.d.ts.map +1 -1
- package/dist/resources/responses/responses.js.map +1 -1
- package/dist/resources/responses/responses.mjs.map +1 -1
- package/dist/resources/routes.d.ts +10 -9
- package/dist/resources/routes.d.ts.map +1 -1
- package/dist/resources/routes.js.map +1 -1
- package/dist/resources/routes.mjs.map +1 -1
- package/dist/resources/safety.d.ts +131 -9
- package/dist/resources/safety.d.ts.map +1 -1
- package/dist/resources/safety.js +1 -3
- package/dist/resources/safety.js.map +1 -1
- package/dist/resources/safety.mjs +1 -3
- package/dist/resources/safety.mjs.map +1 -1
- package/dist/resources/scoring-functions.d.ts +23 -1
- package/dist/resources/scoring-functions.d.ts.map +1 -1
- package/dist/resources/scoring.d.ts +24 -0
- package/dist/resources/scoring.d.ts.map +1 -1
- package/dist/resources/shared.d.ts +139 -7
- package/dist/resources/shared.d.ts.map +1 -1
- package/dist/resources/shields.d.ts +21 -0
- package/dist/resources/shields.d.ts.map +1 -1
- package/dist/resources/vector-io.d.ts +75 -58
- package/dist/resources/vector-io.d.ts.map +1 -1
- package/dist/resources/vector-io.js +1 -1
- package/dist/resources/vector-io.mjs +1 -1
- package/dist/resources/vector-stores/file-batches.d.ts +13 -7
- package/dist/resources/vector-stores/file-batches.d.ts.map +1 -1
- package/dist/resources/vector-stores/file-batches.js +3 -6
- package/dist/resources/vector-stores/file-batches.js.map +1 -1
- package/dist/resources/vector-stores/file-batches.mjs +3 -6
- package/dist/resources/vector-stores/file-batches.mjs.map +1 -1
- package/dist/resources/vector-stores/files.d.ts +31 -9
- package/dist/resources/vector-stores/files.d.ts.map +1 -1
- package/dist/resources/vector-stores/files.js +4 -4
- package/dist/resources/vector-stores/files.js.map +1 -1
- package/dist/resources/vector-stores/files.mjs +4 -4
- package/dist/resources/vector-stores/files.mjs.map +1 -1
- package/dist/resources/vector-stores/vector-stores.d.ts +87 -13
- package/dist/resources/vector-stores/vector-stores.d.ts.map +1 -1
- package/dist/resources/vector-stores/vector-stores.js +5 -10
- package/dist/resources/vector-stores/vector-stores.js.map +1 -1
- package/dist/resources/vector-stores/vector-stores.mjs +5 -10
- package/dist/resources/vector-stores/vector-stores.mjs.map +1 -1
- package/dist/src/core.ts +6 -0
- package/dist/src/index.ts +11 -16
- package/dist/src/resources/alpha/admin.ts +84 -0
- package/dist/src/resources/alpha/alpha.ts +16 -8
- package/dist/src/resources/alpha/benchmarks.ts +37 -1
- package/dist/src/resources/alpha/eval/eval.ts +28 -7
- package/dist/src/resources/alpha/index.ts +2 -0
- package/dist/src/resources/alpha/inference.ts +58 -7
- package/dist/src/resources/alpha/post-training/index.ts +2 -10
- package/dist/src/resources/alpha/post-training/job.ts +5 -26
- package/dist/src/resources/alpha/post-training/post-training.ts +38 -22
- package/dist/src/resources/beta/datasets.ts +103 -8
- package/dist/src/resources/chat/chat.ts +122 -20
- package/dist/src/resources/chat/completions.ts +1138 -79
- package/dist/src/resources/completions.ts +137 -28
- package/dist/src/resources/conversations/conversations.ts +67 -15
- package/dist/src/resources/conversations/items.ts +479 -110
- package/dist/src/resources/embeddings.ts +46 -8
- package/dist/src/resources/files.ts +58 -31
- package/dist/src/resources/index.ts +3 -3
- package/dist/src/resources/inspect.ts +3 -57
- package/dist/src/resources/models/models.ts +21 -6
- package/dist/src/resources/moderations.ts +38 -5
- package/dist/src/resources/prompts/prompts.ts +26 -12
- package/dist/src/resources/prompts/versions.ts +0 -2
- package/dist/src/resources/providers.ts +5 -16
- package/dist/src/resources/responses/input-items.ts +138 -15
- package/dist/src/resources/responses/responses.ts +1076 -196
- package/dist/src/resources/routes.ts +10 -14
- package/dist/src/resources/safety.ts +131 -8
- package/dist/src/resources/scoring-functions.ts +23 -1
- package/dist/src/resources/scoring.ts +24 -0
- package/dist/src/resources/shared.ts +148 -7
- package/dist/src/resources/shields.ts +21 -0
- package/dist/src/resources/vector-io.ts +95 -78
- package/dist/src/resources/vector-stores/file-batches.ts +13 -7
- package/dist/src/resources/vector-stores/files.ts +31 -11
- package/dist/src/resources/vector-stores/vector-stores.ts +89 -15
- package/dist/src/version.ts +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/version.mjs +1 -1
- package/package.json +1 -1
- package/src/core.ts +6 -0
- package/src/index.ts +11 -16
- package/src/resources/alpha/admin.ts +84 -0
- package/src/resources/alpha/alpha.ts +16 -8
- package/src/resources/alpha/benchmarks.ts +37 -1
- package/src/resources/alpha/eval/eval.ts +28 -7
- package/src/resources/alpha/index.ts +2 -0
- package/src/resources/alpha/inference.ts +58 -7
- package/src/resources/alpha/post-training/index.ts +2 -10
- package/src/resources/alpha/post-training/job.ts +5 -26
- package/src/resources/alpha/post-training/post-training.ts +38 -22
- package/src/resources/beta/datasets.ts +103 -8
- package/src/resources/chat/chat.ts +122 -20
- package/src/resources/chat/completions.ts +1138 -79
- package/src/resources/completions.ts +137 -28
- package/src/resources/conversations/conversations.ts +67 -15
- package/src/resources/conversations/items.ts +479 -110
- package/src/resources/embeddings.ts +46 -8
- package/src/resources/files.ts +58 -31
- package/src/resources/index.ts +3 -3
- package/src/resources/inspect.ts +3 -57
- package/src/resources/models/models.ts +21 -6
- package/src/resources/moderations.ts +38 -5
- package/src/resources/prompts/prompts.ts +26 -12
- package/src/resources/prompts/versions.ts +0 -2
- package/src/resources/providers.ts +5 -16
- package/src/resources/responses/input-items.ts +138 -15
- package/src/resources/responses/responses.ts +1076 -196
- package/src/resources/routes.ts +10 -14
- package/src/resources/safety.ts +131 -8
- package/src/resources/scoring-functions.ts +23 -1
- package/src/resources/scoring.ts +24 -0
- package/src/resources/shared.ts +148 -7
- package/src/resources/shields.ts +21 -0
- package/src/resources/vector-io.ts +95 -78
- package/src/resources/vector-stores/file-batches.ts +13 -7
- package/src/resources/vector-stores/files.ts +31 -11
- package/src/resources/vector-stores/vector-stores.ts +89 -15
- package/src/version.ts +1 -1
- package/tests/api-resources/alpha/admin.test.ts +111 -0
- package/tests/api-resources/alpha/eval/eval.test.ts +40 -20
- package/tests/api-resources/alpha/inference.test.ts +1 -1
- package/tests/api-resources/alpha/post-training/job.test.ts +21 -12
- package/tests/api-resources/alpha/post-training/post-training.test.ts +12 -2
- package/tests/api-resources/beta/datasets.test.ts +9 -3
- package/tests/api-resources/chat/completions.test.ts +20 -7
- package/tests/api-resources/completions.test.ts +5 -5
- package/tests/api-resources/conversations/items.test.ts +22 -3
- package/tests/api-resources/embeddings.test.ts +2 -2
- package/tests/api-resources/files.test.ts +6 -1
- package/tests/api-resources/responses/input-items.test.ts +7 -1
- package/tests/api-resources/responses/responses.test.ts +19 -5
- package/tests/api-resources/safety.test.ts +9 -5
- package/tests/api-resources/tool-runtime.test.ts +9 -2
- package/tests/api-resources/vector-io.test.ts +13 -4
- package/tests/api-resources/vector-stores/file-batches.test.ts +7 -1
- package/tests/api-resources/vector-stores/files.test.ts +7 -1
- package/tests/api-resources/vector-stores/vector-stores.test.ts +14 -2
|
@@ -40,32 +40,24 @@ class Conversations extends resource_1.APIResource {
|
|
|
40
40
|
this.items = new ItemsAPI.Items(this._client);
|
|
41
41
|
}
|
|
42
42
|
/**
|
|
43
|
-
* Create a conversation.
|
|
44
|
-
*
|
|
45
43
|
* Create a conversation.
|
|
46
44
|
*/
|
|
47
45
|
create(body, options) {
|
|
48
46
|
return this._client.post('/v1/conversations', { body, ...options });
|
|
49
47
|
}
|
|
50
48
|
/**
|
|
51
|
-
* Retrieve a conversation.
|
|
52
|
-
*
|
|
53
49
|
* Get a conversation with the given ID.
|
|
54
50
|
*/
|
|
55
51
|
retrieve(conversationId, options) {
|
|
56
52
|
return this._client.get(`/v1/conversations/${conversationId}`, options);
|
|
57
53
|
}
|
|
58
54
|
/**
|
|
59
|
-
* Update a conversation.
|
|
60
|
-
*
|
|
61
55
|
* Update a conversation's metadata with the given ID.
|
|
62
56
|
*/
|
|
63
57
|
update(conversationId, body, options) {
|
|
64
58
|
return this._client.post(`/v1/conversations/${conversationId}`, { body, ...options });
|
|
65
59
|
}
|
|
66
60
|
/**
|
|
67
|
-
* Delete a conversation.
|
|
68
|
-
*
|
|
69
61
|
* Delete a conversation with the given ID.
|
|
70
62
|
*/
|
|
71
63
|
delete(conversationId, options) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversations.js","sourceRoot":"","sources":["../../src/resources/conversations/conversations.ts"],"names":[],"mappings":";AAAA,qDAAqD;AACrD,uBAAuB;AACvB,EAAE;AACF,gFAAgF;AAChF,0CAA0C;AAC1C,EAAE;AACF,sFAAsF;;;;;;;;;;;;;;;;;;;;;;;;;;AAEtF,gDAA6C;AAE7C,qDAAoC;AACpC,sCASiB;AAEjB,MAAa,aAAc,SAAQ,sBAAW;IAA9C;;QACE,UAAK,GAAmB,IAAI,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"conversations.js","sourceRoot":"","sources":["../../src/resources/conversations/conversations.ts"],"names":[],"mappings":";AAAA,qDAAqD;AACrD,uBAAuB;AACvB,EAAE;AACF,gFAAgF;AAChF,0CAA0C;AAC1C,EAAE;AACF,sFAAsF;;;;;;;;;;;;;;;;;;;;;;;;;;AAEtF,gDAA6C;AAE7C,qDAAoC;AACpC,sCASiB;AAEjB,MAAa,aAAc,SAAQ,sBAAW;IAA9C;;QACE,UAAK,GAAmB,IAAI,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAiC3D,CAAC;IA/BC;;OAEG;IACH,MAAM,CAAC,IAA8B,EAAE,OAA6B;QAClE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,mBAAmB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACtE,CAAC;IAED;;OAEG;IACH,QAAQ,CAAC,cAAsB,EAAE,OAA6B;QAC5D,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,qBAAqB,cAAc,EAAE,EAAE,OAAO,CAAC,CAAC;IAC1E,CAAC;IAED;;OAEG;IACH,MAAM,CACJ,cAAsB,EACtB,IAA8B,EAC9B,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,qBAAqB,cAAc,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACxF,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,cAAsB,EAAE,OAA6B;QAC1D,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,qBAAqB,cAAc,EAAE,EAAE,OAAO,CAAC,CAAC;IAC7E,CAAC;CACF;AAlCD,sCAkCC;AA6aD,aAAa,CAAC,KAAK,GAAG,aAAK,CAAC;AAC5B,aAAa,CAAC,iCAAiC,GAAG,yCAAiC,CAAC"}
|
|
@@ -14,32 +14,24 @@ export class Conversations extends APIResource {
|
|
|
14
14
|
this.items = new ItemsAPI.Items(this._client);
|
|
15
15
|
}
|
|
16
16
|
/**
|
|
17
|
-
* Create a conversation.
|
|
18
|
-
*
|
|
19
17
|
* Create a conversation.
|
|
20
18
|
*/
|
|
21
19
|
create(body, options) {
|
|
22
20
|
return this._client.post('/v1/conversations', { body, ...options });
|
|
23
21
|
}
|
|
24
22
|
/**
|
|
25
|
-
* Retrieve a conversation.
|
|
26
|
-
*
|
|
27
23
|
* Get a conversation with the given ID.
|
|
28
24
|
*/
|
|
29
25
|
retrieve(conversationId, options) {
|
|
30
26
|
return this._client.get(`/v1/conversations/${conversationId}`, options);
|
|
31
27
|
}
|
|
32
28
|
/**
|
|
33
|
-
* Update a conversation.
|
|
34
|
-
*
|
|
35
29
|
* Update a conversation's metadata with the given ID.
|
|
36
30
|
*/
|
|
37
31
|
update(conversationId, body, options) {
|
|
38
32
|
return this._client.post(`/v1/conversations/${conversationId}`, { body, ...options });
|
|
39
33
|
}
|
|
40
34
|
/**
|
|
41
|
-
* Delete a conversation.
|
|
42
|
-
*
|
|
43
35
|
* Delete a conversation with the given ID.
|
|
44
36
|
*/
|
|
45
37
|
delete(conversationId, options) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversations.mjs","sourceRoot":"","sources":["../../src/resources/conversations/conversations.ts"],"names":[],"mappings":"AAAA,qDAAqD;AACrD,uBAAuB;AACvB,EAAE;AACF,gFAAgF;AAChF,0CAA0C;AAC1C,EAAE;AACF,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAEf,KAAK,QAAQ;OACb,EAOL,iCAAiC,EACjC,KAAK,GACN;AAED,MAAM,OAAO,aAAc,SAAQ,WAAW;IAA9C;;QACE,UAAK,GAAmB,IAAI,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"conversations.mjs","sourceRoot":"","sources":["../../src/resources/conversations/conversations.ts"],"names":[],"mappings":"AAAA,qDAAqD;AACrD,uBAAuB;AACvB,EAAE;AACF,gFAAgF;AAChF,0CAA0C;AAC1C,EAAE;AACF,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAEf,KAAK,QAAQ;OACb,EAOL,iCAAiC,EACjC,KAAK,GACN;AAED,MAAM,OAAO,aAAc,SAAQ,WAAW;IAA9C;;QACE,UAAK,GAAmB,IAAI,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAiC3D,CAAC;IA/BC;;OAEG;IACH,MAAM,CAAC,IAA8B,EAAE,OAA6B;QAClE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,mBAAmB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACtE,CAAC;IAED;;OAEG;IACH,QAAQ,CAAC,cAAsB,EAAE,OAA6B;QAC5D,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,qBAAqB,cAAc,EAAE,EAAE,OAAO,CAAC,CAAC;IAC1E,CAAC;IAED;;OAEG;IACH,MAAM,CACJ,cAAsB,EACtB,IAA8B,EAC9B,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,qBAAqB,cAAc,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACxF,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,cAAsB,EAAE,OAA6B;QAC1D,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,qBAAqB,cAAc,EAAE,EAAE,OAAO,CAAC,CAAC;IAC7E,CAAC;CACF;AA6aD,aAAa,CAAC,KAAK,GAAG,KAAK,CAAC;AAC5B,aAAa,CAAC,iCAAiC,GAAG,iCAAiC,CAAC"}
|
|
@@ -3,27 +3,19 @@ import * as Core from "../../core.js";
|
|
|
3
3
|
import { OpenAICursorPage, type OpenAICursorPageParams } from "../../pagination.js";
|
|
4
4
|
export declare class Items extends APIResource {
|
|
5
5
|
/**
|
|
6
|
-
* Create items.
|
|
7
|
-
*
|
|
8
6
|
* Create items in the conversation.
|
|
9
7
|
*/
|
|
10
8
|
create(conversationId: string, body: ItemCreateParams, options?: Core.RequestOptions): Core.APIPromise<ItemCreateResponse>;
|
|
11
9
|
/**
|
|
12
|
-
* List items.
|
|
13
|
-
*
|
|
14
10
|
* List items in the conversation.
|
|
15
11
|
*/
|
|
16
12
|
list(conversationId: string, query?: ItemListParams, options?: Core.RequestOptions): Core.PagePromise<ItemListResponsesOpenAICursorPage, ItemListResponse>;
|
|
17
13
|
list(conversationId: string, options?: Core.RequestOptions): Core.PagePromise<ItemListResponsesOpenAICursorPage, ItemListResponse>;
|
|
18
14
|
/**
|
|
19
|
-
* Delete an item.
|
|
20
|
-
*
|
|
21
15
|
* Delete a conversation item.
|
|
22
16
|
*/
|
|
23
17
|
delete(conversationId: string, itemId: string, options?: Core.RequestOptions): Core.APIPromise<ItemDeleteResponse>;
|
|
24
18
|
/**
|
|
25
|
-
* Retrieve an item.
|
|
26
|
-
*
|
|
27
19
|
* Retrieve a conversation item.
|
|
28
20
|
*/
|
|
29
21
|
get(conversationId: string, itemId: string, options?: Core.RequestOptions): Core.APIPromise<ItemGetResponse>;
|
|
@@ -62,7 +54,7 @@ export declare namespace ItemCreateResponse {
|
|
|
62
54
|
* and there is no way to tell them apart in certain scenarios.
|
|
63
55
|
*/
|
|
64
56
|
interface OpenAIResponseMessageOutput {
|
|
65
|
-
content: string | Array<OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentText | OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentImage | OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentFile> | Array<OpenAIResponseMessageOutput.
|
|
57
|
+
content: string | Array<OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentText | OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentImage | OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentFile> | Array<OpenAIResponseMessageOutput.OpenAIResponseOutputMessageContentOutputTextOutput | OpenAIResponseMessageOutput.OpenAIResponseContentPartRefusal>;
|
|
66
58
|
role: 'system' | 'developer' | 'user' | 'assistant';
|
|
67
59
|
id?: string | null;
|
|
68
60
|
status?: string | null;
|
|
@@ -95,12 +87,13 @@ export declare namespace ItemCreateResponse {
|
|
|
95
87
|
filename?: string | null;
|
|
96
88
|
type?: 'input_file';
|
|
97
89
|
}
|
|
98
|
-
interface
|
|
90
|
+
interface OpenAIResponseOutputMessageContentOutputTextOutput {
|
|
99
91
|
text: string;
|
|
100
|
-
annotations?: Array<
|
|
92
|
+
annotations?: Array<OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationFileCitation | OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationCitation | OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationContainerFileCitation | OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationFilePath>;
|
|
93
|
+
logprobs?: Array<OpenAIResponseOutputMessageContentOutputTextOutput.Logprob> | null;
|
|
101
94
|
type?: 'output_text';
|
|
102
95
|
}
|
|
103
|
-
namespace
|
|
96
|
+
namespace OpenAIResponseOutputMessageContentOutputTextOutput {
|
|
104
97
|
/**
|
|
105
98
|
* File citation annotation for referencing specific files in response content.
|
|
106
99
|
*/
|
|
@@ -133,6 +126,48 @@ export declare namespace ItemCreateResponse {
|
|
|
133
126
|
index: number;
|
|
134
127
|
type?: 'file_path';
|
|
135
128
|
}
|
|
129
|
+
/**
|
|
130
|
+
* The log probability for a token from an OpenAI-compatible chat completion
|
|
131
|
+
* response.
|
|
132
|
+
*/
|
|
133
|
+
interface Logprob {
|
|
134
|
+
/**
|
|
135
|
+
* The token.
|
|
136
|
+
*/
|
|
137
|
+
token: string;
|
|
138
|
+
/**
|
|
139
|
+
* The log probability of the token.
|
|
140
|
+
*/
|
|
141
|
+
logprob: number;
|
|
142
|
+
/**
|
|
143
|
+
* The bytes for the token.
|
|
144
|
+
*/
|
|
145
|
+
bytes?: Array<number> | null;
|
|
146
|
+
/**
|
|
147
|
+
* The top log probabilities for the token.
|
|
148
|
+
*/
|
|
149
|
+
top_logprobs?: Array<Logprob.TopLogprob> | null;
|
|
150
|
+
}
|
|
151
|
+
namespace Logprob {
|
|
152
|
+
/**
|
|
153
|
+
* The top log probability for a token from an OpenAI-compatible chat completion
|
|
154
|
+
* response.
|
|
155
|
+
*/
|
|
156
|
+
interface TopLogprob {
|
|
157
|
+
/**
|
|
158
|
+
* The token.
|
|
159
|
+
*/
|
|
160
|
+
token: string;
|
|
161
|
+
/**
|
|
162
|
+
* The log probability of the token.
|
|
163
|
+
*/
|
|
164
|
+
logprob: number;
|
|
165
|
+
/**
|
|
166
|
+
* The bytes for the token.
|
|
167
|
+
*/
|
|
168
|
+
bytes?: Array<number> | null;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
136
171
|
}
|
|
137
172
|
/**
|
|
138
173
|
* Refusal content within a streamed response part.
|
|
@@ -263,7 +298,7 @@ export declare namespace ItemListResponse {
|
|
|
263
298
|
* and there is no way to tell them apart in certain scenarios.
|
|
264
299
|
*/
|
|
265
300
|
interface OpenAIResponseMessageOutput {
|
|
266
|
-
content: string | Array<OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentText | OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentImage | OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentFile> | Array<OpenAIResponseMessageOutput.
|
|
301
|
+
content: string | Array<OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentText | OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentImage | OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentFile> | Array<OpenAIResponseMessageOutput.OpenAIResponseOutputMessageContentOutputTextOutput | OpenAIResponseMessageOutput.OpenAIResponseContentPartRefusal>;
|
|
267
302
|
role: 'system' | 'developer' | 'user' | 'assistant';
|
|
268
303
|
id?: string | null;
|
|
269
304
|
status?: string | null;
|
|
@@ -296,12 +331,13 @@ export declare namespace ItemListResponse {
|
|
|
296
331
|
filename?: string | null;
|
|
297
332
|
type?: 'input_file';
|
|
298
333
|
}
|
|
299
|
-
interface
|
|
334
|
+
interface OpenAIResponseOutputMessageContentOutputTextOutput {
|
|
300
335
|
text: string;
|
|
301
|
-
annotations?: Array<
|
|
336
|
+
annotations?: Array<OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationFileCitation | OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationCitation | OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationContainerFileCitation | OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationFilePath>;
|
|
337
|
+
logprobs?: Array<OpenAIResponseOutputMessageContentOutputTextOutput.Logprob> | null;
|
|
302
338
|
type?: 'output_text';
|
|
303
339
|
}
|
|
304
|
-
namespace
|
|
340
|
+
namespace OpenAIResponseOutputMessageContentOutputTextOutput {
|
|
305
341
|
/**
|
|
306
342
|
* File citation annotation for referencing specific files in response content.
|
|
307
343
|
*/
|
|
@@ -334,6 +370,48 @@ export declare namespace ItemListResponse {
|
|
|
334
370
|
index: number;
|
|
335
371
|
type?: 'file_path';
|
|
336
372
|
}
|
|
373
|
+
/**
|
|
374
|
+
* The log probability for a token from an OpenAI-compatible chat completion
|
|
375
|
+
* response.
|
|
376
|
+
*/
|
|
377
|
+
interface Logprob {
|
|
378
|
+
/**
|
|
379
|
+
* The token.
|
|
380
|
+
*/
|
|
381
|
+
token: string;
|
|
382
|
+
/**
|
|
383
|
+
* The log probability of the token.
|
|
384
|
+
*/
|
|
385
|
+
logprob: number;
|
|
386
|
+
/**
|
|
387
|
+
* The bytes for the token.
|
|
388
|
+
*/
|
|
389
|
+
bytes?: Array<number> | null;
|
|
390
|
+
/**
|
|
391
|
+
* The top log probabilities for the token.
|
|
392
|
+
*/
|
|
393
|
+
top_logprobs?: Array<Logprob.TopLogprob> | null;
|
|
394
|
+
}
|
|
395
|
+
namespace Logprob {
|
|
396
|
+
/**
|
|
397
|
+
* The top log probability for a token from an OpenAI-compatible chat completion
|
|
398
|
+
* response.
|
|
399
|
+
*/
|
|
400
|
+
interface TopLogprob {
|
|
401
|
+
/**
|
|
402
|
+
* The token.
|
|
403
|
+
*/
|
|
404
|
+
token: string;
|
|
405
|
+
/**
|
|
406
|
+
* The log probability of the token.
|
|
407
|
+
*/
|
|
408
|
+
logprob: number;
|
|
409
|
+
/**
|
|
410
|
+
* The bytes for the token.
|
|
411
|
+
*/
|
|
412
|
+
bytes?: Array<number> | null;
|
|
413
|
+
}
|
|
414
|
+
}
|
|
337
415
|
}
|
|
338
416
|
/**
|
|
339
417
|
* Refusal content within a streamed response part.
|
|
@@ -473,88 +551,250 @@ export interface ItemDeleteResponse {
|
|
|
473
551
|
* under one type because the Responses API gives them all the same "type" value,
|
|
474
552
|
* and there is no way to tell them apart in certain scenarios.
|
|
475
553
|
*/
|
|
476
|
-
export
|
|
477
|
-
content: string | Array<ItemGetResponse.OpenAIResponseInputMessageContentText | ItemGetResponse.OpenAIResponseInputMessageContentImage | ItemGetResponse.OpenAIResponseInputMessageContentFile> | Array<ItemGetResponse.OpenAIResponseOutputMessageContentOutputText | ItemGetResponse.OpenAIResponseContentPartRefusal>;
|
|
478
|
-
role: 'system' | 'developer' | 'user' | 'assistant';
|
|
479
|
-
id?: string | null;
|
|
480
|
-
status?: string | null;
|
|
481
|
-
type?: 'message';
|
|
482
|
-
}
|
|
554
|
+
export type ItemGetResponse = ItemGetResponse.OpenAIResponseMessageOutput | ItemGetResponse.OpenAIResponseOutputMessageWebSearchToolCall | ItemGetResponse.OpenAIResponseOutputMessageFileSearchToolCall | ItemGetResponse.OpenAIResponseOutputMessageFunctionToolCall | ItemGetResponse.OpenAIResponseInputFunctionToolCallOutput | ItemGetResponse.OpenAIResponseMcpApprovalRequest | ItemGetResponse.OpenAIResponseMcpApprovalResponse | ItemGetResponse.OpenAIResponseOutputMessageMcpCall | ItemGetResponse.OpenAIResponseOutputMessageMcpListTools;
|
|
483
555
|
export declare namespace ItemGetResponse {
|
|
484
556
|
/**
|
|
485
|
-
*
|
|
557
|
+
* Corresponds to the various Message types in the Responses API. They are all
|
|
558
|
+
* under one type because the Responses API gives them all the same "type" value,
|
|
559
|
+
* and there is no way to tell them apart in certain scenarios.
|
|
486
560
|
*/
|
|
487
|
-
interface
|
|
488
|
-
|
|
489
|
-
|
|
561
|
+
interface OpenAIResponseMessageOutput {
|
|
562
|
+
content: string | Array<OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentText | OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentImage | OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentFile> | Array<OpenAIResponseMessageOutput.OpenAIResponseOutputMessageContentOutputTextOutput | OpenAIResponseMessageOutput.OpenAIResponseContentPartRefusal>;
|
|
563
|
+
role: 'system' | 'developer' | 'user' | 'assistant';
|
|
564
|
+
id?: string | null;
|
|
565
|
+
status?: string | null;
|
|
566
|
+
type?: 'message';
|
|
567
|
+
}
|
|
568
|
+
namespace OpenAIResponseMessageOutput {
|
|
569
|
+
/**
|
|
570
|
+
* Text content for input messages in OpenAI response format.
|
|
571
|
+
*/
|
|
572
|
+
interface OpenAIResponseInputMessageContentText {
|
|
573
|
+
text: string;
|
|
574
|
+
type?: 'input_text';
|
|
575
|
+
}
|
|
576
|
+
/**
|
|
577
|
+
* Image content for input messages in OpenAI response format.
|
|
578
|
+
*/
|
|
579
|
+
interface OpenAIResponseInputMessageContentImage {
|
|
580
|
+
detail?: 'low' | 'high' | 'auto';
|
|
581
|
+
file_id?: string | null;
|
|
582
|
+
image_url?: string | null;
|
|
583
|
+
type?: 'input_image';
|
|
584
|
+
}
|
|
585
|
+
/**
|
|
586
|
+
* File content for input messages in OpenAI response format.
|
|
587
|
+
*/
|
|
588
|
+
interface OpenAIResponseInputMessageContentFile {
|
|
589
|
+
file_data?: string | null;
|
|
590
|
+
file_id?: string | null;
|
|
591
|
+
file_url?: string | null;
|
|
592
|
+
filename?: string | null;
|
|
593
|
+
type?: 'input_file';
|
|
594
|
+
}
|
|
595
|
+
interface OpenAIResponseOutputMessageContentOutputTextOutput {
|
|
596
|
+
text: string;
|
|
597
|
+
annotations?: Array<OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationFileCitation | OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationCitation | OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationContainerFileCitation | OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationFilePath>;
|
|
598
|
+
logprobs?: Array<OpenAIResponseOutputMessageContentOutputTextOutput.Logprob> | null;
|
|
599
|
+
type?: 'output_text';
|
|
600
|
+
}
|
|
601
|
+
namespace OpenAIResponseOutputMessageContentOutputTextOutput {
|
|
602
|
+
/**
|
|
603
|
+
* File citation annotation for referencing specific files in response content.
|
|
604
|
+
*/
|
|
605
|
+
interface OpenAIResponseAnnotationFileCitation {
|
|
606
|
+
file_id: string;
|
|
607
|
+
filename: string;
|
|
608
|
+
index: number;
|
|
609
|
+
type?: 'file_citation';
|
|
610
|
+
}
|
|
611
|
+
/**
|
|
612
|
+
* URL citation annotation for referencing external web resources.
|
|
613
|
+
*/
|
|
614
|
+
interface OpenAIResponseAnnotationCitation {
|
|
615
|
+
end_index: number;
|
|
616
|
+
start_index: number;
|
|
617
|
+
title: string;
|
|
618
|
+
url: string;
|
|
619
|
+
type?: 'url_citation';
|
|
620
|
+
}
|
|
621
|
+
interface OpenAIResponseAnnotationContainerFileCitation {
|
|
622
|
+
container_id: string;
|
|
623
|
+
end_index: number;
|
|
624
|
+
file_id: string;
|
|
625
|
+
filename: string;
|
|
626
|
+
start_index: number;
|
|
627
|
+
type?: 'container_file_citation';
|
|
628
|
+
}
|
|
629
|
+
interface OpenAIResponseAnnotationFilePath {
|
|
630
|
+
file_id: string;
|
|
631
|
+
index: number;
|
|
632
|
+
type?: 'file_path';
|
|
633
|
+
}
|
|
634
|
+
/**
|
|
635
|
+
* The log probability for a token from an OpenAI-compatible chat completion
|
|
636
|
+
* response.
|
|
637
|
+
*/
|
|
638
|
+
interface Logprob {
|
|
639
|
+
/**
|
|
640
|
+
* The token.
|
|
641
|
+
*/
|
|
642
|
+
token: string;
|
|
643
|
+
/**
|
|
644
|
+
* The log probability of the token.
|
|
645
|
+
*/
|
|
646
|
+
logprob: number;
|
|
647
|
+
/**
|
|
648
|
+
* The bytes for the token.
|
|
649
|
+
*/
|
|
650
|
+
bytes?: Array<number> | null;
|
|
651
|
+
/**
|
|
652
|
+
* The top log probabilities for the token.
|
|
653
|
+
*/
|
|
654
|
+
top_logprobs?: Array<Logprob.TopLogprob> | null;
|
|
655
|
+
}
|
|
656
|
+
namespace Logprob {
|
|
657
|
+
/**
|
|
658
|
+
* The top log probability for a token from an OpenAI-compatible chat completion
|
|
659
|
+
* response.
|
|
660
|
+
*/
|
|
661
|
+
interface TopLogprob {
|
|
662
|
+
/**
|
|
663
|
+
* The token.
|
|
664
|
+
*/
|
|
665
|
+
token: string;
|
|
666
|
+
/**
|
|
667
|
+
* The log probability of the token.
|
|
668
|
+
*/
|
|
669
|
+
logprob: number;
|
|
670
|
+
/**
|
|
671
|
+
* The bytes for the token.
|
|
672
|
+
*/
|
|
673
|
+
bytes?: Array<number> | null;
|
|
674
|
+
}
|
|
675
|
+
}
|
|
676
|
+
}
|
|
677
|
+
/**
|
|
678
|
+
* Refusal content within a streamed response part.
|
|
679
|
+
*/
|
|
680
|
+
interface OpenAIResponseContentPartRefusal {
|
|
681
|
+
refusal: string;
|
|
682
|
+
type?: 'refusal';
|
|
683
|
+
}
|
|
490
684
|
}
|
|
491
685
|
/**
|
|
492
|
-
*
|
|
686
|
+
* Web search tool call output message for OpenAI responses.
|
|
493
687
|
*/
|
|
494
|
-
interface
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
type?: 'input_image';
|
|
688
|
+
interface OpenAIResponseOutputMessageWebSearchToolCall {
|
|
689
|
+
id: string;
|
|
690
|
+
status: string;
|
|
691
|
+
type?: 'web_search_call';
|
|
499
692
|
}
|
|
500
693
|
/**
|
|
501
|
-
* File
|
|
694
|
+
* File search tool call output message for OpenAI responses.
|
|
502
695
|
*/
|
|
503
|
-
interface
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
type?: '
|
|
509
|
-
}
|
|
510
|
-
interface OpenAIResponseOutputMessageContentOutputText {
|
|
511
|
-
text: string;
|
|
512
|
-
annotations?: Array<OpenAIResponseOutputMessageContentOutputText.OpenAIResponseAnnotationFileCitation | OpenAIResponseOutputMessageContentOutputText.OpenAIResponseAnnotationCitation | OpenAIResponseOutputMessageContentOutputText.OpenAIResponseAnnotationContainerFileCitation | OpenAIResponseOutputMessageContentOutputText.OpenAIResponseAnnotationFilePath>;
|
|
513
|
-
type?: 'output_text';
|
|
696
|
+
interface OpenAIResponseOutputMessageFileSearchToolCall {
|
|
697
|
+
id: string;
|
|
698
|
+
queries: Array<string>;
|
|
699
|
+
status: string;
|
|
700
|
+
results?: Array<OpenAIResponseOutputMessageFileSearchToolCall.Result> | null;
|
|
701
|
+
type?: 'file_search_call';
|
|
514
702
|
}
|
|
515
|
-
namespace
|
|
516
|
-
/**
|
|
517
|
-
* File citation annotation for referencing specific files in response content.
|
|
518
|
-
*/
|
|
519
|
-
interface OpenAIResponseAnnotationFileCitation {
|
|
520
|
-
file_id: string;
|
|
521
|
-
filename: string;
|
|
522
|
-
index: number;
|
|
523
|
-
type?: 'file_citation';
|
|
524
|
-
}
|
|
703
|
+
namespace OpenAIResponseOutputMessageFileSearchToolCall {
|
|
525
704
|
/**
|
|
526
|
-
*
|
|
705
|
+
* Search results returned by the file search operation.
|
|
527
706
|
*/
|
|
528
|
-
interface
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
url: string;
|
|
533
|
-
type?: 'url_citation';
|
|
534
|
-
}
|
|
535
|
-
interface OpenAIResponseAnnotationContainerFileCitation {
|
|
536
|
-
container_id: string;
|
|
537
|
-
end_index: number;
|
|
707
|
+
interface Result {
|
|
708
|
+
attributes: {
|
|
709
|
+
[key: string]: unknown;
|
|
710
|
+
};
|
|
538
711
|
file_id: string;
|
|
539
712
|
filename: string;
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
}
|
|
543
|
-
interface OpenAIResponseAnnotationFilePath {
|
|
544
|
-
file_id: string;
|
|
545
|
-
index: number;
|
|
546
|
-
type?: 'file_path';
|
|
713
|
+
score: number;
|
|
714
|
+
text: string;
|
|
547
715
|
}
|
|
548
716
|
}
|
|
549
717
|
/**
|
|
550
|
-
*
|
|
718
|
+
* Function tool call output message for OpenAI responses.
|
|
719
|
+
*/
|
|
720
|
+
interface OpenAIResponseOutputMessageFunctionToolCall {
|
|
721
|
+
arguments: string;
|
|
722
|
+
call_id: string;
|
|
723
|
+
name: string;
|
|
724
|
+
id?: string | null;
|
|
725
|
+
status?: string | null;
|
|
726
|
+
type?: 'function_call';
|
|
727
|
+
}
|
|
728
|
+
/**
|
|
729
|
+
* This represents the output of a function call that gets passed back to the
|
|
730
|
+
* model.
|
|
551
731
|
*/
|
|
552
|
-
interface
|
|
553
|
-
|
|
554
|
-
|
|
732
|
+
interface OpenAIResponseInputFunctionToolCallOutput {
|
|
733
|
+
call_id: string;
|
|
734
|
+
output: string;
|
|
735
|
+
id?: string | null;
|
|
736
|
+
status?: string | null;
|
|
737
|
+
type?: 'function_call_output';
|
|
738
|
+
}
|
|
739
|
+
/**
|
|
740
|
+
* A request for human approval of a tool invocation.
|
|
741
|
+
*/
|
|
742
|
+
interface OpenAIResponseMcpApprovalRequest {
|
|
743
|
+
id: string;
|
|
744
|
+
arguments: string;
|
|
745
|
+
name: string;
|
|
746
|
+
server_label: string;
|
|
747
|
+
type?: 'mcp_approval_request';
|
|
748
|
+
}
|
|
749
|
+
/**
|
|
750
|
+
* A response to an MCP approval request.
|
|
751
|
+
*/
|
|
752
|
+
interface OpenAIResponseMcpApprovalResponse {
|
|
753
|
+
approval_request_id: string;
|
|
754
|
+
approve: boolean;
|
|
755
|
+
id?: string | null;
|
|
756
|
+
reason?: string | null;
|
|
757
|
+
type?: 'mcp_approval_response';
|
|
758
|
+
}
|
|
759
|
+
/**
|
|
760
|
+
* Model Context Protocol (MCP) call output message for OpenAI responses.
|
|
761
|
+
*/
|
|
762
|
+
interface OpenAIResponseOutputMessageMcpCall {
|
|
763
|
+
id: string;
|
|
764
|
+
arguments: string;
|
|
765
|
+
name: string;
|
|
766
|
+
server_label: string;
|
|
767
|
+
error?: string | null;
|
|
768
|
+
output?: string | null;
|
|
769
|
+
type?: 'mcp_call';
|
|
770
|
+
}
|
|
771
|
+
/**
|
|
772
|
+
* MCP list tools output message containing available tools from an MCP server.
|
|
773
|
+
*/
|
|
774
|
+
interface OpenAIResponseOutputMessageMcpListTools {
|
|
775
|
+
id: string;
|
|
776
|
+
server_label: string;
|
|
777
|
+
tools: Array<OpenAIResponseOutputMessageMcpListTools.Tool>;
|
|
778
|
+
type?: 'mcp_list_tools';
|
|
779
|
+
}
|
|
780
|
+
namespace OpenAIResponseOutputMessageMcpListTools {
|
|
781
|
+
/**
|
|
782
|
+
* Tool definition returned by MCP list tools operation.
|
|
783
|
+
*/
|
|
784
|
+
interface Tool {
|
|
785
|
+
input_schema: {
|
|
786
|
+
[key: string]: unknown;
|
|
787
|
+
};
|
|
788
|
+
name: string;
|
|
789
|
+
description?: string | null;
|
|
790
|
+
}
|
|
555
791
|
}
|
|
556
792
|
}
|
|
557
793
|
export interface ItemCreateParams {
|
|
794
|
+
/**
|
|
795
|
+
* Items to include in the conversation context. You may add up to 20 items at a
|
|
796
|
+
* time.
|
|
797
|
+
*/
|
|
558
798
|
items: Array<ItemCreateParams.OpenAIResponseMessageInput | ItemCreateParams.OpenAIResponseOutputMessageWebSearchToolCall | ItemCreateParams.OpenAIResponseOutputMessageFileSearchToolCall | ItemCreateParams.OpenAIResponseOutputMessageFunctionToolCall | ItemCreateParams.OpenAIResponseInputFunctionToolCallOutput | ItemCreateParams.OpenAIResponseMcpApprovalRequest | ItemCreateParams.OpenAIResponseMcpApprovalResponse | ItemCreateParams.OpenAIResponseOutputMessageMcpCall | ItemCreateParams.OpenAIResponseOutputMessageMcpListTools>;
|
|
559
799
|
}
|
|
560
800
|
export declare namespace ItemCreateParams {
|
|
@@ -564,7 +804,7 @@ export declare namespace ItemCreateParams {
|
|
|
564
804
|
* and there is no way to tell them apart in certain scenarios.
|
|
565
805
|
*/
|
|
566
806
|
interface OpenAIResponseMessageInput {
|
|
567
|
-
content: string | Array<OpenAIResponseMessageInput.OpenAIResponseInputMessageContentText | OpenAIResponseMessageInput.OpenAIResponseInputMessageContentImage | OpenAIResponseMessageInput.OpenAIResponseInputMessageContentFile> | Array<OpenAIResponseMessageInput.
|
|
807
|
+
content: string | Array<OpenAIResponseMessageInput.OpenAIResponseInputMessageContentText | OpenAIResponseMessageInput.OpenAIResponseInputMessageContentImage | OpenAIResponseMessageInput.OpenAIResponseInputMessageContentFile> | Array<OpenAIResponseMessageInput.OpenAIResponseOutputMessageContentOutputTextInput | OpenAIResponseMessageInput.OpenAIResponseContentPartRefusal>;
|
|
568
808
|
role: 'system' | 'developer' | 'user' | 'assistant';
|
|
569
809
|
id?: string | null;
|
|
570
810
|
status?: string | null;
|
|
@@ -597,12 +837,13 @@ export declare namespace ItemCreateParams {
|
|
|
597
837
|
filename?: string | null;
|
|
598
838
|
type?: 'input_file';
|
|
599
839
|
}
|
|
600
|
-
interface
|
|
840
|
+
interface OpenAIResponseOutputMessageContentOutputTextInput {
|
|
601
841
|
text: string;
|
|
602
|
-
annotations?: Array<
|
|
842
|
+
annotations?: Array<OpenAIResponseOutputMessageContentOutputTextInput.OpenAIResponseAnnotationFileCitation | OpenAIResponseOutputMessageContentOutputTextInput.OpenAIResponseAnnotationCitation | OpenAIResponseOutputMessageContentOutputTextInput.OpenAIResponseAnnotationContainerFileCitation | OpenAIResponseOutputMessageContentOutputTextInput.OpenAIResponseAnnotationFilePath>;
|
|
843
|
+
logprobs?: Array<OpenAIResponseOutputMessageContentOutputTextInput.Logprob> | null;
|
|
603
844
|
type?: 'output_text';
|
|
604
845
|
}
|
|
605
|
-
namespace
|
|
846
|
+
namespace OpenAIResponseOutputMessageContentOutputTextInput {
|
|
606
847
|
/**
|
|
607
848
|
* File citation annotation for referencing specific files in response content.
|
|
608
849
|
*/
|
|
@@ -635,6 +876,48 @@ export declare namespace ItemCreateParams {
|
|
|
635
876
|
index: number;
|
|
636
877
|
type?: 'file_path';
|
|
637
878
|
}
|
|
879
|
+
/**
|
|
880
|
+
* The log probability for a token from an OpenAI-compatible chat completion
|
|
881
|
+
* response.
|
|
882
|
+
*/
|
|
883
|
+
interface Logprob {
|
|
884
|
+
/**
|
|
885
|
+
* The token.
|
|
886
|
+
*/
|
|
887
|
+
token: string;
|
|
888
|
+
/**
|
|
889
|
+
* The log probability of the token.
|
|
890
|
+
*/
|
|
891
|
+
logprob: number;
|
|
892
|
+
/**
|
|
893
|
+
* The bytes for the token.
|
|
894
|
+
*/
|
|
895
|
+
bytes?: Array<number> | null;
|
|
896
|
+
/**
|
|
897
|
+
* The top log probabilities for the token.
|
|
898
|
+
*/
|
|
899
|
+
top_logprobs?: Array<Logprob.TopLogprob> | null;
|
|
900
|
+
}
|
|
901
|
+
namespace Logprob {
|
|
902
|
+
/**
|
|
903
|
+
* The top log probability for a token from an OpenAI-compatible chat completion
|
|
904
|
+
* response.
|
|
905
|
+
*/
|
|
906
|
+
interface TopLogprob {
|
|
907
|
+
/**
|
|
908
|
+
* The token.
|
|
909
|
+
*/
|
|
910
|
+
token: string;
|
|
911
|
+
/**
|
|
912
|
+
* The log probability of the token.
|
|
913
|
+
*/
|
|
914
|
+
logprob: number;
|
|
915
|
+
/**
|
|
916
|
+
* The bytes for the token.
|
|
917
|
+
*/
|
|
918
|
+
bytes?: Array<number> | null;
|
|
919
|
+
}
|
|
920
|
+
}
|
|
638
921
|
}
|
|
639
922
|
/**
|
|
640
923
|
* Refusal content within a streamed response part.
|