garriga 1.0.11 → 1.0.13
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/index.js +7 -4
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -219,19 +219,22 @@ class localLLM {
|
|
|
219
219
|
prompt,
|
|
220
220
|
model: source,
|
|
221
221
|
stream: false,
|
|
222
|
-
format: "json",
|
|
222
|
+
//format: "json",
|
|
223
223
|
|
|
224
224
|
keep_alive: -1,
|
|
225
225
|
options: {
|
|
226
|
-
num_ctx: process.env.MAX_CONTEXT_FRAUD ||
|
|
227
|
-
temperature: process.env.TEMPERATURE_FRAUD || 0.1,
|
|
228
|
-
num_predict: process.env.MAX_TOKENS_FRAUD || 2500,
|
|
226
|
+
num_ctx: +process.env.MAX_CONTEXT_FRAUD || 65536,
|
|
227
|
+
temperature: +process.env.TEMPERATURE_FRAUD || 0.1,
|
|
228
|
+
num_predict: +process.env.MAX_TOKENS_FRAUD || 2500,
|
|
229
|
+
top_k: +process.env.TOP_K_FRAUD || 40,
|
|
230
|
+
top_p: +process.env.TOP_P_FRAUD || 0.9,
|
|
229
231
|
},
|
|
230
232
|
};
|
|
231
233
|
const response = await axios.post(this.apiUrlOllama, ollamaPayload, {
|
|
232
234
|
headers: {
|
|
233
235
|
"Content-Type": "application/json",
|
|
234
236
|
},
|
|
237
|
+
timeout: +process.env.TIMEOUT_OLLAMA_FRAUD || 300000,
|
|
235
238
|
});
|
|
236
239
|
|
|
237
240
|
return response?.data.response;
|