@yapyak/ollama 0.0.18 → 0.0.19
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 +0 -2
- package/dist/index.js +1 -2
- package/package.json +5 -5
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { ContextLevel, Translator } from "yapyak/translator";
|
|
2
|
-
//#region src/ollama.d.ts
|
|
3
2
|
/** Options for {@link ollama}. */
|
|
4
3
|
type OllamaOptions = {
|
|
5
4
|
/**
|
|
@@ -81,5 +80,4 @@ type OllamaOptions = {
|
|
|
81
80
|
* ```
|
|
82
81
|
*/
|
|
83
82
|
export declare function ollama(options?: OllamaOptions): Translator;
|
|
84
|
-
//#endregion
|
|
85
83
|
export type { OllamaOptions };
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TranslatorInvalidResponseError, TranslatorTruncatedError, createTranslator } from "yapyak/translator";
|
|
2
2
|
import { buildSystem, causeToError, fetchWithRetry, parseResponseBody, parseTranslationsBatch, resolveMaxTokens, responseToError } from "yapyak/translator/internal";
|
|
3
|
-
|
|
3
|
+
// src/ollama.ts
|
|
4
4
|
const DEFAULT_MODEL = "llama3.1";
|
|
5
5
|
const DEFAULT_ENDPOINT = "http://localhost:11434/api/generate";
|
|
6
6
|
const DEFAULT_TEMPERATURE = .2;
|
|
@@ -87,5 +87,4 @@ function ollama(options = {}) {
|
|
|
87
87
|
function validateResponse(body) {
|
|
88
88
|
if (body.done_reason === "length") throw new TranslatorTruncatedError("yapyak ollama: response truncated by token limit (done_reason='length'). Lower batchSize or raise `maxTokens` in the translator options.", { vendor: "ollama" });
|
|
89
89
|
}
|
|
90
|
-
//#endregion
|
|
91
90
|
export { ollama };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yapyak/ollama",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.19",
|
|
4
4
|
"description": "Ollama translator for yapyak.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"i18n",
|
|
@@ -31,17 +31,17 @@
|
|
|
31
31
|
"dist"
|
|
32
32
|
],
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"tsdown": "0.23.
|
|
34
|
+
"tsdown": "0.23.2",
|
|
35
35
|
"typescript": "6.0.3",
|
|
36
|
-
"vitest": "5.0.
|
|
36
|
+
"vitest": "5.0.5",
|
|
37
37
|
"@yapyak/tsdown-config": "0.0.0",
|
|
38
38
|
"@yapyak/typescript-config": "0.0.0"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
|
-
"yapyak": "0.0.
|
|
41
|
+
"yapyak": "0.0.19"
|
|
42
42
|
},
|
|
43
43
|
"engines": {
|
|
44
|
-
"node": ">=22.
|
|
44
|
+
"node": ">=22.23.4"
|
|
45
45
|
},
|
|
46
46
|
"publishConfig": {
|
|
47
47
|
"access": "public"
|