@ax-llm/ax 14.0.20 → 14.0.23
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 +262 -257
- package/index.cjs.map +1 -1
- package/index.d.cts +378 -218
- package/index.d.ts +378 -218
- package/index.global.js +84 -79
- package/index.global.js.map +1 -1
- package/index.js +262 -257
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.d.cts
CHANGED
|
@@ -597,6 +597,7 @@ interface AxAIMemory {
|
|
|
597
597
|
getLast(sessionId?: string): AxMemoryData[number] | undefined;
|
|
598
598
|
addTag(name: string, sessionId?: string): void;
|
|
599
599
|
rewindToTag(name: string, sessionId?: string): AxMemoryData;
|
|
600
|
+
removeByTag(name: string, sessionId?: string): AxMemoryData;
|
|
600
601
|
}
|
|
601
602
|
|
|
602
603
|
interface AxFieldType {
|
|
@@ -617,14 +618,14 @@ declare class AxSignatureBuilder<_TInput extends Record<string, any> = {}, _TOut
|
|
|
617
618
|
* @param fieldInfo - Field type created with f.string(), f.number(), etc.
|
|
618
619
|
* @param prepend - If true, adds field to the beginning of input fields
|
|
619
620
|
*/
|
|
620
|
-
input<K extends string, T extends AxFluentFieldInfo<any, any, any, any> | AxFluentFieldType
|
|
621
|
+
input<K extends string, T extends AxFluentFieldInfo<any, any, any, any> | AxFluentFieldType<any, any, any, any, any>>(name: K, fieldInfo: T, prepend?: boolean): AxSignatureBuilder<AddFieldToShape<_TInput, K, T>, _TOutput>;
|
|
621
622
|
/**
|
|
622
623
|
* Add an output field to the signature
|
|
623
624
|
* @param name - Field name
|
|
624
625
|
* @param fieldInfo - Field type created with f.string(), f.number(), etc.
|
|
625
626
|
* @param prepend - If true, adds field to the beginning of output fields
|
|
626
627
|
*/
|
|
627
|
-
output<K extends string, T extends AxFluentFieldInfo<any, any, any, any> | AxFluentFieldType
|
|
628
|
+
output<K extends string, T extends AxFluentFieldInfo<any, any, any, any> | AxFluentFieldType<any, any, any, any, any>>(name: K, fieldInfo: T, prepend?: boolean): AxSignatureBuilder<_TInput, AddFieldToShape<_TOutput, K, T>>;
|
|
628
629
|
/**
|
|
629
630
|
* Set the description for the signature
|
|
630
631
|
* @param description - Description text
|
|
@@ -635,45 +636,38 @@ declare class AxSignatureBuilder<_TInput extends Record<string, any> = {}, _TOut
|
|
|
635
636
|
*/
|
|
636
637
|
build(): AxSignature<_TInput, _TOutput>;
|
|
637
638
|
}
|
|
638
|
-
declare class AxFluentFieldType implements AxFieldType {
|
|
639
|
-
readonly type:
|
|
640
|
-
readonly isArray
|
|
641
|
-
readonly options?:
|
|
639
|
+
declare class AxFluentFieldType<TType extends AxFieldType['type'] = AxFieldType['type'], TIsArray extends boolean = false, TOptions extends readonly string[] | undefined = undefined, TIsOptional extends boolean = false, TIsInternal extends boolean = false> implements AxFieldType {
|
|
640
|
+
readonly type: TType;
|
|
641
|
+
readonly isArray: TIsArray;
|
|
642
|
+
readonly options?: TOptions;
|
|
642
643
|
readonly description?: string;
|
|
643
|
-
readonly isOptional
|
|
644
|
-
readonly isInternal
|
|
645
|
-
constructor(fieldType:
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
644
|
+
readonly isOptional: TIsOptional;
|
|
645
|
+
readonly isInternal: TIsInternal;
|
|
646
|
+
constructor(fieldType: {
|
|
647
|
+
type: TType;
|
|
648
|
+
isArray: TIsArray;
|
|
649
|
+
options?: TOptions;
|
|
650
|
+
description?: string;
|
|
651
|
+
isOptional: TIsOptional;
|
|
652
|
+
isInternal: TIsInternal;
|
|
653
|
+
});
|
|
654
|
+
optional(): AxFluentFieldType<TType, TIsArray, TOptions, true, TIsInternal>;
|
|
655
|
+
array(): AxFluentFieldType<TType, true, TOptions, TIsOptional, TIsInternal>;
|
|
656
|
+
internal(): AxFluentFieldType<TType, TIsArray, TOptions, TIsOptional, true>;
|
|
649
657
|
}
|
|
650
658
|
declare const f: (() => AxSignatureBuilder) & {
|
|
651
|
-
string: (desc?: string) => AxFluentFieldType
|
|
652
|
-
number: (desc?: string) => AxFluentFieldType
|
|
653
|
-
boolean: (desc?: string) => AxFluentFieldType
|
|
654
|
-
json: (desc?: string) => AxFluentFieldType
|
|
655
|
-
datetime: (desc?: string) => AxFluentFieldType
|
|
656
|
-
date: (desc?: string) => AxFluentFieldType
|
|
657
|
-
class: <const TOptions extends readonly string[]>(options: TOptions, desc?: string) => AxFluentFieldType
|
|
658
|
-
image: (desc?: string) => AxFluentFieldType
|
|
659
|
-
audio: (desc?: string) => AxFluentFieldType
|
|
660
|
-
file: (desc?: string) => AxFluentFieldType
|
|
661
|
-
url: (desc?: string) => AxFluentFieldType
|
|
662
|
-
code: (language?: string, desc?: string) => AxFluentFieldType
|
|
663
|
-
array: <T extends AxFluentFieldInfo<any, any, any, any>>(baseType: T) => AxFluentFieldInfo<T["type"], true, T["options"], T["isOptional"]>;
|
|
664
|
-
optional: <T extends AxFluentFieldInfo<any, any, any, any>>(baseType: T) => AxFluentFieldInfo<T["type"], T["isArray"], T["options"], true>;
|
|
665
|
-
internal: <T extends AxFluentFieldInfo<any, any, any, any>>(baseType: T) => T & {
|
|
666
|
-
readonly isInternal: true;
|
|
667
|
-
};
|
|
668
|
-
legacyArray: <T extends AxFieldType>(baseType: T) => T & {
|
|
669
|
-
readonly isArray: true;
|
|
670
|
-
};
|
|
671
|
-
legacyOptional: <T extends AxFieldType>(baseType: T) => T & {
|
|
672
|
-
readonly isOptional: true;
|
|
673
|
-
};
|
|
674
|
-
legacyInternal: <T extends AxFieldType>(baseType: T) => T & {
|
|
675
|
-
readonly isInternal: true;
|
|
676
|
-
};
|
|
659
|
+
string: (desc?: string) => AxFluentFieldType<"string", false, undefined, false, false>;
|
|
660
|
+
number: (desc?: string) => AxFluentFieldType<"number", false, undefined, false, false>;
|
|
661
|
+
boolean: (desc?: string) => AxFluentFieldType<"boolean", false, undefined, false, false>;
|
|
662
|
+
json: (desc?: string) => AxFluentFieldType<"json", false, undefined, false, false>;
|
|
663
|
+
datetime: (desc?: string) => AxFluentFieldType<"datetime", false, undefined, false, false>;
|
|
664
|
+
date: (desc?: string) => AxFluentFieldType<"date", false, undefined, false, false>;
|
|
665
|
+
class: <const TOptions extends readonly string[]>(options: TOptions, desc?: string) => AxFluentFieldType<"class", false, TOptions, false, false>;
|
|
666
|
+
image: (desc?: string) => AxFluentFieldType<"image", false, undefined, false, false>;
|
|
667
|
+
audio: (desc?: string) => AxFluentFieldType<"audio", false, undefined, false, false>;
|
|
668
|
+
file: (desc?: string) => AxFluentFieldType<"file", false, undefined, false, false>;
|
|
669
|
+
url: (desc?: string) => AxFluentFieldType<"url", false, undefined, false, false>;
|
|
670
|
+
code: (language?: string, desc?: string) => AxFluentFieldType<"code", false, undefined, false, false>;
|
|
677
671
|
};
|
|
678
672
|
interface AxField {
|
|
679
673
|
name: string;
|
|
@@ -748,6 +742,17 @@ type InferFluentType<T extends AxFluentFieldInfo<any, any, any, any> | AxFluentF
|
|
|
748
742
|
mimeType: string;
|
|
749
743
|
fileUri: string;
|
|
750
744
|
} : T['type'] extends 'url' ? T['isArray'] extends true ? string[] : string : T['type'] extends 'code' ? T['isArray'] extends true ? string[] : string : T['type'] extends 'class' ? T['options'] extends readonly (infer U)[] ? T['isArray'] extends true ? U[] : U : T['isArray'] extends true ? string[] : string : any;
|
|
745
|
+
type _IsInternal<T> = T extends {
|
|
746
|
+
readonly isInternal: true;
|
|
747
|
+
} ? true : false;
|
|
748
|
+
type _IsOptional<T> = T extends {
|
|
749
|
+
readonly isOptional: true;
|
|
750
|
+
} ? true : false;
|
|
751
|
+
type AddFieldToShape<S extends Record<string, any>, K extends string, T extends AxFluentFieldInfo<any, any, any, any> | AxFluentFieldType> = _IsInternal<T> extends true ? S : _IsOptional<T> extends true ? S & {
|
|
752
|
+
readonly [P in K]?: InferFluentType<T>;
|
|
753
|
+
} : S & {
|
|
754
|
+
readonly [P in K]: InferFluentType<T>;
|
|
755
|
+
};
|
|
751
756
|
interface AxSignatureConfig {
|
|
752
757
|
description?: string;
|
|
753
758
|
inputs: readonly AxField[];
|
|
@@ -846,6 +851,7 @@ declare class AxMemory implements AxAIMemory {
|
|
|
846
851
|
}>, sessionId?: string): void;
|
|
847
852
|
addTag(name: string, sessionId?: string): void;
|
|
848
853
|
rewindToTag(name: string, sessionId?: string): AxMemoryData;
|
|
854
|
+
removeByTag(name: string, sessionId?: string): AxMemoryData;
|
|
849
855
|
history(index: number, sessionId?: string): ({
|
|
850
856
|
role: "system";
|
|
851
857
|
content: string;
|
|
@@ -976,6 +982,38 @@ type AxInputFunctionType = (AxFunction | {
|
|
|
976
982
|
toFunction: () => AxFunction | AxFunction[];
|
|
977
983
|
})[];
|
|
978
984
|
|
|
985
|
+
type AxFieldProcessorProcess = (value: AxFieldValue, context?: Readonly<{
|
|
986
|
+
values?: AxGenOut;
|
|
987
|
+
sessionId?: string;
|
|
988
|
+
done?: boolean;
|
|
989
|
+
}>) => unknown | Promise<unknown>;
|
|
990
|
+
type AxStreamingFieldProcessorProcess = (value: string, context?: Readonly<{
|
|
991
|
+
values?: AxGenOut;
|
|
992
|
+
sessionId?: string;
|
|
993
|
+
done?: boolean;
|
|
994
|
+
}>) => unknown | Promise<unknown>;
|
|
995
|
+
interface AxFieldProcessor {
|
|
996
|
+
field: Readonly<AxField>;
|
|
997
|
+
/**
|
|
998
|
+
* Process the field value and return a new value (or undefined if no update is needed).
|
|
999
|
+
* The returned value may be merged back into memory.
|
|
1000
|
+
* @param value - The current field value.
|
|
1001
|
+
* @param context - Additional context (e.g. memory and session id).
|
|
1002
|
+
*/
|
|
1003
|
+
process: AxFieldProcessorProcess | AxStreamingFieldProcessorProcess;
|
|
1004
|
+
}
|
|
1005
|
+
|
|
1006
|
+
interface AxGEPAEvaluationBatch<Traj = any, Out = any> {
|
|
1007
|
+
outputs: Out[];
|
|
1008
|
+
scores: number[];
|
|
1009
|
+
trajectories?: Traj[] | null;
|
|
1010
|
+
}
|
|
1011
|
+
interface AxGEPAAdapter<Datum = any, Traj = any, Out = any> {
|
|
1012
|
+
evaluate(batch: readonly Datum[], candidate: Readonly<Record<string, string>>, captureTraces?: boolean): Promise<AxGEPAEvaluationBatch<Traj, Out>> | AxGEPAEvaluationBatch<Traj, Out>;
|
|
1013
|
+
make_reflective_dataset(candidate: Readonly<Record<string, string>>, evalBatch: Readonly<AxGEPAEvaluationBatch<Traj, Out>>, componentsToUpdate: readonly string[]): Record<string, any[]>;
|
|
1014
|
+
propose_new_texts?: (candidate: Readonly<Record<string, string>>, reflectiveDataset: Readonly<Record<string, any[]>>, componentsToUpdate: readonly string[]) => Promise<Record<string, string>> | Record<string, string>;
|
|
1015
|
+
}
|
|
1016
|
+
|
|
979
1017
|
type AxOptimizerLoggerData = {
|
|
980
1018
|
name: 'OptimizationStart';
|
|
981
1019
|
value: {
|
|
@@ -1047,7 +1085,7 @@ type AxMetricFnArgs = Parameters<AxMetricFn>[0];
|
|
|
1047
1085
|
type AxMultiMetricFn = <T = any>(arg0: Readonly<{
|
|
1048
1086
|
prediction: T;
|
|
1049
1087
|
example: AxExample;
|
|
1050
|
-
}>) => Record<string, number
|
|
1088
|
+
}>) => Record<string, number> | Promise<Record<string, number>>;
|
|
1051
1089
|
interface AxOptimizationProgress {
|
|
1052
1090
|
round: number;
|
|
1053
1091
|
totalRounds: number;
|
|
@@ -1184,132 +1222,10 @@ interface AxCompileOptions {
|
|
|
1184
1222
|
overrideCheckpointLoad?: AxCheckpointLoadFn;
|
|
1185
1223
|
overrideCheckpointInterval?: number;
|
|
1186
1224
|
saveCheckpointOnComplete?: boolean;
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
sessionId?: string;
|
|
1192
|
-
done?: boolean;
|
|
1193
|
-
}>) => unknown | Promise<unknown>;
|
|
1194
|
-
type AxStreamingFieldProcessorProcess = (value: string, context?: Readonly<{
|
|
1195
|
-
values?: AxGenOut;
|
|
1196
|
-
sessionId?: string;
|
|
1197
|
-
done?: boolean;
|
|
1198
|
-
}>) => unknown | Promise<unknown>;
|
|
1199
|
-
interface AxFieldProcessor {
|
|
1200
|
-
field: Readonly<AxField>;
|
|
1201
|
-
/**
|
|
1202
|
-
* Process the field value and return a new value (or undefined if no update is needed).
|
|
1203
|
-
* The returned value may be merged back into memory.
|
|
1204
|
-
* @param value - The current field value.
|
|
1205
|
-
* @param context - Additional context (e.g. memory and session id).
|
|
1206
|
-
*/
|
|
1207
|
-
process: AxFieldProcessorProcess | AxStreamingFieldProcessorProcess;
|
|
1208
|
-
}
|
|
1209
|
-
|
|
1210
|
-
declare class AxProgram<IN, OUT> implements AxUsable, AxTunable<IN, OUT> {
|
|
1211
|
-
protected signature: AxSignature;
|
|
1212
|
-
protected sigHash: string;
|
|
1213
|
-
protected examples?: OUT[];
|
|
1214
|
-
protected examplesOptions?: AxSetExamplesOptions;
|
|
1215
|
-
protected demos?: OUT[];
|
|
1216
|
-
protected trace?: OUT;
|
|
1217
|
-
protected usage: AxProgramUsage[];
|
|
1218
|
-
protected traceLabel?: string;
|
|
1219
|
-
private key;
|
|
1220
|
-
private children;
|
|
1221
|
-
constructor(signature: ConstructorParameters<typeof AxSignature>[0], options?: Readonly<AxProgramOptions>);
|
|
1222
|
-
getSignature(): AxSignature;
|
|
1223
|
-
setSignature(signature: ConstructorParameters<typeof AxSignature>[0]): void;
|
|
1224
|
-
setDescription(description: string): void;
|
|
1225
|
-
private updateSignatureHash;
|
|
1226
|
-
register(prog: Readonly<AxTunable<IN, OUT> & AxUsable>): void;
|
|
1227
|
-
setId(id: string): void;
|
|
1228
|
-
setParentId(parentId: string): void;
|
|
1229
|
-
setExamples(examples: Readonly<AxProgramExamples<IN, OUT>>, options?: Readonly<AxSetExamplesOptions>): void;
|
|
1230
|
-
private _setExamples;
|
|
1231
|
-
getTraces(): AxProgramTrace<IN, OUT>[];
|
|
1232
|
-
getUsage(): AxProgramUsage[];
|
|
1233
|
-
resetUsage(): void;
|
|
1234
|
-
setDemos(demos: readonly AxProgramDemos<IN, OUT>[]): void;
|
|
1235
|
-
/**
|
|
1236
|
-
* Apply optimized configuration to this program
|
|
1237
|
-
* @param optimizedProgram The optimized program configuration to apply
|
|
1238
|
-
*/
|
|
1239
|
-
applyOptimization(optimizedProgram: AxOptimizedProgram<OUT>): void;
|
|
1240
|
-
}
|
|
1241
|
-
|
|
1242
|
-
type AxGenerateResult<OUT> = OUT & {
|
|
1243
|
-
thought?: string;
|
|
1244
|
-
};
|
|
1245
|
-
interface AxResponseHandlerArgs<T> {
|
|
1246
|
-
ai: Readonly<AxAIService>;
|
|
1247
|
-
model?: string;
|
|
1248
|
-
res: T;
|
|
1249
|
-
mem: AxAIMemory;
|
|
1250
|
-
sessionId?: string;
|
|
1251
|
-
traceId?: string;
|
|
1252
|
-
functions: Readonly<AxFunction[]>;
|
|
1253
|
-
strictMode?: boolean;
|
|
1254
|
-
span?: Span;
|
|
1255
|
-
logger: AxLoggerFunction;
|
|
1256
|
-
}
|
|
1257
|
-
interface AxStreamingEvent<T> {
|
|
1258
|
-
event: 'delta' | 'done' | 'error';
|
|
1259
|
-
data: {
|
|
1260
|
-
contentDelta?: string;
|
|
1261
|
-
partialValues?: Partial<T>;
|
|
1262
|
-
error?: string;
|
|
1263
|
-
functions?: AxChatResponseFunctionCall[];
|
|
1264
|
-
};
|
|
1265
|
-
}
|
|
1266
|
-
declare class AxGen<IN = any, OUT extends AxGenOut = any> extends AxProgram<IN, OUT> implements AxProgrammable<IN, OUT> {
|
|
1267
|
-
private promptTemplate;
|
|
1268
|
-
private asserts;
|
|
1269
|
-
private streamingAsserts;
|
|
1270
|
-
private options?;
|
|
1271
|
-
private functions;
|
|
1272
|
-
private fieldProcessors;
|
|
1273
|
-
private streamingFieldProcessors;
|
|
1274
|
-
private excludeContentFromTrace;
|
|
1275
|
-
private thoughtFieldName;
|
|
1276
|
-
private signatureToolCallingManager?;
|
|
1277
|
-
constructor(signature: NonNullable<ConstructorParameters<typeof AxSignature>[0]> | AxSignature<any, any>, options?: Readonly<AxProgramForwardOptions<any>>);
|
|
1278
|
-
private getSignatureName;
|
|
1279
|
-
private getMetricsInstruments;
|
|
1280
|
-
updateMeter(meter?: Meter): void;
|
|
1281
|
-
private createStates;
|
|
1282
|
-
addAssert: (fn: AxAssertion["fn"], message?: string) => void;
|
|
1283
|
-
addStreamingAssert: (fieldName: string, fn: AxStreamingAssertion["fn"], message?: string) => void;
|
|
1284
|
-
private addFieldProcessorInternal;
|
|
1285
|
-
addStreamingFieldProcessor: (fieldName: string, fn: AxFieldProcessor["process"]) => void;
|
|
1286
|
-
addFieldProcessor: (fieldName: string, fn: AxFieldProcessor["process"]) => void;
|
|
1287
|
-
private forwardSendRequest;
|
|
1288
|
-
private forwardCore;
|
|
1289
|
-
private _forward2;
|
|
1290
|
-
_forward1(ai: Readonly<AxAIService>, values: IN | AxMessage<IN>[], options: Readonly<AxProgramForwardOptions<any>>): AxGenStreamingOut<OUT>;
|
|
1291
|
-
forward<T extends Readonly<AxAIService>>(ai: T, values: IN | AxMessage<IN>[], options?: Readonly<AxProgramForwardOptionsWithModels<T>>): Promise<OUT>;
|
|
1292
|
-
streamingForward<T extends Readonly<AxAIService>>(ai: T, values: IN | AxMessage<IN>[], options?: Readonly<AxProgramStreamingForwardOptionsWithModels<T>>): AxGenStreamingOut<OUT>;
|
|
1293
|
-
setExamples(examples: Readonly<AxProgramExamples<IN, OUT>>, options?: Readonly<AxSetExamplesOptions>): void;
|
|
1294
|
-
private isDebug;
|
|
1295
|
-
private getLogger;
|
|
1296
|
-
}
|
|
1297
|
-
type AxGenerateErrorDetails = {
|
|
1298
|
-
model?: string;
|
|
1299
|
-
maxTokens?: number;
|
|
1300
|
-
streaming: boolean;
|
|
1301
|
-
signature: {
|
|
1302
|
-
input: Readonly<AxIField[]>;
|
|
1303
|
-
output: Readonly<AxIField[]>;
|
|
1304
|
-
description?: string;
|
|
1305
|
-
};
|
|
1306
|
-
};
|
|
1307
|
-
type ErrorOptions = {
|
|
1308
|
-
cause?: Error;
|
|
1309
|
-
};
|
|
1310
|
-
declare class AxGenerateError extends Error {
|
|
1311
|
-
readonly details: AxGenerateErrorDetails;
|
|
1312
|
-
constructor(message: string, details: Readonly<AxGenerateErrorDetails>, options?: ErrorOptions);
|
|
1225
|
+
gepaAdapter?: AxGEPAAdapter<any, any, any>;
|
|
1226
|
+
skipPerfectScore?: boolean;
|
|
1227
|
+
perfectScore?: number;
|
|
1228
|
+
maxMetricCalls?: number;
|
|
1313
1229
|
}
|
|
1314
1230
|
|
|
1315
1231
|
interface AxOptimizerMetricsConfig {
|
|
@@ -1782,6 +1698,111 @@ declare abstract class AxBaseOptimizer implements AxOptimizer {
|
|
|
1782
1698
|
reset(): void;
|
|
1783
1699
|
}
|
|
1784
1700
|
|
|
1701
|
+
declare class AxProgram<IN, OUT> implements AxUsable, AxTunable<IN, OUT> {
|
|
1702
|
+
protected signature: AxSignature;
|
|
1703
|
+
protected sigHash: string;
|
|
1704
|
+
protected examples?: OUT[];
|
|
1705
|
+
protected examplesOptions?: AxSetExamplesOptions;
|
|
1706
|
+
protected demos?: OUT[];
|
|
1707
|
+
protected trace?: OUT;
|
|
1708
|
+
protected usage: AxProgramUsage[];
|
|
1709
|
+
protected traceLabel?: string;
|
|
1710
|
+
private key;
|
|
1711
|
+
private children;
|
|
1712
|
+
constructor(signature: ConstructorParameters<typeof AxSignature>[0], options?: Readonly<AxProgramOptions>);
|
|
1713
|
+
getSignature(): AxSignature;
|
|
1714
|
+
setSignature(signature: ConstructorParameters<typeof AxSignature>[0]): void;
|
|
1715
|
+
setDescription(description: string): void;
|
|
1716
|
+
private updateSignatureHash;
|
|
1717
|
+
register(prog: Readonly<AxTunable<IN, OUT> & AxUsable>): void;
|
|
1718
|
+
setId(id: string): void;
|
|
1719
|
+
setParentId(parentId: string): void;
|
|
1720
|
+
setExamples(examples: Readonly<AxProgramExamples<IN, OUT>>, options?: Readonly<AxSetExamplesOptions>): void;
|
|
1721
|
+
private _setExamples;
|
|
1722
|
+
getTraces(): AxProgramTrace<IN, OUT>[];
|
|
1723
|
+
getUsage(): AxProgramUsage[];
|
|
1724
|
+
resetUsage(): void;
|
|
1725
|
+
setDemos(demos: readonly AxProgramDemos<IN, OUT>[]): void;
|
|
1726
|
+
/**
|
|
1727
|
+
* Apply optimized configuration to this program
|
|
1728
|
+
* @param optimizedProgram The optimized program configuration to apply
|
|
1729
|
+
*/
|
|
1730
|
+
applyOptimization(optimizedProgram: AxOptimizedProgram<OUT>): void;
|
|
1731
|
+
}
|
|
1732
|
+
|
|
1733
|
+
type AxGenerateResult<OUT> = OUT & {
|
|
1734
|
+
thought?: string;
|
|
1735
|
+
};
|
|
1736
|
+
interface AxResponseHandlerArgs<T> {
|
|
1737
|
+
ai: Readonly<AxAIService>;
|
|
1738
|
+
model?: string;
|
|
1739
|
+
res: T;
|
|
1740
|
+
mem: AxAIMemory;
|
|
1741
|
+
sessionId?: string;
|
|
1742
|
+
traceId?: string;
|
|
1743
|
+
functions: Readonly<AxFunction[]>;
|
|
1744
|
+
strictMode?: boolean;
|
|
1745
|
+
span?: Span;
|
|
1746
|
+
logger: AxLoggerFunction;
|
|
1747
|
+
}
|
|
1748
|
+
interface AxStreamingEvent<T> {
|
|
1749
|
+
event: 'delta' | 'done' | 'error';
|
|
1750
|
+
data: {
|
|
1751
|
+
contentDelta?: string;
|
|
1752
|
+
partialValues?: Partial<T>;
|
|
1753
|
+
error?: string;
|
|
1754
|
+
functions?: AxChatResponseFunctionCall[];
|
|
1755
|
+
};
|
|
1756
|
+
}
|
|
1757
|
+
declare class AxGen<IN = any, OUT extends AxGenOut = any> extends AxProgram<IN, OUT> implements AxProgrammable<IN, OUT> {
|
|
1758
|
+
private promptTemplate;
|
|
1759
|
+
private asserts;
|
|
1760
|
+
private streamingAsserts;
|
|
1761
|
+
private options?;
|
|
1762
|
+
private functions;
|
|
1763
|
+
private fieldProcessors;
|
|
1764
|
+
private streamingFieldProcessors;
|
|
1765
|
+
private excludeContentFromTrace;
|
|
1766
|
+
private thoughtFieldName;
|
|
1767
|
+
private signatureToolCallingManager?;
|
|
1768
|
+
constructor(signature: NonNullable<ConstructorParameters<typeof AxSignature>[0]> | AxSignature<any, any>, options?: Readonly<AxProgramForwardOptions<any>>);
|
|
1769
|
+
private getSignatureName;
|
|
1770
|
+
private getMetricsInstruments;
|
|
1771
|
+
updateMeter(meter?: Meter): void;
|
|
1772
|
+
private createStates;
|
|
1773
|
+
addAssert: (fn: AxAssertion["fn"], message?: string) => void;
|
|
1774
|
+
addStreamingAssert: (fieldName: string, fn: AxStreamingAssertion["fn"], message?: string) => void;
|
|
1775
|
+
private addFieldProcessorInternal;
|
|
1776
|
+
addStreamingFieldProcessor: (fieldName: string, fn: AxFieldProcessor["process"]) => void;
|
|
1777
|
+
addFieldProcessor: (fieldName: string, fn: AxFieldProcessor["process"]) => void;
|
|
1778
|
+
private forwardSendRequest;
|
|
1779
|
+
private forwardCore;
|
|
1780
|
+
private _forward2;
|
|
1781
|
+
_forward1(ai: Readonly<AxAIService>, values: IN | AxMessage<IN>[], options: Readonly<AxProgramForwardOptions<any>>): AxGenStreamingOut<OUT>;
|
|
1782
|
+
forward<T extends Readonly<AxAIService>>(ai: T, values: IN | AxMessage<IN>[], options?: Readonly<AxProgramForwardOptionsWithModels<T>>): Promise<OUT>;
|
|
1783
|
+
streamingForward<T extends Readonly<AxAIService>>(ai: T, values: IN | AxMessage<IN>[], options?: Readonly<AxProgramStreamingForwardOptionsWithModels<T>>): AxGenStreamingOut<OUT>;
|
|
1784
|
+
setExamples(examples: Readonly<AxProgramExamples<IN, OUT>>, options?: Readonly<AxSetExamplesOptions>): void;
|
|
1785
|
+
private isDebug;
|
|
1786
|
+
private getLogger;
|
|
1787
|
+
}
|
|
1788
|
+
type AxGenerateErrorDetails = {
|
|
1789
|
+
model?: string;
|
|
1790
|
+
maxTokens?: number;
|
|
1791
|
+
streaming: boolean;
|
|
1792
|
+
signature: {
|
|
1793
|
+
input: Readonly<AxIField[]>;
|
|
1794
|
+
output: Readonly<AxIField[]>;
|
|
1795
|
+
description?: string;
|
|
1796
|
+
};
|
|
1797
|
+
};
|
|
1798
|
+
type ErrorOptions = {
|
|
1799
|
+
cause?: Error;
|
|
1800
|
+
};
|
|
1801
|
+
declare class AxGenerateError extends Error {
|
|
1802
|
+
readonly details: AxGenerateErrorDetails;
|
|
1803
|
+
constructor(message: string, details: Readonly<AxGenerateErrorDetails>, options?: ErrorOptions);
|
|
1804
|
+
}
|
|
1805
|
+
|
|
1785
1806
|
type Writeable<T> = {
|
|
1786
1807
|
-readonly [P in keyof T]: T[P];
|
|
1787
1808
|
};
|
|
@@ -1890,12 +1911,26 @@ interface TypeMap {
|
|
|
1890
1911
|
type ParseClassOptions<S extends string> = S extends `${infer First},${infer Rest}` ? Trim<First> | ParseClassOptions<Trim<Rest>> : S extends `${infer First}|${infer Rest}` ? Trim<First> | ParseClassOptions<Trim<Rest>> : S extends `${infer First} | ${infer Rest}` ? Trim<First> | ParseClassOptions<Trim<Rest>> : S extends `${infer First}, ${infer Rest}` ? Trim<First> | ParseClassOptions<Trim<Rest>> : Trim<S>;
|
|
1891
1912
|
type ResolveType<T extends string> = T extends keyof TypeMap ? TypeMap[T] : T extends `${infer BaseType}[]` ? BaseType extends keyof TypeMap ? TypeMap[BaseType][] : any[] : T extends `class[]|${infer Options}` ? ParseClassOptions<Options>[] : T extends `class|${infer Options}` ? ParseClassOptions<Options> : T extends 'class' ? string : any;
|
|
1892
1913
|
type Trim<S extends string> = S extends ` ${infer T}` ? Trim<T> : S extends `\n${infer T}` ? Trim<T> : S extends `\t${infer T}` ? Trim<T> : S extends `\r${infer T}` ? Trim<T> : S extends `${infer U} ` ? Trim<U> : S extends `${infer U}\n` ? Trim<U> : S extends `${infer U}\t` ? Trim<U> : S extends `${infer U}\r` ? Trim<U> : S;
|
|
1893
|
-
type ParseField<S extends string> = S extends `${infer Name}
|
|
1914
|
+
type ParseField<S extends string> = S extends `${infer Name}?!` ? {
|
|
1915
|
+
name: Trim<Name>;
|
|
1916
|
+
optional: true;
|
|
1917
|
+
internal: true;
|
|
1918
|
+
} : S extends `${infer Name}!?` ? {
|
|
1894
1919
|
name: Trim<Name>;
|
|
1895
1920
|
optional: true;
|
|
1921
|
+
internal: true;
|
|
1922
|
+
} : S extends `${infer Name}?` ? {
|
|
1923
|
+
name: Trim<Name>;
|
|
1924
|
+
optional: true;
|
|
1925
|
+
internal: false;
|
|
1926
|
+
} : S extends `${infer Name}!` ? {
|
|
1927
|
+
name: Trim<Name>;
|
|
1928
|
+
optional: false;
|
|
1929
|
+
internal: true;
|
|
1896
1930
|
} : {
|
|
1897
1931
|
name: Trim<S>;
|
|
1898
1932
|
optional: false;
|
|
1933
|
+
internal: false;
|
|
1899
1934
|
};
|
|
1900
1935
|
type ExtractType<S extends string> = S extends `class[] "${infer Options}" "${infer _Desc}"` ? `class[]|${Options}` : S extends `class[] "${infer Options}"` ? `class[]|${Options}` : S extends `class "${infer Options}" "${infer _Desc}"` ? `class|${Options}` : S extends `class "${infer Options}"` ? `class|${Options}` : S extends `${infer Type}[] "${infer _Desc}"` ? `${Type}[]` : S extends `${infer Type}[]` ? `${Type}[]` : S extends `${infer Type} "${infer _Desc}"` ? Type : S;
|
|
1901
1936
|
type ParseNameAndType<S extends string> = S extends `${infer Name}:${infer TypePart}` ? ParseField<Name> & {
|
|
@@ -1978,10 +2013,11 @@ type BuildObject<T extends readonly {
|
|
|
1978
2013
|
name: string;
|
|
1979
2014
|
type: string;
|
|
1980
2015
|
optional: boolean;
|
|
2016
|
+
internal?: boolean;
|
|
1981
2017
|
}[]> = {
|
|
1982
|
-
-readonly [K in T[number] as K['optional'] extends false ? K['name'] : never]: ResolveType<K['type']>;
|
|
2018
|
+
-readonly [K in T[number] as K['internal'] extends true ? never : K['optional'] extends false ? K['name'] : never]: ResolveType<K['type']>;
|
|
1983
2019
|
} & {
|
|
1984
|
-
-readonly [K in T[number] as K['optional'] extends true ? K['name'] : never]?: ResolveType<K['type']>;
|
|
2020
|
+
-readonly [K in T[number] as K['internal'] extends true ? never : K['optional'] extends true ? K['name'] : never]?: ResolveType<K['type']>;
|
|
1985
2021
|
};
|
|
1986
2022
|
type StripSignatureDescription<S extends string> = S extends `"${infer _Desc}" ${infer Rest}` ? Trim<Rest> : S;
|
|
1987
2023
|
/**
|
|
@@ -2056,11 +2092,11 @@ type AxMessage<IN> = {
|
|
|
2056
2092
|
values: IN;
|
|
2057
2093
|
};
|
|
2058
2094
|
type AxProgramTrace<IN, OUT> = {
|
|
2059
|
-
trace: OUT & IN
|
|
2095
|
+
trace: OUT & Partial<IN>;
|
|
2060
2096
|
programId: string;
|
|
2061
2097
|
};
|
|
2062
2098
|
type AxProgramDemos<IN, OUT> = {
|
|
2063
|
-
traces: (OUT & IN)[];
|
|
2099
|
+
traces: (OUT & Partial<IN>)[];
|
|
2064
2100
|
programId: string;
|
|
2065
2101
|
};
|
|
2066
2102
|
type AxProgramExamples<IN, OUT> = AxProgramDemos<IN, OUT> | AxProgramDemos<IN, OUT>['traces'];
|
|
@@ -2099,6 +2135,7 @@ type AxProgramForwardOptions<MODEL> = AxAIServiceOptions & {
|
|
|
2099
2135
|
fastFail?: boolean;
|
|
2100
2136
|
showThoughts?: boolean;
|
|
2101
2137
|
functionCallMode?: 'auto' | 'native' | 'prompt';
|
|
2138
|
+
disableMemoryCleanup?: boolean;
|
|
2102
2139
|
traceLabel?: string;
|
|
2103
2140
|
description?: string;
|
|
2104
2141
|
thoughtFieldName?: string;
|
|
@@ -2151,6 +2188,11 @@ interface AxProgramOptions {
|
|
|
2151
2188
|
traceLabel?: string;
|
|
2152
2189
|
}
|
|
2153
2190
|
|
|
2191
|
+
type AxExamples<T> = T extends AxSignature<infer IN, infer OUT> ? OUT & Partial<IN> : T extends AxSignatureBuilder<infer IN2, infer OUT2> ? OUT2 & Partial<IN2> : T extends AxGen<infer IN4, infer OUT4> ? OUT4 & Partial<IN4> : T extends string ? ParseSignature<T> extends {
|
|
2192
|
+
inputs: infer IN3;
|
|
2193
|
+
outputs: infer OUT3;
|
|
2194
|
+
} ? OUT3 & Partial<IN3> : never : never;
|
|
2195
|
+
|
|
2154
2196
|
interface AxAIFeatures {
|
|
2155
2197
|
functions: boolean;
|
|
2156
2198
|
streaming: boolean;
|
|
@@ -5576,6 +5618,88 @@ declare class AxBootstrapFewShot extends AxBaseOptimizer {
|
|
|
5576
5618
|
compile<IN, OUT extends AxGenOut>(program: Readonly<AxGen<IN, OUT>>, examples: readonly AxTypedExample<IN>[], metricFn: AxMetricFn, options?: AxCompileOptions): Promise<AxOptimizerResult<OUT>>;
|
|
5577
5619
|
}
|
|
5578
5620
|
|
|
5621
|
+
/** Single-module GEPA (reflective prompt evolution with Pareto sampling) */
|
|
5622
|
+
declare class AxGEPA extends AxBaseOptimizer {
|
|
5623
|
+
private numTrials;
|
|
5624
|
+
private minibatch;
|
|
5625
|
+
private minibatchSize;
|
|
5626
|
+
private earlyStoppingTrials;
|
|
5627
|
+
private minImprovementThreshold;
|
|
5628
|
+
private sampleCount;
|
|
5629
|
+
private paretoSetSize;
|
|
5630
|
+
private crossoverEvery;
|
|
5631
|
+
private tieEpsilon;
|
|
5632
|
+
private feedbackMemorySize;
|
|
5633
|
+
private feedbackMemory;
|
|
5634
|
+
private mergeMax;
|
|
5635
|
+
private mergesUsed;
|
|
5636
|
+
private mergesDue;
|
|
5637
|
+
private totalMergesTested;
|
|
5638
|
+
private lastIterFoundNewProgram;
|
|
5639
|
+
private mergeAttemptKeys;
|
|
5640
|
+
private mergeCompositionKeys;
|
|
5641
|
+
private rngState;
|
|
5642
|
+
private samplerState;
|
|
5643
|
+
private localScoreHistory;
|
|
5644
|
+
private localConfigurationHistory;
|
|
5645
|
+
constructor(args: Readonly<AxOptimizerArgs>);
|
|
5646
|
+
reset(): void;
|
|
5647
|
+
/**
|
|
5648
|
+
* Multi-objective GEPA: reflective evolution with Pareto frontier
|
|
5649
|
+
*/
|
|
5650
|
+
compile<IN, OUT extends AxGenOut>(program: Readonly<AxGen<IN, OUT>>, examples: readonly AxTypedExample<IN>[], metricFn: AxMetricFn, options?: AxCompileOptions): Promise<AxParetoResult<OUT>>;
|
|
5651
|
+
/** Lightweight auto presets */
|
|
5652
|
+
configureAuto(level: 'light' | 'medium' | 'heavy'): void;
|
|
5653
|
+
private getBaseInstruction;
|
|
5654
|
+
private evaluateOnSet;
|
|
5655
|
+
private evaluateAvg;
|
|
5656
|
+
private evaluateOne;
|
|
5657
|
+
private reflectInstruction;
|
|
5658
|
+
private updateSamplerShuffled;
|
|
5659
|
+
private nextMinibatchIndices;
|
|
5660
|
+
private rand;
|
|
5661
|
+
private mergeInstructions;
|
|
5662
|
+
}
|
|
5663
|
+
|
|
5664
|
+
/** Flow-aware GEPA (system-level reflective evolution with module selection + system-aware merge) */
|
|
5665
|
+
declare class AxGEPAFlow extends AxBaseOptimizer {
|
|
5666
|
+
private numTrials;
|
|
5667
|
+
private minibatch;
|
|
5668
|
+
private minibatchSize;
|
|
5669
|
+
private earlyStoppingTrials;
|
|
5670
|
+
private minImprovementThreshold;
|
|
5671
|
+
private sampleCount;
|
|
5672
|
+
private crossoverEvery;
|
|
5673
|
+
private tieEpsilon;
|
|
5674
|
+
private paretoSetSize;
|
|
5675
|
+
private mergeMax;
|
|
5676
|
+
private mergesUsed;
|
|
5677
|
+
private mergesDue;
|
|
5678
|
+
private totalMergesTested;
|
|
5679
|
+
private lastIterFoundNewProgram;
|
|
5680
|
+
private rngState;
|
|
5681
|
+
private mergeAttemptKeys;
|
|
5682
|
+
private mergeCompositionKeys;
|
|
5683
|
+
private samplerState;
|
|
5684
|
+
constructor(args: Readonly<AxOptimizerArgs>);
|
|
5685
|
+
reset(): void;
|
|
5686
|
+
configureAuto(level: 'light' | 'medium' | 'heavy'): void;
|
|
5687
|
+
/**
|
|
5688
|
+
* Multi-objective GEPA-Flow: system-level reflective evolution with Pareto frontier
|
|
5689
|
+
*/
|
|
5690
|
+
compile<IN, OUT extends AxGenOut>(program: Readonly<any>, examples: readonly AxTypedExample<IN>[], metricFn: AxMetricFn, options?: AxCompileOptions): Promise<AxParetoResult<OUT>>;
|
|
5691
|
+
private getBaseInstruction;
|
|
5692
|
+
private evaluateOnSet;
|
|
5693
|
+
private evaluateAvg;
|
|
5694
|
+
private evaluateOne;
|
|
5695
|
+
private reflectModuleInstruction;
|
|
5696
|
+
private updateSamplerShuffled;
|
|
5697
|
+
private nextMinibatchIndices;
|
|
5698
|
+
private systemAwareMergeWithSig;
|
|
5699
|
+
private rand;
|
|
5700
|
+
private systemAwareMerge;
|
|
5701
|
+
}
|
|
5702
|
+
|
|
5579
5703
|
interface AxMiPROResult<IN, OUT extends AxGenOut> extends AxOptimizerResult<OUT> {
|
|
5580
5704
|
optimizedGen?: AxGen<IN, OUT>;
|
|
5581
5705
|
optimizedProgram?: AxOptimizedProgram<OUT>;
|
|
@@ -6313,6 +6437,22 @@ TState extends AxFlowState = IN> implements AxFlowable<IN, OUT> {
|
|
|
6313
6437
|
* @returns Object mapping node names to their usage statistics
|
|
6314
6438
|
*/
|
|
6315
6439
|
getUsageReport(): Record<string, AxProgramUsage[]>;
|
|
6440
|
+
/**
|
|
6441
|
+
* Expose node programs for system-level operations (optimization, inspection)
|
|
6442
|
+
*/
|
|
6443
|
+
getNodePrograms(): ReadonlyArray<{
|
|
6444
|
+
name: string;
|
|
6445
|
+
program: AxProgrammable<any, any>;
|
|
6446
|
+
}>;
|
|
6447
|
+
/**
|
|
6448
|
+
* Attempt to set instruction on a node if supported (AxGen.
|
|
6449
|
+
* setInstruction is optional; returns true if applied)
|
|
6450
|
+
*/
|
|
6451
|
+
setNodeInstruction(name: string, instruction: string): boolean;
|
|
6452
|
+
/**
|
|
6453
|
+
* Bulk-apply instructions to nodes; ignores names that don’t exist or nodes without instruction setter
|
|
6454
|
+
*/
|
|
6455
|
+
setAllNodeInstructions(map: Readonly<Record<string, string>>): void;
|
|
6316
6456
|
/**
|
|
6317
6457
|
* Gets a detailed trace report broken down by node name.
|
|
6318
6458
|
* This provides visibility into the execution traces for each node.
|
|
@@ -7212,31 +7352,35 @@ declare class AxMCPClient {
|
|
|
7212
7352
|
private sendNotification;
|
|
7213
7353
|
}
|
|
7214
7354
|
|
|
7215
|
-
|
|
7216
|
-
|
|
7217
|
-
|
|
7218
|
-
|
|
7219
|
-
|
|
7220
|
-
|
|
7221
|
-
|
|
7222
|
-
|
|
7355
|
+
type TokenSet = {
|
|
7356
|
+
accessToken: string;
|
|
7357
|
+
refreshToken?: string;
|
|
7358
|
+
expiresAt?: number;
|
|
7359
|
+
issuer?: string;
|
|
7360
|
+
};
|
|
7361
|
+
interface AxMCPOAuthOptions {
|
|
7362
|
+
clientId?: string;
|
|
7363
|
+
clientSecret?: string;
|
|
7364
|
+
redirectUri?: string;
|
|
7365
|
+
scopes?: string[];
|
|
7366
|
+
selectAuthorizationServer?: (issuers: string[], resourceMetadata: unknown) => Promise<string> | string;
|
|
7367
|
+
onAuthCode?: (authorizationUrl: string) => Promise<{
|
|
7368
|
+
code: string;
|
|
7369
|
+
redirectUri?: string;
|
|
7370
|
+
}>;
|
|
7371
|
+
tokenStore?: {
|
|
7372
|
+
getToken: (key: string) => Promise<TokenSet | null> | TokenSet | null;
|
|
7373
|
+
setToken: (key: string, token: TokenSet) => Promise<void> | void;
|
|
7374
|
+
clearToken?: (key: string) => Promise<void> | void;
|
|
7375
|
+
};
|
|
7223
7376
|
}
|
|
7377
|
+
|
|
7224
7378
|
interface AxMCPStreamableHTTPTransportOptions {
|
|
7225
|
-
/**
|
|
7226
|
-
* Custom headers to include with all HTTP requests
|
|
7227
|
-
* Note: Content-Type, Accept, and Mcp-Session-Id are managed automatically
|
|
7228
|
-
*/
|
|
7229
7379
|
headers?: Record<string, string>;
|
|
7230
|
-
/**
|
|
7231
|
-
* Authorization header value (convenience for common use case)
|
|
7232
|
-
* If provided, will be added to the headers as 'Authorization'
|
|
7233
|
-
*/
|
|
7234
7380
|
authorization?: string;
|
|
7381
|
+
oauth?: AxMCPOAuthOptions;
|
|
7235
7382
|
}
|
|
7236
|
-
|
|
7237
|
-
* AxMCPStreambleHTTPTransport implements the 2025-03-26 Streamable HTTP transport specification
|
|
7238
|
-
* This transport uses a single HTTP endpoint that supports both POST and GET methods
|
|
7239
|
-
*/
|
|
7383
|
+
|
|
7240
7384
|
declare class AxMCPStreambleHTTPTransport implements AxMCPTransport {
|
|
7241
7385
|
private mcpEndpoint;
|
|
7242
7386
|
private sessionId?;
|
|
@@ -7244,46 +7388,45 @@ declare class AxMCPStreambleHTTPTransport implements AxMCPTransport {
|
|
|
7244
7388
|
private pendingRequests;
|
|
7245
7389
|
private messageHandler?;
|
|
7246
7390
|
private customHeaders;
|
|
7391
|
+
private oauthHelper;
|
|
7392
|
+
private currentToken?;
|
|
7393
|
+
private currentIssuer?;
|
|
7247
7394
|
constructor(mcpEndpoint: string, options?: AxMCPStreamableHTTPTransportOptions);
|
|
7248
|
-
/**
|
|
7249
|
-
* Update custom headers (useful for refreshing tokens)
|
|
7250
|
-
*/
|
|
7251
7395
|
setHeaders(headers: Record<string, string>): void;
|
|
7252
|
-
/**
|
|
7253
|
-
* Update authorization header (convenience method)
|
|
7254
|
-
*/
|
|
7255
7396
|
setAuthorization(authorization: string): void;
|
|
7256
|
-
/**
|
|
7257
|
-
* Get a copy of the current custom headers
|
|
7258
|
-
*/
|
|
7259
7397
|
getHeaders(): Record<string, string>;
|
|
7260
|
-
/**
|
|
7261
|
-
* Build headers for HTTP requests, merging custom headers with required ones
|
|
7262
|
-
*/
|
|
7263
7398
|
private buildHeaders;
|
|
7264
|
-
/**
|
|
7265
|
-
* Set a handler for incoming server messages (requests/notifications)
|
|
7266
|
-
*/
|
|
7267
7399
|
setMessageHandler(handler: (message: AxMCPJSONRPCRequest<unknown> | AxMCPJSONRPCNotification) => void): void;
|
|
7268
7400
|
connect(): Promise<void>;
|
|
7269
|
-
/**
|
|
7270
|
-
* Opens an SSE stream to listen for server-initiated messages
|
|
7271
|
-
*/
|
|
7272
7401
|
openListeningStream(): Promise<void>;
|
|
7273
|
-
/**
|
|
7274
|
-
* Opens an SSE stream using fetch API to support custom headers
|
|
7275
|
-
*/
|
|
7276
7402
|
private openListeningStreamWithFetch;
|
|
7277
7403
|
send(message: Readonly<AxMCPJSONRPCRequest<unknown>>): Promise<AxMCPJSONRPCResponse<unknown>>;
|
|
7278
7404
|
private handleSSEResponse;
|
|
7279
7405
|
sendNotification(message: Readonly<AxMCPJSONRPCNotification>): Promise<void>;
|
|
7280
|
-
/**
|
|
7281
|
-
* Explicitly terminate the session (if supported by server)
|
|
7282
|
-
*/
|
|
7283
7406
|
terminateSession(): Promise<void>;
|
|
7284
|
-
|
|
7285
|
-
|
|
7286
|
-
|
|
7407
|
+
close(): void;
|
|
7408
|
+
}
|
|
7409
|
+
|
|
7410
|
+
declare class AxMCPHTTPSSETransport implements AxMCPTransport {
|
|
7411
|
+
private endpoint;
|
|
7412
|
+
private sseUrl;
|
|
7413
|
+
private eventSource?;
|
|
7414
|
+
private customHeaders;
|
|
7415
|
+
private oauthHelper;
|
|
7416
|
+
private currentToken?;
|
|
7417
|
+
private currentIssuer?;
|
|
7418
|
+
private sseAbort?;
|
|
7419
|
+
private pendingRequests;
|
|
7420
|
+
private messageHandler?;
|
|
7421
|
+
private endpointReady?;
|
|
7422
|
+
constructor(sseUrl: string, options?: AxMCPStreamableHTTPTransportOptions);
|
|
7423
|
+
private buildHeaders;
|
|
7424
|
+
private openSSEWithFetch;
|
|
7425
|
+
private createEndpointReady;
|
|
7426
|
+
private consumeSSEStream;
|
|
7427
|
+
connect(): Promise<void>;
|
|
7428
|
+
send(message: Readonly<AxMCPJSONRPCRequest<unknown>>): Promise<AxMCPJSONRPCResponse<unknown>>;
|
|
7429
|
+
sendNotification(message: Readonly<AxMCPJSONRPCNotification>): Promise<void>;
|
|
7287
7430
|
close(): void;
|
|
7288
7431
|
}
|
|
7289
7432
|
|
|
@@ -7539,95 +7682,112 @@ declare const axRAG: (queryFn: (query: string) => Promise<string>, options?: {
|
|
|
7539
7682
|
queryGeneratorResult: BuildObject<[{
|
|
7540
7683
|
name: "searchQuery";
|
|
7541
7684
|
optional: false;
|
|
7685
|
+
internal: false;
|
|
7542
7686
|
} & {
|
|
7543
7687
|
type: "string";
|
|
7544
7688
|
}, {
|
|
7545
7689
|
name: "queryReasoning";
|
|
7546
7690
|
optional: false;
|
|
7691
|
+
internal: false;
|
|
7547
7692
|
} & {
|
|
7548
7693
|
type: "string";
|
|
7549
7694
|
}]>;
|
|
7550
7695
|
contextualizerResult: BuildObject<[{
|
|
7551
7696
|
name: "enhancedContext";
|
|
7552
7697
|
optional: false;
|
|
7698
|
+
internal: false;
|
|
7553
7699
|
} & {
|
|
7554
7700
|
type: "string";
|
|
7555
7701
|
}]>;
|
|
7556
7702
|
qualityAssessorResult: BuildObject<[{
|
|
7557
7703
|
name: "completenessScore";
|
|
7558
7704
|
optional: false;
|
|
7705
|
+
internal: false;
|
|
7559
7706
|
} & {
|
|
7560
7707
|
type: "number";
|
|
7561
7708
|
}, {
|
|
7562
7709
|
name: "missingAspects";
|
|
7563
7710
|
optional: false;
|
|
7711
|
+
internal: false;
|
|
7564
7712
|
} & {
|
|
7565
7713
|
type: "string[]";
|
|
7566
7714
|
}]>;
|
|
7567
7715
|
queryRefinerResult: BuildObject<[{
|
|
7568
7716
|
name: "refinedQuery";
|
|
7569
7717
|
optional: false;
|
|
7718
|
+
internal: false;
|
|
7570
7719
|
} & {
|
|
7571
7720
|
type: "string";
|
|
7572
7721
|
}]>;
|
|
7573
7722
|
questionDecomposerResult: BuildObject<[{
|
|
7574
7723
|
name: "subQuestions";
|
|
7575
7724
|
optional: false;
|
|
7725
|
+
internal: false;
|
|
7576
7726
|
} & {
|
|
7577
7727
|
type: "string[]";
|
|
7578
7728
|
}, {
|
|
7579
7729
|
name: "decompositionReason";
|
|
7580
7730
|
optional: false;
|
|
7731
|
+
internal: false;
|
|
7581
7732
|
} & {
|
|
7582
7733
|
type: "string";
|
|
7583
7734
|
}]>;
|
|
7584
7735
|
evidenceSynthesizerResult: BuildObject<[{
|
|
7585
7736
|
name: "synthesizedEvidence";
|
|
7586
7737
|
optional: false;
|
|
7738
|
+
internal: false;
|
|
7587
7739
|
} & {
|
|
7588
7740
|
type: "string";
|
|
7589
7741
|
}, {
|
|
7590
7742
|
name: "evidenceGaps";
|
|
7591
7743
|
optional: false;
|
|
7744
|
+
internal: false;
|
|
7592
7745
|
} & {
|
|
7593
7746
|
type: "string[]";
|
|
7594
7747
|
}]>;
|
|
7595
7748
|
gapAnalyzerResult: BuildObject<[{
|
|
7596
7749
|
name: "needsMoreInfo";
|
|
7597
7750
|
optional: false;
|
|
7751
|
+
internal: false;
|
|
7598
7752
|
} & {
|
|
7599
7753
|
type: "boolean";
|
|
7600
7754
|
}, {
|
|
7601
7755
|
name: "focusedQueries";
|
|
7602
7756
|
optional: false;
|
|
7757
|
+
internal: false;
|
|
7603
7758
|
} & {
|
|
7604
7759
|
type: "string[]";
|
|
7605
7760
|
}]>;
|
|
7606
7761
|
answerGeneratorResult: BuildObject<[{
|
|
7607
7762
|
name: "comprehensiveAnswer";
|
|
7608
7763
|
optional: false;
|
|
7764
|
+
internal: false;
|
|
7609
7765
|
} & {
|
|
7610
7766
|
type: "string";
|
|
7611
7767
|
}, {
|
|
7612
7768
|
name: "confidenceLevel";
|
|
7613
7769
|
optional: false;
|
|
7770
|
+
internal: false;
|
|
7614
7771
|
} & {
|
|
7615
7772
|
type: "number";
|
|
7616
7773
|
}]>;
|
|
7617
7774
|
qualityValidatorResult: BuildObject<[{
|
|
7618
7775
|
name: "qualityScore";
|
|
7619
7776
|
optional: false;
|
|
7777
|
+
internal: false;
|
|
7620
7778
|
} & {
|
|
7621
7779
|
type: "number";
|
|
7622
7780
|
}, {
|
|
7623
7781
|
name: "issues";
|
|
7624
7782
|
optional: false;
|
|
7783
|
+
internal: false;
|
|
7625
7784
|
} & {
|
|
7626
7785
|
type: "string[]";
|
|
7627
7786
|
}]>;
|
|
7628
7787
|
answerHealerResult: BuildObject<[{
|
|
7629
7788
|
name: "healedAnswer";
|
|
7630
7789
|
optional: false;
|
|
7790
|
+
internal: false;
|
|
7631
7791
|
} & {
|
|
7632
7792
|
type: "string";
|
|
7633
7793
|
}]>;
|
|
@@ -7704,4 +7864,4 @@ declare class AxRateLimiterTokenUsage {
|
|
|
7704
7864
|
acquire(tokens: number): Promise<void>;
|
|
7705
7865
|
}
|
|
7706
7866
|
|
|
7707
|
-
export { AxAI, AxAIAnthropic, type AxAIAnthropicArgs, type AxAIAnthropicChatError, type AxAIAnthropicChatRequest, type AxAIAnthropicChatRequestCacheParam, type AxAIAnthropicChatResponse, type AxAIAnthropicChatResponseDelta, type AxAIAnthropicConfig, type AxAIAnthropicContentBlockDeltaEvent, type AxAIAnthropicContentBlockStartEvent, type AxAIAnthropicContentBlockStopEvent, type AxAIAnthropicErrorEvent, type AxAIAnthropicFunctionTool, type AxAIAnthropicMessageDeltaEvent, type AxAIAnthropicMessageStartEvent, type AxAIAnthropicMessageStopEvent, AxAIAnthropicModel, type AxAIAnthropicPingEvent, type AxAIAnthropicRequestTool, type AxAIAnthropicThinkingConfig, type AxAIAnthropicThinkingTokenBudgetLevels, AxAIAnthropicVertexModel, type AxAIAnthropicWebSearchTool, type AxAIArgs, AxAIAzureOpenAI, type AxAIAzureOpenAIArgs, type AxAIAzureOpenAIConfig, AxAICohere, type AxAICohereArgs, type AxAICohereChatRequest, type AxAICohereChatRequestToolResults, type AxAICohereChatResponse, type AxAICohereChatResponseDelta, type AxAICohereChatResponseToolCalls, type AxAICohereConfig, AxAICohereEmbedModel, type AxAICohereEmbedRequest, type AxAICohereEmbedResponse, AxAICohereModel, AxAIDeepSeek, type AxAIDeepSeekArgs, AxAIDeepSeekModel, type AxAIEmbedModels, type AxAIFeatures, AxAIGoogleGemini, type AxAIGoogleGeminiArgs, type AxAIGoogleGeminiBatchEmbedRequest, type AxAIGoogleGeminiBatchEmbedResponse, type AxAIGoogleGeminiChatRequest, type AxAIGoogleGeminiChatResponse, type AxAIGoogleGeminiChatResponseDelta, type AxAIGoogleGeminiConfig, type AxAIGoogleGeminiContent, type AxAIGoogleGeminiContentPart, AxAIGoogleGeminiEmbedModel, AxAIGoogleGeminiEmbedTypes, type AxAIGoogleGeminiGenerationConfig, AxAIGoogleGeminiModel, type AxAIGoogleGeminiOptionsTools, AxAIGoogleGeminiSafetyCategory, type AxAIGoogleGeminiSafetySettings, AxAIGoogleGeminiSafetyThreshold, type AxAIGoogleGeminiThinkingConfig, type AxAIGoogleGeminiThinkingTokenBudgetLevels, type AxAIGoogleGeminiTool, type AxAIGoogleGeminiToolConfig, type AxAIGoogleGeminiToolFunctionDeclaration, type AxAIGoogleGeminiToolGoogleSearchRetrieval, type AxAIGoogleVertexBatchEmbedRequest, type AxAIGoogleVertexBatchEmbedResponse, AxAIGrok, type AxAIGrokArgs, type AxAIGrokChatRequest, AxAIGrokEmbedModels, AxAIGrokModel, type AxAIGrokOptionsTools, type AxAIGrokSearchSource, AxAIGroq, type AxAIGroqArgs, AxAIGroqModel, AxAIHuggingFace, type AxAIHuggingFaceArgs, type AxAIHuggingFaceConfig, AxAIHuggingFaceModel, type AxAIHuggingFaceRequest, type AxAIHuggingFaceResponse, type AxAIInputModelList, type AxAIMemory, type AxAIMetricsInstruments, AxAIMistral, type AxAIMistralArgs, type AxAIMistralChatRequest, AxAIMistralEmbedModels, AxAIMistralModel, type AxAIModelList, type AxAIModelListBase, type AxAIModels, AxAIOllama, type AxAIOllamaAIConfig, type AxAIOllamaArgs, AxAIOpenAI, type AxAIOpenAIAnnotation, type AxAIOpenAIArgs, AxAIOpenAIBase, type AxAIOpenAIBaseArgs, type AxAIOpenAIChatRequest, type AxAIOpenAIChatResponse, type AxAIOpenAIChatResponseDelta, type AxAIOpenAIConfig, AxAIOpenAIEmbedModel, type AxAIOpenAIEmbedRequest, type AxAIOpenAIEmbedResponse, type AxAIOpenAILogprob, AxAIOpenAIModel, type AxAIOpenAIResponseDelta, AxAIOpenAIResponses, type AxAIOpenAIResponsesArgs, AxAIOpenAIResponsesBase, type AxAIOpenAIResponsesCodeInterpreterToolCall, type AxAIOpenAIResponsesComputerToolCall, type AxAIOpenAIResponsesConfig, type AxAIOpenAIResponsesContentPartAddedEvent, type AxAIOpenAIResponsesContentPartDoneEvent, type AxAIOpenAIResponsesDefineFunctionTool, type AxAIOpenAIResponsesErrorEvent, type AxAIOpenAIResponsesFileSearchCallCompletedEvent, type AxAIOpenAIResponsesFileSearchCallInProgressEvent, type AxAIOpenAIResponsesFileSearchCallSearchingEvent, type AxAIOpenAIResponsesFileSearchToolCall, type AxAIOpenAIResponsesFunctionCallArgumentsDeltaEvent, type AxAIOpenAIResponsesFunctionCallArgumentsDoneEvent, type AxAIOpenAIResponsesFunctionCallItem, type AxAIOpenAIResponsesImageGenerationCallCompletedEvent, type AxAIOpenAIResponsesImageGenerationCallGeneratingEvent, type AxAIOpenAIResponsesImageGenerationCallInProgressEvent, type AxAIOpenAIResponsesImageGenerationCallPartialImageEvent, type AxAIOpenAIResponsesImageGenerationToolCall, AxAIOpenAIResponsesImpl, type AxAIOpenAIResponsesInputAudioContentPart, type AxAIOpenAIResponsesInputContentPart, type AxAIOpenAIResponsesInputFunctionCallItem, type AxAIOpenAIResponsesInputFunctionCallOutputItem, type AxAIOpenAIResponsesInputImageUrlContentPart, type AxAIOpenAIResponsesInputItem, type AxAIOpenAIResponsesInputMessageItem, type AxAIOpenAIResponsesInputTextContentPart, type AxAIOpenAIResponsesLocalShellToolCall, type AxAIOpenAIResponsesMCPCallArgumentsDeltaEvent, type AxAIOpenAIResponsesMCPCallArgumentsDoneEvent, type AxAIOpenAIResponsesMCPCallCompletedEvent, type AxAIOpenAIResponsesMCPCallFailedEvent, type AxAIOpenAIResponsesMCPCallInProgressEvent, type AxAIOpenAIResponsesMCPListToolsCompletedEvent, type AxAIOpenAIResponsesMCPListToolsFailedEvent, type AxAIOpenAIResponsesMCPListToolsInProgressEvent, type AxAIOpenAIResponsesMCPToolCall, AxAIOpenAIResponsesModel, type AxAIOpenAIResponsesOutputItem, type AxAIOpenAIResponsesOutputItemAddedEvent, type AxAIOpenAIResponsesOutputItemDoneEvent, type AxAIOpenAIResponsesOutputMessageItem, type AxAIOpenAIResponsesOutputRefusalContentPart, type AxAIOpenAIResponsesOutputTextAnnotationAddedEvent, type AxAIOpenAIResponsesOutputTextContentPart, type AxAIOpenAIResponsesOutputTextDeltaEvent, type AxAIOpenAIResponsesOutputTextDoneEvent, type AxAIOpenAIResponsesReasoningDeltaEvent, type AxAIOpenAIResponsesReasoningDoneEvent, type AxAIOpenAIResponsesReasoningItem, type AxAIOpenAIResponsesReasoningSummaryDeltaEvent, type AxAIOpenAIResponsesReasoningSummaryDoneEvent, type AxAIOpenAIResponsesReasoningSummaryPart, type AxAIOpenAIResponsesReasoningSummaryPartAddedEvent, type AxAIOpenAIResponsesReasoningSummaryPartDoneEvent, type AxAIOpenAIResponsesReasoningSummaryTextDeltaEvent, type AxAIOpenAIResponsesReasoningSummaryTextDoneEvent, type AxAIOpenAIResponsesRefusalDeltaEvent, type AxAIOpenAIResponsesRefusalDoneEvent, type AxAIOpenAIResponsesRequest, type AxAIOpenAIResponsesResponse, type AxAIOpenAIResponsesResponseCompletedEvent, type AxAIOpenAIResponsesResponseCreatedEvent, type AxAIOpenAIResponsesResponseDelta, type AxAIOpenAIResponsesResponseFailedEvent, type AxAIOpenAIResponsesResponseInProgressEvent, type AxAIOpenAIResponsesResponseIncompleteEvent, type AxAIOpenAIResponsesResponseQueuedEvent, type AxAIOpenAIResponsesStreamEvent, type AxAIOpenAIResponsesStreamEventBase, type AxAIOpenAIResponsesToolCall, type AxAIOpenAIResponsesToolCallBase, type AxAIOpenAIResponsesToolChoice, type AxAIOpenAIResponsesToolDefinition, type AxAIOpenAIResponsesWebSearchCallCompletedEvent, type AxAIOpenAIResponsesWebSearchCallInProgressEvent, type AxAIOpenAIResponsesWebSearchCallSearchingEvent, type AxAIOpenAIResponsesWebSearchToolCall, type AxAIOpenAIUrlCitation, type AxAIOpenAIUsage, AxAIOpenRouter, type AxAIOpenRouterArgs, AxAIRefusalError, AxAIReka, type AxAIRekaArgs, type AxAIRekaChatRequest, type AxAIRekaChatResponse, type AxAIRekaChatResponseDelta, type AxAIRekaConfig, AxAIRekaModel, type AxAIRekaUsage, type AxAIService, AxAIServiceAbortedError, type AxAIServiceActionOptions, AxAIServiceAuthenticationError, AxAIServiceError, type AxAIServiceImpl, type AxAIServiceMetrics, type AxAIServiceModelType, AxAIServiceNetworkError, type AxAIServiceOptions, AxAIServiceResponseError, AxAIServiceStatusError, AxAIServiceStreamTerminatedError, AxAIServiceTimeoutError, AxAITogether, type AxAITogetherArgs, AxAIWebLLM, type AxAIWebLLMArgs, type AxAIWebLLMChatRequest, type AxAIWebLLMChatResponse, type AxAIWebLLMChatResponseDelta, type AxAIWebLLMConfig, type AxAIWebLLMEmbedModel, type AxAIWebLLMEmbedRequest, type AxAIWebLLMEmbedResponse, AxAIWebLLMModel, type AxAPI, type AxAPIConfig, AxAgent, type AxAgentConfig, type AxAgentFeatures, type AxAgentOptions, type AxAgentic, AxApacheTika, type AxApacheTikaArgs, type AxApacheTikaConvertOptions, type AxAssertion, AxAssertionError, AxBalancer, type AxBalancerOptions, AxBaseAI, type AxBaseAIArgs, AxBaseOptimizer, AxBootstrapFewShot, type AxBootstrapOptimizerOptions, type AxChatRequest, type AxChatResponse, type AxChatResponseFunctionCall, type AxChatResponseResult, type AxCheckpointLoadFn, type AxCheckpointSaveFn, type AxCitation, type AxCompileOptions, AxContentProcessingError, type AxContentProcessingServices, type AxCostTracker, type AxCostTrackerOptions, AxDB, type AxDBArgs, AxDBBase, type AxDBBaseArgs, type AxDBBaseOpOptions, AxDBCloudflare, type AxDBCloudflareArgs, type AxDBCloudflareOpOptions, type AxDBLoaderOptions, AxDBManager, type AxDBManagerArgs, type AxDBMatch, AxDBMemory, type AxDBMemoryArgs, type AxDBMemoryOpOptions, AxDBPinecone, type AxDBPineconeArgs, type AxDBPineconeOpOptions, type AxDBQueryRequest, type AxDBQueryResponse, type AxDBQueryService, type AxDBService, type AxDBState, type AxDBUpsertRequest, type AxDBUpsertResponse, AxDBWeaviate, type AxDBWeaviateArgs, type AxDBWeaviateOpOptions, type AxDataRow, AxDefaultCostTracker, AxDefaultResultReranker, type AxDockerContainer, AxDockerSession, type AxEmbedRequest, type AxEmbedResponse, AxEmbeddingAdapter, type AxErrorCategory, AxEvalUtil, type AxEvaluateArgs, type AxExample, type AxField, type AxFieldProcessor, type AxFieldProcessorProcess, type AxFieldTemplateFn, type AxFieldType, type AxFieldValue, AxFlow, type AxFlowAutoParallelConfig, type AxFlowBranchContext, type AxFlowBranchEvaluationData, type AxFlowCompleteData, AxFlowDependencyAnalyzer, type AxFlowDynamicContext, type AxFlowErrorData, AxFlowExecutionPlanner, type AxFlowExecutionStep, type AxFlowLogData, type AxFlowLoggerData, type AxFlowLoggerFunction, type AxFlowNodeDefinition, type AxFlowParallelBranch, type AxFlowParallelGroup, type AxFlowParallelGroupCompleteData, type AxFlowParallelGroupStartData, type AxFlowStartData, type AxFlowState, type AxFlowStepCompleteData, type AxFlowStepFunction, type AxFlowStepStartData, type AxFlowSubContext, AxFlowSubContextImpl, type AxFlowTypedParallelBranch, type AxFlowTypedSubContext, AxFlowTypedSubContextImpl, type AxFlowable, type AxFluentFieldInfo, AxFluentFieldType, type AxForwardable, type AxFunction, AxFunctionError, type AxFunctionHandler, type AxFunctionJSONSchema, AxFunctionProcessor, type AxFunctionResult, type AxFunctionResultFormatter, AxGen, type AxGenDeltaOut, type AxGenIn, type AxGenMetricsInstruments, type AxGenOut, type AxGenStreamingOut, AxGenerateError, type AxGenerateErrorDetails, type AxGenerateResult, AxHFDataLoader, type AxIField, type AxInputFunctionType, AxInstanceRegistry, type AxInternalChatRequest, type AxInternalEmbedRequest, AxLLMRequestTypeValues, type AxLoggerData, type AxLoggerFunction, AxMCPClient, type AxMCPFunctionDescription, AxMCPHTTPSSETransport, type AxMCPInitializeParams, type AxMCPInitializeResult, type AxMCPJSONRPCErrorResponse, type AxMCPJSONRPCNotification, type AxMCPJSONRPCRequest, type AxMCPJSONRPCResponse, type AxMCPJSONRPCSuccessResponse, type AxMCPStreamableHTTPTransportOptions, AxMCPStreambleHTTPTransport, type AxMCPToolsListResult, type AxMCPTransport, AxMediaNotSupportedError, AxMemory, type AxMemoryData, type AxMessage, type AxMetricFn, type AxMetricFnArgs, type AxMetricsConfig, AxMiPRO, type AxMiPROOptimizerOptions, type AxMiPROResult, AxMockAIService, type AxMockAIServiceConfig, type AxModelConfig, type AxModelInfo, type AxModelInfoWithProvider, type AxModelUsage, type AxMultiMetricFn, type AxMultiProviderConfig, AxMultiServiceRouter, type AxOptimizationCheckpoint, type AxOptimizationProgress, type AxOptimizationStats, type AxOptimizedProgram, AxOptimizedProgramImpl, type AxOptimizer, type AxOptimizerArgs, type AxOptimizerLoggerData, type AxOptimizerLoggerFunction, type AxOptimizerMetricsConfig, type AxOptimizerMetricsInstruments, type AxOptimizerResult, type AxParetoResult, AxProgram, type AxProgramDemos, type AxProgramExamples, type AxProgramForwardOptions, type AxProgramForwardOptionsWithModels, type AxProgramOptions, type AxProgramStreamingForwardOptions, type AxProgramStreamingForwardOptionsWithModels, type AxProgramTrace, type AxProgramUsage, type AxProgrammable, AxPromptTemplate, type AxPromptTemplateOptions, AxProviderRouter, type AxRateLimiterFunction, AxRateLimiterTokenUsage, type AxRateLimiterTokenUsageOptions, type AxRerankerIn, type AxRerankerOut, type AxResponseHandlerArgs, type AxResultPickerFunction, type AxResultPickerFunctionFieldResults, type AxResultPickerFunctionFunctionResults, type AxRewriteIn, type AxRewriteOut, type AxRoutingResult, type AxSamplePickerOptions, type AxSetExamplesOptions, AxSignature, AxSignatureBuilder, type AxSignatureConfig, AxSimpleClassifier, AxSimpleClassifierClass, type AxSimpleClassifierForwardOptions, AxSpanKindValues, AxStopFunctionCallException, type AxStreamingAssertion, type AxStreamingEvent, type AxStreamingFieldProcessorProcess, AxStringUtil, AxTestPrompt, type AxTokenUsage, type AxTunable, type AxTypedExample, type AxUsable, agent, ai, ax, axAIAnthropicDefaultConfig, axAIAnthropicVertexDefaultConfig, axAIAzureOpenAIBestConfig, axAIAzureOpenAICreativeConfig, axAIAzureOpenAIDefaultConfig, axAIAzureOpenAIFastConfig, axAICohereCreativeConfig, axAICohereDefaultConfig, axAIDeepSeekCodeConfig, axAIDeepSeekDefaultConfig, axAIGoogleGeminiDefaultConfig, axAIGoogleGeminiDefaultCreativeConfig, axAIGrokBestConfig, axAIGrokDefaultConfig, axAIHuggingFaceCreativeConfig, axAIHuggingFaceDefaultConfig, axAIMistralBestConfig, axAIMistralDefaultConfig, axAIOllamaDefaultConfig, axAIOllamaDefaultCreativeConfig, axAIOpenAIBestConfig, axAIOpenAICreativeConfig, axAIOpenAIDefaultConfig, axAIOpenAIFastConfig, axAIOpenAIResponsesBestConfig, axAIOpenAIResponsesCreativeConfig, axAIOpenAIResponsesDefaultConfig, axAIOpenRouterDefaultConfig, axAIRekaBestConfig, axAIRekaCreativeConfig, axAIRekaDefaultConfig, axAIRekaFastConfig, axAITogetherDefaultConfig, axAIWebLLMCreativeConfig, axAIWebLLMDefaultConfig, axAnalyzeChatPromptRequirements, axAnalyzeRequestRequirements, axBaseAIDefaultConfig, axBaseAIDefaultCreativeConfig, axCheckMetricsHealth, axCreateDefaultColorLogger, axCreateDefaultOptimizerColorLogger, axCreateDefaultOptimizerTextLogger, axCreateDefaultTextLogger, axCreateFlowColorLogger, axCreateFlowTextLogger, axDefaultFlowLogger, axDefaultMetricsConfig, axDefaultOptimizerLogger, axDefaultOptimizerMetricsConfig, axGetCompatibilityReport, axGetFormatCompatibility, axGetMetricsConfig, axGetOptimizerMetricsConfig, axGetProvidersWithMediaSupport, axGlobals, axModelInfoAnthropic, axModelInfoCohere, axModelInfoDeepSeek, axModelInfoGoogleGemini, axModelInfoGrok, axModelInfoGroq, axModelInfoHuggingFace, axModelInfoMistral, axModelInfoOpenAI, axModelInfoOpenAIResponses, axModelInfoReka, axModelInfoTogether, axModelInfoWebLLM, axProcessContentForProvider, axRAG, axScoreProvidersForRequest, axSelectOptimalProvider, axSpanAttributes, axSpanEvents, axUpdateMetricsConfig, axUpdateOptimizerMetricsConfig, axValidateChatRequestMessage, axValidateChatResponseResult, axValidateProviderCapabilities, f, flow, s };
|
|
7867
|
+
export { AxAI, AxAIAnthropic, type AxAIAnthropicArgs, type AxAIAnthropicChatError, type AxAIAnthropicChatRequest, type AxAIAnthropicChatRequestCacheParam, type AxAIAnthropicChatResponse, type AxAIAnthropicChatResponseDelta, type AxAIAnthropicConfig, type AxAIAnthropicContentBlockDeltaEvent, type AxAIAnthropicContentBlockStartEvent, type AxAIAnthropicContentBlockStopEvent, type AxAIAnthropicErrorEvent, type AxAIAnthropicFunctionTool, type AxAIAnthropicMessageDeltaEvent, type AxAIAnthropicMessageStartEvent, type AxAIAnthropicMessageStopEvent, AxAIAnthropicModel, type AxAIAnthropicPingEvent, type AxAIAnthropicRequestTool, type AxAIAnthropicThinkingConfig, type AxAIAnthropicThinkingTokenBudgetLevels, AxAIAnthropicVertexModel, type AxAIAnthropicWebSearchTool, type AxAIArgs, AxAIAzureOpenAI, type AxAIAzureOpenAIArgs, type AxAIAzureOpenAIConfig, AxAICohere, type AxAICohereArgs, type AxAICohereChatRequest, type AxAICohereChatRequestToolResults, type AxAICohereChatResponse, type AxAICohereChatResponseDelta, type AxAICohereChatResponseToolCalls, type AxAICohereConfig, AxAICohereEmbedModel, type AxAICohereEmbedRequest, type AxAICohereEmbedResponse, AxAICohereModel, AxAIDeepSeek, type AxAIDeepSeekArgs, AxAIDeepSeekModel, type AxAIEmbedModels, type AxAIFeatures, AxAIGoogleGemini, type AxAIGoogleGeminiArgs, type AxAIGoogleGeminiBatchEmbedRequest, type AxAIGoogleGeminiBatchEmbedResponse, type AxAIGoogleGeminiChatRequest, type AxAIGoogleGeminiChatResponse, type AxAIGoogleGeminiChatResponseDelta, type AxAIGoogleGeminiConfig, type AxAIGoogleGeminiContent, type AxAIGoogleGeminiContentPart, AxAIGoogleGeminiEmbedModel, AxAIGoogleGeminiEmbedTypes, type AxAIGoogleGeminiGenerationConfig, AxAIGoogleGeminiModel, type AxAIGoogleGeminiOptionsTools, AxAIGoogleGeminiSafetyCategory, type AxAIGoogleGeminiSafetySettings, AxAIGoogleGeminiSafetyThreshold, type AxAIGoogleGeminiThinkingConfig, type AxAIGoogleGeminiThinkingTokenBudgetLevels, type AxAIGoogleGeminiTool, type AxAIGoogleGeminiToolConfig, type AxAIGoogleGeminiToolFunctionDeclaration, type AxAIGoogleGeminiToolGoogleSearchRetrieval, type AxAIGoogleVertexBatchEmbedRequest, type AxAIGoogleVertexBatchEmbedResponse, AxAIGrok, type AxAIGrokArgs, type AxAIGrokChatRequest, AxAIGrokEmbedModels, AxAIGrokModel, type AxAIGrokOptionsTools, type AxAIGrokSearchSource, AxAIGroq, type AxAIGroqArgs, AxAIGroqModel, AxAIHuggingFace, type AxAIHuggingFaceArgs, type AxAIHuggingFaceConfig, AxAIHuggingFaceModel, type AxAIHuggingFaceRequest, type AxAIHuggingFaceResponse, type AxAIInputModelList, type AxAIMemory, type AxAIMetricsInstruments, AxAIMistral, type AxAIMistralArgs, type AxAIMistralChatRequest, AxAIMistralEmbedModels, AxAIMistralModel, type AxAIModelList, type AxAIModelListBase, type AxAIModels, AxAIOllama, type AxAIOllamaAIConfig, type AxAIOllamaArgs, AxAIOpenAI, type AxAIOpenAIAnnotation, type AxAIOpenAIArgs, AxAIOpenAIBase, type AxAIOpenAIBaseArgs, type AxAIOpenAIChatRequest, type AxAIOpenAIChatResponse, type AxAIOpenAIChatResponseDelta, type AxAIOpenAIConfig, AxAIOpenAIEmbedModel, type AxAIOpenAIEmbedRequest, type AxAIOpenAIEmbedResponse, type AxAIOpenAILogprob, AxAIOpenAIModel, type AxAIOpenAIResponseDelta, AxAIOpenAIResponses, type AxAIOpenAIResponsesArgs, AxAIOpenAIResponsesBase, type AxAIOpenAIResponsesCodeInterpreterToolCall, type AxAIOpenAIResponsesComputerToolCall, type AxAIOpenAIResponsesConfig, type AxAIOpenAIResponsesContentPartAddedEvent, type AxAIOpenAIResponsesContentPartDoneEvent, type AxAIOpenAIResponsesDefineFunctionTool, type AxAIOpenAIResponsesErrorEvent, type AxAIOpenAIResponsesFileSearchCallCompletedEvent, type AxAIOpenAIResponsesFileSearchCallInProgressEvent, type AxAIOpenAIResponsesFileSearchCallSearchingEvent, type AxAIOpenAIResponsesFileSearchToolCall, type AxAIOpenAIResponsesFunctionCallArgumentsDeltaEvent, type AxAIOpenAIResponsesFunctionCallArgumentsDoneEvent, type AxAIOpenAIResponsesFunctionCallItem, type AxAIOpenAIResponsesImageGenerationCallCompletedEvent, type AxAIOpenAIResponsesImageGenerationCallGeneratingEvent, type AxAIOpenAIResponsesImageGenerationCallInProgressEvent, type AxAIOpenAIResponsesImageGenerationCallPartialImageEvent, type AxAIOpenAIResponsesImageGenerationToolCall, AxAIOpenAIResponsesImpl, type AxAIOpenAIResponsesInputAudioContentPart, type AxAIOpenAIResponsesInputContentPart, type AxAIOpenAIResponsesInputFunctionCallItem, type AxAIOpenAIResponsesInputFunctionCallOutputItem, type AxAIOpenAIResponsesInputImageUrlContentPart, type AxAIOpenAIResponsesInputItem, type AxAIOpenAIResponsesInputMessageItem, type AxAIOpenAIResponsesInputTextContentPart, type AxAIOpenAIResponsesLocalShellToolCall, type AxAIOpenAIResponsesMCPCallArgumentsDeltaEvent, type AxAIOpenAIResponsesMCPCallArgumentsDoneEvent, type AxAIOpenAIResponsesMCPCallCompletedEvent, type AxAIOpenAIResponsesMCPCallFailedEvent, type AxAIOpenAIResponsesMCPCallInProgressEvent, type AxAIOpenAIResponsesMCPListToolsCompletedEvent, type AxAIOpenAIResponsesMCPListToolsFailedEvent, type AxAIOpenAIResponsesMCPListToolsInProgressEvent, type AxAIOpenAIResponsesMCPToolCall, AxAIOpenAIResponsesModel, type AxAIOpenAIResponsesOutputItem, type AxAIOpenAIResponsesOutputItemAddedEvent, type AxAIOpenAIResponsesOutputItemDoneEvent, type AxAIOpenAIResponsesOutputMessageItem, type AxAIOpenAIResponsesOutputRefusalContentPart, type AxAIOpenAIResponsesOutputTextAnnotationAddedEvent, type AxAIOpenAIResponsesOutputTextContentPart, type AxAIOpenAIResponsesOutputTextDeltaEvent, type AxAIOpenAIResponsesOutputTextDoneEvent, type AxAIOpenAIResponsesReasoningDeltaEvent, type AxAIOpenAIResponsesReasoningDoneEvent, type AxAIOpenAIResponsesReasoningItem, type AxAIOpenAIResponsesReasoningSummaryDeltaEvent, type AxAIOpenAIResponsesReasoningSummaryDoneEvent, type AxAIOpenAIResponsesReasoningSummaryPart, type AxAIOpenAIResponsesReasoningSummaryPartAddedEvent, type AxAIOpenAIResponsesReasoningSummaryPartDoneEvent, type AxAIOpenAIResponsesReasoningSummaryTextDeltaEvent, type AxAIOpenAIResponsesReasoningSummaryTextDoneEvent, type AxAIOpenAIResponsesRefusalDeltaEvent, type AxAIOpenAIResponsesRefusalDoneEvent, type AxAIOpenAIResponsesRequest, type AxAIOpenAIResponsesResponse, type AxAIOpenAIResponsesResponseCompletedEvent, type AxAIOpenAIResponsesResponseCreatedEvent, type AxAIOpenAIResponsesResponseDelta, type AxAIOpenAIResponsesResponseFailedEvent, type AxAIOpenAIResponsesResponseInProgressEvent, type AxAIOpenAIResponsesResponseIncompleteEvent, type AxAIOpenAIResponsesResponseQueuedEvent, type AxAIOpenAIResponsesStreamEvent, type AxAIOpenAIResponsesStreamEventBase, type AxAIOpenAIResponsesToolCall, type AxAIOpenAIResponsesToolCallBase, type AxAIOpenAIResponsesToolChoice, type AxAIOpenAIResponsesToolDefinition, type AxAIOpenAIResponsesWebSearchCallCompletedEvent, type AxAIOpenAIResponsesWebSearchCallInProgressEvent, type AxAIOpenAIResponsesWebSearchCallSearchingEvent, type AxAIOpenAIResponsesWebSearchToolCall, type AxAIOpenAIUrlCitation, type AxAIOpenAIUsage, AxAIOpenRouter, type AxAIOpenRouterArgs, AxAIRefusalError, AxAIReka, type AxAIRekaArgs, type AxAIRekaChatRequest, type AxAIRekaChatResponse, type AxAIRekaChatResponseDelta, type AxAIRekaConfig, AxAIRekaModel, type AxAIRekaUsage, type AxAIService, AxAIServiceAbortedError, type AxAIServiceActionOptions, AxAIServiceAuthenticationError, AxAIServiceError, type AxAIServiceImpl, type AxAIServiceMetrics, type AxAIServiceModelType, AxAIServiceNetworkError, type AxAIServiceOptions, AxAIServiceResponseError, AxAIServiceStatusError, AxAIServiceStreamTerminatedError, AxAIServiceTimeoutError, AxAITogether, type AxAITogetherArgs, AxAIWebLLM, type AxAIWebLLMArgs, type AxAIWebLLMChatRequest, type AxAIWebLLMChatResponse, type AxAIWebLLMChatResponseDelta, type AxAIWebLLMConfig, type AxAIWebLLMEmbedModel, type AxAIWebLLMEmbedRequest, type AxAIWebLLMEmbedResponse, AxAIWebLLMModel, type AxAPI, type AxAPIConfig, AxAgent, type AxAgentConfig, type AxAgentFeatures, type AxAgentOptions, type AxAgentic, AxApacheTika, type AxApacheTikaArgs, type AxApacheTikaConvertOptions, type AxAssertion, AxAssertionError, AxBalancer, type AxBalancerOptions, AxBaseAI, type AxBaseAIArgs, AxBaseOptimizer, AxBootstrapFewShot, type AxBootstrapOptimizerOptions, type AxChatRequest, type AxChatResponse, type AxChatResponseFunctionCall, type AxChatResponseResult, type AxCheckpointLoadFn, type AxCheckpointSaveFn, type AxCitation, type AxCompileOptions, AxContentProcessingError, type AxContentProcessingServices, type AxCostTracker, type AxCostTrackerOptions, AxDB, type AxDBArgs, AxDBBase, type AxDBBaseArgs, type AxDBBaseOpOptions, AxDBCloudflare, type AxDBCloudflareArgs, type AxDBCloudflareOpOptions, type AxDBLoaderOptions, AxDBManager, type AxDBManagerArgs, type AxDBMatch, AxDBMemory, type AxDBMemoryArgs, type AxDBMemoryOpOptions, AxDBPinecone, type AxDBPineconeArgs, type AxDBPineconeOpOptions, type AxDBQueryRequest, type AxDBQueryResponse, type AxDBQueryService, type AxDBService, type AxDBState, type AxDBUpsertRequest, type AxDBUpsertResponse, AxDBWeaviate, type AxDBWeaviateArgs, type AxDBWeaviateOpOptions, type AxDataRow, AxDefaultCostTracker, AxDefaultResultReranker, type AxDockerContainer, AxDockerSession, type AxEmbedRequest, type AxEmbedResponse, AxEmbeddingAdapter, type AxErrorCategory, AxEvalUtil, type AxEvaluateArgs, type AxExample, type AxExamples, type AxField, type AxFieldProcessor, type AxFieldProcessorProcess, type AxFieldTemplateFn, type AxFieldType, type AxFieldValue, AxFlow, type AxFlowAutoParallelConfig, type AxFlowBranchContext, type AxFlowBranchEvaluationData, type AxFlowCompleteData, AxFlowDependencyAnalyzer, type AxFlowDynamicContext, type AxFlowErrorData, AxFlowExecutionPlanner, type AxFlowExecutionStep, type AxFlowLogData, type AxFlowLoggerData, type AxFlowLoggerFunction, type AxFlowNodeDefinition, type AxFlowParallelBranch, type AxFlowParallelGroup, type AxFlowParallelGroupCompleteData, type AxFlowParallelGroupStartData, type AxFlowStartData, type AxFlowState, type AxFlowStepCompleteData, type AxFlowStepFunction, type AxFlowStepStartData, type AxFlowSubContext, AxFlowSubContextImpl, type AxFlowTypedParallelBranch, type AxFlowTypedSubContext, AxFlowTypedSubContextImpl, type AxFlowable, type AxFluentFieldInfo, AxFluentFieldType, type AxForwardable, type AxFunction, AxFunctionError, type AxFunctionHandler, type AxFunctionJSONSchema, AxFunctionProcessor, type AxFunctionResult, type AxFunctionResultFormatter, AxGEPA, type AxGEPAAdapter, type AxGEPAEvaluationBatch, AxGEPAFlow, AxGen, type AxGenDeltaOut, type AxGenIn, type AxGenMetricsInstruments, type AxGenOut, type AxGenStreamingOut, AxGenerateError, type AxGenerateErrorDetails, type AxGenerateResult, AxHFDataLoader, type AxIField, type AxInputFunctionType, AxInstanceRegistry, type AxInternalChatRequest, type AxInternalEmbedRequest, AxLLMRequestTypeValues, type AxLoggerData, type AxLoggerFunction, AxMCPClient, type AxMCPFunctionDescription, AxMCPHTTPSSETransport, type AxMCPInitializeParams, type AxMCPInitializeResult, type AxMCPJSONRPCErrorResponse, type AxMCPJSONRPCNotification, type AxMCPJSONRPCRequest, type AxMCPJSONRPCResponse, type AxMCPJSONRPCSuccessResponse, type AxMCPOAuthOptions, type AxMCPStreamableHTTPTransportOptions, AxMCPStreambleHTTPTransport, type AxMCPToolsListResult, type AxMCPTransport, AxMediaNotSupportedError, AxMemory, type AxMemoryData, type AxMessage, type AxMetricFn, type AxMetricFnArgs, type AxMetricsConfig, AxMiPRO, type AxMiPROOptimizerOptions, type AxMiPROResult, AxMockAIService, type AxMockAIServiceConfig, type AxModelConfig, type AxModelInfo, type AxModelInfoWithProvider, type AxModelUsage, type AxMultiMetricFn, type AxMultiProviderConfig, AxMultiServiceRouter, type AxOptimizationCheckpoint, type AxOptimizationProgress, type AxOptimizationStats, type AxOptimizedProgram, AxOptimizedProgramImpl, type AxOptimizer, type AxOptimizerArgs, type AxOptimizerLoggerData, type AxOptimizerLoggerFunction, type AxOptimizerMetricsConfig, type AxOptimizerMetricsInstruments, type AxOptimizerResult, type AxParetoResult, AxProgram, type AxProgramDemos, type AxProgramExamples, type AxProgramForwardOptions, type AxProgramForwardOptionsWithModels, type AxProgramOptions, type AxProgramStreamingForwardOptions, type AxProgramStreamingForwardOptionsWithModels, type AxProgramTrace, type AxProgramUsage, type AxProgrammable, AxPromptTemplate, type AxPromptTemplateOptions, AxProviderRouter, type AxRateLimiterFunction, AxRateLimiterTokenUsage, type AxRateLimiterTokenUsageOptions, type AxRerankerIn, type AxRerankerOut, type AxResponseHandlerArgs, type AxResultPickerFunction, type AxResultPickerFunctionFieldResults, type AxResultPickerFunctionFunctionResults, type AxRewriteIn, type AxRewriteOut, type AxRoutingResult, type AxSamplePickerOptions, type AxSetExamplesOptions, AxSignature, AxSignatureBuilder, type AxSignatureConfig, AxSimpleClassifier, AxSimpleClassifierClass, type AxSimpleClassifierForwardOptions, AxSpanKindValues, AxStopFunctionCallException, type AxStreamingAssertion, type AxStreamingEvent, type AxStreamingFieldProcessorProcess, AxStringUtil, AxTestPrompt, type AxTokenUsage, type AxTunable, type AxTypedExample, type AxUsable, agent, ai, ax, axAIAnthropicDefaultConfig, axAIAnthropicVertexDefaultConfig, axAIAzureOpenAIBestConfig, axAIAzureOpenAICreativeConfig, axAIAzureOpenAIDefaultConfig, axAIAzureOpenAIFastConfig, axAICohereCreativeConfig, axAICohereDefaultConfig, axAIDeepSeekCodeConfig, axAIDeepSeekDefaultConfig, axAIGoogleGeminiDefaultConfig, axAIGoogleGeminiDefaultCreativeConfig, axAIGrokBestConfig, axAIGrokDefaultConfig, axAIHuggingFaceCreativeConfig, axAIHuggingFaceDefaultConfig, axAIMistralBestConfig, axAIMistralDefaultConfig, axAIOllamaDefaultConfig, axAIOllamaDefaultCreativeConfig, axAIOpenAIBestConfig, axAIOpenAICreativeConfig, axAIOpenAIDefaultConfig, axAIOpenAIFastConfig, axAIOpenAIResponsesBestConfig, axAIOpenAIResponsesCreativeConfig, axAIOpenAIResponsesDefaultConfig, axAIOpenRouterDefaultConfig, axAIRekaBestConfig, axAIRekaCreativeConfig, axAIRekaDefaultConfig, axAIRekaFastConfig, axAITogetherDefaultConfig, axAIWebLLMCreativeConfig, axAIWebLLMDefaultConfig, axAnalyzeChatPromptRequirements, axAnalyzeRequestRequirements, axBaseAIDefaultConfig, axBaseAIDefaultCreativeConfig, axCheckMetricsHealth, axCreateDefaultColorLogger, axCreateDefaultOptimizerColorLogger, axCreateDefaultOptimizerTextLogger, axCreateDefaultTextLogger, axCreateFlowColorLogger, axCreateFlowTextLogger, axDefaultFlowLogger, axDefaultMetricsConfig, axDefaultOptimizerLogger, axDefaultOptimizerMetricsConfig, axGetCompatibilityReport, axGetFormatCompatibility, axGetMetricsConfig, axGetOptimizerMetricsConfig, axGetProvidersWithMediaSupport, axGlobals, axModelInfoAnthropic, axModelInfoCohere, axModelInfoDeepSeek, axModelInfoGoogleGemini, axModelInfoGrok, axModelInfoGroq, axModelInfoHuggingFace, axModelInfoMistral, axModelInfoOpenAI, axModelInfoOpenAIResponses, axModelInfoReka, axModelInfoTogether, axModelInfoWebLLM, axProcessContentForProvider, axRAG, axScoreProvidersForRequest, axSelectOptimalProvider, axSpanAttributes, axSpanEvents, axUpdateMetricsConfig, axUpdateOptimizerMetricsConfig, axValidateChatRequestMessage, axValidateChatResponseResult, axValidateProviderCapabilities, f, flow, s };
|