@runnerpro/backend 1.13.35 → 1.13.37

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.
@@ -415,17 +415,37 @@ const cambiarTonoEntrenadorNeutro = (text, idCliente) => __awaiter(void 0, void
415
415
  return text;
416
416
  try {
417
417
  console.time('sendPrompt');
418
- // Prompt simplificado para testing
419
- const textCorregido = yield (0, prompt_1.sendPrompt)(`Corrige este texto: ${text}`, {
420
- maxOutputTokens: 1500, // Suficiente para thoughtsTokenCount + respuesta real
421
- timeout: 15000,
422
- });
418
+ const textCorregido = yield (0, prompt_1.sendPrompt)(`
419
+ Actúa como un sistema automático de corrección y estandarización de texto para una aplicación de fitness. Tu única función es procesar un mensaje y devolver una única versión mejorada.
420
+
421
+ Sigue estas reglas estrictamente:
422
+ 1. Corrige todos los errores ortográficos y gramaticales.
423
+ 2. Ajusta el tono para que sea cercano y amable, pero manteniendo siempre un lenguaje profesional. No debe sonar ni robótico ni demasiado coloquial.
424
+ 3. NO añadas información, ideas o frases que no estuvieran implícitas en el mensaje original. Tu trabajo es reformular, no añadir contenido.
425
+ 4. NO ofrezcas múltiples opciones.
426
+ 5. NO incluyas explicaciones, comentarios ni viñetas.
427
+ 6. NO uses caracteres especiales para dar estilo al texto (como * para negrita/cursiva o _). El resultado debe ser siempre texto plano.
428
+ 7. Tu respuesta DEBE ser únicamente el texto final corregido.
429
+
430
+ ---
431
+ **EJEMPLO 1**
432
+ **Texto Original:** "hey, mñn no te olvides d entrenar el hombro, no agas el vago q te veo. Y bebe awua"
433
+ **Texto Corregido:** "¡Hola! Para mañana, recuerda entrenar hombro. Mantén la intensidad y no olvides hidratarte."
434
+ ---
435
+ **EJEMPLO 2**
436
+ **Texto Original:** "Llegas tarde ala sesion de oy"
437
+ **Texto Corregido:** "Hola, te escribo sobre la sesión de hoy. Avísame si va todo bien."
438
+ ---
439
+
440
+ **TAREA ACTUAL**
441
+ **Texto Original:** ${text}
442
+ **Texto Corregido:**
443
+ `);
423
444
  console.log('textCorregido', textCorregido);
424
445
  console.timeEnd('sendPrompt');
425
446
  return textCorregido;
426
447
  }
427
448
  catch (error) {
428
- console.error('Error completo:', error);
429
449
  return text;
430
450
  }
431
451
  });
@@ -11,7 +11,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.sendPrompt = void 0;
13
13
  const { VertexAI } = require('@google-cloud/vertexai');
14
- function sendPrompt(prompt, options = {}) {
14
+ function sendPrompt(prompt) {
15
15
  var _a, _b, _c;
16
16
  return __awaiter(this, void 0, void 0, function* () {
17
17
  // Inicializa el cliente de Vertex AI
@@ -25,9 +25,9 @@ function sendPrompt(prompt, options = {}) {
25
25
  const generativeModel = vertex_ai.preview.getGenerativeModel({
26
26
  model: model,
27
27
  generationConfig: {
28
- temperature: options.temperature || 0.3,
29
- topP: options.topP || 0.8,
30
- topK: options.topK || 20,
28
+ temperature: 0.3,
29
+ topP: 0.8,
30
+ topK: 20,
31
31
  },
32
32
  });
33
33
  try {
@@ -1 +1 @@
1
- {"version":3,"file":"conversation.d.ts","sourceRoot":"","sources":["../../../../../src/chat/api/conversation.ts"],"names":[],"mappings":"AAmBA,QAAA,MAAM,iBAAiB,0BAA2B,GAAG,SAuBpD,CAAC;AAybF,OAAO,EAAE,iBAAiB,EAAE,CAAC"}
1
+ {"version":3,"file":"conversation.d.ts","sourceRoot":"","sources":["../../../../../src/chat/api/conversation.ts"],"names":[],"mappings":"AAmBA,QAAA,MAAM,iBAAiB,0BAA2B,GAAG,SAuBpD,CAAC;AA2cF,OAAO,EAAE,iBAAiB,EAAE,CAAC"}
@@ -1,10 +1,3 @@
1
- interface SendPromptOptions {
2
- maxOutputTokens?: number;
3
- temperature?: number;
4
- topP?: number;
5
- topK?: number;
6
- timeout?: number;
7
- }
8
- declare function sendPrompt(prompt: string, options?: SendPromptOptions): Promise<any>;
1
+ declare function sendPrompt(prompt: string): Promise<any>;
9
2
  export { sendPrompt };
10
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/prompt/index.ts"],"names":[],"mappings":"AAEA,UAAU,iBAAiB;IACzB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,iBAAe,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,GAAE,iBAAsB,gBAoCxE;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,gBAoCvC;AAED,OAAO,EAAE,UAAU,EAAE,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@runnerpro/backend",
3
- "version": "1.13.35",
3
+ "version": "1.13.37",
4
4
  "description": "A collection of common backend functions",
5
5
  "exports": {
6
6
  ".": "./lib/cjs/index.js"