ework-web 0.10.126 → 0.10.127
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/package.json +1 -1
- package/src/translate.ts +4 -0
package/package.json
CHANGED
package/src/translate.ts
CHANGED
|
@@ -45,6 +45,9 @@ export async function translateText(cfg: Config, text: string): Promise<string>
|
|
|
45
45
|
body: JSON.stringify({
|
|
46
46
|
model: cfg.translateModel,
|
|
47
47
|
stream: false,
|
|
48
|
+
// Reasoning-off: translation needs none, and reasoning tokens delay
|
|
49
|
+
// time-to-first-token past interactive patience on the shared server.
|
|
50
|
+
chat_template_kwargs: { enable_thinking: false },
|
|
48
51
|
messages: [
|
|
49
52
|
{ role: "system", content: SYSTEM_PROMPT },
|
|
50
53
|
{ role: "user", content: body },
|
|
@@ -121,6 +124,7 @@ async function* streamOneChunk(cfg: Config, chunk: string): AsyncGenerator<strin
|
|
|
121
124
|
body: JSON.stringify({
|
|
122
125
|
model: cfg.translateModel,
|
|
123
126
|
stream: true,
|
|
127
|
+
chat_template_kwargs: { enable_thinking: false },
|
|
124
128
|
messages: [
|
|
125
129
|
{ role: "system", content: SYSTEM_PROMPT },
|
|
126
130
|
{ role: "user", content: chunk },
|