@zerotal/ai 1.9.0 → 1.10.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/api-surface.md +4 -4
- package/package.json +4 -4
- package/src/AiManager.ts +2 -2
- package/src/drivers/anthropic-sdk.ts +2 -2
- package/src/types.ts +2 -2
package/api-surface.md
CHANGED
|
@@ -389,8 +389,8 @@ interface AiObjectResponse = {
|
|
|
389
389
|
|
|
390
390
|
interface AiQueueOptions = {
|
|
391
391
|
handler: string
|
|
392
|
-
meta?: Record<string, unknown>
|
|
393
|
-
queue?: string
|
|
392
|
+
meta?: Record<string, unknown> | undefined
|
|
393
|
+
queue?: string | undefined
|
|
394
394
|
}
|
|
395
395
|
|
|
396
396
|
interface AiRequest = {
|
|
@@ -451,14 +451,14 @@ interface AiUsage = {
|
|
|
451
451
|
|
|
452
452
|
interface AnthropicConfigShape = {
|
|
453
453
|
apiKey: string
|
|
454
|
-
baseUrl?: string
|
|
454
|
+
baseUrl?: string | undefined
|
|
455
455
|
cacheSystem: boolean
|
|
456
456
|
effort: AiEffort
|
|
457
457
|
fallbacks: boolean
|
|
458
458
|
maxTokens: number
|
|
459
459
|
model: string
|
|
460
460
|
streamMaxTokens: number
|
|
461
|
-
temperature?: number
|
|
461
|
+
temperature?: number | undefined
|
|
462
462
|
timeout: number
|
|
463
463
|
}
|
|
464
464
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zerotal/ai",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.10.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"maturity": "experimental",
|
|
6
6
|
"maturityReview": "1.11.0",
|
|
@@ -31,9 +31,9 @@
|
|
|
31
31
|
"typecheck": "tsc --noEmit"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@zerotal/core": "1.
|
|
35
|
-
"@zerotal/validator": "1.
|
|
36
|
-
"@zerotal/queue": "1.
|
|
34
|
+
"@zerotal/core": "1.10.0",
|
|
35
|
+
"@zerotal/validator": "1.10.0",
|
|
36
|
+
"@zerotal/queue": "1.10.0"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
39
39
|
"@anthropic-ai/sdk": ">=0.70.0"
|
package/src/AiManager.ts
CHANGED
|
@@ -55,9 +55,9 @@ export interface AiQueueOptions {
|
|
|
55
55
|
/** The handler name registered with {@link AiManager.onGenerated}. */
|
|
56
56
|
handler: string;
|
|
57
57
|
/** Anything the handler needs to know — an id, a tenant. Must be JSON-safe. */
|
|
58
|
-
meta?: Record<string, unknown
|
|
58
|
+
meta?: Record<string, unknown> | undefined;
|
|
59
59
|
/** Queue name. Defaults to `ai`. */
|
|
60
|
-
queue?: string;
|
|
60
|
+
queue?: string | undefined;
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
/** What a queued generation's handler receives. */
|
|
@@ -64,8 +64,8 @@ export interface AnthropicMessageStream extends AsyncIterable<AnthropicStreamEve
|
|
|
64
64
|
|
|
65
65
|
/** Per-request options. Note the SDK's timeout is in **milliseconds**. */
|
|
66
66
|
export interface AnthropicRequestOptions {
|
|
67
|
-
signal?: AbortSignal;
|
|
68
|
-
timeout?: number;
|
|
67
|
+
signal?: AbortSignal | undefined;
|
|
68
|
+
timeout?: number | undefined;
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
/** One `messages` namespace — the shape is identical on `client` and `client.beta`. */
|
package/src/types.ts
CHANGED
|
@@ -237,14 +237,14 @@ export interface AnthropicConfigShape {
|
|
|
237
237
|
/** Mark the system prompt cacheable. The cheapest win available. */
|
|
238
238
|
cacheSystem: boolean;
|
|
239
239
|
/** Override the API base URL (proxies, gateways). */
|
|
240
|
-
baseUrl?: string;
|
|
240
|
+
baseUrl?: string | undefined;
|
|
241
241
|
/** Request timeout in milliseconds. */
|
|
242
242
|
timeout: number;
|
|
243
243
|
/**
|
|
244
244
|
* Best-effort default sampling temperature. Dropped by this driver on models
|
|
245
245
|
* that reject it (which is every current one) — `validateAiConfig` warns.
|
|
246
246
|
*/
|
|
247
|
-
temperature?: number;
|
|
247
|
+
temperature?: number | undefined;
|
|
248
248
|
}
|
|
249
249
|
|
|
250
250
|
/** OpenAI driver settings. */
|