@runnerpro/backend 1.13.16 → 1.13.18
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.
|
@@ -224,7 +224,7 @@ const sendMessage = (req, res, { sendNotification, firebaseMessaging, isClient }
|
|
|
224
224
|
// Si es entrenador, se marca leído cuando se envía un mensaje
|
|
225
225
|
yield markReadMessage({ isClient, idCliente });
|
|
226
226
|
// Cambiar el tono del texto a uno neutro y corregir la ortografía
|
|
227
|
-
if (idCliente === 'sJzhGqaJcddq96x80hZAlPJ6pET2') {
|
|
227
|
+
if (idCliente === 'sJzhGqaJcddq96x80hZAlPJ6pET2' && process.env.NODE_ENV === 'PROD') {
|
|
228
228
|
console.log('cambiarTonoEntrenadorNeutro');
|
|
229
229
|
text = yield cambiarTonoEntrenadorNeutro(text);
|
|
230
230
|
}
|
package/lib/cjs/prompt/index.js
CHANGED
|
@@ -11,19 +11,20 @@ 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
|
-
// Inicializa el cliente de Vertex AI
|
|
15
|
-
const vertex_ai = new VertexAI({
|
|
16
|
-
project: 'glass-timing-393523', // Reemplaza con tu ID de proyecto de Google Cloud
|
|
17
|
-
location: 'us-central1', // Reemplaza con tu región
|
|
18
|
-
});
|
|
19
|
-
// Selecciona el modelo de Gemini
|
|
20
|
-
const model = 'gemini-2.5-flash'; // O cualquier otro modelo de Gemini disponible
|
|
21
|
-
// Configura el modelo generativo
|
|
22
|
-
const generativeModel = vertex_ai.preview.getGenerativeModel({
|
|
23
|
-
model: model,
|
|
24
|
-
});
|
|
25
14
|
function sendPrompt(prompt) {
|
|
26
15
|
return __awaiter(this, void 0, void 0, function* () {
|
|
16
|
+
console.log(process.env.GCP_PROJECT_ID);
|
|
17
|
+
// Inicializa el cliente de Vertex AI
|
|
18
|
+
const vertex_ai = new VertexAI({
|
|
19
|
+
project: 'glass-timing-393523', // Reemplaza con tu ID de proyecto de Google Cloud
|
|
20
|
+
location: 'us-central1', // Reemplaza con tu región
|
|
21
|
+
});
|
|
22
|
+
// Selecciona el modelo de Gemini
|
|
23
|
+
const model = 'gemini-2.5-flash'; // O cualquier otro modelo de Gemini disponible
|
|
24
|
+
// Configura el modelo generativo
|
|
25
|
+
const generativeModel = vertex_ai.preview.getGenerativeModel({
|
|
26
|
+
model: model,
|
|
27
|
+
});
|
|
27
28
|
console.log(`Enviando prompt: "${prompt}"`);
|
|
28
29
|
try {
|
|
29
30
|
const resp = yield generativeModel.generateContent(prompt);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/prompt/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/prompt/index.ts"],"names":[],"mappings":"AAEA,iBAAe,UAAU,CAAC,MAAM,KAAA,gBAiC/B;AAED,OAAO,EAAE,UAAU,EAAE,CAAC"}
|