@ax-llm/ax 11.0.31 → 11.0.32

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.
package/index.cjs CHANGED
@@ -2653,6 +2653,7 @@ var AxAIDeepSeek = class extends AxAIOpenAIBase {
2653
2653
 
2654
2654
  // ai/google-gemini/types.ts
2655
2655
  var AxAIGoogleGeminiModel = /* @__PURE__ */ ((AxAIGoogleGeminiModel2) => {
2656
+ AxAIGoogleGeminiModel2["Gemini25Pro"] = "gemini-2.5-pro-exp-03-25";
2656
2657
  AxAIGoogleGeminiModel2["Gemini20Pro"] = "gemini-2.0-pro-exp-02-05";
2657
2658
  AxAIGoogleGeminiModel2["Gemini20Flash"] = "gemini-2.0-flash";
2658
2659
  AxAIGoogleGeminiModel2["Gemini20FlashLite"] = "gemini-2.0-flash-lite-preview-02-05";
@@ -2662,12 +2663,11 @@ var AxAIGoogleGeminiModel = /* @__PURE__ */ ((AxAIGoogleGeminiModel2) => {
2662
2663
  AxAIGoogleGeminiModel2["Gemini15Flash002"] = "gemini-1.5-flash-002";
2663
2664
  AxAIGoogleGeminiModel2["Gemini15Flash8B"] = "gemini-1.5-flash-8b";
2664
2665
  AxAIGoogleGeminiModel2["Gemini15Pro"] = "gemini-1.5-pro";
2665
- AxAIGoogleGeminiModel2["Gemma2"] = "gemma-2-27b-it";
2666
- AxAIGoogleGeminiModel2["AQA"] = "aqa";
2667
2666
  return AxAIGoogleGeminiModel2;
2668
2667
  })(AxAIGoogleGeminiModel || {});
2669
2668
  var AxAIGoogleGeminiEmbedModel = /* @__PURE__ */ ((AxAIGoogleGeminiEmbedModel2) => {
2670
2669
  AxAIGoogleGeminiEmbedModel2["GeminiEmbedding"] = "gemini-embedding-exp-03-07";
2670
+ AxAIGoogleGeminiEmbedModel2["TextEmbeddingLarge"] = "text-embedding-large-exp-03-07";
2671
2671
  AxAIGoogleGeminiEmbedModel2["TextEmbedding004"] = "text-embedding-004";
2672
2672
  AxAIGoogleGeminiEmbedModel2["TextEmbedding005"] = "text-embedding-005";
2673
2673
  return AxAIGoogleGeminiEmbedModel2;
@@ -2797,6 +2797,9 @@ var AxAIGoogleGeminiImpl = class {
2797
2797
  this.endpointId = endpointId;
2798
2798
  this.apiKey = apiKey;
2799
2799
  this.options = options;
2800
+ if (!this.isVertex && this.config.autoTruncate) {
2801
+ throw new Error("Auto truncate is not supported for GoogleGemini");
2802
+ }
2800
2803
  }
2801
2804
  getModelConfig() {
2802
2805
  const { config } = this;
@@ -2992,8 +2995,13 @@ var AxAIGoogleGeminiImpl = class {
2992
2995
  }
2993
2996
  reqValue = {
2994
2997
  instances: req.texts.map((text) => ({
2995
- content: text
2996
- }))
2998
+ content: text,
2999
+ ...this.config.embedType && { taskType: this.config.embedType }
3000
+ })),
3001
+ parameters: {
3002
+ autoTruncate: this.config.autoTruncate,
3003
+ outputDimensionality: this.config.dimensions
3004
+ }
2997
3005
  };
2998
3006
  } else {
2999
3007
  apiConfig = {
@@ -3004,7 +3012,7 @@ var AxAIGoogleGeminiImpl = class {
3004
3012
  model: "models/" + model,
3005
3013
  content: { parts: [{ text }] },
3006
3014
  outputDimensionality: this.config.dimensions,
3007
- taskType: this.config.embedType
3015
+ ...this.config.embedType && { taskType: this.config.embedType }
3008
3016
  }))
3009
3017
  };
3010
3018
  }