llama-stack-client 0.2.18 → 0.2.19-rc2
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.d.ts.map +1 -1
- package/version.js +1 -1
- package/version.js.map +1 -1
- package/version.mjs +1 -1
- package/version.mjs.map +1 -1
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../resource';
|
|
4
4
|
import * as Core from '../core';
|
|
5
|
-
import * as Shared from './shared';
|
|
6
5
|
|
|
7
6
|
export class ScoringFunctions extends APIResource {
|
|
8
7
|
/**
|
|
@@ -49,7 +48,7 @@ export interface ScoringFn {
|
|
|
49
48
|
|
|
50
49
|
provider_id: string;
|
|
51
50
|
|
|
52
|
-
return_type:
|
|
51
|
+
return_type: ScoringFn.ReturnType;
|
|
53
52
|
|
|
54
53
|
/**
|
|
55
54
|
* The resource type, always scoring_function
|
|
@@ -66,6 +65,22 @@ export interface ScoringFn {
|
|
|
66
65
|
provider_resource_id?: string;
|
|
67
66
|
}
|
|
68
67
|
|
|
68
|
+
export namespace ScoringFn {
|
|
69
|
+
export interface ReturnType {
|
|
70
|
+
type:
|
|
71
|
+
| 'string'
|
|
72
|
+
| 'number'
|
|
73
|
+
| 'boolean'
|
|
74
|
+
| 'array'
|
|
75
|
+
| 'object'
|
|
76
|
+
| 'json'
|
|
77
|
+
| 'union'
|
|
78
|
+
| 'chat_completion_input'
|
|
79
|
+
| 'completion_input'
|
|
80
|
+
| 'agent_turn_input';
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
69
84
|
/**
|
|
70
85
|
* Parameters for LLM-as-judge scoring function configuration.
|
|
71
86
|
*/
|
|
@@ -155,7 +170,7 @@ export interface ScoringFunctionRegisterParams {
|
|
|
155
170
|
*/
|
|
156
171
|
description: string;
|
|
157
172
|
|
|
158
|
-
return_type:
|
|
173
|
+
return_type: ScoringFunctionRegisterParams.ReturnType;
|
|
159
174
|
|
|
160
175
|
/**
|
|
161
176
|
* The ID of the scoring function to register.
|
|
@@ -179,6 +194,22 @@ export interface ScoringFunctionRegisterParams {
|
|
|
179
194
|
provider_scoring_fn_id?: string;
|
|
180
195
|
}
|
|
181
196
|
|
|
197
|
+
export namespace ScoringFunctionRegisterParams {
|
|
198
|
+
export interface ReturnType {
|
|
199
|
+
type:
|
|
200
|
+
| 'string'
|
|
201
|
+
| 'number'
|
|
202
|
+
| 'boolean'
|
|
203
|
+
| 'array'
|
|
204
|
+
| 'object'
|
|
205
|
+
| 'json'
|
|
206
|
+
| 'union'
|
|
207
|
+
| 'chat_completion_input'
|
|
208
|
+
| 'completion_input'
|
|
209
|
+
| 'agent_turn_input';
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
|
|
182
213
|
export declare namespace ScoringFunctions {
|
|
183
214
|
export {
|
|
184
215
|
type ListScoringFunctionsResponse as ListScoringFunctionsResponse,
|
package/src/resources/shared.ts
CHANGED
|
@@ -132,29 +132,7 @@ export interface ChatCompletionResponse {
|
|
|
132
132
|
/**
|
|
133
133
|
* (Optional) List of metrics associated with the API response
|
|
134
134
|
*/
|
|
135
|
-
metrics?: Array<
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
export namespace ChatCompletionResponse {
|
|
139
|
-
/**
|
|
140
|
-
* A metric value included in API responses.
|
|
141
|
-
*/
|
|
142
|
-
export interface Metric {
|
|
143
|
-
/**
|
|
144
|
-
* The name of the metric
|
|
145
|
-
*/
|
|
146
|
-
metric: string;
|
|
147
|
-
|
|
148
|
-
/**
|
|
149
|
-
* The numeric value of the metric
|
|
150
|
-
*/
|
|
151
|
-
value: number;
|
|
152
|
-
|
|
153
|
-
/**
|
|
154
|
-
* (Optional) The unit of measurement for the metric value
|
|
155
|
-
*/
|
|
156
|
-
unit?: string;
|
|
157
|
-
}
|
|
135
|
+
metrics?: Array<Metric>;
|
|
158
136
|
}
|
|
159
137
|
|
|
160
138
|
/**
|
|
@@ -235,7 +213,7 @@ export namespace ContentDelta {
|
|
|
235
213
|
/**
|
|
236
214
|
* Either an in-progress tool call string or the final parsed tool call
|
|
237
215
|
*/
|
|
238
|
-
tool_call: Shared.
|
|
216
|
+
tool_call: string | Shared.ToolCall;
|
|
239
217
|
|
|
240
218
|
/**
|
|
241
219
|
* Discriminator type of the delta. Always "tool_call"
|
|
@@ -494,6 +472,26 @@ export namespace InterleavedContentItem {
|
|
|
494
472
|
*/
|
|
495
473
|
export type Message = UserMessage | SystemMessage | ToolResponseMessage | CompletionMessage;
|
|
496
474
|
|
|
475
|
+
/**
|
|
476
|
+
* A metric value included in API responses.
|
|
477
|
+
*/
|
|
478
|
+
export interface Metric {
|
|
479
|
+
/**
|
|
480
|
+
* The name of the metric
|
|
481
|
+
*/
|
|
482
|
+
metric: string;
|
|
483
|
+
|
|
484
|
+
/**
|
|
485
|
+
* The numeric value of the metric
|
|
486
|
+
*/
|
|
487
|
+
value: number;
|
|
488
|
+
|
|
489
|
+
/**
|
|
490
|
+
* (Optional) The unit of measurement for the metric value
|
|
491
|
+
*/
|
|
492
|
+
unit?: string;
|
|
493
|
+
}
|
|
494
|
+
|
|
497
495
|
/**
|
|
498
496
|
* Parameter type for string values.
|
|
499
497
|
*/
|
|
@@ -781,20 +779,6 @@ export namespace ResponseFormat {
|
|
|
781
779
|
}
|
|
782
780
|
}
|
|
783
781
|
|
|
784
|
-
export interface ReturnType {
|
|
785
|
-
type:
|
|
786
|
-
| 'string'
|
|
787
|
-
| 'number'
|
|
788
|
-
| 'boolean'
|
|
789
|
-
| 'array'
|
|
790
|
-
| 'object'
|
|
791
|
-
| 'json'
|
|
792
|
-
| 'union'
|
|
793
|
-
| 'chat_completion_input'
|
|
794
|
-
| 'completion_input'
|
|
795
|
-
| 'agent_turn_input';
|
|
796
|
-
}
|
|
797
|
-
|
|
798
782
|
/**
|
|
799
783
|
* Details of a safety violation detected by content moderation.
|
|
800
784
|
*/
|
|
@@ -949,11 +933,6 @@ export interface ToolCall {
|
|
|
949
933
|
arguments_json?: string;
|
|
950
934
|
}
|
|
951
935
|
|
|
952
|
-
/**
|
|
953
|
-
* Either an in-progress tool call string or the final parsed tool call
|
|
954
|
-
*/
|
|
955
|
-
export type ToolCallOrString = string | ToolCall;
|
|
956
|
-
|
|
957
936
|
export interface ToolParamDefinition {
|
|
958
937
|
param_type: string;
|
|
959
938
|
|
|
@@ -48,6 +48,21 @@ export class Telemetry extends APIResource {
|
|
|
48
48
|
});
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
+
/**
|
|
52
|
+
* Query metrics.
|
|
53
|
+
*/
|
|
54
|
+
queryMetrics(
|
|
55
|
+
metricName: string,
|
|
56
|
+
body: TelemetryQueryMetricsParams,
|
|
57
|
+
options?: Core.RequestOptions,
|
|
58
|
+
): Core.APIPromise<TelemetryQueryMetricsResponse> {
|
|
59
|
+
return (
|
|
60
|
+
this._client.post(`/v1/telemetry/metrics/${metricName}`, { body, ...options }) as Core.APIPromise<{
|
|
61
|
+
data: TelemetryQueryMetricsResponse;
|
|
62
|
+
}>
|
|
63
|
+
)._thenUnwrap((obj) => obj.data);
|
|
64
|
+
}
|
|
65
|
+
|
|
51
66
|
/**
|
|
52
67
|
* Query spans.
|
|
53
68
|
*/
|
|
@@ -401,6 +416,68 @@ export interface TelemetryGetSpanResponse {
|
|
|
401
416
|
*/
|
|
402
417
|
export type TelemetryGetSpanTreeResponse = { [key: string]: SpanWithStatus };
|
|
403
418
|
|
|
419
|
+
/**
|
|
420
|
+
* List of metric series matching the query criteria
|
|
421
|
+
*/
|
|
422
|
+
export type TelemetryQueryMetricsResponse =
|
|
423
|
+
Array<TelemetryQueryMetricsResponse.TelemetryQueryMetricsResponseItem>;
|
|
424
|
+
|
|
425
|
+
export namespace TelemetryQueryMetricsResponse {
|
|
426
|
+
/**
|
|
427
|
+
* A time series of metric data points.
|
|
428
|
+
*/
|
|
429
|
+
export interface TelemetryQueryMetricsResponseItem {
|
|
430
|
+
/**
|
|
431
|
+
* List of labels associated with this metric series
|
|
432
|
+
*/
|
|
433
|
+
labels: Array<TelemetryQueryMetricsResponseItem.Label>;
|
|
434
|
+
|
|
435
|
+
/**
|
|
436
|
+
* The name of the metric
|
|
437
|
+
*/
|
|
438
|
+
metric: string;
|
|
439
|
+
|
|
440
|
+
/**
|
|
441
|
+
* List of data points in chronological order
|
|
442
|
+
*/
|
|
443
|
+
values: Array<TelemetryQueryMetricsResponseItem.Value>;
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
export namespace TelemetryQueryMetricsResponseItem {
|
|
447
|
+
/**
|
|
448
|
+
* A label associated with a metric.
|
|
449
|
+
*/
|
|
450
|
+
export interface Label {
|
|
451
|
+
/**
|
|
452
|
+
* The name of the label
|
|
453
|
+
*/
|
|
454
|
+
name: string;
|
|
455
|
+
|
|
456
|
+
/**
|
|
457
|
+
* The value of the label
|
|
458
|
+
*/
|
|
459
|
+
value: string;
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
/**
|
|
463
|
+
* A single data point in a metric time series.
|
|
464
|
+
*/
|
|
465
|
+
export interface Value {
|
|
466
|
+
/**
|
|
467
|
+
* Unix timestamp when the metric value was recorded
|
|
468
|
+
*/
|
|
469
|
+
timestamp: number;
|
|
470
|
+
|
|
471
|
+
unit: string;
|
|
472
|
+
|
|
473
|
+
/**
|
|
474
|
+
* The numeric value of the metric at this timestamp
|
|
475
|
+
*/
|
|
476
|
+
value: number;
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
|
|
404
481
|
/**
|
|
405
482
|
* List of spans matching the query criteria
|
|
406
483
|
*/
|
|
@@ -477,6 +554,55 @@ export interface TelemetryLogEventParams {
|
|
|
477
554
|
ttl_seconds: number;
|
|
478
555
|
}
|
|
479
556
|
|
|
557
|
+
export interface TelemetryQueryMetricsParams {
|
|
558
|
+
/**
|
|
559
|
+
* The type of query to perform.
|
|
560
|
+
*/
|
|
561
|
+
query_type: 'range' | 'instant';
|
|
562
|
+
|
|
563
|
+
/**
|
|
564
|
+
* The start time of the metric to query.
|
|
565
|
+
*/
|
|
566
|
+
start_time: number;
|
|
567
|
+
|
|
568
|
+
/**
|
|
569
|
+
* The end time of the metric to query.
|
|
570
|
+
*/
|
|
571
|
+
end_time?: number;
|
|
572
|
+
|
|
573
|
+
/**
|
|
574
|
+
* The granularity of the metric to query.
|
|
575
|
+
*/
|
|
576
|
+
granularity?: string;
|
|
577
|
+
|
|
578
|
+
/**
|
|
579
|
+
* The label matchers to apply to the metric.
|
|
580
|
+
*/
|
|
581
|
+
label_matchers?: Array<TelemetryQueryMetricsParams.LabelMatcher>;
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
export namespace TelemetryQueryMetricsParams {
|
|
585
|
+
/**
|
|
586
|
+
* A matcher for filtering metrics by label values.
|
|
587
|
+
*/
|
|
588
|
+
export interface LabelMatcher {
|
|
589
|
+
/**
|
|
590
|
+
* The name of the label to match
|
|
591
|
+
*/
|
|
592
|
+
name: string;
|
|
593
|
+
|
|
594
|
+
/**
|
|
595
|
+
* The comparison operator to use for matching
|
|
596
|
+
*/
|
|
597
|
+
operator: '=' | '!=' | '=~' | '!~';
|
|
598
|
+
|
|
599
|
+
/**
|
|
600
|
+
* The value to match against
|
|
601
|
+
*/
|
|
602
|
+
value: string;
|
|
603
|
+
}
|
|
604
|
+
}
|
|
605
|
+
|
|
480
606
|
export interface TelemetryQuerySpansParams {
|
|
481
607
|
/**
|
|
482
608
|
* The attribute filters to apply to the spans.
|
|
@@ -547,10 +673,12 @@ export declare namespace Telemetry {
|
|
|
547
673
|
type Trace as Trace,
|
|
548
674
|
type TelemetryGetSpanResponse as TelemetryGetSpanResponse,
|
|
549
675
|
type TelemetryGetSpanTreeResponse as TelemetryGetSpanTreeResponse,
|
|
676
|
+
type TelemetryQueryMetricsResponse as TelemetryQueryMetricsResponse,
|
|
550
677
|
type TelemetryQuerySpansResponse as TelemetryQuerySpansResponse,
|
|
551
678
|
type TelemetryQueryTracesResponse as TelemetryQueryTracesResponse,
|
|
552
679
|
type TelemetryGetSpanTreeParams as TelemetryGetSpanTreeParams,
|
|
553
680
|
type TelemetryLogEventParams as TelemetryLogEventParams,
|
|
681
|
+
type TelemetryQueryMetricsParams as TelemetryQueryMetricsParams,
|
|
554
682
|
type TelemetryQuerySpansParams as TelemetryQuerySpansParams,
|
|
555
683
|
type TelemetryQueryTracesParams as TelemetryQueryTracesParams,
|
|
556
684
|
type TelemetrySaveSpansToDatasetParams as TelemetrySaveSpansToDatasetParams,
|
|
@@ -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
|
/**
|
|
@@ -49,17 +50,24 @@ export class Files extends APIResource {
|
|
|
49
50
|
vectorStoreId: string,
|
|
50
51
|
query?: FileListParams,
|
|
51
52
|
options?: Core.RequestOptions,
|
|
52
|
-
): Core.
|
|
53
|
-
list(
|
|
53
|
+
): Core.PagePromise<VectorStoreFilesOpenAICursorPage, VectorStoreFile>;
|
|
54
|
+
list(
|
|
55
|
+
vectorStoreId: string,
|
|
56
|
+
options?: Core.RequestOptions,
|
|
57
|
+
): Core.PagePromise<VectorStoreFilesOpenAICursorPage, VectorStoreFile>;
|
|
54
58
|
list(
|
|
55
59
|
vectorStoreId: string,
|
|
56
60
|
query: FileListParams | Core.RequestOptions = {},
|
|
57
61
|
options?: Core.RequestOptions,
|
|
58
|
-
): Core.
|
|
62
|
+
): Core.PagePromise<VectorStoreFilesOpenAICursorPage, VectorStoreFile> {
|
|
59
63
|
if (isRequestOptions(query)) {
|
|
60
64
|
return this.list(vectorStoreId, {}, query);
|
|
61
65
|
}
|
|
62
|
-
return this._client.
|
|
66
|
+
return this._client.getAPIList(
|
|
67
|
+
`/v1/openai/v1/vector_stores/${vectorStoreId}/files`,
|
|
68
|
+
VectorStoreFilesOpenAICursorPage,
|
|
69
|
+
{ query, ...options },
|
|
70
|
+
);
|
|
63
71
|
}
|
|
64
72
|
|
|
65
73
|
/**
|
|
@@ -85,6 +93,8 @@ export class Files extends APIResource {
|
|
|
85
93
|
}
|
|
86
94
|
}
|
|
87
95
|
|
|
96
|
+
export class VectorStoreFilesOpenAICursorPage extends OpenAICursorPage<VectorStoreFile> {}
|
|
97
|
+
|
|
88
98
|
/**
|
|
89
99
|
* OpenAI Vector Store File object.
|
|
90
100
|
*/
|
|
@@ -196,36 +206,6 @@ export namespace VectorStoreFile {
|
|
|
196
206
|
}
|
|
197
207
|
}
|
|
198
208
|
|
|
199
|
-
/**
|
|
200
|
-
* Response from listing files in a vector store.
|
|
201
|
-
*/
|
|
202
|
-
export interface FileListResponse {
|
|
203
|
-
/**
|
|
204
|
-
* List of vector store file objects
|
|
205
|
-
*/
|
|
206
|
-
data: Array<VectorStoreFile>;
|
|
207
|
-
|
|
208
|
-
/**
|
|
209
|
-
* Whether there are more files available beyond this page
|
|
210
|
-
*/
|
|
211
|
-
has_more: boolean;
|
|
212
|
-
|
|
213
|
-
/**
|
|
214
|
-
* Object type identifier, always "list"
|
|
215
|
-
*/
|
|
216
|
-
object: string;
|
|
217
|
-
|
|
218
|
-
/**
|
|
219
|
-
* (Optional) ID of the first file in the list for pagination
|
|
220
|
-
*/
|
|
221
|
-
first_id?: string;
|
|
222
|
-
|
|
223
|
-
/**
|
|
224
|
-
* (Optional) ID of the last file in the list for pagination
|
|
225
|
-
*/
|
|
226
|
-
last_id?: string;
|
|
227
|
-
}
|
|
228
|
-
|
|
229
209
|
/**
|
|
230
210
|
* Response from deleting a vector store file.
|
|
231
211
|
*/
|
|
@@ -358,13 +338,7 @@ export interface FileUpdateParams {
|
|
|
358
338
|
attributes: { [key: string]: boolean | number | string | Array<unknown> | unknown | null };
|
|
359
339
|
}
|
|
360
340
|
|
|
361
|
-
export interface FileListParams {
|
|
362
|
-
/**
|
|
363
|
-
* (Optional) A cursor for use in pagination. `after` is an object ID that defines
|
|
364
|
-
* your place in the list.
|
|
365
|
-
*/
|
|
366
|
-
after?: string;
|
|
367
|
-
|
|
341
|
+
export interface FileListParams extends OpenAICursorPageParams {
|
|
368
342
|
/**
|
|
369
343
|
* (Optional) A cursor for use in pagination. `before` is an object ID that defines
|
|
370
344
|
* your place in the list.
|
|
@@ -376,12 +350,6 @@ export interface FileListParams {
|
|
|
376
350
|
*/
|
|
377
351
|
filter?: 'completed' | 'in_progress' | 'cancelled' | 'failed';
|
|
378
352
|
|
|
379
|
-
/**
|
|
380
|
-
* (Optional) A limit on the number of objects to be returned. Limit can range
|
|
381
|
-
* between 1 and 100, and the default is 20.
|
|
382
|
-
*/
|
|
383
|
-
limit?: number;
|
|
384
|
-
|
|
385
353
|
/**
|
|
386
354
|
* (Optional) Sort order by the `created_at` timestamp of the objects. `asc` for
|
|
387
355
|
* ascending order and `desc` for descending order.
|
|
@@ -389,12 +357,14 @@ export interface FileListParams {
|
|
|
389
357
|
order?: string;
|
|
390
358
|
}
|
|
391
359
|
|
|
360
|
+
Files.VectorStoreFilesOpenAICursorPage = VectorStoreFilesOpenAICursorPage;
|
|
361
|
+
|
|
392
362
|
export declare namespace Files {
|
|
393
363
|
export {
|
|
394
364
|
type VectorStoreFile as VectorStoreFile,
|
|
395
|
-
type FileListResponse as FileListResponse,
|
|
396
365
|
type FileDeleteResponse as FileDeleteResponse,
|
|
397
366
|
type FileContentResponse as FileContentResponse,
|
|
367
|
+
VectorStoreFilesOpenAICursorPage as VectorStoreFilesOpenAICursorPage,
|
|
398
368
|
type FileCreateParams as FileCreateParams,
|
|
399
369
|
type FileUpdateParams as FileUpdateParams,
|
|
400
370
|
type FileListParams as FileListParams,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
3
|
export {
|
|
4
|
+
VectorStoreFilesOpenAICursorPage,
|
|
4
5
|
Files,
|
|
5
6
|
type VectorStoreFile,
|
|
6
|
-
type FileListResponse,
|
|
7
7
|
type FileDeleteResponse,
|
|
8
8
|
type FileContentResponse,
|
|
9
9
|
type FileCreateParams,
|
|
@@ -11,6 +11,7 @@ export {
|
|
|
11
11
|
type FileListParams,
|
|
12
12
|
} from './files';
|
|
13
13
|
export {
|
|
14
|
+
VectorStoresOpenAICursorPage,
|
|
14
15
|
VectorStores,
|
|
15
16
|
type ListVectorStoresResponse,
|
|
16
17
|
type VectorStore,
|
|
@@ -9,11 +9,12 @@ import {
|
|
|
9
9
|
FileCreateParams,
|
|
10
10
|
FileDeleteResponse,
|
|
11
11
|
FileListParams,
|
|
12
|
-
FileListResponse,
|
|
13
12
|
FileUpdateParams,
|
|
14
13
|
Files,
|
|
15
14
|
VectorStoreFile,
|
|
15
|
+
VectorStoreFilesOpenAICursorPage,
|
|
16
16
|
} from './files';
|
|
17
|
+
import { OpenAICursorPage, type OpenAICursorPageParams } from '../../pagination';
|
|
17
18
|
|
|
18
19
|
export class VectorStores extends APIResource {
|
|
19
20
|
files: FilesAPI.Files = new FilesAPI.Files(this._client);
|
|
@@ -49,16 +50,19 @@ export class VectorStores extends APIResource {
|
|
|
49
50
|
list(
|
|
50
51
|
query?: VectorStoreListParams,
|
|
51
52
|
options?: Core.RequestOptions,
|
|
52
|
-
): Core.
|
|
53
|
-
list(options?: Core.RequestOptions): Core.
|
|
53
|
+
): Core.PagePromise<VectorStoresOpenAICursorPage, VectorStore>;
|
|
54
|
+
list(options?: Core.RequestOptions): Core.PagePromise<VectorStoresOpenAICursorPage, VectorStore>;
|
|
54
55
|
list(
|
|
55
56
|
query: VectorStoreListParams | Core.RequestOptions = {},
|
|
56
57
|
options?: Core.RequestOptions,
|
|
57
|
-
): Core.
|
|
58
|
+
): Core.PagePromise<VectorStoresOpenAICursorPage, VectorStore> {
|
|
58
59
|
if (isRequestOptions(query)) {
|
|
59
60
|
return this.list({}, query);
|
|
60
61
|
}
|
|
61
|
-
return this._client.
|
|
62
|
+
return this._client.getAPIList('/v1/openai/v1/vector_stores', VectorStoresOpenAICursorPage, {
|
|
63
|
+
query,
|
|
64
|
+
...options,
|
|
65
|
+
});
|
|
62
66
|
}
|
|
63
67
|
|
|
64
68
|
/**
|
|
@@ -81,6 +85,8 @@ export class VectorStores extends APIResource {
|
|
|
81
85
|
}
|
|
82
86
|
}
|
|
83
87
|
|
|
88
|
+
export class VectorStoresOpenAICursorPage extends OpenAICursorPage<VectorStore> {}
|
|
89
|
+
|
|
84
90
|
/**
|
|
85
91
|
* Response from listing vector stores.
|
|
86
92
|
*/
|
|
@@ -363,25 +369,13 @@ export interface VectorStoreUpdateParams {
|
|
|
363
369
|
name?: string;
|
|
364
370
|
}
|
|
365
371
|
|
|
366
|
-
export interface VectorStoreListParams {
|
|
367
|
-
/**
|
|
368
|
-
* A cursor for use in pagination. `after` is an object ID that defines your place
|
|
369
|
-
* in the list.
|
|
370
|
-
*/
|
|
371
|
-
after?: string;
|
|
372
|
-
|
|
372
|
+
export interface VectorStoreListParams extends OpenAICursorPageParams {
|
|
373
373
|
/**
|
|
374
374
|
* A cursor for use in pagination. `before` is an object ID that defines your place
|
|
375
375
|
* in the list.
|
|
376
376
|
*/
|
|
377
377
|
before?: string;
|
|
378
378
|
|
|
379
|
-
/**
|
|
380
|
-
* A limit on the number of objects to be returned. Limit can range between 1 and
|
|
381
|
-
* 100, and the default is 20.
|
|
382
|
-
*/
|
|
383
|
-
limit?: number;
|
|
384
|
-
|
|
385
379
|
/**
|
|
386
380
|
* Sort order by the `created_at` timestamp of the objects. `asc` for ascending
|
|
387
381
|
* order and `desc` for descending order.
|
|
@@ -438,7 +432,9 @@ export namespace VectorStoreSearchParams {
|
|
|
438
432
|
}
|
|
439
433
|
}
|
|
440
434
|
|
|
435
|
+
VectorStores.VectorStoresOpenAICursorPage = VectorStoresOpenAICursorPage;
|
|
441
436
|
VectorStores.Files = Files;
|
|
437
|
+
VectorStores.VectorStoreFilesOpenAICursorPage = VectorStoreFilesOpenAICursorPage;
|
|
442
438
|
|
|
443
439
|
export declare namespace VectorStores {
|
|
444
440
|
export {
|
|
@@ -446,6 +442,7 @@ export declare namespace VectorStores {
|
|
|
446
442
|
type VectorStore as VectorStore,
|
|
447
443
|
type VectorStoreDeleteResponse as VectorStoreDeleteResponse,
|
|
448
444
|
type VectorStoreSearchResponse as VectorStoreSearchResponse,
|
|
445
|
+
VectorStoresOpenAICursorPage as VectorStoresOpenAICursorPage,
|
|
449
446
|
type VectorStoreCreateParams as VectorStoreCreateParams,
|
|
450
447
|
type VectorStoreUpdateParams as VectorStoreUpdateParams,
|
|
451
448
|
type VectorStoreListParams as VectorStoreListParams,
|
|
@@ -455,9 +452,9 @@ export declare namespace VectorStores {
|
|
|
455
452
|
export {
|
|
456
453
|
Files as Files,
|
|
457
454
|
type VectorStoreFile as VectorStoreFile,
|
|
458
|
-
type FileListResponse as FileListResponse,
|
|
459
455
|
type FileDeleteResponse as FileDeleteResponse,
|
|
460
456
|
type FileContentResponse as FileContentResponse,
|
|
457
|
+
VectorStoreFilesOpenAICursorPage as VectorStoreFilesOpenAICursorPage,
|
|
461
458
|
type FileCreateParams as FileCreateParams,
|
|
462
459
|
type FileUpdateParams as FileUpdateParams,
|
|
463
460
|
type FileListParams as FileListParams,
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.2.
|
|
1
|
+
export const VERSION = '0.2.19rc2'; // x-release-please-version
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.2.
|
|
1
|
+
export declare const VERSION = "0.2.19rc2";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,cAAc,CAAC"}
|
package/version.js
CHANGED
package/version.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":";;;AAAa,QAAA,OAAO,GAAG,
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":";;;AAAa,QAAA,OAAO,GAAG,WAAW,CAAC,CAAC,2BAA2B"}
|
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '0.2.
|
|
1
|
+
export const VERSION = '0.2.19rc2'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|
package/version.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.mjs","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,
|
|
1
|
+
{"version":3,"file":"version.mjs","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,WAAW,CAAC,CAAC,2BAA2B"}
|