@ax-llm/ax 10.0.32 → 10.0.35
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 +24 -25
- package/index.cjs.map +1 -1
- package/index.d.cts +2 -2
- package/index.d.ts +2 -2
- package/index.js +24 -25
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.d.cts
CHANGED
|
@@ -983,9 +983,9 @@ declare class AxAIGoogleGemini extends AxBaseAI<AxAIGoogleGeminiChatRequest, AxA
|
|
|
983
983
|
|
|
984
984
|
declare enum AxAIGroqModel {
|
|
985
985
|
Llama3_8B = "llama3-8b-8192",
|
|
986
|
-
|
|
986
|
+
Llama33_70B = "llama-3.3-70b-versatile",
|
|
987
987
|
Mixtral_8x7B = "mixtral-8x7b-32768",
|
|
988
|
-
|
|
988
|
+
Gemma2_9B = "gemma2-9b-it"
|
|
989
989
|
}
|
|
990
990
|
|
|
991
991
|
type AxAIGroqAIConfig = AxAIOpenAIConfig;
|
package/index.d.ts
CHANGED
|
@@ -983,9 +983,9 @@ declare class AxAIGoogleGemini extends AxBaseAI<AxAIGoogleGeminiChatRequest, AxA
|
|
|
983
983
|
|
|
984
984
|
declare enum AxAIGroqModel {
|
|
985
985
|
Llama3_8B = "llama3-8b-8192",
|
|
986
|
-
|
|
986
|
+
Llama33_70B = "llama-3.3-70b-versatile",
|
|
987
987
|
Mixtral_8x7B = "mixtral-8x7b-32768",
|
|
988
|
-
|
|
988
|
+
Gemma2_9B = "gemma2-9b-it"
|
|
989
989
|
}
|
|
990
990
|
|
|
991
991
|
type AxAIGroqAIConfig = AxAIOpenAIConfig;
|
package/index.js
CHANGED
|
@@ -2110,7 +2110,7 @@ var AxAIGoogleGeminiImpl = class {
|
|
|
2110
2110
|
throw new Error("Chat prompt is empty");
|
|
2111
2111
|
}
|
|
2112
2112
|
const apiConfig = {
|
|
2113
|
-
name: stream ? `/models/${model}:streamGenerateContent?alt=sse` : `/models/${model}:
|
|
2113
|
+
name: stream ? `/models/${model}:streamGenerateContent?alt=sse` : `/models/${model}:generateContent`
|
|
2114
2114
|
};
|
|
2115
2115
|
if (this.isVertex === false) {
|
|
2116
2116
|
const pf = stream ? "&" : "?";
|
|
@@ -2427,23 +2427,23 @@ var AxRateLimiterTokenUsage = class {
|
|
|
2427
2427
|
// ai/groq/types.ts
|
|
2428
2428
|
var AxAIGroqModel = /* @__PURE__ */ ((AxAIGroqModel2) => {
|
|
2429
2429
|
AxAIGroqModel2["Llama3_8B"] = "llama3-8b-8192";
|
|
2430
|
-
AxAIGroqModel2["
|
|
2430
|
+
AxAIGroqModel2["Llama33_70B"] = "llama-3.3-70b-versatile";
|
|
2431
2431
|
AxAIGroqModel2["Mixtral_8x7B"] = "mixtral-8x7b-32768";
|
|
2432
|
-
AxAIGroqModel2["
|
|
2432
|
+
AxAIGroqModel2["Gemma2_9B"] = "gemma2-9b-it";
|
|
2433
2433
|
return AxAIGroqModel2;
|
|
2434
2434
|
})(AxAIGroqModel || {});
|
|
2435
2435
|
|
|
2436
2436
|
// ai/groq/info.ts
|
|
2437
2437
|
var axModelInfoGroq = [
|
|
2438
2438
|
{
|
|
2439
|
-
name: "
|
|
2439
|
+
name: "gemma2-9b-it" /* Gemma2_9B */,
|
|
2440
2440
|
currency: "usd",
|
|
2441
2441
|
characterIsToken: true,
|
|
2442
2442
|
promptTokenCostPer1M: 0.2,
|
|
2443
2443
|
completionTokenCostPer1M: 0.2
|
|
2444
2444
|
},
|
|
2445
2445
|
{
|
|
2446
|
-
name: "
|
|
2446
|
+
name: "llama-3.3-70b-versatile" /* Llama33_70B */,
|
|
2447
2447
|
currency: "usd",
|
|
2448
2448
|
characterIsToken: true,
|
|
2449
2449
|
promptTokenCostPer1M: 0.59,
|
|
@@ -2467,7 +2467,7 @@ var axModelInfoGroq = [
|
|
|
2467
2467
|
|
|
2468
2468
|
// ai/groq/api.ts
|
|
2469
2469
|
var axAIGroqDefaultConfig = () => structuredClone({
|
|
2470
|
-
model: "
|
|
2470
|
+
model: "llama-3.3-70b-versatile" /* Llama33_70B */,
|
|
2471
2471
|
...axBaseAIDefaultConfig()
|
|
2472
2472
|
});
|
|
2473
2473
|
var AxAIGroq = class extends AxAIOpenAI {
|
|
@@ -3222,8 +3222,8 @@ var AxAssertionError = class extends Error {
|
|
|
3222
3222
|
getFixingInstructions = (_sig) => {
|
|
3223
3223
|
const extraFields = [];
|
|
3224
3224
|
extraFields.push({
|
|
3225
|
-
name: "
|
|
3226
|
-
title: "
|
|
3225
|
+
name: "error",
|
|
3226
|
+
title: "Error",
|
|
3227
3227
|
description: this.message
|
|
3228
3228
|
});
|
|
3229
3229
|
return extraFields;
|
|
@@ -4010,15 +4010,17 @@ var AxProgram = class {
|
|
|
4010
4010
|
};
|
|
4011
4011
|
|
|
4012
4012
|
// dsp/prompt.ts
|
|
4013
|
+
var functionCallInstructions = `
|
|
4014
|
+
## Function Call Instructions
|
|
4015
|
+
- Complete the task, using the functions defined earlier in this prompt.
|
|
4016
|
+
- Call functions step-by-step, using the output of one function as input to the next.
|
|
4017
|
+
- Use the function results to generate the output fields.`;
|
|
4013
4018
|
var formattingRules = `
|
|
4014
|
-
|
|
4015
|
-
|
|
4016
|
-
|
|
4017
|
-
|
|
4018
|
-
|
|
4019
|
-
5. Match the exact structure and format specifications for each field
|
|
4020
|
-
6. No preamble, postscript, or supplementary information
|
|
4021
|
-
7. Pure output only - conforming exactly to the documented requirements`;
|
|
4019
|
+
## Output Formatting Rules
|
|
4020
|
+
- Each output key, value must strictly adhere to the specified output field formatting rules.
|
|
4021
|
+
- No preamble, postscript, or supplementary information.
|
|
4022
|
+
- Output must be in plain text, with each \`key: value\` pair on a new line.
|
|
4023
|
+
- Do not repeat output fields.`;
|
|
4022
4024
|
var AxPromptTemplate = class {
|
|
4023
4025
|
sig;
|
|
4024
4026
|
fieldTemplates;
|
|
@@ -4035,14 +4037,11 @@ var AxPromptTemplate = class {
|
|
|
4035
4037
|
(f) => "toFunction" in f ? f.toFunction() : f
|
|
4036
4038
|
);
|
|
4037
4039
|
const funcList = funcs?.map(
|
|
4038
|
-
(fn) => `- \`${fn.name}\`: ${capitalizeFirstLetter(fn.description)}
|
|
4040
|
+
(fn) => `- \`${fn.name}\`: ${capitalizeFirstLetter(fn.description)}.`
|
|
4039
4041
|
).join("\n");
|
|
4040
4042
|
if (funcList && funcList.length > 0) {
|
|
4041
4043
|
task.push(`## Available Functions
|
|
4042
4044
|
${funcList}`);
|
|
4043
|
-
task.push(
|
|
4044
|
-
`Complete the task, using the functions defined earlier in this prompt, as needed. The output field values may be generated by applying these functions if appropriate for the task.`
|
|
4045
|
-
);
|
|
4046
4045
|
}
|
|
4047
4046
|
const inputFields = this.renderFields(this.sig.getInputFields());
|
|
4048
4047
|
task.push(`## Input Fields
|
|
@@ -4050,10 +4049,10 @@ ${inputFields}`);
|
|
|
4050
4049
|
const outputFields = this.renderFields(this.sig.getOutputFields());
|
|
4051
4050
|
task.push(`## Output Fields
|
|
4052
4051
|
${outputFields}`);
|
|
4053
|
-
|
|
4054
|
-
|
|
4055
|
-
|
|
4056
|
-
task.push(formattingRules);
|
|
4052
|
+
if (funcList && funcList.length > 0) {
|
|
4053
|
+
task.push(functionCallInstructions.trim());
|
|
4054
|
+
}
|
|
4055
|
+
task.push(formattingRules.trim());
|
|
4057
4056
|
const desc = this.sig.getDescription();
|
|
4058
4057
|
if (desc) {
|
|
4059
4058
|
task.push(
|
|
@@ -4279,7 +4278,7 @@ ${capitalizeFirstLetter(desc.endsWith(".") ? desc : desc + ".")}`
|
|
|
4279
4278
|
const type = field.type?.name ? toFieldType(field.type) : "string";
|
|
4280
4279
|
const required = field.isOptional ? "optional" : "required";
|
|
4281
4280
|
const description = field.description ? `: ${capitalizeFirstLetter(field.description)}` : "";
|
|
4282
|
-
return `- \`${name}\` (${type}, ${required})${description}
|
|
4281
|
+
return `- \`${name}\` (${type}, ${required})${description}.`.trim();
|
|
4283
4282
|
});
|
|
4284
4283
|
return rows.join("\n");
|
|
4285
4284
|
};
|