@runnerpro/backend 1.13.35 → 1.13.36

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,36 @@ 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 profesional, neutro y constructivo.
424
+ 3. NO ofrezcas múltiples opciones.
425
+ 4. NO incluyas explicaciones, comentarios ni viñetas.
426
+ 5. Tu respuesta DEBE ser únicamente el texto final corregido.
427
+ 6. NO uses caracteres especiales para dar estilo al texto (como * para negrita/cursiva o _). El resultado debe ser siempre texto plano.
428
+
429
+ ---
430
+ **EJEMPLO 1**
431
+ **Texto Original:** "hey, mñn no te olvides d entrenar el hombro, no agas el vago q te veo. Y bebe awua"
432
+ **Texto Corregido:** "Hola, mañana recuerda enfocarte en el entrenamiento de hombro. Es importante mantener la constancia para ver resultados. No olvides hidratarte bien."
433
+ ---
434
+ **EJEMPLO 2**
435
+ **Texto Original:** "olaaaa cm estas"
436
+ **Texto Corregido:** "Hola, ¿cómo estás?"
437
+ ---
438
+
439
+ **TAREA ACTUAL**
440
+ **Texto Original:** ${text}
441
+ **Texto Corregido:**
442
+ `);
423
443
  console.log('textCorregido', textCorregido);
424
444
  console.timeEnd('sendPrompt');
425
445
  return textCorregido;
426
446
  }
427
447
  catch (error) {
428
- console.error('Error completo:', error);
429
448
  return text;
430
449
  }
431
450
  });
@@ -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;AA0cF,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.36",
4
4
  "description": "A collection of common backend functions",
5
5
  "exports": {
6
6
  ".": "./lib/cjs/index.js"