llama-stack-client 0.2.18 → 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.
Files changed (118) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/index.d.mts +12 -11
  3. package/index.d.ts +12 -11
  4. package/index.d.ts.map +1 -1
  5. package/index.js +3 -0
  6. package/index.js.map +1 -1
  7. package/index.mjs +6 -3
  8. package/index.mjs.map +1 -1
  9. package/package.json +4 -1
  10. package/pagination.d.ts +19 -0
  11. package/pagination.d.ts.map +1 -1
  12. package/pagination.js +42 -1
  13. package/pagination.js.map +1 -1
  14. package/pagination.mjs +40 -0
  15. package/pagination.mjs.map +1 -1
  16. package/resources/chat/chat.d.ts +2 -2
  17. package/resources/chat/chat.d.ts.map +1 -1
  18. package/resources/chat/chat.js +1 -0
  19. package/resources/chat/chat.js.map +1 -1
  20. package/resources/chat/chat.mjs +2 -1
  21. package/resources/chat/chat.mjs.map +1 -1
  22. package/resources/chat/completions.d.ts +414 -446
  23. package/resources/chat/completions.d.ts.map +1 -1
  24. package/resources/chat/completions.js +7 -2
  25. package/resources/chat/completions.js.map +1 -1
  26. package/resources/chat/completions.mjs +5 -1
  27. package/resources/chat/completions.mjs.map +1 -1
  28. package/resources/chat/index.d.ts +1 -1
  29. package/resources/chat/index.d.ts.map +1 -1
  30. package/resources/chat/index.js +2 -1
  31. package/resources/chat/index.js.map +1 -1
  32. package/resources/chat/index.mjs +1 -1
  33. package/resources/chat/index.mjs.map +1 -1
  34. package/resources/files.d.ts +10 -19
  35. package/resources/files.d.ts.map +1 -1
  36. package/resources/files.js +7 -2
  37. package/resources/files.js.map +1 -1
  38. package/resources/files.mjs +5 -1
  39. package/resources/files.mjs.map +1 -1
  40. package/resources/index.d.ts +4 -4
  41. package/resources/index.d.ts.map +1 -1
  42. package/resources/index.js +4 -1
  43. package/resources/index.js.map +1 -1
  44. package/resources/index.mjs +3 -3
  45. package/resources/index.mjs.map +1 -1
  46. package/resources/inference.d.ts +2 -38
  47. package/resources/inference.d.ts.map +1 -1
  48. package/resources/moderations.d.ts +1 -5
  49. package/resources/moderations.d.ts.map +1 -1
  50. package/resources/responses/index.d.ts +1 -1
  51. package/resources/responses/index.d.ts.map +1 -1
  52. package/resources/responses/index.js +2 -1
  53. package/resources/responses/index.js.map +1 -1
  54. package/resources/responses/index.mjs +1 -1
  55. package/resources/responses/index.mjs.map +1 -1
  56. package/resources/responses/input-items.d.ts +30 -3
  57. package/resources/responses/input-items.d.ts.map +1 -1
  58. package/resources/responses/responses.d.ts +604 -470
  59. package/resources/responses/responses.d.ts.map +1 -1
  60. package/resources/responses/responses.js +10 -2
  61. package/resources/responses/responses.js.map +1 -1
  62. package/resources/responses/responses.mjs +8 -1
  63. package/resources/responses/responses.mjs.map +1 -1
  64. package/resources/scoring-functions.d.ts +12 -3
  65. package/resources/scoring-functions.d.ts.map +1 -1
  66. package/resources/scoring-functions.js.map +1 -1
  67. package/resources/scoring-functions.mjs.map +1 -1
  68. package/resources/shared.d.ts +19 -28
  69. package/resources/shared.d.ts.map +1 -1
  70. package/resources/telemetry.d.ts +98 -1
  71. package/resources/telemetry.d.ts.map +1 -1
  72. package/resources/telemetry.js +6 -0
  73. package/resources/telemetry.js.map +1 -1
  74. package/resources/telemetry.mjs +6 -0
  75. package/resources/telemetry.mjs.map +1 -1
  76. package/resources/vector-stores/files.d.ts +7 -39
  77. package/resources/vector-stores/files.d.ts.map +1 -1
  78. package/resources/vector-stores/files.js +7 -2
  79. package/resources/vector-stores/files.js.map +1 -1
  80. package/resources/vector-stores/files.mjs +5 -1
  81. package/resources/vector-stores/files.mjs.map +1 -1
  82. package/resources/vector-stores/index.d.ts +2 -2
  83. package/resources/vector-stores/index.d.ts.map +1 -1
  84. package/resources/vector-stores/index.js +3 -1
  85. package/resources/vector-stores/index.js.map +1 -1
  86. package/resources/vector-stores/index.mjs +2 -2
  87. package/resources/vector-stores/index.mjs.map +1 -1
  88. package/resources/vector-stores/vector-stores.d.ts +9 -16
  89. package/resources/vector-stores/vector-stores.d.ts.map +1 -1
  90. package/resources/vector-stores/vector-stores.js +11 -2
  91. package/resources/vector-stores/vector-stores.js.map +1 -1
  92. package/resources/vector-stores/vector-stores.mjs +10 -2
  93. package/resources/vector-stores/vector-stores.mjs.map +1 -1
  94. package/src/index.ts +27 -3
  95. package/src/pagination.ts +70 -0
  96. package/src/resources/chat/chat.ts +3 -0
  97. package/src/resources/chat/completions.ts +483 -510
  98. package/src/resources/chat/index.ts +1 -0
  99. package/src/resources/files.ts +14 -22
  100. package/src/resources/index.ts +5 -0
  101. package/src/resources/inference.ts +2 -44
  102. package/src/resources/moderations.ts +1 -5
  103. package/src/resources/responses/index.ts +1 -0
  104. package/src/resources/responses/input-items.ts +33 -1
  105. package/src/resources/responses/responses.ts +700 -532
  106. package/src/resources/scoring-functions.ts +34 -3
  107. package/src/resources/shared.ts +22 -43
  108. package/src/resources/telemetry.ts +128 -0
  109. package/src/resources/vector-stores/files.ts +18 -48
  110. package/src/resources/vector-stores/index.ts +2 -1
  111. package/src/resources/vector-stores/vector-stores.ts +16 -19
  112. package/src/version.ts +1 -1
  113. package/version.d.ts +1 -1
  114. package/version.d.ts.map +1 -1
  115. package/version.js +1 -1
  116. package/version.js.map +1 -1
  117. package/version.mjs +1 -1
  118. package/version.mjs.map +1 -1
