@awsless/i18n 0.0.13 → 0.0.14
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/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/package.json +8 -7
package/dist/index.d.ts
CHANGED
|
@@ -23,8 +23,8 @@ type I18nPluginProps = {
|
|
|
23
23
|
declare const i18n: (props: I18nPluginProps) => Plugin;
|
|
24
24
|
|
|
25
25
|
type AiTranslationProps = {
|
|
26
|
-
/** The maximum number of tokens allowed in the AI's response. */
|
|
27
|
-
|
|
26
|
+
/** The maximum number of output tokens allowed in the AI's response. */
|
|
27
|
+
maxOutputTokens: number;
|
|
28
28
|
/** The language model to use for translations (e.g., gpt-4, gpt-3.5-turbo). */
|
|
29
29
|
model: LanguageModel;
|
|
30
30
|
/** Number of text entries to translate in a single batch.
|
package/dist/index.js
CHANGED
|
@@ -221,7 +221,7 @@ var ai = (props) => {
|
|
|
221
221
|
batches.map(async (texts2) => {
|
|
222
222
|
const result = await generateObject({
|
|
223
223
|
model: props.model,
|
|
224
|
-
|
|
224
|
+
maxOutputTokens: props.maxOutputTokens,
|
|
225
225
|
schema: z.object({
|
|
226
226
|
translations: z.object({
|
|
227
227
|
source: z.string(),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@awsless/i18n",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.14",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"keywords": [
|
|
@@ -9,7 +9,8 @@
|
|
|
9
9
|
"internationalization",
|
|
10
10
|
"i18n",
|
|
11
11
|
"svelte",
|
|
12
|
-
"sveltekit"
|
|
12
|
+
"sveltekit",
|
|
13
|
+
"ai"
|
|
13
14
|
],
|
|
14
15
|
"repository": {
|
|
15
16
|
"type": "git",
|
|
@@ -39,28 +40,28 @@
|
|
|
39
40
|
]
|
|
40
41
|
},
|
|
41
42
|
"devDependencies": {
|
|
42
|
-
"@ai-sdk/openai": "^
|
|
43
|
+
"@ai-sdk/openai": "^2.0.42",
|
|
43
44
|
"@sveltejs/vite-plugin-svelte": "^3.1.2",
|
|
44
45
|
"svelte": "^4.2.19",
|
|
45
46
|
"svelte-preprocess": "^6.0.2",
|
|
46
|
-
"vite": "^
|
|
47
|
+
"vite": "^7.1.9"
|
|
47
48
|
},
|
|
48
49
|
"peerDependencies": {
|
|
49
50
|
"svelte": "^4.2.19",
|
|
50
|
-
"vite": "^
|
|
51
|
+
"vite": "^7.1.9"
|
|
51
52
|
},
|
|
52
53
|
"dependencies": {
|
|
53
54
|
"@swc/core": "^1.3.70",
|
|
54
55
|
"@types/chunk": "^0.0.0",
|
|
55
56
|
"@types/line-column": "^1.0.2",
|
|
56
|
-
"ai": "^
|
|
57
|
+
"ai": "^5.0.60",
|
|
57
58
|
"chunk": "^0.0.3",
|
|
58
59
|
"estree-walker": "^3.0.3",
|
|
59
60
|
"glob": "^10.3.9",
|
|
60
61
|
"line-column": "^1.0.2",
|
|
61
62
|
"magic-string": "^0.30.18",
|
|
62
63
|
"swc-walk": "1.0.0-rc.2",
|
|
63
|
-
"zod": "^
|
|
64
|
+
"zod": "^4.1.11"
|
|
64
65
|
},
|
|
65
66
|
"scripts": {
|
|
66
67
|
"test": "pnpm code test",
|