@llumiverse/common 1.3.0 → 1.4.0
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/lib/capability/anthropic.d.ts +3 -0
- package/lib/capability/anthropic.d.ts.map +1 -0
- package/lib/capability/anthropic.js +92 -0
- package/lib/capability/anthropic.js.map +1 -0
- package/lib/{types/capability → capability}/azure_foundry.d.ts +1 -1
- package/lib/capability/azure_foundry.d.ts.map +1 -0
- package/lib/capability/azure_foundry.js +394 -0
- package/lib/capability/azure_foundry.js.map +1 -0
- package/lib/{types/capability → capability}/bedrock.d.ts +1 -1
- package/lib/capability/bedrock.d.ts.map +1 -0
- package/lib/capability/bedrock.js +300 -0
- package/lib/capability/bedrock.js.map +1 -0
- package/lib/{types/capability → capability}/openai.d.ts +1 -1
- package/lib/capability/openai.d.ts.map +1 -0
- package/lib/capability/openai.js +179 -0
- package/lib/capability/openai.js.map +1 -0
- package/lib/{types/capability → capability}/vertexai.d.ts +1 -1
- package/lib/capability/vertexai.d.ts.map +1 -0
- package/lib/capability/vertexai.js +137 -0
- package/lib/capability/vertexai.js.map +1 -0
- package/lib/{types/capability.d.ts → capability.d.ts} +1 -1
- package/lib/capability.d.ts.map +1 -0
- package/lib/{esm/capability.js → capability.js} +17 -17
- package/lib/capability.js.map +1 -0
- package/lib/index.d.ts +14 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +14 -0
- package/lib/index.js.map +1 -0
- package/lib/{types/options → options}/anthropic.d.ts +2 -2
- package/lib/options/anthropic.d.ts.map +1 -0
- package/lib/{esm/options → options}/anthropic.js +14 -11
- package/lib/options/anthropic.js.map +1 -0
- package/lib/{types/options → options}/azure_foundry.d.ts +14 -14
- package/lib/options/azure_foundry.d.ts.map +1 -0
- package/lib/{esm/options → options}/azure_foundry.js +126 -126
- package/lib/options/azure_foundry.js.map +1 -0
- package/lib/{types/options → options}/bedrock.d.ts +16 -16
- package/lib/{types/options → options}/bedrock.d.ts.map +1 -1
- package/lib/options/bedrock.js +489 -0
- package/lib/options/bedrock.js.map +1 -0
- package/lib/options/context-windows.d.ts.map +1 -0
- package/lib/options/context-windows.js.map +1 -0
- package/lib/options/embedding.d.ts +38 -0
- package/lib/options/embedding.d.ts.map +1 -0
- package/lib/options/embedding.js +77 -0
- package/lib/options/embedding.js.map +1 -0
- package/lib/{types/options → options}/fallback.d.ts +2 -2
- package/lib/options/fallback.d.ts.map +1 -0
- package/lib/options/fallback.js +65 -0
- package/lib/options/fallback.js.map +1 -0
- package/lib/{types/options → options}/groq.d.ts +2 -2
- package/lib/options/groq.d.ts.map +1 -0
- package/lib/options/groq.js +54 -0
- package/lib/options/groq.js.map +1 -0
- package/lib/options/openai.d.ts +40 -0
- package/lib/options/openai.d.ts.map +1 -0
- package/lib/options/openai.js +284 -0
- package/lib/options/openai.js.map +1 -0
- package/lib/{types/options → options}/shared-parsing.d.ts +1 -1
- package/lib/options/shared-parsing.d.ts.map +1 -0
- package/lib/{esm/options → options}/shared-parsing.js +14 -17
- package/lib/options/shared-parsing.js.map +1 -0
- package/lib/options/version-parsing.d.ts.map +1 -0
- package/lib/{esm/options → options}/version-parsing.js +15 -15
- package/lib/options/version-parsing.js.map +1 -0
- package/lib/{types/options → options}/vertexai.d.ts +15 -15
- package/lib/options/vertexai.d.ts.map +1 -0
- package/lib/options/vertexai.js +606 -0
- package/lib/options/vertexai.js.map +1 -0
- package/lib/{types/options.d.ts → options.d.ts} +1 -1
- package/lib/options.d.ts.map +1 -0
- package/lib/{esm/options.js → options.js} +8 -8
- package/lib/options.js.map +1 -0
- package/lib/{types/types.d.ts → types.d.ts} +143 -35
- package/lib/types.d.ts.map +1 -0
- package/lib/{esm/types.js → types.js} +21 -23
- package/lib/types.js.map +1 -0
- package/package.json +11 -34
- package/src/LlumiverseError.test.ts +18 -72
- package/src/capability/anthropic.ts +61 -11
- package/src/capability/azure_foundry.ts +303 -65
- package/src/capability/bedrock.ts +201 -56
- package/src/capability/openai.ts +135 -41
- package/src/capability/vertexai.ts +105 -35
- package/src/capability.ts +18 -18
- package/src/index.ts +13 -12
- package/src/options/anthropic.ts +16 -13
- package/src/options/azure_foundry.ts +157 -143
- package/src/options/bedrock.ts +247 -185
- package/src/options/context-windows.ts +2 -2
- package/src/options/embedding.ts +92 -0
- package/src/options/fallback.ts +50 -17
- package/src/options/groq.ts +48 -21
- package/src/options/openai.ts +228 -183
- package/src/options/shared-parsing.ts +16 -21
- package/src/options/version-parsing.ts +17 -17
- package/src/options/vertexai.ts +382 -288
- package/src/options.ts +8 -8
- package/src/types.ts +260 -155
- package/lib/cjs/capability/anthropic.js +0 -45
- package/lib/cjs/capability/anthropic.js.map +0 -1
- package/lib/cjs/capability/azure_foundry.js +0 -160
- package/lib/cjs/capability/azure_foundry.js.map +0 -1
- package/lib/cjs/capability/bedrock.js +0 -158
- package/lib/cjs/capability/bedrock.js.map +0 -1
- package/lib/cjs/capability/openai.js +0 -98
- package/lib/cjs/capability/openai.js.map +0 -1
- package/lib/cjs/capability/vertexai.js +0 -80
- package/lib/cjs/capability/vertexai.js.map +0 -1
- package/lib/cjs/capability.js +0 -115
- package/lib/cjs/capability.js.map +0 -1
- package/lib/cjs/index.js +0 -29
- package/lib/cjs/index.js.map +0 -1
- package/lib/cjs/options/anthropic.js +0 -34
- package/lib/cjs/options/anthropic.js.map +0 -1
- package/lib/cjs/options/azure_foundry.js +0 -423
- package/lib/cjs/options/azure_foundry.js.map +0 -1
- package/lib/cjs/options/bedrock.js +0 -427
- package/lib/cjs/options/bedrock.js.map +0 -1
- package/lib/cjs/options/context-windows.js +0 -138
- package/lib/cjs/options/context-windows.js.map +0 -1
- package/lib/cjs/options/fallback.js +0 -35
- package/lib/cjs/options/fallback.js.map +0 -1
- package/lib/cjs/options/groq.js +0 -37
- package/lib/cjs/options/groq.js.map +0 -1
- package/lib/cjs/options/openai.js +0 -246
- package/lib/cjs/options/openai.js.map +0 -1
- package/lib/cjs/options/shared-parsing.js +0 -144
- package/lib/cjs/options/shared-parsing.js.map +0 -1
- package/lib/cjs/options/version-parsing.js +0 -326
- package/lib/cjs/options/version-parsing.js.map +0 -1
- package/lib/cjs/options/vertexai.js +0 -525
- package/lib/cjs/options/vertexai.js.map +0 -1
- package/lib/cjs/options.js +0 -33
- package/lib/cjs/options.js.map +0 -1
- package/lib/cjs/package.json +0 -3
- package/lib/cjs/types.js +0 -307
- package/lib/cjs/types.js.map +0 -1
- package/lib/esm/capability/anthropic.js +0 -42
- package/lib/esm/capability/anthropic.js.map +0 -1
- package/lib/esm/capability/azure_foundry.js +0 -157
- package/lib/esm/capability/azure_foundry.js.map +0 -1
- package/lib/esm/capability/bedrock.js +0 -155
- package/lib/esm/capability/bedrock.js.map +0 -1
- package/lib/esm/capability/openai.js +0 -95
- package/lib/esm/capability/openai.js.map +0 -1
- package/lib/esm/capability/vertexai.js +0 -77
- package/lib/esm/capability/vertexai.js.map +0 -1
- package/lib/esm/capability.js.map +0 -1
- package/lib/esm/index.js +0 -13
- package/lib/esm/index.js.map +0 -1
- package/lib/esm/options/anthropic.js.map +0 -1
- package/lib/esm/options/azure_foundry.js.map +0 -1
- package/lib/esm/options/bedrock.js +0 -423
- package/lib/esm/options/bedrock.js.map +0 -1
- package/lib/esm/options/context-windows.js.map +0 -1
- package/lib/esm/options/fallback.js +0 -32
- package/lib/esm/options/fallback.js.map +0 -1
- package/lib/esm/options/groq.js +0 -34
- package/lib/esm/options/groq.js.map +0 -1
- package/lib/esm/options/openai.js +0 -243
- package/lib/esm/options/openai.js.map +0 -1
- package/lib/esm/options/shared-parsing.js.map +0 -1
- package/lib/esm/options/version-parsing.js.map +0 -1
- package/lib/esm/options/vertexai.js +0 -519
- package/lib/esm/options/vertexai.js.map +0 -1
- package/lib/esm/options.js.map +0 -1
- package/lib/esm/types.js.map +0 -1
- package/lib/types/capability/anthropic.d.ts +0 -3
- package/lib/types/capability/anthropic.d.ts.map +0 -1
- package/lib/types/capability/azure_foundry.d.ts.map +0 -1
- package/lib/types/capability/bedrock.d.ts.map +0 -1
- package/lib/types/capability/openai.d.ts.map +0 -1
- package/lib/types/capability/vertexai.d.ts.map +0 -1
- package/lib/types/capability.d.ts.map +0 -1
- package/lib/types/index.d.ts +0 -13
- package/lib/types/index.d.ts.map +0 -1
- package/lib/types/options/anthropic.d.ts.map +0 -1
- package/lib/types/options/azure_foundry.d.ts.map +0 -1
- package/lib/types/options/context-windows.d.ts.map +0 -1
- package/lib/types/options/fallback.d.ts.map +0 -1
- package/lib/types/options/groq.d.ts.map +0 -1
- package/lib/types/options/openai.d.ts +0 -40
- package/lib/types/options/openai.d.ts.map +0 -1
- package/lib/types/options/shared-parsing.d.ts.map +0 -1
- package/lib/types/options/version-parsing.d.ts.map +0 -1
- package/lib/types/options/vertexai.d.ts.map +0 -1
- package/lib/types/options.d.ts.map +0 -1
- package/lib/types/types.d.ts.map +0 -1
- /package/lib/{types/options → options}/context-windows.d.ts +0 -0
- /package/lib/{esm/options → options}/context-windows.js +0 -0
- /package/lib/{types/options → options}/version-parsing.d.ts +0 -0
package/src/types.ts
CHANGED
|
@@ -20,7 +20,7 @@ export enum Providers {
|
|
|
20
20
|
groq = 'groq',
|
|
21
21
|
watsonx = 'watsonx',
|
|
22
22
|
xai = 'xai',
|
|
23
|
-
anthropic = 'anthropic'
|
|
23
|
+
anthropic = 'anthropic',
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
export interface ProviderParams {
|
|
@@ -33,145 +33,210 @@ export interface ProviderParams {
|
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
export const ProviderList: Record<Providers, ProviderParams> = {
|
|
36
|
-
openai:
|
|
37
|
-
{
|
|
36
|
+
openai: {
|
|
38
37
|
id: Providers.openai,
|
|
39
|
-
name:
|
|
38
|
+
name: 'OpenAI',
|
|
40
39
|
requiresApiKey: true,
|
|
41
40
|
requiresEndpointUrl: false,
|
|
42
41
|
supportSearch: false,
|
|
43
42
|
},
|
|
44
|
-
azure_openai:
|
|
45
|
-
{
|
|
43
|
+
azure_openai: {
|
|
46
44
|
id: Providers.azure_openai,
|
|
47
|
-
name:
|
|
45
|
+
name: 'Azure OpenAI',
|
|
48
46
|
requiresApiKey: false,
|
|
49
47
|
requiresEndpointUrl: true,
|
|
50
48
|
supportSearch: false,
|
|
51
49
|
},
|
|
52
|
-
azure_foundry:
|
|
53
|
-
{
|
|
50
|
+
azure_foundry: {
|
|
54
51
|
id: Providers.azure_foundry,
|
|
55
|
-
name:
|
|
52
|
+
name: 'Microsoft Foundry',
|
|
56
53
|
requiresApiKey: true,
|
|
57
54
|
requiresEndpointUrl: true,
|
|
58
55
|
supportSearch: false,
|
|
59
56
|
},
|
|
60
|
-
huggingface_ie:
|
|
61
|
-
{
|
|
57
|
+
huggingface_ie: {
|
|
62
58
|
id: Providers.huggingface_ie,
|
|
63
|
-
name:
|
|
59
|
+
name: 'HuggingFace Inference Endpoint',
|
|
64
60
|
requiresApiKey: true,
|
|
65
61
|
requiresEndpointUrl: true,
|
|
66
62
|
},
|
|
67
|
-
replicate:
|
|
68
|
-
{
|
|
63
|
+
replicate: {
|
|
69
64
|
id: Providers.replicate,
|
|
70
|
-
name:
|
|
65
|
+
name: 'Replicate',
|
|
71
66
|
requiresApiKey: true,
|
|
72
67
|
requiresEndpointUrl: false,
|
|
73
68
|
supportSearch: true,
|
|
74
69
|
},
|
|
75
|
-
bedrock:
|
|
76
|
-
{
|
|
70
|
+
bedrock: {
|
|
77
71
|
id: Providers.bedrock,
|
|
78
|
-
name:
|
|
72
|
+
name: 'Amazon Bedrock',
|
|
79
73
|
requiresApiKey: false,
|
|
80
74
|
requiresEndpointUrl: false,
|
|
81
|
-
endpointPlaceholder:
|
|
75
|
+
endpointPlaceholder: 'region name (eg. us-east-1)',
|
|
82
76
|
supportSearch: false,
|
|
83
77
|
},
|
|
84
78
|
vertexai: {
|
|
85
79
|
id: Providers.vertexai,
|
|
86
|
-
name:
|
|
80
|
+
name: 'Google Agent Platform (Vertex AI)',
|
|
87
81
|
requiresApiKey: false,
|
|
88
82
|
requiresEndpointUrl: false,
|
|
89
83
|
supportSearch: false,
|
|
90
84
|
},
|
|
91
85
|
togetherai: {
|
|
92
86
|
id: Providers.togetherai,
|
|
93
|
-
name:
|
|
94
|
-
requiresApiKey:
|
|
87
|
+
name: 'Together AI',
|
|
88
|
+
requiresApiKey: true,
|
|
95
89
|
requiresEndpointUrl: false,
|
|
96
90
|
supportSearch: false,
|
|
97
91
|
},
|
|
98
92
|
mistralai: {
|
|
99
93
|
id: Providers.mistralai,
|
|
100
|
-
name:
|
|
94
|
+
name: 'Mistral AI',
|
|
101
95
|
requiresApiKey: false,
|
|
102
96
|
requiresEndpointUrl: false,
|
|
103
97
|
supportSearch: false,
|
|
104
98
|
},
|
|
105
99
|
groq: {
|
|
106
100
|
id: Providers.groq,
|
|
107
|
-
name:
|
|
101
|
+
name: 'Groq Cloud',
|
|
108
102
|
requiresApiKey: false,
|
|
109
103
|
requiresEndpointUrl: false,
|
|
110
104
|
supportSearch: false,
|
|
111
105
|
},
|
|
112
106
|
watsonx: {
|
|
113
107
|
id: Providers.watsonx,
|
|
114
|
-
name:
|
|
108
|
+
name: 'IBM WatsonX',
|
|
115
109
|
requiresApiKey: true,
|
|
116
110
|
requiresEndpointUrl: true,
|
|
117
|
-
supportSearch: false
|
|
111
|
+
supportSearch: false,
|
|
118
112
|
},
|
|
119
113
|
xai: {
|
|
120
114
|
id: Providers.xai,
|
|
121
|
-
name:
|
|
115
|
+
name: 'xAI (Grok)',
|
|
122
116
|
requiresApiKey: true,
|
|
123
117
|
requiresEndpointUrl: false,
|
|
124
|
-
supportSearch: false
|
|
118
|
+
supportSearch: false,
|
|
125
119
|
},
|
|
126
120
|
openai_compatible: {
|
|
127
121
|
id: Providers.openai_compatible,
|
|
128
|
-
name:
|
|
122
|
+
name: 'OpenAI Compatible',
|
|
129
123
|
requiresApiKey: true,
|
|
130
124
|
requiresEndpointUrl: true,
|
|
131
|
-
endpointPlaceholder:
|
|
132
|
-
supportSearch: false
|
|
125
|
+
endpointPlaceholder: 'https://api.example.com/v1',
|
|
126
|
+
supportSearch: false,
|
|
133
127
|
},
|
|
134
128
|
anthropic: {
|
|
135
129
|
id: Providers.anthropic,
|
|
136
|
-
name:
|
|
130
|
+
name: 'Anthropic',
|
|
137
131
|
requiresApiKey: true,
|
|
138
132
|
requiresEndpointUrl: false,
|
|
139
133
|
supportSearch: false,
|
|
140
134
|
},
|
|
141
|
-
}
|
|
135
|
+
};
|
|
142
136
|
|
|
143
137
|
// ============== Embeddings ===============
|
|
144
138
|
|
|
139
|
+
/**
|
|
140
|
+
* Semantic task type for embedding models. Drivers map these to provider-
|
|
141
|
+
* specific values (e.g. "RETRIEVAL_QUERY" for Vertex, "search_query" for Cohere).
|
|
142
|
+
* - "query" — a search query to find relevant documents
|
|
143
|
+
* - "document" — a document to be indexed and retrieved
|
|
144
|
+
*/
|
|
145
|
+
export type EmbeddingTaskType = 'query' | 'document';
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* One input to an embedding model. Discriminated by `type`.
|
|
149
|
+
* Drivers consume binary content via DataSource and may pass a provider-native
|
|
150
|
+
* URL (gs://, s3://, https://) when one is available.
|
|
151
|
+
*/
|
|
152
|
+
export type EmbeddingInput = TextEmbeddingInput | ImageEmbeddingInput | VideoEmbeddingInput | AudioEmbeddingInput;
|
|
153
|
+
|
|
154
|
+
export interface TextEmbeddingInput {
|
|
155
|
+
type: 'text';
|
|
156
|
+
text: string;
|
|
157
|
+
/** Overrides EmbeddingsOptions.task_type for this input. */
|
|
158
|
+
task_type?: EmbeddingTaskType;
|
|
159
|
+
/** Document title hint — used by Vertex AI for RETRIEVAL_DOCUMENT. */
|
|
160
|
+
title?: string;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
export interface ImageEmbeddingInput {
|
|
164
|
+
type: 'image';
|
|
165
|
+
source: DataSource;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
export interface VideoEmbeddingInput {
|
|
169
|
+
type: 'video';
|
|
170
|
+
source: DataSource;
|
|
171
|
+
start_sec?: number;
|
|
172
|
+
length_sec?: number;
|
|
173
|
+
/** Vertex multimodal segment length. */
|
|
174
|
+
interval_sec?: number;
|
|
175
|
+
/** TwelveLabs Marengo. */
|
|
176
|
+
use_fixed_length_sec?: boolean;
|
|
177
|
+
/** TwelveLabs Marengo. */
|
|
178
|
+
min_clip_sec?: number;
|
|
179
|
+
/** TwelveLabs Marengo: which views to extract per segment. */
|
|
180
|
+
embedding_option?: ('visual-text' | 'visual-image' | 'audio')[];
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
export interface AudioEmbeddingInput {
|
|
184
|
+
type: 'audio';
|
|
185
|
+
source: DataSource;
|
|
186
|
+
start_sec?: number;
|
|
187
|
+
length_sec?: number;
|
|
188
|
+
}
|
|
189
|
+
|
|
145
190
|
export interface EmbeddingsOptions {
|
|
191
|
+
inputs: EmbeddingInput[];
|
|
146
192
|
/**
|
|
147
|
-
*
|
|
148
|
-
|
|
149
|
-
text?: string;
|
|
150
|
-
/**
|
|
151
|
-
* The image to generate embeddings for
|
|
152
|
-
*/
|
|
153
|
-
image?: string
|
|
154
|
-
/**
|
|
155
|
-
* The model to use to generate the embeddings. Optional.
|
|
193
|
+
* Provider model id. When omitted the driver picks a sensible default
|
|
194
|
+
* for the modalities present in `inputs`.
|
|
156
195
|
*/
|
|
157
196
|
model?: string;
|
|
158
197
|
|
|
198
|
+
/** Default task type applied to text inputs that don't set their own. */
|
|
199
|
+
task_type?: EmbeddingTaskType;
|
|
200
|
+
/** Output dimension truncation (MRL). Vertex/OpenAI where supported. */
|
|
201
|
+
dimensions?: number;
|
|
159
202
|
}
|
|
160
203
|
|
|
161
204
|
export interface EmbeddingsResult {
|
|
162
|
-
/**
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
values: number[];
|
|
166
|
-
/**
|
|
167
|
-
* The model used to generate the embeddings.
|
|
168
|
-
*/
|
|
205
|
+
/** One result item per input, in the same order as EmbeddingsOptions.inputs. */
|
|
206
|
+
results: EmbeddingResultItem[];
|
|
207
|
+
/** The provider model id that produced the result. */
|
|
169
208
|
model: string;
|
|
209
|
+
/** Aggregate token usage when reported by the provider. */
|
|
210
|
+
usage?: EmbeddingsTokenUsage;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
export interface EmbeddingResultItem {
|
|
170
214
|
/**
|
|
171
|
-
*
|
|
215
|
+
* One or more vectors produced for this input.
|
|
216
|
+
* Single vector for text/image; multiple for segmented video/audio or
|
|
217
|
+
* joint-multimodal models that return per-modality vectors.
|
|
172
218
|
*/
|
|
173
|
-
|
|
219
|
+
outputs: EmbeddingOutput[];
|
|
220
|
+
/** Token count attributed to this input, when reported by the provider. */
|
|
221
|
+
input_tokens?: number;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
export interface EmbeddingOutput {
|
|
225
|
+
values: number[];
|
|
226
|
+
/** Which modality this vector represents (useful for joint-multimodal results). */
|
|
227
|
+
modality?: 'text' | 'image' | 'video' | 'audio';
|
|
228
|
+
/** Segment start time for video/audio. */
|
|
229
|
+
start_sec?: number;
|
|
230
|
+
/** Segment end time for video/audio. */
|
|
231
|
+
end_sec?: number;
|
|
232
|
+
/** TwelveLabs Marengo: which view of the segment this vector represents. */
|
|
233
|
+
embedding_option?: string;
|
|
234
|
+
}
|
|
174
235
|
|
|
236
|
+
export interface EmbeddingsTokenUsage {
|
|
237
|
+
input_tokens?: number;
|
|
238
|
+
input_text_tokens?: number;
|
|
239
|
+
input_image_tokens?: number;
|
|
175
240
|
}
|
|
176
241
|
|
|
177
242
|
export interface ResultValidationError {
|
|
@@ -195,11 +260,11 @@ export interface LlumiverseErrorContext {
|
|
|
195
260
|
|
|
196
261
|
/**
|
|
197
262
|
* Standardized error class for Llumiverse driver errors.
|
|
198
|
-
*
|
|
263
|
+
*
|
|
199
264
|
* Normalizes errors from different LLM providers (OpenAI, Anthropic, Bedrock, VertexAI, etc.)
|
|
200
265
|
* into a consistent format. The primary value is the `retryable` flag, which enables upstream
|
|
201
266
|
* consumers to implement smart retry logic.
|
|
202
|
-
*
|
|
267
|
+
*
|
|
203
268
|
* @example
|
|
204
269
|
* ```typescript
|
|
205
270
|
* try {
|
|
@@ -209,7 +274,7 @@ export interface LlumiverseErrorContext {
|
|
|
209
274
|
* console.log(`Provider: ${error.context.provider}`);
|
|
210
275
|
* console.log(`Model: ${error.context.model}`);
|
|
211
276
|
* console.log(`Retryable: ${error.retryable}`);
|
|
212
|
-
*
|
|
277
|
+
*
|
|
213
278
|
* if (error.retryable) {
|
|
214
279
|
* // Implement retry logic with exponential backoff
|
|
215
280
|
* await retryWithBackoff(() => driver.execute(segments, options));
|
|
@@ -223,7 +288,7 @@ export interface LlumiverseErrorContext {
|
|
|
223
288
|
* ```
|
|
224
289
|
*/
|
|
225
290
|
export class LlumiverseError extends Error {
|
|
226
|
-
/**
|
|
291
|
+
/**
|
|
227
292
|
* HTTP status code (e.g., 429, 500) if available.
|
|
228
293
|
* Undefined if the error doesn't have a numeric status code.
|
|
229
294
|
*/
|
|
@@ -235,12 +300,12 @@ export class LlumiverseError extends Error {
|
|
|
235
300
|
*/
|
|
236
301
|
readonly name: string;
|
|
237
302
|
|
|
238
|
-
/**
|
|
303
|
+
/**
|
|
239
304
|
* Whether this error is retryable.
|
|
240
305
|
* - True: Definitely retryable (rate limits, timeouts, server errors)
|
|
241
306
|
* - False: Definitely not retryable (auth failures, invalid requests, malformed schemas)
|
|
242
307
|
* - Undefined: Unknown retryability - allows consumers to decide default behavior
|
|
243
|
-
*
|
|
308
|
+
*
|
|
244
309
|
* When undefined, consumers can choose their retry strategy:
|
|
245
310
|
* - Conservative: Don't retry unknown errors (avoid spam)
|
|
246
311
|
* - Resilient: Retry unknown errors (prioritize success)
|
|
@@ -265,7 +330,7 @@ export class LlumiverseError extends Error {
|
|
|
265
330
|
context: LlumiverseErrorContext,
|
|
266
331
|
originalError: unknown,
|
|
267
332
|
code?: number,
|
|
268
|
-
name?: string
|
|
333
|
+
name?: string,
|
|
269
334
|
) {
|
|
270
335
|
super(message);
|
|
271
336
|
this.name = name || 'LlumiverseError';
|
|
@@ -293,16 +358,15 @@ export class LlumiverseError extends Error {
|
|
|
293
358
|
context: this.context,
|
|
294
359
|
stack: this.stack,
|
|
295
360
|
// Include original error message if available
|
|
296
|
-
originalErrorMessage:
|
|
297
|
-
? this.originalError.message
|
|
298
|
-
: String(this.originalError),
|
|
361
|
+
originalErrorMessage:
|
|
362
|
+
this.originalError instanceof Error ? this.originalError.message : String(this.originalError),
|
|
299
363
|
};
|
|
300
364
|
}
|
|
301
365
|
|
|
302
366
|
/**
|
|
303
367
|
* Type guard to check if an error is a LlumiverseError.
|
|
304
368
|
* Useful for conditional error handling.
|
|
305
|
-
*
|
|
369
|
+
*
|
|
306
370
|
* @param error - The error to check
|
|
307
371
|
* @returns True if the error is a LlumiverseError
|
|
308
372
|
*/
|
|
@@ -314,21 +378,22 @@ export class LlumiverseError extends Error {
|
|
|
314
378
|
// ============== Result Types ===============
|
|
315
379
|
|
|
316
380
|
export interface BaseResult {
|
|
317
|
-
type:
|
|
318
|
-
value:
|
|
381
|
+
type: 'text' | 'json' | 'image';
|
|
382
|
+
value: unknown;
|
|
319
383
|
}
|
|
320
384
|
|
|
321
385
|
export interface TextResult extends BaseResult {
|
|
322
|
-
type:
|
|
386
|
+
type: 'text';
|
|
323
387
|
value: string;
|
|
324
388
|
}
|
|
325
389
|
|
|
326
390
|
export interface JsonResult extends BaseResult {
|
|
327
|
-
type:
|
|
391
|
+
type: 'json';
|
|
392
|
+
value: JSONValue;
|
|
328
393
|
}
|
|
329
394
|
|
|
330
395
|
export interface ImageResult extends BaseResult {
|
|
331
|
-
type:
|
|
396
|
+
type: 'image';
|
|
332
397
|
value: string; // base64 data url or real url
|
|
333
398
|
}
|
|
334
399
|
|
|
@@ -337,17 +402,18 @@ export interface ImageResult extends BaseResult {
|
|
|
337
402
|
*/
|
|
338
403
|
export type CompletionResult = TextResult | JsonResult | ImageResult;
|
|
339
404
|
|
|
340
|
-
|
|
341
405
|
//Internal structure used in driver implementation.
|
|
342
406
|
export interface CompletionChunkObject {
|
|
343
407
|
result: CompletionResult[];
|
|
344
408
|
token_usage?: ExecutionTokenUsage;
|
|
345
|
-
finish_reason?:
|
|
409
|
+
finish_reason?: 'stop' | 'length' | string;
|
|
346
410
|
/**
|
|
347
411
|
* Tool calls returned by the model during streaming.
|
|
348
412
|
* Each chunk may contain partial tool call information that needs to be aggregated.
|
|
413
|
+
* Typed with `unknown` params because streamed chunks carry partial (often string)
|
|
414
|
+
* tool_input that is only parsed into a JSONObject once fully accumulated.
|
|
349
415
|
*/
|
|
350
|
-
tool_use?: ToolUse[];
|
|
416
|
+
tool_use?: ToolUse<unknown>[];
|
|
351
417
|
}
|
|
352
418
|
|
|
353
419
|
/**
|
|
@@ -357,29 +423,29 @@ export interface CompletionChunkObject {
|
|
|
357
423
|
* - Plain object schemas for simpler cases
|
|
358
424
|
*/
|
|
359
425
|
export interface ToolDefinition {
|
|
360
|
-
name: string
|
|
361
|
-
description?: string
|
|
426
|
+
name: string;
|
|
427
|
+
description?: string;
|
|
362
428
|
input_schema: {
|
|
363
429
|
type?: unknown;
|
|
364
430
|
properties?: Record<string, unknown> | null | undefined;
|
|
365
431
|
required?: readonly string[] | string[];
|
|
366
432
|
additionalProperties?: unknown;
|
|
367
433
|
[k: string]: unknown;
|
|
368
|
-
}
|
|
434
|
+
};
|
|
369
435
|
}
|
|
370
436
|
/**
|
|
371
437
|
* A tool use instance represents a call to a tool.
|
|
372
438
|
* The id property is used to identify the tool call.
|
|
373
439
|
*/
|
|
374
440
|
export interface ToolUse<ParamsT = JSONObject> {
|
|
375
|
-
id: string
|
|
376
|
-
tool_name: string
|
|
377
|
-
tool_input: ParamsT | null
|
|
441
|
+
id: string;
|
|
442
|
+
tool_name: string;
|
|
443
|
+
tool_input: ParamsT | null;
|
|
378
444
|
/**
|
|
379
445
|
* Gemini thinking models require thought_signature to be passed back with tool results.
|
|
380
446
|
* This preserves the model's reasoning state during multi-turn tool use.
|
|
381
447
|
*/
|
|
382
|
-
thought_signature?: string
|
|
448
|
+
thought_signature?: string;
|
|
383
449
|
}
|
|
384
450
|
|
|
385
451
|
export interface Completion {
|
|
@@ -389,11 +455,11 @@ export interface Completion {
|
|
|
389
455
|
/**
|
|
390
456
|
* Contains the tools from which the model awaits information.
|
|
391
457
|
*/
|
|
392
|
-
tool_use?: ToolUse[];
|
|
458
|
+
tool_use?: ToolUse<unknown>[];
|
|
393
459
|
/**
|
|
394
460
|
* The finish reason as reported by the model: stop | length or other model specific values
|
|
395
461
|
*/
|
|
396
|
-
finish_reason?:
|
|
462
|
+
finish_reason?: 'stop' | 'length' | 'tool_use' | string;
|
|
397
463
|
|
|
398
464
|
/**
|
|
399
465
|
* Set only if a result validation error occurred, otherwise if the result is valid the error field is undefined
|
|
@@ -404,7 +470,7 @@ export interface Completion {
|
|
|
404
470
|
/**
|
|
405
471
|
* The original response. Only included if the option include_original_response is set to true and the request is made using execute. Not supported when streaming.
|
|
406
472
|
*/
|
|
407
|
-
original_response?:
|
|
473
|
+
original_response?: unknown;
|
|
408
474
|
|
|
409
475
|
/**
|
|
410
476
|
* The conversation context. This is an opaque structure that can be passed to the next request to restore the context.
|
|
@@ -412,7 +478,7 @@ export interface Completion {
|
|
|
412
478
|
conversation?: unknown;
|
|
413
479
|
}
|
|
414
480
|
|
|
415
|
-
export interface ExecutionResponse<PromptT =
|
|
481
|
+
export interface ExecutionResponse<PromptT = unknown> extends Completion {
|
|
416
482
|
prompt: PromptT;
|
|
417
483
|
/**
|
|
418
484
|
* The time it took to execute the request in seconds
|
|
@@ -424,8 +490,7 @@ export interface ExecutionResponse<PromptT = any> extends Completion {
|
|
|
424
490
|
chunks?: number;
|
|
425
491
|
}
|
|
426
492
|
|
|
427
|
-
|
|
428
|
-
export interface CompletionStream<PromptT = any> extends AsyncIterable<string> {
|
|
493
|
+
export interface CompletionStream<PromptT = unknown> extends AsyncIterable<string> {
|
|
429
494
|
completion: ExecutionResponse<PromptT> | undefined;
|
|
430
495
|
}
|
|
431
496
|
|
|
@@ -435,7 +500,7 @@ export interface CompletionStream<PromptT = any> extends AsyncIterable<string> {
|
|
|
435
500
|
* - Message-only: logger.info("message")
|
|
436
501
|
* - Object-first: logger.info({ data }, "message")
|
|
437
502
|
* - PREVENTS: logger.info("message", { data }) - compile error (objects not allowed in ...args)
|
|
438
|
-
*
|
|
503
|
+
*
|
|
439
504
|
* Additional args must be primitives (string | number | boolean) for string interpolation.
|
|
440
505
|
*/
|
|
441
506
|
export interface Logger {
|
|
@@ -449,19 +514,52 @@ export interface Logger {
|
|
|
449
514
|
error<T>(obj: T, msg?: T extends string ? never : string, ...args: (string | number | boolean)[]): void;
|
|
450
515
|
}
|
|
451
516
|
|
|
517
|
+
/**
|
|
518
|
+
* HTTP timeouts applied to a driver's upstream LLM-provider calls.
|
|
519
|
+
*
|
|
520
|
+
* All values are in milliseconds. Drivers should map these onto whatever
|
|
521
|
+
* HTTP client their SDK uses; the defaults applied in
|
|
522
|
+
* `@llumiverse/core/createDriverHttpAgent` are:
|
|
523
|
+
* - headersTimeout: 60_000
|
|
524
|
+
* - bodyTimeout: 60_000
|
|
525
|
+
* - connectTimeout: 10_000
|
|
526
|
+
* - keepAliveTimeout: 30_000
|
|
527
|
+
*
|
|
528
|
+
* The defaults are deliberately tighter than Node's undici default
|
|
529
|
+
* (5 minutes for headers/body) so a hung upstream surfaces quickly. Bump
|
|
530
|
+
* `bodyTimeout` for streaming flows that have legitimate silent gaps
|
|
531
|
+
* (e.g. tool-using agents).
|
|
532
|
+
*/
|
|
533
|
+
export interface HttpTimeoutOptions {
|
|
534
|
+
/** Time (ms) to wait for the first response byte after the request is sent. */
|
|
535
|
+
headersTimeout?: number;
|
|
536
|
+
/** Time (ms) between body chunks once streaming has started. */
|
|
537
|
+
bodyTimeout?: number;
|
|
538
|
+
/** TCP/TLS connect timeout (ms). */
|
|
539
|
+
connectTimeout?: number;
|
|
540
|
+
/** Idle socket reuse timeout (ms). */
|
|
541
|
+
keepAliveTimeout?: number;
|
|
542
|
+
}
|
|
543
|
+
|
|
452
544
|
export interface DriverOptions {
|
|
453
|
-
logger?: Logger |
|
|
545
|
+
logger?: Logger | 'console';
|
|
546
|
+
/**
|
|
547
|
+
* Optional HTTP timeouts applied to the driver's upstream LLM-provider
|
|
548
|
+
* calls. Drivers that don't make HTTP calls (e.g. the in-process test
|
|
549
|
+
* driver) ignore this. See {@link HttpTimeoutOptions} for defaults.
|
|
550
|
+
*/
|
|
551
|
+
httpTimeout?: HttpTimeoutOptions;
|
|
454
552
|
}
|
|
455
553
|
|
|
456
554
|
export type JSONSchemaTypeName =
|
|
457
|
-
|
|
|
458
|
-
|
|
|
459
|
-
|
|
|
460
|
-
|
|
|
461
|
-
|
|
|
462
|
-
|
|
|
463
|
-
|
|
|
464
|
-
|
|
|
555
|
+
| 'string' //
|
|
556
|
+
| 'number'
|
|
557
|
+
| 'integer'
|
|
558
|
+
| 'boolean'
|
|
559
|
+
| 'object'
|
|
560
|
+
| 'array'
|
|
561
|
+
| 'null'
|
|
562
|
+
| 'any';
|
|
465
563
|
|
|
466
564
|
export type JSONSchemaType =
|
|
467
565
|
| string //
|
|
@@ -475,7 +573,7 @@ export interface JSONSchemaObject {
|
|
|
475
573
|
[key: string]: JSONSchemaType;
|
|
476
574
|
}
|
|
477
575
|
|
|
478
|
-
export interface JSONSchemaArray extends Array<JSONSchemaType> {
|
|
576
|
+
export interface JSONSchemaArray extends Array<JSONSchemaType> {}
|
|
479
577
|
|
|
480
578
|
export interface JSONSchemaProperties {
|
|
481
579
|
[key: string]: JSONSchema;
|
|
@@ -485,12 +583,16 @@ export interface JSONSchema {
|
|
|
485
583
|
type?: JSONSchemaTypeName | JSONSchemaTypeName[];
|
|
486
584
|
description?: string;
|
|
487
585
|
properties?: JSONSchemaProperties;
|
|
586
|
+
items?: JSONSchema;
|
|
587
|
+
format?: string;
|
|
588
|
+
editor?: unknown;
|
|
589
|
+
default?: unknown;
|
|
488
590
|
additionalProperties?: boolean | JSONSchema;
|
|
489
591
|
required?: string[];
|
|
490
|
-
[k: string]:
|
|
592
|
+
[k: string]: unknown;
|
|
491
593
|
}
|
|
492
594
|
|
|
493
|
-
export type PromptFormatter<T =
|
|
595
|
+
export type PromptFormatter<T = unknown> = (messages: PromptSegment[], schema?: JSONSchema) => T;
|
|
494
596
|
|
|
495
597
|
//Options are split into PromptOptions, ModelOptions and ExecutionOptions.
|
|
496
598
|
//ExecutionOptions are most often used within llumiverse as they are the most complete.
|
|
@@ -514,6 +616,12 @@ export interface StatelessExecutionOptions extends PromptOptions {
|
|
|
514
616
|
include_original_response?: boolean;
|
|
515
617
|
model_options?: ModelOptions;
|
|
516
618
|
|
|
619
|
+
/**
|
|
620
|
+
* Per-call HTTP timeouts for upstream LLM-provider calls. These override
|
|
621
|
+
* the driver's default `DriverOptions.httpTimeout` for this execution only.
|
|
622
|
+
*/
|
|
623
|
+
httpTimeout?: HttpTimeoutOptions;
|
|
624
|
+
|
|
517
625
|
/**
|
|
518
626
|
* @deprecated This is deprecated. Use CompletionResult.type information instead.
|
|
519
627
|
*/
|
|
@@ -568,28 +676,28 @@ export interface ExecutionOptions extends StatelessExecutionOptions {
|
|
|
568
676
|
//Common names to share between different models
|
|
569
677
|
export enum SharedOptions {
|
|
570
678
|
//Text
|
|
571
|
-
max_tokens =
|
|
572
|
-
temperature =
|
|
573
|
-
top_p =
|
|
574
|
-
top_k =
|
|
575
|
-
presence_penalty =
|
|
576
|
-
frequency_penalty =
|
|
577
|
-
stop_sequence =
|
|
578
|
-
effort =
|
|
679
|
+
max_tokens = 'max_tokens',
|
|
680
|
+
temperature = 'temperature',
|
|
681
|
+
top_p = 'top_p',
|
|
682
|
+
top_k = 'top_k',
|
|
683
|
+
presence_penalty = 'presence_penalty',
|
|
684
|
+
frequency_penalty = 'frequency_penalty',
|
|
685
|
+
stop_sequence = 'stop_sequence',
|
|
686
|
+
effort = 'effort',
|
|
579
687
|
|
|
580
688
|
//Image
|
|
581
|
-
seed =
|
|
582
|
-
number_of_images =
|
|
689
|
+
seed = 'seed',
|
|
690
|
+
number_of_images = 'number_of_images',
|
|
583
691
|
}
|
|
584
692
|
|
|
585
693
|
export enum OptionType {
|
|
586
|
-
numeric =
|
|
587
|
-
enum =
|
|
588
|
-
boolean =
|
|
589
|
-
string_list =
|
|
694
|
+
numeric = 'numeric',
|
|
695
|
+
enum = 'enum',
|
|
696
|
+
boolean = 'boolean',
|
|
697
|
+
string_list = 'string_list',
|
|
590
698
|
}
|
|
591
699
|
|
|
592
|
-
export type ReasoningEffort =
|
|
700
|
+
export type ReasoningEffort = 'low' | 'medium' | 'high';
|
|
593
701
|
|
|
594
702
|
// ============== Model Options ===============
|
|
595
703
|
|
|
@@ -647,16 +755,16 @@ export interface StringListOptionInfo extends OptionInfoPrototype {
|
|
|
647
755
|
|
|
648
756
|
// ============== Prompts ===============
|
|
649
757
|
export enum PromptRole {
|
|
650
|
-
safety =
|
|
651
|
-
system =
|
|
652
|
-
user =
|
|
653
|
-
assistant =
|
|
654
|
-
negative =
|
|
655
|
-
mask =
|
|
758
|
+
safety = 'safety',
|
|
759
|
+
system = 'system',
|
|
760
|
+
user = 'user',
|
|
761
|
+
assistant = 'assistant',
|
|
762
|
+
negative = 'negative',
|
|
763
|
+
mask = 'mask',
|
|
656
764
|
/**
|
|
657
765
|
* Used to send the response of a tool
|
|
658
766
|
*/
|
|
659
|
-
tool =
|
|
767
|
+
tool = 'tool',
|
|
660
768
|
}
|
|
661
769
|
|
|
662
770
|
export interface PromptSegment {
|
|
@@ -671,7 +779,7 @@ export interface PromptSegment {
|
|
|
671
779
|
* This should be copied from the ToolUse.thought_signature when sending tool responses.
|
|
672
780
|
*/
|
|
673
781
|
thought_signature?: string;
|
|
674
|
-
files?: DataSource[]
|
|
782
|
+
files?: DataSource[];
|
|
675
783
|
}
|
|
676
784
|
|
|
677
785
|
export interface ExecutionTokenUsage {
|
|
@@ -695,8 +803,8 @@ export interface ExecutionTokenUsage {
|
|
|
695
803
|
* @deprecated This is deprecated. Use CompletionResult.type information instead.
|
|
696
804
|
*/
|
|
697
805
|
export enum Modalities {
|
|
698
|
-
text =
|
|
699
|
-
image =
|
|
806
|
+
text = 'text',
|
|
807
|
+
image = 'image',
|
|
700
808
|
}
|
|
701
809
|
|
|
702
810
|
/**
|
|
@@ -731,7 +839,7 @@ export interface AIModel<ProviderKeys = string> {
|
|
|
731
839
|
status?: AIModelStatus; //status of the model
|
|
732
840
|
can_stream?: boolean; //if the model's response can be streamed
|
|
733
841
|
is_custom?: boolean; //if the model is a custom model (a trained model)
|
|
734
|
-
is_multimodal?: boolean //if the model support files and images
|
|
842
|
+
is_multimodal?: boolean; //if the model support files and images
|
|
735
843
|
input_modalities?: string[]; //Input modalities supported by the model (e.g. text, image, video, audio)
|
|
736
844
|
output_modalities?: string[]; //Output modalities supported by the model (e.g. text, image, video, audio)
|
|
737
845
|
tool_support?: boolean; //if the model supports tool use
|
|
@@ -739,12 +847,12 @@ export interface AIModel<ProviderKeys = string> {
|
|
|
739
847
|
}
|
|
740
848
|
|
|
741
849
|
export enum AIModelStatus {
|
|
742
|
-
Available =
|
|
743
|
-
Pending =
|
|
744
|
-
Stopped =
|
|
745
|
-
Unavailable =
|
|
746
|
-
Unknown =
|
|
747
|
-
Legacy =
|
|
850
|
+
Available = 'available',
|
|
851
|
+
Pending = 'pending',
|
|
852
|
+
Stopped = 'stopped',
|
|
853
|
+
Unavailable = 'unavailable',
|
|
854
|
+
Unknown = 'unknown',
|
|
855
|
+
Legacy = 'legacy',
|
|
748
856
|
}
|
|
749
857
|
|
|
750
858
|
/**
|
|
@@ -761,37 +869,34 @@ export interface ModelSearchPayload {
|
|
|
761
869
|
owner?: string;
|
|
762
870
|
}
|
|
763
871
|
|
|
764
|
-
|
|
765
872
|
export enum ModelType {
|
|
766
|
-
Classifier =
|
|
767
|
-
Regressor =
|
|
768
|
-
Clustering =
|
|
769
|
-
AnomalyDetection =
|
|
770
|
-
TimeSeries =
|
|
771
|
-
Text =
|
|
772
|
-
Image =
|
|
773
|
-
Audio =
|
|
774
|
-
Video =
|
|
775
|
-
Embedding =
|
|
776
|
-
Chat =
|
|
777
|
-
Code =
|
|
778
|
-
NLP =
|
|
779
|
-
MultiModal =
|
|
780
|
-
Test =
|
|
781
|
-
Other =
|
|
782
|
-
Unknown =
|
|
873
|
+
Classifier = 'classifier',
|
|
874
|
+
Regressor = 'regressor',
|
|
875
|
+
Clustering = 'clustering',
|
|
876
|
+
AnomalyDetection = 'anomaly-detection',
|
|
877
|
+
TimeSeries = 'time-series',
|
|
878
|
+
Text = 'text',
|
|
879
|
+
Image = 'image',
|
|
880
|
+
Audio = 'audio',
|
|
881
|
+
Video = 'video',
|
|
882
|
+
Embedding = 'embedding',
|
|
883
|
+
Chat = 'chat',
|
|
884
|
+
Code = 'code',
|
|
885
|
+
NLP = 'nlp',
|
|
886
|
+
MultiModal = 'multi-modal',
|
|
887
|
+
Test = 'test',
|
|
888
|
+
Other = 'other',
|
|
889
|
+
Unknown = 'unknown',
|
|
783
890
|
}
|
|
784
891
|
|
|
785
|
-
|
|
786
892
|
// ============== training =====================
|
|
787
893
|
|
|
788
|
-
|
|
789
|
-
|
|
790
894
|
export interface DataSource {
|
|
791
895
|
name: string;
|
|
792
896
|
mime_type: string;
|
|
793
897
|
getStream(): Promise<ReadableStream<Uint8Array | string>>;
|
|
794
898
|
getURL(): Promise<string>;
|
|
899
|
+
getURI(): Promise<string>;
|
|
795
900
|
}
|
|
796
901
|
|
|
797
902
|
export interface TrainingOptions {
|
|
@@ -802,16 +907,16 @@ export interface TrainingOptions {
|
|
|
802
907
|
|
|
803
908
|
export interface TrainingPromptOptions {
|
|
804
909
|
segments: PromptSegment[];
|
|
805
|
-
completion: CompletionResult[]
|
|
910
|
+
completion: CompletionResult[];
|
|
806
911
|
model: string; // the model to train
|
|
807
912
|
schema?: JSONSchema; // the result schema f any
|
|
808
913
|
}
|
|
809
914
|
|
|
810
915
|
export enum TrainingJobStatus {
|
|
811
|
-
running =
|
|
812
|
-
succeeded =
|
|
813
|
-
failed =
|
|
814
|
-
cancelled =
|
|
916
|
+
running = 'running',
|
|
917
|
+
succeeded = 'succeeded',
|
|
918
|
+
failed = 'failed',
|
|
919
|
+
cancelled = 'cancelled',
|
|
815
920
|
}
|
|
816
921
|
|
|
817
922
|
export interface TrainingJob {
|