@@ -2,6 +2,7 @@
2
2
 
3
3
  export { Chat, type ChatCompletionChunk } from './chat';
4
4
  export {
5
+ CompletionListResponsesOpenAICursorPage,
5
6
  Completions,
6
7
  type CompletionCreateResponse,
7
8
  type CompletionRetrieveResponse,
@@ -3,6 +3,7 @@
3
3
  import { APIResource } from '../resource';
4
4
  import { isRequestOptions } from '../core';
5
5
  import * as Core from '../core';
6
+ import { OpenAICursorPage, type OpenAICursorPageParams } from '../pagination';
6
7
 
7
8
  export class Files extends APIResource {
8
9
  /**
@@ -26,16 +27,16 @@ export class Files extends APIResource {
26
27
  /**
27
28
  * Returns a list of files that belong to the user's organization.
28
29
  */
29
- list(query?: FileListParams, options?: Core.RequestOptions): Core.APIPromise<ListFilesResponse>;
30
- list(options?: Core.RequestOptions): Core.APIPromise<ListFilesResponse>;
30
+ list(query?: FileListParams, options?: Core.RequestOptions): Core.PagePromise<FilesOpenAICursorPage, File>;
31
+ list(options?: Core.RequestOptions): Core.PagePromise<FilesOpenAICursorPage, File>;
31
32
  list(
32
33
  query: FileListParams | Core.RequestOptions = {},
33
34
  options?: Core.RequestOptions,
34
- ): Core.APIPromise<ListFilesResponse> {
35
+ ): Core.PagePromise<FilesOpenAICursorPage, File> {
35
36
  if (isRequestOptions(query)) {
36
37
  return this.list({}, query);
37
38
  }
38
- return this._client.get('/v1/openai/v1/files', { query, ...options });
39
+ return this._client.getAPIList('/v1/openai/v1/files', FilesOpenAICursorPage, { query, ...options });
39
40
  }
40
41
 
41
42
  /**
@@ -53,6 +54,8 @@ export class Files extends APIResource {
53
54
  }
54
55
  }
55
56
 
57
+ export class FilesOpenAICursorPage extends OpenAICursorPage<File> {}
58
+
56
59
  /**
57
60
  * Response for deleting a file in OpenAI Files API.
58
61
  */
@@ -110,7 +113,7 @@ export interface File {
110
113
  /**
111
114
  * The intended purpose of the file
112
115
  */
113
- purpose: 'assistants';
116
+ purpose: 'assistants' | 'batch';
114
117
  }
115
118
 
116
119
  /**
@@ -151,24 +154,10 @@ export interface FileCreateParams {
151
154
  /**
152
155
  * Valid purpose values for OpenAI Files API.
153
156
  */
154
- purpose: 'assistants';
157
+ purpose: 'assistants' | 'batch';
155
158
  }
156
159
 
157
- export interface FileListParams {
158
- /**
159
- * A cursor for use in pagination. `after` is an object ID that defines your place
160
- * in the list. For instance, if you make a list request and receive 100 objects,
161
- * ending with obj_foo, your subsequent call can include after=obj_foo in order to
162
- * fetch the next page of the list.
163
- */
164
- after?: string;
165
-
166
- /**
167
- * A limit on the number of objects to be returned. Limit can range between 1 and
168
- * 10,000, and the default is 10,000.
169
- */
170
- limit?: number;
171
-
160
+ export interface FileListParams extends OpenAICursorPageParams {
172
161
  /**
173
162
  * Sort order by the `created_at` timestamp of the objects. `asc` for ascending
174
163
  * order and `desc` for descending order.
@@ -178,15 +167,18 @@ export interface FileListParams {
178
167
  /**
179
168
  * Only return files with the given purpose.
180
169
  */
181
- purpose?: 'assistants';
170
+ purpose?: 'assistants' | 'batch';
182
171
  }
183
172
 
173
+ Files.FilesOpenAICursorPage = FilesOpenAICursorPage;
174
+
184
175
  export declare namespace Files {
185
176
  export {
186
177
  type DeleteFileResponse as DeleteFileResponse,
187
178
  type File as File,
188
179
  type ListFilesResponse as ListFilesResponse,
189
180
  type FileContentResponse as FileContentResponse,
181
+ FilesOpenAICursorPage as FilesOpenAICursorPage,
190
182
  type FileCreateParams as FileCreateParams,
191
183
  type FileListParams as FileListParams,
192
184
  };
@@ -53,6 +53,7 @@ export {
53
53
  type EvalRunEvalAlphaParams,
54
54
  } from './eval/eval';
55
55
  export {
56
+ FilesOpenAICursorPage,
56
57
  Files,
57
58
  type DeleteFileResponse,
58
59
  type File,
@@ -97,6 +98,7 @@ export {
97
98
  } from './post-training/post-training';
98
99
  export { Providers, type ListProvidersResponse, type ProviderListResponse } from './providers';
99
100
  export {
101
+ ResponseListResponsesOpenAICursorPage,
100
102
  Responses,
101
103
  type ResponseObject,
102
104
  type ResponseObjectStream,
@@ -144,10 +146,12 @@ export {
144
146
  type Trace,
145
147
  type TelemetryGetSpanResponse,
146
148
  type TelemetryGetSpanTreeResponse,
149
+ type TelemetryQueryMetricsResponse,
147
150
  type TelemetryQuerySpansResponse,
148
151
  type TelemetryQueryTracesResponse,
149
152
  type TelemetryGetSpanTreeParams,
150
153
  type TelemetryLogEventParams,
154
+ type TelemetryQueryMetricsParams,
151
155
  type TelemetryQuerySpansParams,
152
156
  type TelemetryQueryTracesParams,
153
157
  type TelemetrySaveSpansToDatasetParams,
@@ -189,6 +193,7 @@ export {
189
193
  type VectorIoQueryParams,
190
194
  } from './vector-io';
191
195
  export {
196
+ VectorStoresOpenAICursorPage,
192
197
  VectorStores,
193
198
  type ListVectorStoresResponse,
194
199
  type VectorStore,
@@ -109,7 +109,7 @@ export interface ChatCompletionResponseStreamChunk {
109
109
  /**
110
110
  * (Optional) List of metrics associated with the API response
111
111
  */
112
- metrics?: Array<ChatCompletionResponseStreamChunk.Metric>;
112
+ metrics?: Array<Shared.Metric>;
113
113
  }
114
114
 
115
115
  export namespace ChatCompletionResponseStreamChunk {
@@ -138,26 +138,6 @@ export namespace ChatCompletionResponseStreamChunk {
138
138
  */
139
139
  stop_reason?: 'end_of_turn' | 'end_of_message' | 'out_of_tokens';
140
140
  }
141
-
142
- /**
143
- * A metric value included in API responses.
144
- */
145
- export interface Metric {
146
- /**
147
- * The name of the metric
148
- */
149
- metric: string;
150
-
151
- /**
152
- * The numeric value of the metric
153
- */
154
- value: number;
155
-
156
- /**
157
- * (Optional) The unit of measurement for the metric value
158
- */
159
- unit?: string;
160
- }
161
141
  }
162
142
 
163
143
  /**
@@ -182,29 +162,7 @@ export interface CompletionResponse {
182
162
  /**
183
163
  * (Optional) List of metrics associated with the API response
184
164
  */
185
- metrics?: Array<CompletionResponse.Metric>;
186
- }
187
-
188
- export namespace CompletionResponse {
189
- /**
190
- * A metric value included in API responses.
191
- */
192
- export interface Metric {
193
- /**
194
- * The name of the metric
195
- */
196
- metric: string;
197
-
198
- /**
199
- * The numeric value of the metric
200
- */
201
- value: number;
202
-
203
- /**
204
- * (Optional) The unit of measurement for the metric value
205
- */
206
- unit?: string;
207
- }
165
+ metrics?: Array<Shared.Metric>;
208
166
  }
209
167
 
210
168
  /**
@@ -55,11 +55,7 @@ export namespace CreateResponse {
55
55
  category_applied_input_types?: { [key: string]: Array<string> };
56
56
 
57
57
  /**
58
- * A list of the categories along with their scores as predicted by model. Required
59
- * set of categories that need to be in response - violence - violence/graphic -
60
- * harassment - harassment/threatening - hate - hate/threatening - illicit -
61
- * illicit/violent - sexual - sexual/minors - self-harm - self-harm/intent -
62
- * self-harm/instructions
58
+ * A list of the categories along with their scores as predicted by model.
63
59
  */
64
60
  category_scores?: { [key: string]: number };
65
61
 
@@ -2,6 +2,7 @@
2
2
 
3
3
  export { InputItems, type InputItemListResponse, type InputItemListParams } from './input-items';
4
4
  export {
5
+ ResponseListResponsesOpenAICursorPage,
5
6
  Responses,
6
7
  type ResponseObject,
7
8
  type ResponseObjectStream,
@@ -95,7 +95,39 @@ export namespace InputItemListResponse {
95
95
  /**
96
96
  * (Optional) Search results returned by the file search operation
97
97
  */
98
- results?: Array<{ [key: string]: boolean | number | string | Array<unknown> | unknown | null }>;
98
+ results?: Array<OpenAIResponseOutputMessageFileSearchToolCall.Result>;
99
+ }
100
+
101
+ export namespace OpenAIResponseOutputMessageFileSearchToolCall {
102
+ /**
103
+ * Search results returned by the file search operation.
104
+ */
105
+ export interface Result {
106
+ /**
107
+ * (Optional) Key-value attributes associated with the file
108
+ */
109
+ attributes: { [key: string]: boolean | number | string | Array<unknown> | unknown | null };
110
+
111
+ /**
112
+ * Unique identifier of the file containing the result
113
+ */
114
+ file_id: string;
115
+
116
+ /**
117
+ * Name of the file containing the result
118
+ */
119
+ filename: string;
120
+
121
+ /**
122
+ * Relevance score for this search result (between 0 and 1)
123
+ */
124
+ score: number;
125
+
126
+ /**
127
+ * Text content of the search result
128
+ */
129
+ text: string;
130
+ }
99
131
  }
100
132
 
101
133
  /**