@runnerpro/backend 1.13.26 → 1.13.28
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.
|
@@ -424,6 +424,7 @@ const cambiarTonoEntrenadorNeutro = (text, idCliente) => __awaiter(void 0, void
|
|
|
424
424
|
|
|
425
425
|
Devuelve solo el texto corregido y reescrito, sin añadir explicaciones.
|
|
426
426
|
`);
|
|
427
|
+
console.log('textCorregido', textCorregido);
|
|
427
428
|
console.timeEnd('sendPrompt');
|
|
428
429
|
return textCorregido;
|
|
429
430
|
}
|
package/lib/cjs/prompt/index.js
CHANGED
|
@@ -16,7 +16,7 @@ function sendPrompt(prompt, options = {}) {
|
|
|
16
16
|
// Inicializa el cliente de Vertex AI
|
|
17
17
|
const vertex_ai = new VertexAI({
|
|
18
18
|
project: process.env.PROJECT_ID, // Reemplaza con tu ID de proyecto de Google Cloud
|
|
19
|
-
location: '
|
|
19
|
+
location: 'europe-west8', // Reemplaza con tu región
|
|
20
20
|
});
|
|
21
21
|
// Selecciona el modelo de Gemini más rápido
|
|
22
22
|
const model = 'gemini-2.5-flash'; // Flash es más rápido que Pro
|
|
@@ -36,6 +36,7 @@ function sendPrompt(prompt, options = {}) {
|
|
|
36
36
|
const resp = yield Promise.race([generativeModel.generateContent(prompt), timeoutPromise]);
|
|
37
37
|
const content = resp.response.candidates[0].content;
|
|
38
38
|
// Asumiendo que la respuesta es de tipo texto
|
|
39
|
+
console.log('content', content.parts);
|
|
39
40
|
if (content.parts && content.parts.length > 0 && content.parts[0].text)
|
|
40
41
|
return content.parts[0].text;
|
|
41
42
|
return '';
|
|
@@ -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;
|
|
1
|
+
{"version":3,"file":"conversation.d.ts","sourceRoot":"","sources":["../../../../../src/chat/api/conversation.ts"],"names":[],"mappings":"AAmBA,QAAA,MAAM,iBAAiB,0BAA2B,GAAG,SAuBpD,CAAC;AA0bF,OAAO,EAAE,iBAAiB,EAAE,CAAC"}
|
|
@@ -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,
|
|
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,gBAsCxE;AAED,OAAO,EAAE,UAAU,EAAE,CAAC"}
|