@yapyak/ollama 0.0.9 → 0.0.10
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 +6 -0
- package/dist/index.js +2 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -26,6 +26,12 @@ type OllamaOptions = {
|
|
|
26
26
|
* @defaultValue `'http://localhost:11434/api/generate'`
|
|
27
27
|
*/
|
|
28
28
|
endpoint?: string;
|
|
29
|
+
/**
|
|
30
|
+
* The maximum style-reference examples per request.
|
|
31
|
+
*
|
|
32
|
+
* @defaultValue `5`, or `0` when `context` is `'none'`
|
|
33
|
+
*/
|
|
34
|
+
examples?: number;
|
|
29
35
|
/** The translation glossary. */
|
|
30
36
|
glossary?: Record<string, Record<string, string>>;
|
|
31
37
|
/** The extra request headers. */
|
package/dist/index.js
CHANGED
|
@@ -26,11 +26,12 @@ const MAX_TOKENS_PER_ITEM = 96;
|
|
|
26
26
|
* ```
|
|
27
27
|
*/
|
|
28
28
|
function ollama(options = {}) {
|
|
29
|
-
const { batchSize = DEFAULT_BATCH_SIZE, concurrency, context, endpoint = DEFAULT_ENDPOINT, glossary, headers: customHeaders, maxRetries = DEFAULT_MAX_RETRIES, maxTokens, model = DEFAULT_MODEL, temperature = DEFAULT_TEMPERATURE, timeout = DEFAULT_TIMEOUT, voice } = options;
|
|
29
|
+
const { batchSize = DEFAULT_BATCH_SIZE, concurrency, context, endpoint = DEFAULT_ENDPOINT, examples, glossary, headers: customHeaders, maxRetries = DEFAULT_MAX_RETRIES, maxTokens, model = DEFAULT_MODEL, temperature = DEFAULT_TEMPERATURE, timeout = DEFAULT_TIMEOUT, voice } = options;
|
|
30
30
|
return createTranslator({
|
|
31
31
|
batchSize,
|
|
32
32
|
concurrency,
|
|
33
33
|
context,
|
|
34
|
+
examples,
|
|
34
35
|
id: "ollama",
|
|
35
36
|
translate: async (request) => {
|
|
36
37
|
const { items, signal, sourceLocale, targetLocales } = request;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yapyak/ollama",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.10",
|
|
4
4
|
"description": "Ollama translator for yapyak.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"i18n",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"@yapyak/typescript-config": "0.0.0"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
40
|
-
"yapyak": "0.0.
|
|
40
|
+
"yapyak": "0.0.10"
|
|
41
41
|
},
|
|
42
42
|
"engines": {
|
|
43
43
|
"node": ">=22.22"
|