@ax-llm/ax 11.0.51 → 11.0.52
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 +9 -12
- package/index.cjs.map +1 -1
- package/index.d.cts +2 -2
- package/index.d.ts +2 -2
- package/index.js +20 -23
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.cjs
CHANGED
|
@@ -885,13 +885,11 @@ var logResponseDelta = (delta) => {
|
|
|
885
885
|
|
|
886
886
|
// ai/base.ts
|
|
887
887
|
var axBaseAIDefaultConfig = () => structuredClone({
|
|
888
|
-
maxTokens: 2e3,
|
|
889
888
|
temperature: 0,
|
|
890
889
|
topK: 40,
|
|
891
890
|
topP: 0.9
|
|
892
891
|
});
|
|
893
892
|
var axBaseAIDefaultCreativeConfig = () => structuredClone({
|
|
894
|
-
maxTokens: 2e3,
|
|
895
893
|
temperature: 0.4,
|
|
896
894
|
topP: 0.7,
|
|
897
895
|
frequencyPenalty: 0.2
|
|
@@ -1114,14 +1112,14 @@ var AxBaseAI = class {
|
|
|
1114
1112
|
[axSpanAttributes.LLM_SYSTEM]: this.name,
|
|
1115
1113
|
[axSpanAttributes.LLM_OPERATION_NAME]: "chat",
|
|
1116
1114
|
[axSpanAttributes.LLM_REQUEST_MODEL]: model,
|
|
1117
|
-
[axSpanAttributes.LLM_REQUEST_MAX_TOKENS]: modelConfig.maxTokens,
|
|
1115
|
+
[axSpanAttributes.LLM_REQUEST_MAX_TOKENS]: modelConfig.maxTokens ?? "Not set",
|
|
1118
1116
|
[axSpanAttributes.LLM_REQUEST_TEMPERATURE]: modelConfig.temperature,
|
|
1119
|
-
[axSpanAttributes.LLM_REQUEST_TOP_P]: modelConfig.topP,
|
|
1120
|
-
[axSpanAttributes.LLM_REQUEST_TOP_K]: modelConfig.topK,
|
|
1121
|
-
[axSpanAttributes.LLM_REQUEST_FREQUENCY_PENALTY]: modelConfig.frequencyPenalty,
|
|
1122
|
-
[axSpanAttributes.LLM_REQUEST_PRESENCE_PENALTY]: modelConfig.presencePenalty,
|
|
1123
|
-
[axSpanAttributes.LLM_REQUEST_STOP_SEQUENCES]: modelConfig.stopSequences?.join(", "),
|
|
1124
|
-
[axSpanAttributes.LLM_REQUEST_LLM_IS_STREAMING]: modelConfig.stream
|
|
1117
|
+
[axSpanAttributes.LLM_REQUEST_TOP_P]: modelConfig.topP ?? "Not set",
|
|
1118
|
+
[axSpanAttributes.LLM_REQUEST_TOP_K]: modelConfig.topK ?? "Not set",
|
|
1119
|
+
[axSpanAttributes.LLM_REQUEST_FREQUENCY_PENALTY]: modelConfig.frequencyPenalty ?? "Not set",
|
|
1120
|
+
[axSpanAttributes.LLM_REQUEST_PRESENCE_PENALTY]: modelConfig.presencePenalty ?? "Not set",
|
|
1121
|
+
[axSpanAttributes.LLM_REQUEST_STOP_SEQUENCES]: modelConfig.stopSequences?.join(", ") ?? "Not set",
|
|
1122
|
+
[axSpanAttributes.LLM_REQUEST_LLM_IS_STREAMING]: modelConfig.stream ?? "Not set"
|
|
1125
1123
|
}
|
|
1126
1124
|
},
|
|
1127
1125
|
options?.traceContext ?? import_api2.context.active(),
|
|
@@ -2220,7 +2218,7 @@ var AxAIOpenAIImpl = class {
|
|
|
2220
2218
|
response_format: this.config?.responseFormat ? { type: this.config.responseFormat } : void 0,
|
|
2221
2219
|
tools,
|
|
2222
2220
|
tool_choice: toolsChoice,
|
|
2223
|
-
max_completion_tokens: req.modelConfig?.maxTokens ?? this.config.maxTokens
|
|
2221
|
+
max_completion_tokens: req.modelConfig?.maxTokens ?? this.config.maxTokens,
|
|
2224
2222
|
temperature: req.modelConfig?.temperature ?? this.config.temperature,
|
|
2225
2223
|
top_p: req.modelConfig?.topP ?? this.config.topP ?? 1,
|
|
2226
2224
|
n: req.modelConfig?.n ?? this.config.n,
|
|
@@ -4776,7 +4774,6 @@ var axAIOpenAIResponsesDefaultConfig = () => ({
|
|
|
4776
4774
|
model: "gpt-4o" /* GPT4O */,
|
|
4777
4775
|
embedModel: "text-embedding-ada-002" /* TextEmbeddingAda002 */,
|
|
4778
4776
|
temperature: 0.7,
|
|
4779
|
-
maxTokens: 2048,
|
|
4780
4777
|
topP: 1,
|
|
4781
4778
|
stream: true
|
|
4782
4779
|
// reasoningEffort: 'medium',
|
|
@@ -4943,7 +4940,7 @@ var AxAIRekaImpl = class {
|
|
|
4943
4940
|
const reqValue = {
|
|
4944
4941
|
model,
|
|
4945
4942
|
messages,
|
|
4946
|
-
max_tokens: req.modelConfig?.maxTokens ?? this.config.maxTokens
|
|
4943
|
+
max_tokens: req.modelConfig?.maxTokens ?? this.config.maxTokens,
|
|
4947
4944
|
temperature: req.modelConfig?.temperature ?? this.config.temperature,
|
|
4948
4945
|
top_k: req.modelConfig?.n ?? this.config.n,
|
|
4949
4946
|
top_p: req.modelConfig?.topP ?? this.config.topP ?? 1,
|