@juspay/neurolink 7.7.1 → 7.8.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/CHANGELOG.md +12 -0
- package/README.md +33 -2
- package/dist/cli/commands/config.d.ts +3 -3
- package/dist/cli/commands/sagemaker.d.ts +11 -0
- package/dist/cli/commands/sagemaker.js +778 -0
- package/dist/cli/factories/commandFactory.js +1 -0
- package/dist/cli/index.js +3 -0
- package/dist/cli/utils/interactiveSetup.js +28 -0
- package/dist/core/baseProvider.d.ts +2 -2
- package/dist/core/types.d.ts +1 -0
- package/dist/core/types.js +1 -0
- package/dist/factories/providerRegistry.js +5 -0
- package/dist/lib/core/baseProvider.d.ts +2 -2
- package/dist/lib/core/types.d.ts +1 -0
- package/dist/lib/core/types.js +1 -0
- package/dist/lib/factories/providerRegistry.js +5 -0
- package/dist/lib/providers/amazonSagemaker.d.ts +67 -0
- package/dist/lib/providers/amazonSagemaker.js +149 -0
- package/dist/lib/providers/index.d.ts +4 -0
- package/dist/lib/providers/index.js +4 -0
- package/dist/lib/providers/sagemaker/adaptive-semaphore.d.ts +86 -0
- package/dist/lib/providers/sagemaker/adaptive-semaphore.js +212 -0
- package/dist/lib/providers/sagemaker/client.d.ts +156 -0
- package/dist/lib/providers/sagemaker/client.js +462 -0
- package/dist/lib/providers/sagemaker/config.d.ts +73 -0
- package/dist/lib/providers/sagemaker/config.js +308 -0
- package/dist/lib/providers/sagemaker/detection.d.ts +176 -0
- package/dist/lib/providers/sagemaker/detection.js +596 -0
- package/dist/lib/providers/sagemaker/diagnostics.d.ts +37 -0
- package/dist/lib/providers/sagemaker/diagnostics.js +137 -0
- package/dist/lib/providers/sagemaker/error-constants.d.ts +78 -0
- package/dist/lib/providers/sagemaker/error-constants.js +227 -0
- package/dist/lib/providers/sagemaker/errors.d.ts +83 -0
- package/dist/lib/providers/sagemaker/errors.js +216 -0
- package/dist/lib/providers/sagemaker/index.d.ts +35 -0
- package/dist/lib/providers/sagemaker/index.js +67 -0
- package/dist/lib/providers/sagemaker/language-model.d.ts +182 -0
- package/dist/lib/providers/sagemaker/language-model.js +755 -0
- package/dist/lib/providers/sagemaker/parsers.d.ts +136 -0
- package/dist/lib/providers/sagemaker/parsers.js +625 -0
- package/dist/lib/providers/sagemaker/streaming.d.ts +39 -0
- package/dist/lib/providers/sagemaker/streaming.js +320 -0
- package/dist/lib/providers/sagemaker/structured-parser.d.ts +117 -0
- package/dist/lib/providers/sagemaker/structured-parser.js +625 -0
- package/dist/lib/providers/sagemaker/types.d.ts +456 -0
- package/dist/lib/providers/sagemaker/types.js +7 -0
- package/dist/lib/types/cli.d.ts +36 -1
- package/dist/providers/amazonSagemaker.d.ts +67 -0
- package/dist/providers/amazonSagemaker.js +149 -0
- package/dist/providers/index.d.ts +4 -0
- package/dist/providers/index.js +4 -0
- package/dist/providers/sagemaker/adaptive-semaphore.d.ts +86 -0
- package/dist/providers/sagemaker/adaptive-semaphore.js +212 -0
- package/dist/providers/sagemaker/client.d.ts +156 -0
- package/dist/providers/sagemaker/client.js +462 -0
- package/dist/providers/sagemaker/config.d.ts +73 -0
- package/dist/providers/sagemaker/config.js +308 -0
- package/dist/providers/sagemaker/detection.d.ts +176 -0
- package/dist/providers/sagemaker/detection.js +596 -0
- package/dist/providers/sagemaker/diagnostics.d.ts +37 -0
- package/dist/providers/sagemaker/diagnostics.js +137 -0
- package/dist/providers/sagemaker/error-constants.d.ts +78 -0
- package/dist/providers/sagemaker/error-constants.js +227 -0
- package/dist/providers/sagemaker/errors.d.ts +83 -0
- package/dist/providers/sagemaker/errors.js +216 -0
- package/dist/providers/sagemaker/index.d.ts +35 -0
- package/dist/providers/sagemaker/index.js +67 -0
- package/dist/providers/sagemaker/language-model.d.ts +182 -0
- package/dist/providers/sagemaker/language-model.js +755 -0
- package/dist/providers/sagemaker/parsers.d.ts +136 -0
- package/dist/providers/sagemaker/parsers.js +625 -0
- package/dist/providers/sagemaker/streaming.d.ts +39 -0
- package/dist/providers/sagemaker/streaming.js +320 -0
- package/dist/providers/sagemaker/structured-parser.d.ts +117 -0
- package/dist/providers/sagemaker/structured-parser.js +625 -0
- package/dist/providers/sagemaker/types.d.ts +456 -0
- package/dist/providers/sagemaker/types.js +7 -0
- package/dist/types/cli.d.ts +36 -1
- package/package.json +4 -1
|
@@ -0,0 +1,456 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TypeScript type definitions for Amazon SageMaker Provider
|
|
3
|
+
*
|
|
4
|
+
* This module contains all interfaces and types for SageMaker integration
|
|
5
|
+
* with the NeuroLink ecosystem and Vercel AI SDK compatibility.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* AWS configuration options for SageMaker client
|
|
9
|
+
*/
|
|
10
|
+
export interface SageMakerConfig {
|
|
11
|
+
/** AWS region for SageMaker service */
|
|
12
|
+
region: string;
|
|
13
|
+
/** AWS access key ID */
|
|
14
|
+
accessKeyId: string;
|
|
15
|
+
/** AWS secret access key */
|
|
16
|
+
secretAccessKey: string;
|
|
17
|
+
/** AWS session token (optional, for temporary credentials) */
|
|
18
|
+
sessionToken?: string;
|
|
19
|
+
/** Request timeout in milliseconds */
|
|
20
|
+
timeout?: number;
|
|
21
|
+
/** Maximum number of retry attempts */
|
|
22
|
+
maxRetries?: number;
|
|
23
|
+
/** Custom SageMaker endpoint URL (optional) */
|
|
24
|
+
endpoint?: string;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Model-specific configuration for SageMaker endpoints
|
|
28
|
+
*/
|
|
29
|
+
export interface SageMakerModelConfig {
|
|
30
|
+
/** SageMaker endpoint name */
|
|
31
|
+
endpointName: string;
|
|
32
|
+
/** Model type for request/response formatting */
|
|
33
|
+
modelType?: "llama" | "mistral" | "claude" | "huggingface" | "jumpstart" | "custom";
|
|
34
|
+
/** Content type for requests */
|
|
35
|
+
contentType?: string;
|
|
36
|
+
/** Accept header for responses */
|
|
37
|
+
accept?: string;
|
|
38
|
+
/** Custom attributes for the endpoint */
|
|
39
|
+
customAttributes?: string;
|
|
40
|
+
/** Input format specification */
|
|
41
|
+
inputFormat?: "huggingface" | "jumpstart" | "custom";
|
|
42
|
+
/** Output format specification */
|
|
43
|
+
outputFormat?: "huggingface" | "jumpstart" | "custom";
|
|
44
|
+
/** Maximum tokens for generation */
|
|
45
|
+
maxTokens?: number;
|
|
46
|
+
/** Temperature parameter */
|
|
47
|
+
temperature?: number;
|
|
48
|
+
/** Top-p parameter */
|
|
49
|
+
topP?: number;
|
|
50
|
+
/** Stop sequences */
|
|
51
|
+
stopSequences?: string[];
|
|
52
|
+
/** Initial concurrency for batch processing */
|
|
53
|
+
initialConcurrency?: number;
|
|
54
|
+
/** Maximum concurrency for batch processing */
|
|
55
|
+
maxConcurrency?: number;
|
|
56
|
+
/** Minimum concurrency for batch processing */
|
|
57
|
+
minConcurrency?: number;
|
|
58
|
+
/** Maximum concurrent detection tests */
|
|
59
|
+
maxConcurrentDetectionTests?: number;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* SageMaker endpoint information and metadata
|
|
63
|
+
*/
|
|
64
|
+
export interface SageMakerEndpointInfo {
|
|
65
|
+
/** Endpoint name */
|
|
66
|
+
endpointName: string;
|
|
67
|
+
/** Endpoint ARN */
|
|
68
|
+
endpointArn: string;
|
|
69
|
+
/** Associated model name */
|
|
70
|
+
modelName: string;
|
|
71
|
+
/** EC2 instance type */
|
|
72
|
+
instanceType: string;
|
|
73
|
+
/** Endpoint creation timestamp */
|
|
74
|
+
creationTime: string;
|
|
75
|
+
/** Last modification timestamp */
|
|
76
|
+
lastModifiedTime: string;
|
|
77
|
+
/** Current endpoint status */
|
|
78
|
+
endpointStatus: "InService" | "Creating" | "Updating" | "SystemUpdating" | "RollingBack" | "Deleting" | "Failed";
|
|
79
|
+
/** Current instance count */
|
|
80
|
+
currentInstanceCount?: number;
|
|
81
|
+
/** Variant weights for A/B testing */
|
|
82
|
+
productionVariants?: Array<{
|
|
83
|
+
variantName: string;
|
|
84
|
+
modelName: string;
|
|
85
|
+
initialInstanceCount: number;
|
|
86
|
+
instanceType: string;
|
|
87
|
+
currentWeight?: number;
|
|
88
|
+
}>;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Token usage and billing information
|
|
92
|
+
*/
|
|
93
|
+
export interface SageMakerUsage {
|
|
94
|
+
/** Number of prompt tokens */
|
|
95
|
+
promptTokens: number;
|
|
96
|
+
/** Number of completion tokens */
|
|
97
|
+
completionTokens: number;
|
|
98
|
+
/** Total tokens used */
|
|
99
|
+
totalTokens: number;
|
|
100
|
+
/** Request processing time in milliseconds */
|
|
101
|
+
requestTime?: number;
|
|
102
|
+
/** Model inference time in milliseconds */
|
|
103
|
+
inferenceTime?: number;
|
|
104
|
+
/** Estimated cost in USD */
|
|
105
|
+
estimatedCost?: number;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Parameters for SageMaker endpoint invocation
|
|
109
|
+
*/
|
|
110
|
+
export interface InvokeEndpointParams {
|
|
111
|
+
/** Endpoint name to invoke */
|
|
112
|
+
EndpointName: string;
|
|
113
|
+
/** Request body as string or Uint8Array */
|
|
114
|
+
Body: string | Uint8Array;
|
|
115
|
+
/** Content type of the request */
|
|
116
|
+
ContentType?: string;
|
|
117
|
+
/** Accept header for response format */
|
|
118
|
+
Accept?: string;
|
|
119
|
+
/** Custom attributes for the request */
|
|
120
|
+
CustomAttributes?: string;
|
|
121
|
+
/** Target model for multi-model endpoints */
|
|
122
|
+
TargetModel?: string;
|
|
123
|
+
/** Target variant for A/B testing */
|
|
124
|
+
TargetVariant?: string;
|
|
125
|
+
/** Inference ID for request tracking */
|
|
126
|
+
InferenceId?: string;
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Response from SageMaker endpoint invocation
|
|
130
|
+
*/
|
|
131
|
+
export interface InvokeEndpointResponse {
|
|
132
|
+
/** Response body */
|
|
133
|
+
Body?: Uint8Array;
|
|
134
|
+
/** Content type of the response */
|
|
135
|
+
ContentType?: string;
|
|
136
|
+
/** Invoked production variant */
|
|
137
|
+
InvokedProductionVariant?: string;
|
|
138
|
+
/** Custom attributes in the response */
|
|
139
|
+
CustomAttributes?: string;
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* Streaming response chunk from SageMaker
|
|
143
|
+
*/
|
|
144
|
+
export interface SageMakerStreamChunk {
|
|
145
|
+
/** Text content in the chunk */
|
|
146
|
+
content?: string;
|
|
147
|
+
/** Indicates if this is the final chunk */
|
|
148
|
+
done?: boolean;
|
|
149
|
+
/** Usage information (only in final chunk) */
|
|
150
|
+
usage?: SageMakerUsage;
|
|
151
|
+
/** Error information if chunk contains error */
|
|
152
|
+
error?: string;
|
|
153
|
+
/** Finish reason for generation */
|
|
154
|
+
finishReason?: "stop" | "length" | "tool-calls" | "content-filter" | "unknown";
|
|
155
|
+
/** Tool call in progress (Phase 2.3) */
|
|
156
|
+
toolCall?: SageMakerStreamingToolCall;
|
|
157
|
+
/** Tool result chunk (Phase 2.3) */
|
|
158
|
+
toolResult?: SageMakerStreamingToolResult;
|
|
159
|
+
/** Structured output streaming (Phase 2.3) */
|
|
160
|
+
structuredOutput?: SageMakerStructuredOutput;
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* Tool call information for function calling
|
|
164
|
+
*/
|
|
165
|
+
export interface SageMakerToolCall {
|
|
166
|
+
/** Tool call identifier */
|
|
167
|
+
id: string;
|
|
168
|
+
/** Tool/function name */
|
|
169
|
+
name: string;
|
|
170
|
+
/** Tool arguments as JSON object */
|
|
171
|
+
arguments: Record<string, unknown>;
|
|
172
|
+
/** Tool call type */
|
|
173
|
+
type: "function";
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* Tool result information
|
|
177
|
+
*/
|
|
178
|
+
export interface SageMakerToolResult {
|
|
179
|
+
/** Tool call identifier */
|
|
180
|
+
toolCallId: string;
|
|
181
|
+
/** Tool name */
|
|
182
|
+
toolName: string;
|
|
183
|
+
/** Tool result data */
|
|
184
|
+
result: unknown;
|
|
185
|
+
/** Execution status */
|
|
186
|
+
status: "success" | "error";
|
|
187
|
+
/** Error message if status is error */
|
|
188
|
+
error?: string;
|
|
189
|
+
}
|
|
190
|
+
/**
|
|
191
|
+
* Streaming tool call information (Phase 2.3)
|
|
192
|
+
*/
|
|
193
|
+
export interface SageMakerStreamingToolCall {
|
|
194
|
+
/** Tool call identifier */
|
|
195
|
+
id: string;
|
|
196
|
+
/** Tool/function name */
|
|
197
|
+
name?: string;
|
|
198
|
+
/** Partial or complete arguments as JSON string */
|
|
199
|
+
arguments?: string;
|
|
200
|
+
/** Tool call type */
|
|
201
|
+
type: "function";
|
|
202
|
+
/** Indicates if this tool call is complete */
|
|
203
|
+
complete?: boolean;
|
|
204
|
+
/** Delta text for incremental argument building */
|
|
205
|
+
argumentsDelta?: string;
|
|
206
|
+
}
|
|
207
|
+
/**
|
|
208
|
+
* Streaming tool result information (Phase 2.3)
|
|
209
|
+
*/
|
|
210
|
+
export interface SageMakerStreamingToolResult {
|
|
211
|
+
/** Tool call identifier */
|
|
212
|
+
toolCallId: string;
|
|
213
|
+
/** Tool name */
|
|
214
|
+
toolName: string;
|
|
215
|
+
/** Partial or complete result data */
|
|
216
|
+
result?: unknown;
|
|
217
|
+
/** Result delta for incremental responses */
|
|
218
|
+
resultDelta?: string;
|
|
219
|
+
/** Execution status */
|
|
220
|
+
status: "pending" | "running" | "success" | "error";
|
|
221
|
+
/** Error message if status is error */
|
|
222
|
+
error?: string;
|
|
223
|
+
/** Indicates if this result is complete */
|
|
224
|
+
complete?: boolean;
|
|
225
|
+
}
|
|
226
|
+
/**
|
|
227
|
+
* Structured output streaming information (Phase 2.3)
|
|
228
|
+
*/
|
|
229
|
+
export interface SageMakerStructuredOutput {
|
|
230
|
+
/** Partial JSON object being built */
|
|
231
|
+
partialObject?: Record<string, unknown>;
|
|
232
|
+
/** JSON delta text */
|
|
233
|
+
jsonDelta?: string;
|
|
234
|
+
/** Current parsing path (e.g., "user.name") */
|
|
235
|
+
currentPath?: string;
|
|
236
|
+
/** Schema validation errors */
|
|
237
|
+
validationErrors?: string[];
|
|
238
|
+
/** Indicates if JSON is complete and valid */
|
|
239
|
+
complete?: boolean;
|
|
240
|
+
/** JSON schema being validated against */
|
|
241
|
+
schema?: Record<string, unknown>;
|
|
242
|
+
}
|
|
243
|
+
/**
|
|
244
|
+
* Enhanced generation request options
|
|
245
|
+
*/
|
|
246
|
+
export interface SageMakerGenerationOptions {
|
|
247
|
+
/** Input prompt text */
|
|
248
|
+
prompt: string;
|
|
249
|
+
/** System prompt for context */
|
|
250
|
+
systemPrompt?: string;
|
|
251
|
+
/** Maximum tokens to generate */
|
|
252
|
+
maxTokens?: number;
|
|
253
|
+
/** Temperature for randomness (0-1) */
|
|
254
|
+
temperature?: number;
|
|
255
|
+
/** Top-p nucleus sampling (0-1) */
|
|
256
|
+
topP?: number;
|
|
257
|
+
/** Top-k sampling */
|
|
258
|
+
topK?: number;
|
|
259
|
+
/** Stop sequences to end generation */
|
|
260
|
+
stopSequences?: string[];
|
|
261
|
+
/** Enable streaming response */
|
|
262
|
+
stream?: boolean;
|
|
263
|
+
/** Tools available for function calling */
|
|
264
|
+
tools?: Array<{
|
|
265
|
+
name: string;
|
|
266
|
+
description: string;
|
|
267
|
+
parameters: Record<string, unknown>;
|
|
268
|
+
}>;
|
|
269
|
+
/** Tool choice mode */
|
|
270
|
+
toolChoice?: "auto" | "none" | {
|
|
271
|
+
type: "tool";
|
|
272
|
+
name: string;
|
|
273
|
+
};
|
|
274
|
+
}
|
|
275
|
+
/**
|
|
276
|
+
* Generation response from SageMaker
|
|
277
|
+
*/
|
|
278
|
+
export interface SageMakerGenerationResponse {
|
|
279
|
+
/** Generated text content */
|
|
280
|
+
text: string;
|
|
281
|
+
/** Token usage information */
|
|
282
|
+
usage: SageMakerUsage;
|
|
283
|
+
/** Finish reason for generation */
|
|
284
|
+
finishReason: "stop" | "length" | "tool-calls" | "content-filter" | "unknown";
|
|
285
|
+
/** Tool calls made during generation */
|
|
286
|
+
toolCalls?: SageMakerToolCall[];
|
|
287
|
+
/** Tool results if tools were executed */
|
|
288
|
+
toolResults?: SageMakerToolResult[];
|
|
289
|
+
/** Additional metadata */
|
|
290
|
+
metadata?: Record<string, unknown>;
|
|
291
|
+
/** Model version or identifier */
|
|
292
|
+
modelVersion?: string;
|
|
293
|
+
}
|
|
294
|
+
/**
|
|
295
|
+
* Error codes specific to SageMaker operations
|
|
296
|
+
*/
|
|
297
|
+
export type SageMakerErrorCode = "VALIDATION_ERROR" | "MODEL_ERROR" | "INTERNAL_ERROR" | "SERVICE_UNAVAILABLE" | "CREDENTIALS_ERROR" | "NETWORK_ERROR" | "ENDPOINT_NOT_FOUND" | "THROTTLING_ERROR" | "UNKNOWN_ERROR";
|
|
298
|
+
/**
|
|
299
|
+
* SageMaker-specific error information
|
|
300
|
+
*/
|
|
301
|
+
export interface SageMakerErrorInfo {
|
|
302
|
+
/** Error code */
|
|
303
|
+
code: SageMakerErrorCode;
|
|
304
|
+
/** Human-readable error message */
|
|
305
|
+
message: string;
|
|
306
|
+
/** HTTP status code if applicable */
|
|
307
|
+
statusCode?: number;
|
|
308
|
+
/** Original error from AWS SDK */
|
|
309
|
+
cause?: Error;
|
|
310
|
+
/** Endpoint name where error occurred */
|
|
311
|
+
endpoint?: string;
|
|
312
|
+
/** Request ID for debugging */
|
|
313
|
+
requestId?: string;
|
|
314
|
+
/** Retry suggestion */
|
|
315
|
+
retryable?: boolean;
|
|
316
|
+
}
|
|
317
|
+
/**
|
|
318
|
+
* Batch inference job configuration
|
|
319
|
+
*/
|
|
320
|
+
export interface BatchInferenceConfig {
|
|
321
|
+
/** Input S3 location */
|
|
322
|
+
inputS3Uri: string;
|
|
323
|
+
/** Output S3 location */
|
|
324
|
+
outputS3Uri: string;
|
|
325
|
+
/** SageMaker model name */
|
|
326
|
+
modelName: string;
|
|
327
|
+
/** Instance type for batch job */
|
|
328
|
+
instanceType: string;
|
|
329
|
+
/** Instance count for batch job */
|
|
330
|
+
instanceCount: number;
|
|
331
|
+
/** Maximum payload size in MB */
|
|
332
|
+
maxPayloadInMB?: number;
|
|
333
|
+
/** Batch strategy */
|
|
334
|
+
batchStrategy?: "MultiRecord" | "SingleRecord";
|
|
335
|
+
}
|
|
336
|
+
/**
|
|
337
|
+
* Model deployment configuration
|
|
338
|
+
*/
|
|
339
|
+
export interface ModelDeploymentConfig {
|
|
340
|
+
/** Model name */
|
|
341
|
+
modelName: string;
|
|
342
|
+
/** Endpoint name */
|
|
343
|
+
endpointName: string;
|
|
344
|
+
/** EC2 instance type */
|
|
345
|
+
instanceType: string;
|
|
346
|
+
/** Initial instance count */
|
|
347
|
+
initialInstanceCount: number;
|
|
348
|
+
/** Model data S3 location */
|
|
349
|
+
modelDataUrl: string;
|
|
350
|
+
/** Container image URI */
|
|
351
|
+
image: string;
|
|
352
|
+
/** IAM execution role ARN */
|
|
353
|
+
executionRoleArn: string;
|
|
354
|
+
/** Resource tags */
|
|
355
|
+
tags?: Record<string, string>;
|
|
356
|
+
/** Auto scaling configuration */
|
|
357
|
+
autoScaling?: {
|
|
358
|
+
minCapacity: number;
|
|
359
|
+
maxCapacity: number;
|
|
360
|
+
targetValue: number;
|
|
361
|
+
scaleUpCooldown: number;
|
|
362
|
+
scaleDownCooldown: number;
|
|
363
|
+
};
|
|
364
|
+
}
|
|
365
|
+
/**
|
|
366
|
+
* Endpoint metrics and monitoring data
|
|
367
|
+
*/
|
|
368
|
+
export interface EndpointMetrics {
|
|
369
|
+
/** Endpoint name */
|
|
370
|
+
endpointName: string;
|
|
371
|
+
/** Total invocations */
|
|
372
|
+
invocations: number;
|
|
373
|
+
/** Average latency in milliseconds */
|
|
374
|
+
averageLatency: number;
|
|
375
|
+
/** Error rate percentage */
|
|
376
|
+
errorRate: number;
|
|
377
|
+
/** CPU utilization percentage */
|
|
378
|
+
cpuUtilization?: number;
|
|
379
|
+
/** Memory utilization percentage */
|
|
380
|
+
memoryUtilization?: number;
|
|
381
|
+
/** Instance count */
|
|
382
|
+
instanceCount: number;
|
|
383
|
+
/** Timestamp of metrics */
|
|
384
|
+
timestamp: string;
|
|
385
|
+
}
|
|
386
|
+
/**
|
|
387
|
+
* Cost estimation data
|
|
388
|
+
*/
|
|
389
|
+
export interface CostEstimate {
|
|
390
|
+
/** Estimated cost in USD */
|
|
391
|
+
estimatedCost: number;
|
|
392
|
+
/** Currency code */
|
|
393
|
+
currency: string;
|
|
394
|
+
/** Cost breakdown */
|
|
395
|
+
breakdown: {
|
|
396
|
+
/** Instance hours cost */
|
|
397
|
+
instanceCost: number;
|
|
398
|
+
/** Request-based cost */
|
|
399
|
+
requestCost: number;
|
|
400
|
+
/** Total processing hours */
|
|
401
|
+
totalHours: number;
|
|
402
|
+
};
|
|
403
|
+
/** Time period for estimate */
|
|
404
|
+
period?: {
|
|
405
|
+
start: string;
|
|
406
|
+
end: string;
|
|
407
|
+
};
|
|
408
|
+
}
|
|
409
|
+
/**
|
|
410
|
+
* SageMaker generation result interface for better type safety
|
|
411
|
+
*/
|
|
412
|
+
export interface SageMakerGenerateResult {
|
|
413
|
+
text?: string;
|
|
414
|
+
reasoning?: string | Array<{
|
|
415
|
+
type: "text";
|
|
416
|
+
text: string;
|
|
417
|
+
signature?: string;
|
|
418
|
+
} | {
|
|
419
|
+
type: "redacted";
|
|
420
|
+
data: string;
|
|
421
|
+
}>;
|
|
422
|
+
files?: Array<{
|
|
423
|
+
data: string | Uint8Array;
|
|
424
|
+
mimeType: string;
|
|
425
|
+
}>;
|
|
426
|
+
logprobs?: Array<{
|
|
427
|
+
token: string;
|
|
428
|
+
logprob: number;
|
|
429
|
+
topLogprobs: Array<{
|
|
430
|
+
token: string;
|
|
431
|
+
logprob: number;
|
|
432
|
+
}>;
|
|
433
|
+
}>;
|
|
434
|
+
usage: {
|
|
435
|
+
promptTokens: number;
|
|
436
|
+
completionTokens: number;
|
|
437
|
+
totalTokens?: number;
|
|
438
|
+
};
|
|
439
|
+
finishReason: "stop" | "length" | "content-filter" | "tool-calls" | "error" | "unknown";
|
|
440
|
+
warnings?: Array<{
|
|
441
|
+
type: "other";
|
|
442
|
+
message: string;
|
|
443
|
+
}>;
|
|
444
|
+
rawCall: {
|
|
445
|
+
rawPrompt: unknown;
|
|
446
|
+
rawSettings: Record<string, unknown>;
|
|
447
|
+
};
|
|
448
|
+
rawResponse?: {
|
|
449
|
+
headers?: Record<string, string>;
|
|
450
|
+
};
|
|
451
|
+
request?: {
|
|
452
|
+
body?: string;
|
|
453
|
+
};
|
|
454
|
+
toolCalls?: SageMakerToolCall[];
|
|
455
|
+
object?: unknown;
|
|
456
|
+
}
|
package/dist/types/cli.d.ts
CHANGED
|
@@ -12,7 +12,7 @@ export interface BaseCommandArgs {
|
|
|
12
12
|
/** Enable debug output */
|
|
13
13
|
debug?: boolean;
|
|
14
14
|
/** Output format */
|
|
15
|
-
format?: "text" | "json" | "table";
|
|
15
|
+
format?: "text" | "json" | "table" | "yaml";
|
|
16
16
|
/** Verbose output */
|
|
17
17
|
verbose?: boolean;
|
|
18
18
|
/** Quiet mode */
|
|
@@ -153,6 +153,41 @@ export interface OllamaCommandArgs extends BaseCommandArgs {
|
|
|
153
153
|
/** Show model information */
|
|
154
154
|
show?: boolean;
|
|
155
155
|
}
|
|
156
|
+
/**
|
|
157
|
+
* SageMaker command arguments
|
|
158
|
+
*/
|
|
159
|
+
export interface SageMakerCommandArgs extends BaseCommandArgs {
|
|
160
|
+
/** SageMaker endpoint name */
|
|
161
|
+
endpoint?: string;
|
|
162
|
+
/** Model name for the endpoint */
|
|
163
|
+
model?: string;
|
|
164
|
+
/** Test prompt for endpoint testing */
|
|
165
|
+
prompt?: string;
|
|
166
|
+
/** List endpoints */
|
|
167
|
+
list?: boolean;
|
|
168
|
+
/** Show configuration */
|
|
169
|
+
config?: boolean;
|
|
170
|
+
/** Setup configuration */
|
|
171
|
+
setup?: boolean;
|
|
172
|
+
/** Clear configuration cache */
|
|
173
|
+
clearCache?: boolean;
|
|
174
|
+
/** Run benchmark test */
|
|
175
|
+
benchmark?: boolean;
|
|
176
|
+
/** Duration for benchmark test (in seconds) */
|
|
177
|
+
duration?: number;
|
|
178
|
+
/** Concurrency level for benchmark */
|
|
179
|
+
concurrency?: number;
|
|
180
|
+
/** Number of requests for benchmark */
|
|
181
|
+
requests?: number;
|
|
182
|
+
/** Maximum tokens per request */
|
|
183
|
+
maxTokens?: number;
|
|
184
|
+
/** Validate endpoint configuration */
|
|
185
|
+
validate?: boolean;
|
|
186
|
+
/** AWS region override */
|
|
187
|
+
region?: string;
|
|
188
|
+
/** Force operation without confirmation */
|
|
189
|
+
force?: boolean;
|
|
190
|
+
}
|
|
156
191
|
/**
|
|
157
192
|
* Provider status command arguments
|
|
158
193
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@juspay/neurolink",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.8.0",
|
|
4
4
|
"description": "Universal AI Development Platform with working MCP integration, multi-provider support, and professional CLI. Built-in tools operational, 58+ external MCP servers discoverable. Connect to filesystem, GitHub, database operations, and more. Build, test, and deploy AI applications with 9 major providers: OpenAI, Anthropic, Google AI, AWS Bedrock, Azure, Hugging Face, Ollama, and Mistral AI.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Juspay Technologies",
|
|
@@ -131,6 +131,9 @@
|
|
|
131
131
|
"@ai-sdk/openai": "^1.0.0",
|
|
132
132
|
"@ai-sdk/provider": "^1.1.3",
|
|
133
133
|
"@ai-sdk/provider-utils": "^2.2.8",
|
|
134
|
+
"@aws-sdk/client-sagemaker": "^3.862.0",
|
|
135
|
+
"@aws-sdk/client-sagemaker-runtime": "^3.862.0",
|
|
136
|
+
"@aws-sdk/types": "^3.862.0",
|
|
134
137
|
"@google/generative-ai": "^0.24.1",
|
|
135
138
|
"@huggingface/inference": "^2.8.0",
|
|
136
139
|
"@modelcontextprotocol/sdk": "^1.13.0",
|