@ax-llm/ax 11.0.30 → 11.0.31
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 +20 -6
- package/index.cjs.map +1 -1
- package/index.d.cts +14 -1
- package/index.d.ts +14 -1
- package/index.js +19 -6
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.cjs
CHANGED
|
@@ -42,6 +42,7 @@ __export(index_exports, {
|
|
|
42
42
|
AxAIDeepSeekModel: () => AxAIDeepSeekModel,
|
|
43
43
|
AxAIGoogleGemini: () => AxAIGoogleGemini,
|
|
44
44
|
AxAIGoogleGeminiEmbedModel: () => AxAIGoogleGeminiEmbedModel,
|
|
45
|
+
AxAIGoogleGeminiEmbedTypes: () => AxAIGoogleGeminiEmbedTypes,
|
|
45
46
|
AxAIGoogleGeminiModel: () => AxAIGoogleGeminiModel,
|
|
46
47
|
AxAIGoogleGeminiSafetyCategory: () => AxAIGoogleGeminiSafetyCategory,
|
|
47
48
|
AxAIGoogleGeminiSafetyThreshold: () => AxAIGoogleGeminiSafetyThreshold,
|
|
@@ -1918,10 +1919,9 @@ var axAIOpenAIFastConfig = () => ({
|
|
|
1918
1919
|
model: "gpt-4o-mini" /* GPT4OMini */
|
|
1919
1920
|
});
|
|
1920
1921
|
var AxAIOpenAIImpl = class {
|
|
1921
|
-
constructor(config, streamingUsage
|
|
1922
|
+
constructor(config, streamingUsage) {
|
|
1922
1923
|
this.config = config;
|
|
1923
1924
|
this.streamingUsage = streamingUsage;
|
|
1924
|
-
this.dimensions = dimensions;
|
|
1925
1925
|
}
|
|
1926
1926
|
getModelConfig() {
|
|
1927
1927
|
const { config } = this;
|
|
@@ -1993,7 +1993,7 @@ var AxAIOpenAIImpl = class {
|
|
|
1993
1993
|
const reqValue = {
|
|
1994
1994
|
model,
|
|
1995
1995
|
input: req.texts,
|
|
1996
|
-
dimensions: this.dimensions
|
|
1996
|
+
dimensions: this.config.dimensions
|
|
1997
1997
|
};
|
|
1998
1998
|
return [apiConfig, reqValue];
|
|
1999
1999
|
}
|
|
@@ -2173,8 +2173,7 @@ var AxAIOpenAIBase = class extends AxBaseAI {
|
|
|
2173
2173
|
}
|
|
2174
2174
|
const aiImpl = new AxAIOpenAIImpl(
|
|
2175
2175
|
config,
|
|
2176
|
-
options?.streamingUsage ?? true
|
|
2177
|
-
config.dimensions
|
|
2176
|
+
options?.streamingUsage ?? true
|
|
2178
2177
|
);
|
|
2179
2178
|
super(aiImpl, {
|
|
2180
2179
|
name: "OpenAI",
|
|
@@ -2668,6 +2667,7 @@ var AxAIGoogleGeminiModel = /* @__PURE__ */ ((AxAIGoogleGeminiModel2) => {
|
|
|
2668
2667
|
return AxAIGoogleGeminiModel2;
|
|
2669
2668
|
})(AxAIGoogleGeminiModel || {});
|
|
2670
2669
|
var AxAIGoogleGeminiEmbedModel = /* @__PURE__ */ ((AxAIGoogleGeminiEmbedModel2) => {
|
|
2670
|
+
AxAIGoogleGeminiEmbedModel2["GeminiEmbedding"] = "gemini-embedding-exp-03-07";
|
|
2671
2671
|
AxAIGoogleGeminiEmbedModel2["TextEmbedding004"] = "text-embedding-004";
|
|
2672
2672
|
AxAIGoogleGeminiEmbedModel2["TextEmbedding005"] = "text-embedding-005";
|
|
2673
2673
|
return AxAIGoogleGeminiEmbedModel2;
|
|
@@ -2687,6 +2687,17 @@ var AxAIGoogleGeminiSafetyThreshold = /* @__PURE__ */ ((AxAIGoogleGeminiSafetyTh
|
|
|
2687
2687
|
AxAIGoogleGeminiSafetyThreshold2["BlockDefault"] = "HARM_BLOCK_THRESHOLD_UNSPECIFIED";
|
|
2688
2688
|
return AxAIGoogleGeminiSafetyThreshold2;
|
|
2689
2689
|
})(AxAIGoogleGeminiSafetyThreshold || {});
|
|
2690
|
+
var AxAIGoogleGeminiEmbedTypes = /* @__PURE__ */ ((AxAIGoogleGeminiEmbedTypes2) => {
|
|
2691
|
+
AxAIGoogleGeminiEmbedTypes2["SemanticSimilarity"] = "SEMANTIC_SIMILARITY";
|
|
2692
|
+
AxAIGoogleGeminiEmbedTypes2["Classification"] = "CLASSIFICATION";
|
|
2693
|
+
AxAIGoogleGeminiEmbedTypes2["Clustering"] = "CLUSTERING";
|
|
2694
|
+
AxAIGoogleGeminiEmbedTypes2["RetrievalDocument"] = "RETRIEVAL_DOCUMENT";
|
|
2695
|
+
AxAIGoogleGeminiEmbedTypes2["RetrievalQuery"] = "RETRIEVAL_QUERY";
|
|
2696
|
+
AxAIGoogleGeminiEmbedTypes2["QuestionAnswering"] = "QUESTION_ANSWERING";
|
|
2697
|
+
AxAIGoogleGeminiEmbedTypes2["FactVerification"] = "FACT_VERIFICATION";
|
|
2698
|
+
AxAIGoogleGeminiEmbedTypes2["CodeRetrievalQuery"] = "CODE_RETRIEVAL_QUERY";
|
|
2699
|
+
return AxAIGoogleGeminiEmbedTypes2;
|
|
2700
|
+
})(AxAIGoogleGeminiEmbedTypes || {});
|
|
2690
2701
|
|
|
2691
2702
|
// ai/google-gemini/info.ts
|
|
2692
2703
|
var axModelInfoGoogleGemini = [
|
|
@@ -2991,7 +3002,9 @@ var AxAIGoogleGeminiImpl = class {
|
|
|
2991
3002
|
reqValue = {
|
|
2992
3003
|
requests: req.texts.map((text) => ({
|
|
2993
3004
|
model: "models/" + model,
|
|
2994
|
-
content: { parts: [{ text }] }
|
|
3005
|
+
content: { parts: [{ text }] },
|
|
3006
|
+
outputDimensionality: this.config.dimensions,
|
|
3007
|
+
taskType: this.config.embedType
|
|
2995
3008
|
}))
|
|
2996
3009
|
};
|
|
2997
3010
|
}
|
|
@@ -11302,6 +11315,7 @@ var AxRAG = class extends AxChainOfThought {
|
|
|
11302
11315
|
AxAIDeepSeekModel,
|
|
11303
11316
|
AxAIGoogleGemini,
|
|
11304
11317
|
AxAIGoogleGeminiEmbedModel,
|
|
11318
|
+
AxAIGoogleGeminiEmbedTypes,
|
|
11305
11319
|
AxAIGoogleGeminiModel,
|
|
11306
11320
|
AxAIGoogleGeminiSafetyCategory,
|
|
11307
11321
|
AxAIGoogleGeminiSafetyThreshold,
|