@ax-llm/ax 11.0.27 → 11.0.28
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 +845 -42
- package/index.cjs.map +1 -1
- package/index.d.cts +148 -2
- package/index.d.ts +148 -2
- package/index.js +848 -46
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.d.cts
CHANGED
|
@@ -1941,19 +1941,48 @@ type AxOptimizerArgs<IN extends AxGenIn, OUT extends AxGenOut> = {
|
|
|
1941
1941
|
maxRounds?: number;
|
|
1942
1942
|
maxExamples?: number;
|
|
1943
1943
|
maxDemos?: number;
|
|
1944
|
+
batchSize?: number;
|
|
1945
|
+
earlyStoppingPatience?: number;
|
|
1946
|
+
teacherAI?: AxAIService;
|
|
1947
|
+
costMonitoring?: boolean;
|
|
1948
|
+
maxTokensPerGeneration?: number;
|
|
1949
|
+
verboseMode?: boolean;
|
|
1950
|
+
debugMode?: boolean;
|
|
1944
1951
|
};
|
|
1945
1952
|
};
|
|
1953
|
+
interface AxOptimizationStats {
|
|
1954
|
+
totalCalls: number;
|
|
1955
|
+
successfulDemos: number;
|
|
1956
|
+
estimatedTokenUsage: number;
|
|
1957
|
+
earlyStopped: boolean;
|
|
1958
|
+
earlyStopping?: {
|
|
1959
|
+
bestScoreRound: number;
|
|
1960
|
+
patienceExhausted: boolean;
|
|
1961
|
+
};
|
|
1962
|
+
}
|
|
1946
1963
|
declare class AxBootstrapFewShot<IN extends AxGenIn = AxGenIn, OUT extends AxGenOut = AxGenOut> {
|
|
1947
1964
|
private ai;
|
|
1965
|
+
private teacherAI?;
|
|
1948
1966
|
private program;
|
|
1949
1967
|
private examples;
|
|
1950
1968
|
private maxRounds;
|
|
1951
1969
|
private maxDemos;
|
|
1952
1970
|
private maxExamples;
|
|
1971
|
+
private batchSize;
|
|
1972
|
+
private earlyStoppingPatience;
|
|
1973
|
+
private costMonitoring;
|
|
1974
|
+
private maxTokensPerGeneration;
|
|
1975
|
+
private verboseMode;
|
|
1976
|
+
private debugMode;
|
|
1953
1977
|
private traces;
|
|
1978
|
+
private stats;
|
|
1954
1979
|
constructor({ ai, program, examples, options, }: Readonly<AxOptimizerArgs<IN, OUT>>);
|
|
1955
1980
|
private compileRound;
|
|
1956
|
-
compile(metricFn: AxMetricFn, options?: Readonly<AxOptimizerArgs<IN, OUT>['options']>): Promise<
|
|
1981
|
+
compile(metricFn: AxMetricFn, options?: Readonly<AxOptimizerArgs<IN, OUT>['options']>): Promise<{
|
|
1982
|
+
demos: AxProgramDemos[];
|
|
1983
|
+
stats: AxOptimizationStats;
|
|
1984
|
+
}>;
|
|
1985
|
+
getStats(): AxOptimizationStats;
|
|
1957
1986
|
}
|
|
1958
1987
|
|
|
1959
1988
|
type AxDBUpsertRequest = {
|
|
@@ -2339,6 +2368,123 @@ declare enum AxSpanKindValues {
|
|
|
2339
2368
|
UNKNOWN = "unknown"
|
|
2340
2369
|
}
|
|
2341
2370
|
|
|
2371
|
+
interface AxMiPROOptions {
|
|
2372
|
+
numCandidates?: number;
|
|
2373
|
+
initTemperature?: number;
|
|
2374
|
+
maxBootstrappedDemos?: number;
|
|
2375
|
+
maxLabeledDemos?: number;
|
|
2376
|
+
numTrials?: number;
|
|
2377
|
+
minibatch?: boolean;
|
|
2378
|
+
minibatchSize?: number;
|
|
2379
|
+
minibatchFullEvalSteps?: number;
|
|
2380
|
+
programAwareProposer?: boolean;
|
|
2381
|
+
dataAwareProposer?: boolean;
|
|
2382
|
+
viewDataBatchSize?: number;
|
|
2383
|
+
tipAwareProposer?: boolean;
|
|
2384
|
+
fewshotAwareProposer?: boolean;
|
|
2385
|
+
seed?: number;
|
|
2386
|
+
verbose?: boolean;
|
|
2387
|
+
earlyStoppingTrials?: number;
|
|
2388
|
+
minImprovementThreshold?: number;
|
|
2389
|
+
}
|
|
2390
|
+
declare class AxMiPRO<IN extends AxGenIn = AxGenIn, OUT extends AxGenOut = AxGenOut> {
|
|
2391
|
+
private ai;
|
|
2392
|
+
private program;
|
|
2393
|
+
private examples;
|
|
2394
|
+
private maxBootstrappedDemos;
|
|
2395
|
+
private maxLabeledDemos;
|
|
2396
|
+
private numCandidates;
|
|
2397
|
+
private initTemperature;
|
|
2398
|
+
private numTrials;
|
|
2399
|
+
private minibatch;
|
|
2400
|
+
private minibatchSize;
|
|
2401
|
+
private minibatchFullEvalSteps;
|
|
2402
|
+
private programAwareProposer;
|
|
2403
|
+
private dataAwareProposer;
|
|
2404
|
+
private viewDataBatchSize;
|
|
2405
|
+
private tipAwareProposer;
|
|
2406
|
+
private fewshotAwareProposer;
|
|
2407
|
+
private seed?;
|
|
2408
|
+
private verbose;
|
|
2409
|
+
private bootstrapper;
|
|
2410
|
+
private earlyStoppingTrials;
|
|
2411
|
+
private minImprovementThreshold;
|
|
2412
|
+
constructor({ ai, program, examples, options, }: Readonly<AxOptimizerArgs<IN, OUT>> & {
|
|
2413
|
+
options?: AxMiPROOptions;
|
|
2414
|
+
});
|
|
2415
|
+
/**
|
|
2416
|
+
* Configures the optimizer for light, medium, or heavy optimization
|
|
2417
|
+
* @param level The optimization level: "light", "medium", or "heavy"
|
|
2418
|
+
*/
|
|
2419
|
+
configureAuto(level: 'light' | 'medium' | 'heavy'): void;
|
|
2420
|
+
/**
|
|
2421
|
+
* Generates creative tips for instruction generation
|
|
2422
|
+
*/
|
|
2423
|
+
private generateTips;
|
|
2424
|
+
/**
|
|
2425
|
+
* Generates instruction candidates for each predictor in the program
|
|
2426
|
+
* @returns Array of generated instruction candidates
|
|
2427
|
+
*/
|
|
2428
|
+
private proposeInstructionCandidates;
|
|
2429
|
+
/**
|
|
2430
|
+
* Generates a summary of the program structure for instruction proposal
|
|
2431
|
+
*/
|
|
2432
|
+
private generateProgramSummary;
|
|
2433
|
+
/**
|
|
2434
|
+
* Generates a summary of the dataset for instruction proposal
|
|
2435
|
+
*/
|
|
2436
|
+
private generateDataSummary;
|
|
2437
|
+
/**
|
|
2438
|
+
* Generates a specific instruction candidate
|
|
2439
|
+
*/
|
|
2440
|
+
private generateInstruction;
|
|
2441
|
+
/**
|
|
2442
|
+
* Bootstraps few-shot examples for the program
|
|
2443
|
+
*/
|
|
2444
|
+
private bootstrapFewShotExamples;
|
|
2445
|
+
/**
|
|
2446
|
+
* Selects labeled examples directly from the training set
|
|
2447
|
+
*/
|
|
2448
|
+
private selectLabeledExamples;
|
|
2449
|
+
/**
|
|
2450
|
+
* Runs Bayesian optimization to find the best combination of few-shot examples and instructions
|
|
2451
|
+
*/
|
|
2452
|
+
private runBayesianOptimization;
|
|
2453
|
+
/**
|
|
2454
|
+
* Evaluates a configuration on the validation set
|
|
2455
|
+
*/
|
|
2456
|
+
private evaluateConfig;
|
|
2457
|
+
/**
|
|
2458
|
+
* Run full evaluation on the entire validation set
|
|
2459
|
+
*/
|
|
2460
|
+
private fullEvaluation;
|
|
2461
|
+
/**
|
|
2462
|
+
* Implements a Bayesian-inspired selection of the next configuration to try
|
|
2463
|
+
* This is a simplified version using Upper Confidence Bound (UCB) strategy
|
|
2464
|
+
*/
|
|
2465
|
+
private selectNextConfiguration;
|
|
2466
|
+
/**
|
|
2467
|
+
* Applies a configuration to a program instance
|
|
2468
|
+
*/
|
|
2469
|
+
private applyConfigToProgram;
|
|
2470
|
+
/**
|
|
2471
|
+
* Sets instruction to a program
|
|
2472
|
+
* Note: Workaround since setInstruction may not be available directly
|
|
2473
|
+
*/
|
|
2474
|
+
private setInstructionToProgram;
|
|
2475
|
+
/**
|
|
2476
|
+
* The main compile method to run MIPROv2 optimization
|
|
2477
|
+
* @param metricFn Evaluation metric function
|
|
2478
|
+
* @param options Optional configuration options
|
|
2479
|
+
* @returns The optimized program
|
|
2480
|
+
*/
|
|
2481
|
+
compile(metricFn: AxMetricFn, options?: Readonly<{
|
|
2482
|
+
valset?: readonly AxExample[];
|
|
2483
|
+
teacher?: Readonly<AxProgram<IN, OUT>>;
|
|
2484
|
+
auto?: 'light' | 'medium' | 'heavy';
|
|
2485
|
+
}>): Promise<Readonly<AxProgram<IN, OUT>>>;
|
|
2486
|
+
}
|
|
2487
|
+
|
|
2342
2488
|
type AxMockAIServiceConfig = {
|
|
2343
2489
|
name?: string;
|
|
2344
2490
|
id?: string;
|
|
@@ -2771,4 +2917,4 @@ declare const axModelInfoReka: AxModelInfo[];
|
|
|
2771
2917
|
|
|
2772
2918
|
declare const axModelInfoTogether: AxModelInfo[];
|
|
2773
2919
|
|
|
2774
|
-
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 AxAIAnthropicMessageDeltaEvent, type AxAIAnthropicMessageStartEvent, type AxAIAnthropicMessageStopEvent, AxAIAnthropicModel, type AxAIAnthropicPingEvent, AxAIAnthropicVertexModel, 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, AxAIGoogleGeminiEmbedModel, type AxAIGoogleGeminiGenerationConfig, AxAIGoogleGeminiModel, type AxAIGoogleGeminiOptionsTools, AxAIGoogleGeminiSafetyCategory, type AxAIGoogleGeminiSafetySettings, AxAIGoogleGeminiSafetyThreshold, type AxAIGoogleGeminiTool, type AxAIGoogleGeminiToolConfig, type AxAIGoogleGeminiToolFunctionDeclaration, type AxAIGoogleGeminiToolGoogleSearchRetrieval, type AxAIGoogleVertexBatchEmbedRequest, type AxAIGoogleVertexBatchEmbedResponse, AxAIGroq, type AxAIGroqArgs, AxAIGroqModel, AxAIHuggingFace, type AxAIHuggingFaceArgs, type AxAIHuggingFaceConfig, AxAIHuggingFaceModel, type AxAIHuggingFaceRequest, type AxAIHuggingFaceResponse, type AxAIInputModelList, type AxAIMemory, AxAIMistral, type AxAIMistralArgs, AxAIMistralEmbedModels, AxAIMistralModel, type AxAIModelList, type AxAIModels, AxAIOllama, type AxAIOllamaAIConfig, type AxAIOllamaArgs, AxAIOpenAI, type AxAIOpenAIArgs, AxAIOpenAIBase, type AxAIOpenAIBaseArgs, type AxAIOpenAIChatRequest, type AxAIOpenAIChatResponse, type AxAIOpenAIChatResponseDelta, type AxAIOpenAIConfig, AxAIOpenAIEmbedModel, type AxAIOpenAIEmbedRequest, type AxAIOpenAIEmbedResponse, type AxAIOpenAILogprob, AxAIOpenAIModel, type AxAIOpenAIResponseDelta, type AxAIOpenAIUsage, type AxAIPromptConfig, AxAIReka, type AxAIRekaArgs, type AxAIRekaChatRequest, type AxAIRekaChatResponse, type AxAIRekaChatResponseDelta, type AxAIRekaConfig, AxAIRekaModel, type AxAIRekaUsage, type AxAIService, type AxAIServiceActionOptions, AxAIServiceAuthenticationError, AxAIServiceError, type AxAIServiceImpl, type AxAIServiceMetrics, AxAIServiceNetworkError, type AxAIServiceOptions, AxAIServiceResponseError, AxAIServiceStatusError, AxAIServiceStreamTerminatedError, AxAIServiceTimeoutError, AxAITogether, type AxAITogetherArgs, type AxAPI, type AxAPIConfig, AxAgent, type AxAgentFeatures, type AxAgentOptions, type AxAgentic, AxApacheTika, type AxApacheTikaArgs, type AxApacheTikaConvertOptions, type AxAssertion, AxAssertionError, AxBalancer, type AxBalancerOptions, AxBaseAI, type AxBaseAIArgs, AxBootstrapFewShot, AxChainOfThought, type AxChatRequest, type AxChatResponse, type AxChatResponseFunctionCall, type AxChatResponseResult, 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, AxDefaultQueryRewriter, AxDefaultResultReranker, type AxDockerContainer, AxDockerSession, type AxEmbedRequest, type AxEmbedResponse, AxEmbeddingAdapter, AxEvalUtil, type AxEvaluateArgs, type AxExample, type AxField, type AxFieldProcessor, type AxFieldProcessorProcess, type AxFieldTemplateFn, type AxFieldValue, type AxFunction, AxFunctionError, type AxFunctionHandler, type AxFunctionJSONSchema, AxFunctionProcessor, AxGen, type AxGenDeltaOut, type AxGenIn, type AxGenOptions, type AxGenOut, type AxGenStreamingOut, type AxGenerateResult, AxHFDataLoader, type AxIField, type AxInputFunctionType, AxInstanceRegistry, type AxInternalChatRequest, type AxInternalEmbedRequest, AxJSInterpreter, AxJSInterpreterPermission, AxLLMRequestTypeValues, AxMCPClient, AxMCPHTTPTransport, AxMCPStdioTransport, type AxMCPTransport, AxMemory, type AxMetricFn, type AxMetricFnArgs, AxMockAIService, type AxMockAIServiceConfig, type AxModelConfig, type AxModelInfo, type AxModelInfoWithProvider, AxMultiServiceRouter, type AxOptimizerArgs, AxProgram, type AxProgramDemos, type AxProgramExamples, type AxProgramForwardOptions, type AxProgramStreamingForwardOptions, type AxProgramTrace, type AxProgramUsage, AxProgramWithSignature, type AxProgramWithSignatureOptions, AxPromptTemplate, AxRAG, type AxRateLimiterFunction, AxRateLimiterTokenUsage, type AxRateLimiterTokenUsageOptions, type AxRerankerIn, type AxRerankerOut, type AxResponseHandlerArgs, type AxRewriteIn, type AxRewriteOut, AxSignature, AxSimpleClassifier, AxSimpleClassifierClass, type AxSimpleClassifierForwardOptions, AxSpanKindValues, type AxStreamingAssertion, type AxStreamingEvent, type AxStreamingFieldProcessorProcess, AxStringUtil, AxTestPrompt, type AxTokenUsage, type AxTunable, type AxUsable, axAIAnthropicDefaultConfig, axAIAzureOpenAIBestConfig, axAIAzureOpenAICreativeConfig, axAIAzureOpenAIDefaultConfig, axAIAzureOpenAIFastConfig, axAICohereCreativeConfig, axAICohereDefaultConfig, axAIDeepSeekCodeConfig, axAIDeepSeekDefaultConfig, axAIGoogleGeminiDefaultConfig, axAIGoogleGeminiDefaultCreativeConfig, axAIHuggingFaceCreativeConfig, axAIHuggingFaceDefaultConfig, axAIMistralBestConfig, axAIMistralDefaultConfig, axAIOllamaDefaultConfig, axAIOllamaDefaultCreativeConfig, axAIOpenAIBestConfig, axAIOpenAICreativeConfig, axAIOpenAIDefaultConfig, axAIOpenAIFastConfig, axAIRekaBestConfig, axAIRekaCreativeConfig, axAIRekaDefaultConfig, axAIRekaFastConfig, axAITogetherDefaultConfig, axBaseAIDefaultConfig, axBaseAIDefaultCreativeConfig, axModelInfoAnthropic, axModelInfoCohere, axModelInfoDeepSeek, axModelInfoGoogleGemini, axModelInfoGroq, axModelInfoHuggingFace, axModelInfoMistral, axModelInfoOpenAI, axModelInfoReka, axModelInfoTogether, axSpanAttributes, axSpanEvents };
|
|
2920
|
+
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 AxAIAnthropicMessageDeltaEvent, type AxAIAnthropicMessageStartEvent, type AxAIAnthropicMessageStopEvent, AxAIAnthropicModel, type AxAIAnthropicPingEvent, AxAIAnthropicVertexModel, 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, AxAIGoogleGeminiEmbedModel, type AxAIGoogleGeminiGenerationConfig, AxAIGoogleGeminiModel, type AxAIGoogleGeminiOptionsTools, AxAIGoogleGeminiSafetyCategory, type AxAIGoogleGeminiSafetySettings, AxAIGoogleGeminiSafetyThreshold, type AxAIGoogleGeminiTool, type AxAIGoogleGeminiToolConfig, type AxAIGoogleGeminiToolFunctionDeclaration, type AxAIGoogleGeminiToolGoogleSearchRetrieval, type AxAIGoogleVertexBatchEmbedRequest, type AxAIGoogleVertexBatchEmbedResponse, AxAIGroq, type AxAIGroqArgs, AxAIGroqModel, AxAIHuggingFace, type AxAIHuggingFaceArgs, type AxAIHuggingFaceConfig, AxAIHuggingFaceModel, type AxAIHuggingFaceRequest, type AxAIHuggingFaceResponse, type AxAIInputModelList, type AxAIMemory, AxAIMistral, type AxAIMistralArgs, AxAIMistralEmbedModels, AxAIMistralModel, type AxAIModelList, type AxAIModels, AxAIOllama, type AxAIOllamaAIConfig, type AxAIOllamaArgs, AxAIOpenAI, type AxAIOpenAIArgs, AxAIOpenAIBase, type AxAIOpenAIBaseArgs, type AxAIOpenAIChatRequest, type AxAIOpenAIChatResponse, type AxAIOpenAIChatResponseDelta, type AxAIOpenAIConfig, AxAIOpenAIEmbedModel, type AxAIOpenAIEmbedRequest, type AxAIOpenAIEmbedResponse, type AxAIOpenAILogprob, AxAIOpenAIModel, type AxAIOpenAIResponseDelta, type AxAIOpenAIUsage, type AxAIPromptConfig, AxAIReka, type AxAIRekaArgs, type AxAIRekaChatRequest, type AxAIRekaChatResponse, type AxAIRekaChatResponseDelta, type AxAIRekaConfig, AxAIRekaModel, type AxAIRekaUsage, type AxAIService, type AxAIServiceActionOptions, AxAIServiceAuthenticationError, AxAIServiceError, type AxAIServiceImpl, type AxAIServiceMetrics, AxAIServiceNetworkError, type AxAIServiceOptions, AxAIServiceResponseError, AxAIServiceStatusError, AxAIServiceStreamTerminatedError, AxAIServiceTimeoutError, AxAITogether, type AxAITogetherArgs, type AxAPI, type AxAPIConfig, AxAgent, type AxAgentFeatures, type AxAgentOptions, type AxAgentic, AxApacheTika, type AxApacheTikaArgs, type AxApacheTikaConvertOptions, type AxAssertion, AxAssertionError, AxBalancer, type AxBalancerOptions, AxBaseAI, type AxBaseAIArgs, AxBootstrapFewShot, AxChainOfThought, type AxChatRequest, type AxChatResponse, type AxChatResponseFunctionCall, type AxChatResponseResult, 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, AxDefaultQueryRewriter, AxDefaultResultReranker, type AxDockerContainer, AxDockerSession, type AxEmbedRequest, type AxEmbedResponse, AxEmbeddingAdapter, AxEvalUtil, type AxEvaluateArgs, type AxExample, type AxField, type AxFieldProcessor, type AxFieldProcessorProcess, type AxFieldTemplateFn, type AxFieldValue, type AxFunction, AxFunctionError, type AxFunctionHandler, type AxFunctionJSONSchema, AxFunctionProcessor, AxGen, type AxGenDeltaOut, type AxGenIn, type AxGenOptions, type AxGenOut, type AxGenStreamingOut, type AxGenerateResult, AxHFDataLoader, type AxIField, type AxInputFunctionType, AxInstanceRegistry, type AxInternalChatRequest, type AxInternalEmbedRequest, AxJSInterpreter, AxJSInterpreterPermission, AxLLMRequestTypeValues, AxMCPClient, AxMCPHTTPTransport, AxMCPStdioTransport, type AxMCPTransport, AxMemory, type AxMetricFn, type AxMetricFnArgs, AxMiPRO, type AxMiPROOptions, AxMockAIService, type AxMockAIServiceConfig, type AxModelConfig, type AxModelInfo, type AxModelInfoWithProvider, AxMultiServiceRouter, type AxOptimizationStats, type AxOptimizerArgs, AxProgram, type AxProgramDemos, type AxProgramExamples, type AxProgramForwardOptions, type AxProgramStreamingForwardOptions, type AxProgramTrace, type AxProgramUsage, AxProgramWithSignature, type AxProgramWithSignatureOptions, AxPromptTemplate, AxRAG, type AxRateLimiterFunction, AxRateLimiterTokenUsage, type AxRateLimiterTokenUsageOptions, type AxRerankerIn, type AxRerankerOut, type AxResponseHandlerArgs, type AxRewriteIn, type AxRewriteOut, AxSignature, AxSimpleClassifier, AxSimpleClassifierClass, type AxSimpleClassifierForwardOptions, AxSpanKindValues, type AxStreamingAssertion, type AxStreamingEvent, type AxStreamingFieldProcessorProcess, AxStringUtil, AxTestPrompt, type AxTokenUsage, type AxTunable, type AxUsable, axAIAnthropicDefaultConfig, axAIAzureOpenAIBestConfig, axAIAzureOpenAICreativeConfig, axAIAzureOpenAIDefaultConfig, axAIAzureOpenAIFastConfig, axAICohereCreativeConfig, axAICohereDefaultConfig, axAIDeepSeekCodeConfig, axAIDeepSeekDefaultConfig, axAIGoogleGeminiDefaultConfig, axAIGoogleGeminiDefaultCreativeConfig, axAIHuggingFaceCreativeConfig, axAIHuggingFaceDefaultConfig, axAIMistralBestConfig, axAIMistralDefaultConfig, axAIOllamaDefaultConfig, axAIOllamaDefaultCreativeConfig, axAIOpenAIBestConfig, axAIOpenAICreativeConfig, axAIOpenAIDefaultConfig, axAIOpenAIFastConfig, axAIRekaBestConfig, axAIRekaCreativeConfig, axAIRekaDefaultConfig, axAIRekaFastConfig, axAITogetherDefaultConfig, axBaseAIDefaultConfig, axBaseAIDefaultCreativeConfig, axModelInfoAnthropic, axModelInfoCohere, axModelInfoDeepSeek, axModelInfoGoogleGemini, axModelInfoGroq, axModelInfoHuggingFace, axModelInfoMistral, axModelInfoOpenAI, axModelInfoReka, axModelInfoTogether, axSpanAttributes, axSpanEvents };
|
package/index.d.ts
CHANGED
|
@@ -1941,19 +1941,48 @@ type AxOptimizerArgs<IN extends AxGenIn, OUT extends AxGenOut> = {
|
|
|
1941
1941
|
maxRounds?: number;
|
|
1942
1942
|
maxExamples?: number;
|
|
1943
1943
|
maxDemos?: number;
|
|
1944
|
+
batchSize?: number;
|
|
1945
|
+
earlyStoppingPatience?: number;
|
|
1946
|
+
teacherAI?: AxAIService;
|
|
1947
|
+
costMonitoring?: boolean;
|
|
1948
|
+
maxTokensPerGeneration?: number;
|
|
1949
|
+
verboseMode?: boolean;
|
|
1950
|
+
debugMode?: boolean;
|
|
1944
1951
|
};
|
|
1945
1952
|
};
|
|
1953
|
+
interface AxOptimizationStats {
|
|
1954
|
+
totalCalls: number;
|
|
1955
|
+
successfulDemos: number;
|
|
1956
|
+
estimatedTokenUsage: number;
|
|
1957
|
+
earlyStopped: boolean;
|
|
1958
|
+
earlyStopping?: {
|
|
1959
|
+
bestScoreRound: number;
|
|
1960
|
+
patienceExhausted: boolean;
|
|
1961
|
+
};
|
|
1962
|
+
}
|
|
1946
1963
|
declare class AxBootstrapFewShot<IN extends AxGenIn = AxGenIn, OUT extends AxGenOut = AxGenOut> {
|
|
1947
1964
|
private ai;
|
|
1965
|
+
private teacherAI?;
|
|
1948
1966
|
private program;
|
|
1949
1967
|
private examples;
|
|
1950
1968
|
private maxRounds;
|
|
1951
1969
|
private maxDemos;
|
|
1952
1970
|
private maxExamples;
|
|
1971
|
+
private batchSize;
|
|
1972
|
+
private earlyStoppingPatience;
|
|
1973
|
+
private costMonitoring;
|
|
1974
|
+
private maxTokensPerGeneration;
|
|
1975
|
+
private verboseMode;
|
|
1976
|
+
private debugMode;
|
|
1953
1977
|
private traces;
|
|
1978
|
+
private stats;
|
|
1954
1979
|
constructor({ ai, program, examples, options, }: Readonly<AxOptimizerArgs<IN, OUT>>);
|
|
1955
1980
|
private compileRound;
|
|
1956
|
-
compile(metricFn: AxMetricFn, options?: Readonly<AxOptimizerArgs<IN, OUT>['options']>): Promise<
|
|
1981
|
+
compile(metricFn: AxMetricFn, options?: Readonly<AxOptimizerArgs<IN, OUT>['options']>): Promise<{
|
|
1982
|
+
demos: AxProgramDemos[];
|
|
1983
|
+
stats: AxOptimizationStats;
|
|
1984
|
+
}>;
|
|
1985
|
+
getStats(): AxOptimizationStats;
|
|
1957
1986
|
}
|
|
1958
1987
|
|
|
1959
1988
|
type AxDBUpsertRequest = {
|
|
@@ -2339,6 +2368,123 @@ declare enum AxSpanKindValues {
|
|
|
2339
2368
|
UNKNOWN = "unknown"
|
|
2340
2369
|
}
|
|
2341
2370
|
|
|
2371
|
+
interface AxMiPROOptions {
|
|
2372
|
+
numCandidates?: number;
|
|
2373
|
+
initTemperature?: number;
|
|
2374
|
+
maxBootstrappedDemos?: number;
|
|
2375
|
+
maxLabeledDemos?: number;
|
|
2376
|
+
numTrials?: number;
|
|
2377
|
+
minibatch?: boolean;
|
|
2378
|
+
minibatchSize?: number;
|
|
2379
|
+
minibatchFullEvalSteps?: number;
|
|
2380
|
+
programAwareProposer?: boolean;
|
|
2381
|
+
dataAwareProposer?: boolean;
|
|
2382
|
+
viewDataBatchSize?: number;
|
|
2383
|
+
tipAwareProposer?: boolean;
|
|
2384
|
+
fewshotAwareProposer?: boolean;
|
|
2385
|
+
seed?: number;
|
|
2386
|
+
verbose?: boolean;
|
|
2387
|
+
earlyStoppingTrials?: number;
|
|
2388
|
+
minImprovementThreshold?: number;
|
|
2389
|
+
}
|
|
2390
|
+
declare class AxMiPRO<IN extends AxGenIn = AxGenIn, OUT extends AxGenOut = AxGenOut> {
|
|
2391
|
+
private ai;
|
|
2392
|
+
private program;
|
|
2393
|
+
private examples;
|
|
2394
|
+
private maxBootstrappedDemos;
|
|
2395
|
+
private maxLabeledDemos;
|
|
2396
|
+
private numCandidates;
|
|
2397
|
+
private initTemperature;
|
|
2398
|
+
private numTrials;
|
|
2399
|
+
private minibatch;
|
|
2400
|
+
private minibatchSize;
|
|
2401
|
+
private minibatchFullEvalSteps;
|
|
2402
|
+
private programAwareProposer;
|
|
2403
|
+
private dataAwareProposer;
|
|
2404
|
+
private viewDataBatchSize;
|
|
2405
|
+
private tipAwareProposer;
|
|
2406
|
+
private fewshotAwareProposer;
|
|
2407
|
+
private seed?;
|
|
2408
|
+
private verbose;
|
|
2409
|
+
private bootstrapper;
|
|
2410
|
+
private earlyStoppingTrials;
|
|
2411
|
+
private minImprovementThreshold;
|
|
2412
|
+
constructor({ ai, program, examples, options, }: Readonly<AxOptimizerArgs<IN, OUT>> & {
|
|
2413
|
+
options?: AxMiPROOptions;
|
|
2414
|
+
});
|
|
2415
|
+
/**
|
|
2416
|
+
* Configures the optimizer for light, medium, or heavy optimization
|
|
2417
|
+
* @param level The optimization level: "light", "medium", or "heavy"
|
|
2418
|
+
*/
|
|
2419
|
+
configureAuto(level: 'light' | 'medium' | 'heavy'): void;
|
|
2420
|
+
/**
|
|
2421
|
+
* Generates creative tips for instruction generation
|
|
2422
|
+
*/
|
|
2423
|
+
private generateTips;
|
|
2424
|
+
/**
|
|
2425
|
+
* Generates instruction candidates for each predictor in the program
|
|
2426
|
+
* @returns Array of generated instruction candidates
|
|
2427
|
+
*/
|
|
2428
|
+
private proposeInstructionCandidates;
|
|
2429
|
+
/**
|
|
2430
|
+
* Generates a summary of the program structure for instruction proposal
|
|
2431
|
+
*/
|
|
2432
|
+
private generateProgramSummary;
|
|
2433
|
+
/**
|
|
2434
|
+
* Generates a summary of the dataset for instruction proposal
|
|
2435
|
+
*/
|
|
2436
|
+
private generateDataSummary;
|
|
2437
|
+
/**
|
|
2438
|
+
* Generates a specific instruction candidate
|
|
2439
|
+
*/
|
|
2440
|
+
private generateInstruction;
|
|
2441
|
+
/**
|
|
2442
|
+
* Bootstraps few-shot examples for the program
|
|
2443
|
+
*/
|
|
2444
|
+
private bootstrapFewShotExamples;
|
|
2445
|
+
/**
|
|
2446
|
+
* Selects labeled examples directly from the training set
|
|
2447
|
+
*/
|
|
2448
|
+
private selectLabeledExamples;
|
|
2449
|
+
/**
|
|
2450
|
+
* Runs Bayesian optimization to find the best combination of few-shot examples and instructions
|
|
2451
|
+
*/
|
|
2452
|
+
private runBayesianOptimization;
|
|
2453
|
+
/**
|
|
2454
|
+
* Evaluates a configuration on the validation set
|
|
2455
|
+
*/
|
|
2456
|
+
private evaluateConfig;
|
|
2457
|
+
/**
|
|
2458
|
+
* Run full evaluation on the entire validation set
|
|
2459
|
+
*/
|
|
2460
|
+
private fullEvaluation;
|
|
2461
|
+
/**
|
|
2462
|
+
* Implements a Bayesian-inspired selection of the next configuration to try
|
|
2463
|
+
* This is a simplified version using Upper Confidence Bound (UCB) strategy
|
|
2464
|
+
*/
|
|
2465
|
+
private selectNextConfiguration;
|
|
2466
|
+
/**
|
|
2467
|
+
* Applies a configuration to a program instance
|
|
2468
|
+
*/
|
|
2469
|
+
private applyConfigToProgram;
|
|
2470
|
+
/**
|
|
2471
|
+
* Sets instruction to a program
|
|
2472
|
+
* Note: Workaround since setInstruction may not be available directly
|
|
2473
|
+
*/
|
|
2474
|
+
private setInstructionToProgram;
|
|
2475
|
+
/**
|
|
2476
|
+
* The main compile method to run MIPROv2 optimization
|
|
2477
|
+
* @param metricFn Evaluation metric function
|
|
2478
|
+
* @param options Optional configuration options
|
|
2479
|
+
* @returns The optimized program
|
|
2480
|
+
*/
|
|
2481
|
+
compile(metricFn: AxMetricFn, options?: Readonly<{
|
|
2482
|
+
valset?: readonly AxExample[];
|
|
2483
|
+
teacher?: Readonly<AxProgram<IN, OUT>>;
|
|
2484
|
+
auto?: 'light' | 'medium' | 'heavy';
|
|
2485
|
+
}>): Promise<Readonly<AxProgram<IN, OUT>>>;
|
|
2486
|
+
}
|
|
2487
|
+
|
|
2342
2488
|
type AxMockAIServiceConfig = {
|
|
2343
2489
|
name?: string;
|
|
2344
2490
|
id?: string;
|
|
@@ -2771,4 +2917,4 @@ declare const axModelInfoReka: AxModelInfo[];
|
|
|
2771
2917
|
|
|
2772
2918
|
declare const axModelInfoTogether: AxModelInfo[];
|
|
2773
2919
|
|
|
2774
|
-
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 AxAIAnthropicMessageDeltaEvent, type AxAIAnthropicMessageStartEvent, type AxAIAnthropicMessageStopEvent, AxAIAnthropicModel, type AxAIAnthropicPingEvent, AxAIAnthropicVertexModel, 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, AxAIGoogleGeminiEmbedModel, type AxAIGoogleGeminiGenerationConfig, AxAIGoogleGeminiModel, type AxAIGoogleGeminiOptionsTools, AxAIGoogleGeminiSafetyCategory, type AxAIGoogleGeminiSafetySettings, AxAIGoogleGeminiSafetyThreshold, type AxAIGoogleGeminiTool, type AxAIGoogleGeminiToolConfig, type AxAIGoogleGeminiToolFunctionDeclaration, type AxAIGoogleGeminiToolGoogleSearchRetrieval, type AxAIGoogleVertexBatchEmbedRequest, type AxAIGoogleVertexBatchEmbedResponse, AxAIGroq, type AxAIGroqArgs, AxAIGroqModel, AxAIHuggingFace, type AxAIHuggingFaceArgs, type AxAIHuggingFaceConfig, AxAIHuggingFaceModel, type AxAIHuggingFaceRequest, type AxAIHuggingFaceResponse, type AxAIInputModelList, type AxAIMemory, AxAIMistral, type AxAIMistralArgs, AxAIMistralEmbedModels, AxAIMistralModel, type AxAIModelList, type AxAIModels, AxAIOllama, type AxAIOllamaAIConfig, type AxAIOllamaArgs, AxAIOpenAI, type AxAIOpenAIArgs, AxAIOpenAIBase, type AxAIOpenAIBaseArgs, type AxAIOpenAIChatRequest, type AxAIOpenAIChatResponse, type AxAIOpenAIChatResponseDelta, type AxAIOpenAIConfig, AxAIOpenAIEmbedModel, type AxAIOpenAIEmbedRequest, type AxAIOpenAIEmbedResponse, type AxAIOpenAILogprob, AxAIOpenAIModel, type AxAIOpenAIResponseDelta, type AxAIOpenAIUsage, type AxAIPromptConfig, AxAIReka, type AxAIRekaArgs, type AxAIRekaChatRequest, type AxAIRekaChatResponse, type AxAIRekaChatResponseDelta, type AxAIRekaConfig, AxAIRekaModel, type AxAIRekaUsage, type AxAIService, type AxAIServiceActionOptions, AxAIServiceAuthenticationError, AxAIServiceError, type AxAIServiceImpl, type AxAIServiceMetrics, AxAIServiceNetworkError, type AxAIServiceOptions, AxAIServiceResponseError, AxAIServiceStatusError, AxAIServiceStreamTerminatedError, AxAIServiceTimeoutError, AxAITogether, type AxAITogetherArgs, type AxAPI, type AxAPIConfig, AxAgent, type AxAgentFeatures, type AxAgentOptions, type AxAgentic, AxApacheTika, type AxApacheTikaArgs, type AxApacheTikaConvertOptions, type AxAssertion, AxAssertionError, AxBalancer, type AxBalancerOptions, AxBaseAI, type AxBaseAIArgs, AxBootstrapFewShot, AxChainOfThought, type AxChatRequest, type AxChatResponse, type AxChatResponseFunctionCall, type AxChatResponseResult, 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, AxDefaultQueryRewriter, AxDefaultResultReranker, type AxDockerContainer, AxDockerSession, type AxEmbedRequest, type AxEmbedResponse, AxEmbeddingAdapter, AxEvalUtil, type AxEvaluateArgs, type AxExample, type AxField, type AxFieldProcessor, type AxFieldProcessorProcess, type AxFieldTemplateFn, type AxFieldValue, type AxFunction, AxFunctionError, type AxFunctionHandler, type AxFunctionJSONSchema, AxFunctionProcessor, AxGen, type AxGenDeltaOut, type AxGenIn, type AxGenOptions, type AxGenOut, type AxGenStreamingOut, type AxGenerateResult, AxHFDataLoader, type AxIField, type AxInputFunctionType, AxInstanceRegistry, type AxInternalChatRequest, type AxInternalEmbedRequest, AxJSInterpreter, AxJSInterpreterPermission, AxLLMRequestTypeValues, AxMCPClient, AxMCPHTTPTransport, AxMCPStdioTransport, type AxMCPTransport, AxMemory, type AxMetricFn, type AxMetricFnArgs, AxMockAIService, type AxMockAIServiceConfig, type AxModelConfig, type AxModelInfo, type AxModelInfoWithProvider, AxMultiServiceRouter, type AxOptimizerArgs, AxProgram, type AxProgramDemos, type AxProgramExamples, type AxProgramForwardOptions, type AxProgramStreamingForwardOptions, type AxProgramTrace, type AxProgramUsage, AxProgramWithSignature, type AxProgramWithSignatureOptions, AxPromptTemplate, AxRAG, type AxRateLimiterFunction, AxRateLimiterTokenUsage, type AxRateLimiterTokenUsageOptions, type AxRerankerIn, type AxRerankerOut, type AxResponseHandlerArgs, type AxRewriteIn, type AxRewriteOut, AxSignature, AxSimpleClassifier, AxSimpleClassifierClass, type AxSimpleClassifierForwardOptions, AxSpanKindValues, type AxStreamingAssertion, type AxStreamingEvent, type AxStreamingFieldProcessorProcess, AxStringUtil, AxTestPrompt, type AxTokenUsage, type AxTunable, type AxUsable, axAIAnthropicDefaultConfig, axAIAzureOpenAIBestConfig, axAIAzureOpenAICreativeConfig, axAIAzureOpenAIDefaultConfig, axAIAzureOpenAIFastConfig, axAICohereCreativeConfig, axAICohereDefaultConfig, axAIDeepSeekCodeConfig, axAIDeepSeekDefaultConfig, axAIGoogleGeminiDefaultConfig, axAIGoogleGeminiDefaultCreativeConfig, axAIHuggingFaceCreativeConfig, axAIHuggingFaceDefaultConfig, axAIMistralBestConfig, axAIMistralDefaultConfig, axAIOllamaDefaultConfig, axAIOllamaDefaultCreativeConfig, axAIOpenAIBestConfig, axAIOpenAICreativeConfig, axAIOpenAIDefaultConfig, axAIOpenAIFastConfig, axAIRekaBestConfig, axAIRekaCreativeConfig, axAIRekaDefaultConfig, axAIRekaFastConfig, axAITogetherDefaultConfig, axBaseAIDefaultConfig, axBaseAIDefaultCreativeConfig, axModelInfoAnthropic, axModelInfoCohere, axModelInfoDeepSeek, axModelInfoGoogleGemini, axModelInfoGroq, axModelInfoHuggingFace, axModelInfoMistral, axModelInfoOpenAI, axModelInfoReka, axModelInfoTogether, axSpanAttributes, axSpanEvents };
|
|
2920
|
+
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 AxAIAnthropicMessageDeltaEvent, type AxAIAnthropicMessageStartEvent, type AxAIAnthropicMessageStopEvent, AxAIAnthropicModel, type AxAIAnthropicPingEvent, AxAIAnthropicVertexModel, 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, AxAIGoogleGeminiEmbedModel, type AxAIGoogleGeminiGenerationConfig, AxAIGoogleGeminiModel, type AxAIGoogleGeminiOptionsTools, AxAIGoogleGeminiSafetyCategory, type AxAIGoogleGeminiSafetySettings, AxAIGoogleGeminiSafetyThreshold, type AxAIGoogleGeminiTool, type AxAIGoogleGeminiToolConfig, type AxAIGoogleGeminiToolFunctionDeclaration, type AxAIGoogleGeminiToolGoogleSearchRetrieval, type AxAIGoogleVertexBatchEmbedRequest, type AxAIGoogleVertexBatchEmbedResponse, AxAIGroq, type AxAIGroqArgs, AxAIGroqModel, AxAIHuggingFace, type AxAIHuggingFaceArgs, type AxAIHuggingFaceConfig, AxAIHuggingFaceModel, type AxAIHuggingFaceRequest, type AxAIHuggingFaceResponse, type AxAIInputModelList, type AxAIMemory, AxAIMistral, type AxAIMistralArgs, AxAIMistralEmbedModels, AxAIMistralModel, type AxAIModelList, type AxAIModels, AxAIOllama, type AxAIOllamaAIConfig, type AxAIOllamaArgs, AxAIOpenAI, type AxAIOpenAIArgs, AxAIOpenAIBase, type AxAIOpenAIBaseArgs, type AxAIOpenAIChatRequest, type AxAIOpenAIChatResponse, type AxAIOpenAIChatResponseDelta, type AxAIOpenAIConfig, AxAIOpenAIEmbedModel, type AxAIOpenAIEmbedRequest, type AxAIOpenAIEmbedResponse, type AxAIOpenAILogprob, AxAIOpenAIModel, type AxAIOpenAIResponseDelta, type AxAIOpenAIUsage, type AxAIPromptConfig, AxAIReka, type AxAIRekaArgs, type AxAIRekaChatRequest, type AxAIRekaChatResponse, type AxAIRekaChatResponseDelta, type AxAIRekaConfig, AxAIRekaModel, type AxAIRekaUsage, type AxAIService, type AxAIServiceActionOptions, AxAIServiceAuthenticationError, AxAIServiceError, type AxAIServiceImpl, type AxAIServiceMetrics, AxAIServiceNetworkError, type AxAIServiceOptions, AxAIServiceResponseError, AxAIServiceStatusError, AxAIServiceStreamTerminatedError, AxAIServiceTimeoutError, AxAITogether, type AxAITogetherArgs, type AxAPI, type AxAPIConfig, AxAgent, type AxAgentFeatures, type AxAgentOptions, type AxAgentic, AxApacheTika, type AxApacheTikaArgs, type AxApacheTikaConvertOptions, type AxAssertion, AxAssertionError, AxBalancer, type AxBalancerOptions, AxBaseAI, type AxBaseAIArgs, AxBootstrapFewShot, AxChainOfThought, type AxChatRequest, type AxChatResponse, type AxChatResponseFunctionCall, type AxChatResponseResult, 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, AxDefaultQueryRewriter, AxDefaultResultReranker, type AxDockerContainer, AxDockerSession, type AxEmbedRequest, type AxEmbedResponse, AxEmbeddingAdapter, AxEvalUtil, type AxEvaluateArgs, type AxExample, type AxField, type AxFieldProcessor, type AxFieldProcessorProcess, type AxFieldTemplateFn, type AxFieldValue, type AxFunction, AxFunctionError, type AxFunctionHandler, type AxFunctionJSONSchema, AxFunctionProcessor, AxGen, type AxGenDeltaOut, type AxGenIn, type AxGenOptions, type AxGenOut, type AxGenStreamingOut, type AxGenerateResult, AxHFDataLoader, type AxIField, type AxInputFunctionType, AxInstanceRegistry, type AxInternalChatRequest, type AxInternalEmbedRequest, AxJSInterpreter, AxJSInterpreterPermission, AxLLMRequestTypeValues, AxMCPClient, AxMCPHTTPTransport, AxMCPStdioTransport, type AxMCPTransport, AxMemory, type AxMetricFn, type AxMetricFnArgs, AxMiPRO, type AxMiPROOptions, AxMockAIService, type AxMockAIServiceConfig, type AxModelConfig, type AxModelInfo, type AxModelInfoWithProvider, AxMultiServiceRouter, type AxOptimizationStats, type AxOptimizerArgs, AxProgram, type AxProgramDemos, type AxProgramExamples, type AxProgramForwardOptions, type AxProgramStreamingForwardOptions, type AxProgramTrace, type AxProgramUsage, AxProgramWithSignature, type AxProgramWithSignatureOptions, AxPromptTemplate, AxRAG, type AxRateLimiterFunction, AxRateLimiterTokenUsage, type AxRateLimiterTokenUsageOptions, type AxRerankerIn, type AxRerankerOut, type AxResponseHandlerArgs, type AxRewriteIn, type AxRewriteOut, AxSignature, AxSimpleClassifier, AxSimpleClassifierClass, type AxSimpleClassifierForwardOptions, AxSpanKindValues, type AxStreamingAssertion, type AxStreamingEvent, type AxStreamingFieldProcessorProcess, AxStringUtil, AxTestPrompt, type AxTokenUsage, type AxTunable, type AxUsable, axAIAnthropicDefaultConfig, axAIAzureOpenAIBestConfig, axAIAzureOpenAICreativeConfig, axAIAzureOpenAIDefaultConfig, axAIAzureOpenAIFastConfig, axAICohereCreativeConfig, axAICohereDefaultConfig, axAIDeepSeekCodeConfig, axAIDeepSeekDefaultConfig, axAIGoogleGeminiDefaultConfig, axAIGoogleGeminiDefaultCreativeConfig, axAIHuggingFaceCreativeConfig, axAIHuggingFaceDefaultConfig, axAIMistralBestConfig, axAIMistralDefaultConfig, axAIOllamaDefaultConfig, axAIOllamaDefaultCreativeConfig, axAIOpenAIBestConfig, axAIOpenAICreativeConfig, axAIOpenAIDefaultConfig, axAIOpenAIFastConfig, axAIRekaBestConfig, axAIRekaCreativeConfig, axAIRekaDefaultConfig, axAIRekaFastConfig, axAITogetherDefaultConfig, axBaseAIDefaultConfig, axBaseAIDefaultCreativeConfig, axModelInfoAnthropic, axModelInfoCohere, axModelInfoDeepSeek, axModelInfoGoogleGemini, axModelInfoGroq, axModelInfoHuggingFace, axModelInfoMistral, axModelInfoOpenAI, axModelInfoReka, axModelInfoTogether, axSpanAttributes, axSpanEvents };
|