@ax-llm/ax 14.0.43 → 15.0.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.
- package/index.cjs +100 -75
- package/index.cjs.map +1 -1
- package/index.d.cts +40 -6
- package/index.d.ts +40 -6
- package/index.global.js +102 -77
- package/index.global.js.map +1 -1
- package/index.js +101 -76
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.d.cts
CHANGED
|
@@ -1945,6 +1945,34 @@ declare class AxPromptTemplate {
|
|
|
1945
1945
|
private readonly functions?;
|
|
1946
1946
|
private readonly cacheSystemPrompt?;
|
|
1947
1947
|
constructor(sig: Readonly<AxSignature>, options?: Readonly<AxPromptTemplateOptions>, fieldTemplates?: Record<string, AxFieldTemplateFn>);
|
|
1948
|
+
/**
|
|
1949
|
+
* Build legacy prompt format (backward compatible)
|
|
1950
|
+
*/
|
|
1951
|
+
private buildLegacyPrompt;
|
|
1952
|
+
/**
|
|
1953
|
+
* Build XML-structured prompt with format protection
|
|
1954
|
+
*/
|
|
1955
|
+
private buildStructuredPrompt;
|
|
1956
|
+
/**
|
|
1957
|
+
* Build identity section describing the task
|
|
1958
|
+
*/
|
|
1959
|
+
private buildIdentitySection;
|
|
1960
|
+
/**
|
|
1961
|
+
* Build functions section with available functions
|
|
1962
|
+
*/
|
|
1963
|
+
private buildFunctionsSection;
|
|
1964
|
+
/**
|
|
1965
|
+
* Build input fields section
|
|
1966
|
+
*/
|
|
1967
|
+
private buildInputFieldsSection;
|
|
1968
|
+
/**
|
|
1969
|
+
* Build output fields section
|
|
1970
|
+
*/
|
|
1971
|
+
private buildOutputFieldsSection;
|
|
1972
|
+
/**
|
|
1973
|
+
* Build formatting rules section with protection
|
|
1974
|
+
*/
|
|
1975
|
+
private buildFormattingRulesSection;
|
|
1948
1976
|
private renderSingleValueUserContent;
|
|
1949
1977
|
render: <T = any>(values: T | ReadonlyArray<AxMessage<T>>, // Allow T or array of AxMessages
|
|
1950
1978
|
{ examples, demos, }: Readonly<{
|
|
@@ -2511,12 +2539,17 @@ declare enum AxAIAnthropicModel {
|
|
|
2511
2539
|
ClaudeInstant12 = "claude-instant-1.2"
|
|
2512
2540
|
}
|
|
2513
2541
|
declare enum AxAIAnthropicVertexModel {
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
2542
|
+
Claude41Opus = "claude-opus-4-1@20250805",
|
|
2543
|
+
Claude4Opus = "claude-opus-4@20250514",
|
|
2544
|
+
Claude45Sonnet = "claude-sonnet-4-5@20250929",
|
|
2545
|
+
Claude4Sonnet = "claude-sonnet-4@20250514",
|
|
2546
|
+
Claude37Sonnet = "claude-3-7-sonnet@20250219",
|
|
2547
|
+
Claude35SonnetV2 = "claude-3-5-sonnet-v2@20241022",
|
|
2548
|
+
Claude45Haiku = "claude-haiku-4.5@20251001",
|
|
2549
|
+
Claude35Haiku = "claude-3-5-haiku@20241022",
|
|
2550
|
+
Claude35Sonnet = "claude-3-5-sonnet@20240620",
|
|
2551
|
+
Claude3Opus = "claude-3-opus@20240229",
|
|
2552
|
+
Claude3Haiku = "claude-3-haiku@20240307"
|
|
2520
2553
|
}
|
|
2521
2554
|
type AxAIAnthropicThinkingConfig = {
|
|
2522
2555
|
type: 'enabled';
|
|
@@ -5792,6 +5825,7 @@ interface AxFieldProcessor {
|
|
|
5792
5825
|
type AxFunctionResultFormatter = (result: unknown) => string;
|
|
5793
5826
|
declare const axGlobals: {
|
|
5794
5827
|
signatureStrict: boolean;
|
|
5828
|
+
useStructuredPrompt: boolean;
|
|
5795
5829
|
tracer: Tracer | undefined;
|
|
5796
5830
|
meter: Meter | undefined;
|
|
5797
5831
|
logger: AxLoggerFunction | undefined;
|
package/index.d.ts
CHANGED
|
@@ -1945,6 +1945,34 @@ declare class AxPromptTemplate {
|
|
|
1945
1945
|
private readonly functions?;
|
|
1946
1946
|
private readonly cacheSystemPrompt?;
|
|
1947
1947
|
constructor(sig: Readonly<AxSignature>, options?: Readonly<AxPromptTemplateOptions>, fieldTemplates?: Record<string, AxFieldTemplateFn>);
|
|
1948
|
+
/**
|
|
1949
|
+
* Build legacy prompt format (backward compatible)
|
|
1950
|
+
*/
|
|
1951
|
+
private buildLegacyPrompt;
|
|
1952
|
+
/**
|
|
1953
|
+
* Build XML-structured prompt with format protection
|
|
1954
|
+
*/
|
|
1955
|
+
private buildStructuredPrompt;
|
|
1956
|
+
/**
|
|
1957
|
+
* Build identity section describing the task
|
|
1958
|
+
*/
|
|
1959
|
+
private buildIdentitySection;
|
|
1960
|
+
/**
|
|
1961
|
+
* Build functions section with available functions
|
|
1962
|
+
*/
|
|
1963
|
+
private buildFunctionsSection;
|
|
1964
|
+
/**
|
|
1965
|
+
* Build input fields section
|
|
1966
|
+
*/
|
|
1967
|
+
private buildInputFieldsSection;
|
|
1968
|
+
/**
|
|
1969
|
+
* Build output fields section
|
|
1970
|
+
*/
|
|
1971
|
+
private buildOutputFieldsSection;
|
|
1972
|
+
/**
|
|
1973
|
+
* Build formatting rules section with protection
|
|
1974
|
+
*/
|
|
1975
|
+
private buildFormattingRulesSection;
|
|
1948
1976
|
private renderSingleValueUserContent;
|
|
1949
1977
|
render: <T = any>(values: T | ReadonlyArray<AxMessage<T>>, // Allow T or array of AxMessages
|
|
1950
1978
|
{ examples, demos, }: Readonly<{
|
|
@@ -2511,12 +2539,17 @@ declare enum AxAIAnthropicModel {
|
|
|
2511
2539
|
ClaudeInstant12 = "claude-instant-1.2"
|
|
2512
2540
|
}
|
|
2513
2541
|
declare enum AxAIAnthropicVertexModel {
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
2542
|
+
Claude41Opus = "claude-opus-4-1@20250805",
|
|
2543
|
+
Claude4Opus = "claude-opus-4@20250514",
|
|
2544
|
+
Claude45Sonnet = "claude-sonnet-4-5@20250929",
|
|
2545
|
+
Claude4Sonnet = "claude-sonnet-4@20250514",
|
|
2546
|
+
Claude37Sonnet = "claude-3-7-sonnet@20250219",
|
|
2547
|
+
Claude35SonnetV2 = "claude-3-5-sonnet-v2@20241022",
|
|
2548
|
+
Claude45Haiku = "claude-haiku-4.5@20251001",
|
|
2549
|
+
Claude35Haiku = "claude-3-5-haiku@20241022",
|
|
2550
|
+
Claude35Sonnet = "claude-3-5-sonnet@20240620",
|
|
2551
|
+
Claude3Opus = "claude-3-opus@20240229",
|
|
2552
|
+
Claude3Haiku = "claude-3-haiku@20240307"
|
|
2520
2553
|
}
|
|
2521
2554
|
type AxAIAnthropicThinkingConfig = {
|
|
2522
2555
|
type: 'enabled';
|
|
@@ -5792,6 +5825,7 @@ interface AxFieldProcessor {
|
|
|
5792
5825
|
type AxFunctionResultFormatter = (result: unknown) => string;
|
|
5793
5826
|
declare const axGlobals: {
|
|
5794
5827
|
signatureStrict: boolean;
|
|
5828
|
+
useStructuredPrompt: boolean;
|
|
5795
5829
|
tracer: Tracer | undefined;
|
|
5796
5830
|
meter: Meter | undefined;
|
|
5797
5831
|
logger: AxLoggerFunction | undefined;
|