garriga 1.0.6 → 1.0.8

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.
Files changed (2) hide show
  1. package/index.js +19 -18
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -209,29 +209,30 @@ class localLLM {
209
209
  userToken,
210
210
  source = process.env.LOCALMODEL || "mistral7b-genei:latest",
211
211
  ) {
212
+ console.log(
213
+ `garriga, llamando al LLm local, modelo ${source} ya que process.env.LOCALMODEL es ${process.env.LOCALMODEL}`,
214
+ );
215
+
212
216
  if (userToken === "modeloLocalOllama") {
213
217
  try {
214
- const response = await axios.post(
215
- this.apiUrlOllama,
216
- {
217
- prompt,
218
- model: source,
219
- stream: false,
220
- format: "json",
218
+ const ollamaPayload = {
219
+ prompt,
220
+ model: source,
221
+ stream: false,
222
+ format: "json",
221
223
 
222
- keep_alive: -1,
223
- options: {
224
- num_ctx: 32768,
225
- temperature: 0.1,
226
- num_predict: 2500,
227
- },
224
+ keep_alive: -1,
225
+ options: {
226
+ num_ctx: 65536,
227
+ temperature: 0.1,
228
+ num_predict: 2500,
228
229
  },
229
- {
230
- headers: {
231
- "Content-Type": "application/json",
232
- },
230
+ };
231
+ const response = await axios.post(this.apiUrlOllama, ollamaPayload, {
232
+ headers: {
233
+ "Content-Type": "application/json",
233
234
  },
234
- );
235
+ });
235
236
 
236
237
  return response?.data.response;
237
238
  } catch (error) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "garriga",
3
- "version": "1.0.6",
3
+ "version": "1.0.8",
4
4
  "description": "AI connector",
5
5
  "main": "index.js",
6
6
  "scripts": {