@runnerpro/backend 1.16.0 → 1.16.2

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.
@@ -523,7 +523,9 @@ Sigue estas reglas estrictamente:
523
523
  **Texto Original:** ${text}
524
524
  **Texto Corregido:**
525
525
  `, 'LITE');
526
+ // @ts-ignore
526
527
  textCorregido = textCorregido.replace(/[¡¿]/g, '');
528
+ // @ts-ignore
527
529
  // Eliminar el último punto de las frases
528
530
  textCorregido = textCorregido.trim().replace(/\.$/, '');
529
531
  return textCorregido;
@@ -23,10 +23,10 @@ function sendPrompt(prompt, model = 'FLASH') {
23
23
  let modelGemini;
24
24
  if (model === 'LITE')
25
25
  modelGemini = 'gemini-2.5-flash-lite';
26
- else if (model === 'FLASH')
27
- modelGemini = 'gemini-2.5-flash';
28
26
  else if (model === 'PRO')
29
27
  modelGemini = 'gemini-2.5-pro';
28
+ else
29
+ modelGemini = 'gemini-2.5-flash';
30
30
  // Configura el modelo generativo con parámetros optimizados para velocidad
31
31
  const generativeModel = vertex_ai.preview.getGenerativeModel({
32
32
  model: modelGemini,
@@ -46,7 +46,7 @@ function sendPrompt(prompt, model = 'FLASH') {
46
46
  if (!parts || parts.length === 0)
47
47
  return '';
48
48
  // Return del texto si existe
49
- return ((_c = parts[0]) === null || _c === void 0 ? void 0 : _c.text) || '';
49
+ return { text: ((_c = parts[0]) === null || _c === void 0 ? void 0 : _c.text) || '', modelGemini };
50
50
  });
51
51
  }
52
52
  exports.sendPrompt = sendPrompt;
@@ -1 +1 @@
1
- {"version":3,"file":"conversation.d.ts","sourceRoot":"","sources":["../../../../../src/chat/api/conversation.ts"],"names":[],"mappings":"AAkBA,QAAA,MAAM,iBAAiB,0BAA2B,GAAG,SA0BpD,CAAC;AA6PF,QAAA,MAAM,gBAAgB;;;;mBAkBrB,CAAC;AAsRF,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,CAAC"}
1
+ {"version":3,"file":"conversation.d.ts","sourceRoot":"","sources":["../../../../../src/chat/api/conversation.ts"],"names":[],"mappings":"AAkBA,QAAA,MAAM,iBAAiB,0BAA2B,GAAG,SA0BpD,CAAC;AA6PF,QAAA,MAAM,gBAAgB;;;;mBAkBrB,CAAC;AAwRF,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,CAAC"}
@@ -1,3 +1,6 @@
1
- declare function sendPrompt(prompt: string, model?: string): Promise<string>;
1
+ declare function sendPrompt(prompt: string, model?: string): Promise<"" | {
2
+ text: string;
3
+ modelGemini: any;
4
+ }>;
2
5
  export { sendPrompt };
3
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/prompt/index.ts"],"names":[],"mappings":"AAEA,iBAAe,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,GAAE,MAAgB,mBAsChE;AAED,OAAO,EAAE,UAAU,EAAE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/prompt/index.ts"],"names":[],"mappings":"AAEA,iBAAe,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,GAAE,MAAgB;;;GAmChE;AAED,OAAO,EAAE,UAAU,EAAE,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@runnerpro/backend",
3
- "version": "1.16.0",
3
+ "version": "1.16.2",
4
4
  "description": "A collection of common backend functions",
5
5
  "exports": {
6
6
  ".": "./lib/cjs/index.js"