@byte_fluffy/nexra-sdk 0.1.0-alpha.47 → 0.1.0-alpha.48
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/dist/catalog.js
CHANGED
|
@@ -9,8 +9,8 @@ import {
|
|
|
9
9
|
listModelSpecs,
|
|
10
10
|
projectMediaGeometry,
|
|
11
11
|
resolveNexraLanguageReasoning
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-2IWCEEDI.js";
|
|
13
|
+
import "./chunk-NR4EWD3X.js";
|
|
14
14
|
export {
|
|
15
15
|
CatalogClient,
|
|
16
16
|
applyMediaGeometry,
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
normalizePublicErrorInput,
|
|
3
3
|
pickPublicErrorFields,
|
|
4
4
|
sortRatioDisplayOrder
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-NR4EWD3X.js";
|
|
6
6
|
|
|
7
7
|
// src/catalog/generated/audio.generated.json
|
|
8
8
|
var audio_generated_default = [
|
|
@@ -60739,7 +60739,7 @@ var NexraWaitTimeoutError = class extends Error {
|
|
|
60739
60739
|
};
|
|
60740
60740
|
|
|
60741
60741
|
// src/generated/version.generated.ts
|
|
60742
|
-
var SDK_VERSION = "0.1.0-alpha.
|
|
60742
|
+
var SDK_VERSION = "0.1.0-alpha.48";
|
|
60743
60743
|
|
|
60744
60744
|
// src/transport.ts
|
|
60745
60745
|
var DEFAULT_BASE_URL = "https://api.nexra-ai.com/v1";
|
|
@@ -10,6 +10,7 @@ var MEDIA_KINDS = [
|
|
|
10
10
|
|
|
11
11
|
// ../contracts/src/public-error-catalog.ts
|
|
12
12
|
var PUBLIC_ERROR_CATALOG = {
|
|
13
|
+
google_channel_rate_limited: { "zh-CN": "\u5F53\u524D\u6587\u672C\u6A21\u578B\u670D\u52A1\u7E41\u5FD9\u6216\u53D7\u5230\u9650\u6D41\uFF08429\uFF09\u3002\u8BF7\u7A0D\u540E\u518D\u8BD5\uFF1B\u82E5\u6301\u7EED\u51FA\u73B0\uFF0C\u53EF\u5207\u6362\u5176\u4ED6\u6587\u672C\u6A21\u578B\uFF0C\u518D\u53D1\u9001\u6D88\u606F\u7EE7\u7EED\u3002", en: "The current text model service is busy or rate limited (429). Try again later; if the problem persists, switch to another text model and send a message to continue." },
|
|
13
14
|
queue_wait_timeout: { "zh-CN": "\u4EFB\u52A1\u6392\u961F\u7B49\u5F85\u6267\u884C\u8D85\u8FC7\u65F6\u9650\uFF0C\u5C1A\u672A\u63D0\u4EA4\u7ED9\u6A21\u578B\u670D\u52A1\u3002\u8BF7\u7A0D\u540E\u91CD\u8BD5\uFF1B\u6301\u7EED\u8D85\u65F6\u65F6\u51ED\u8BF7\u6C42 ID \u8054\u7CFB\u5E73\u53F0\u7BA1\u7406\u5458\u3002", en: "The task exceeded its queue wait limit before submission to the model service. Try again later; contact a platform administrator with the request ID if queue timeouts persist." },
|
|
14
15
|
task_execution_timeout: { "zh-CN": "\u4EFB\u52A1\u8D85\u8FC7\u603B\u65F6\u9650\uFF0C\u5DF2\u7ED3\u675F\u3002\u4E0A\u6E38\u53EF\u80FD\u4ECD\u5728\u5904\u7406\uFF0C\u8BF7\u5148\u6838\u5BF9\u539F\u8BF7\u6C42\u7ED3\u679C\uFF0C\u907F\u514D\u91CD\u590D\u63D0\u4EA4\u3002", en: "The task exceeded its total time limit and has ended. The upstream service may still be processing it; check the original request before submitting again." },
|
|
15
16
|
authentication_required: { "zh-CN": "\u8BF7\u6C42\u672A\u63D0\u4F9B\u53EF\u7528\u7684 Nexra \u8EAB\u4EFD\u51ED\u8BC1\u3002\u8BF7\u767B\u5F55\u8D26\u6237\uFF0C\u6216\u5728\u8BF7\u6C42\u4E2D\u63D0\u4F9B\u6709\u6548\u7684 Nexra API Key\u3002", en: "The request has no usable Nexra credentials. Sign in or include a valid Nexra API key." },
|
package/dist/index.js
CHANGED
|
@@ -20,14 +20,14 @@ import {
|
|
|
20
20
|
projectMediaGeometry,
|
|
21
21
|
queryString,
|
|
22
22
|
sleep
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-2IWCEEDI.js";
|
|
24
24
|
import {
|
|
25
25
|
MEDIA_KINDS,
|
|
26
26
|
TASK_STATUSES,
|
|
27
27
|
createTaskRequest,
|
|
28
28
|
extractUpstreamErrorMessage,
|
|
29
29
|
isTerminalTaskStatus
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-NR4EWD3X.js";
|
|
31
31
|
|
|
32
32
|
// src/assets.ts
|
|
33
33
|
var AssetsClient = class {
|
package/dist/language.js
CHANGED
|
@@ -6,12 +6,12 @@ import {
|
|
|
6
6
|
jsonBody,
|
|
7
7
|
parseServerSentEvents,
|
|
8
8
|
resolveNexraLanguageReasoning
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-2IWCEEDI.js";
|
|
10
10
|
import {
|
|
11
11
|
isPublicErrorCode,
|
|
12
12
|
publicErrorMessage,
|
|
13
13
|
resolvePublicErrorLocale
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-NR4EWD3X.js";
|
|
15
15
|
|
|
16
16
|
// src/language/index.ts
|
|
17
17
|
import { createAnthropic } from "@ai-sdk/anthropic";
|
|
@@ -567,10 +567,12 @@ function isUnpositionedCitation(value) {
|
|
|
567
567
|
function project(value) {
|
|
568
568
|
if (Array.isArray(value)) return value.map(project);
|
|
569
569
|
if (!value || typeof value !== "object") return value;
|
|
570
|
-
|
|
570
|
+
const projected = Object.fromEntries(Object.entries(value).map(([key, item]) => [
|
|
571
571
|
key,
|
|
572
572
|
key === "annotations" && Array.isArray(item) ? item.filter((annotation) => !isUnpositionedCitation(annotation)).map(project) : project(item)
|
|
573
573
|
]));
|
|
574
|
+
if (projected.type === "output_text" && projected.annotations === void 0) projected.annotations = [];
|
|
575
|
+
return projected;
|
|
574
576
|
}
|
|
575
577
|
function citations(value) {
|
|
576
578
|
if (Array.isArray(value)) return value.flatMap(citations);
|
package/dist/media.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@byte_fluffy/nexra-sdk",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.48",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -72,10 +72,20 @@
|
|
|
72
72
|
"@ai-sdk/provider-utils": "^5.0.21"
|
|
73
73
|
},
|
|
74
74
|
"peerDependenciesMeta": {
|
|
75
|
-
"@ai-sdk/anthropic": {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
"@ai-sdk/
|
|
79
|
-
|
|
75
|
+
"@ai-sdk/anthropic": {
|
|
76
|
+
"optional": true
|
|
77
|
+
},
|
|
78
|
+
"@ai-sdk/google": {
|
|
79
|
+
"optional": true
|
|
80
|
+
},
|
|
81
|
+
"@ai-sdk/openai": {
|
|
82
|
+
"optional": true
|
|
83
|
+
},
|
|
84
|
+
"@ai-sdk/provider": {
|
|
85
|
+
"optional": true
|
|
86
|
+
},
|
|
87
|
+
"@ai-sdk/provider-utils": {
|
|
88
|
+
"optional": true
|
|
89
|
+
}
|
|
80
90
|
}
|
|
81
91
|
}
|