@runnerpro/backend 1.18.6 → 1.19.0

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.
@@ -43,22 +43,22 @@ const vertexai_1 = require("@google-cloud/vertexai");
43
43
  * );
44
44
  * ```
45
45
  */
46
- function sendPrompt(prompt, model = 'FLASH', systemPrompt = undefined, media = undefined) {
46
+ function sendPrompt(prompt, model = 'FLASH', systemPrompt = undefined, media = undefined, region = 'europe-west8') {
47
47
  var _a, _b, _c, _d;
48
48
  return __awaiter(this, void 0, void 0, function* () {
49
49
  // Inicializa el cliente de Vertex AI
50
50
  const vertex_ai = new vertexai_1.VertexAI({
51
51
  project: process.env.PROJECT_ID,
52
- location: 'europe-west8',
52
+ location: region,
53
53
  });
54
54
  // Selecciona el modelo de Gemini
55
55
  let modelGemini;
56
56
  if (model === 'LITE')
57
- modelGemini = 'gemini-2.5-flash-lite';
57
+ modelGemini = 'gemini-3.1-flash-lite-preview';
58
58
  else if (model === 'PRO')
59
- modelGemini = 'gemini-2.5-pro'; // Modelo más potente y estable
59
+ modelGemini = 'gemini-3.1-pro-preview'; // Modelo más potente y estable
60
60
  else
61
- modelGemini = 'gemini-2.5-flash';
61
+ modelGemini = 'gemini-3-flash-preview';
62
62
  // Configura el modelo generativo
63
63
  const generativeModel = vertex_ai.preview.getGenerativeModel({
64
64
  model: modelGemini,
@@ -40,6 +40,6 @@ interface MediaContent {
40
40
  * );
41
41
  * ```
42
42
  */
43
- declare function sendPrompt(prompt: string, model?: string, systemPrompt?: string | undefined, media?: MediaContent | undefined): Promise<string>;
43
+ declare function sendPrompt(prompt: string, model?: string, systemPrompt?: string | undefined, media?: MediaContent | undefined, region?: string): Promise<string>;
44
44
  export { sendPrompt };
45
45
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/prompt/index.ts"],"names":[],"mappings":";AAEA;;GAEG;AACH,UAAU,YAAY;IACpB,0CAA0C;IAC1C,MAAM,EAAE,MAAM,CAAC;IACf,6DAA6D;IAC7D,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,iBAAe,UAAU,CACvB,MAAM,EAAE,MAAM,EACd,KAAK,GAAE,MAAgB,EACvB,YAAY,GAAE,MAAM,GAAG,SAAqB,EAC5C,KAAK,GAAE,YAAY,GAAG,SAAqB,mBAsE5C;AAED,OAAO,EAAE,UAAU,EAAE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/prompt/index.ts"],"names":[],"mappings":";AAEA;;GAEG;AACH,UAAU,YAAY;IACpB,0CAA0C;IAC1C,MAAM,EAAE,MAAM,CAAC;IACf,6DAA6D;IAC7D,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,iBAAe,UAAU,CACvB,MAAM,EAAE,MAAM,EACd,KAAK,GAAE,MAAgB,EACvB,YAAY,GAAE,MAAM,GAAG,SAAqB,EAC5C,KAAK,GAAE,YAAY,GAAG,SAAqB,EAC3C,MAAM,GAAE,MAAuB,mBAsEhC;AAED,OAAO,EAAE,UAAU,EAAE,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@runnerpro/backend",
3
- "version": "1.18.6",
3
+ "version": "1.19.0",
4
4
  "description": "A collection of common backend functions",
5
5
  "exports": {
6
6
  ".": "./lib/cjs/index.js"