@ax-llm/ax 11.0.26 → 11.0.27

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.d.cts CHANGED
@@ -300,6 +300,8 @@ interface AxBaseAIArgs<TModel, TEmbedModel> {
300
300
  supportFor: AxAIFeatures | ((model: TModel) => AxAIFeatures);
301
301
  models?: AxAIInputModelList<TModel>;
302
302
  }
303
+ declare const axBaseAIDefaultConfig: () => AxModelConfig;
304
+ declare const axBaseAIDefaultCreativeConfig: () => AxModelConfig;
303
305
  declare class AxBaseAI<TModel, TEmbedModel, TChatRequest, TEmbedRequest, TChatResponse, TChatResponseDelta, TEmbedResponse> implements AxAIService<TModel, TEmbedModel> {
304
306
  private readonly aiImpl;
305
307
  private debug;
@@ -536,6 +538,7 @@ interface AxAIAnthropicErrorEvent {
536
538
  }
537
539
  type AxAIAnthropicChatResponseDelta = AxAIAnthropicMessageStartEvent | AxAIAnthropicContentBlockStartEvent | AxAIAnthropicContentBlockDeltaEvent | AxAIAnthropicContentBlockStopEvent | AxAIAnthropicMessageDeltaEvent | AxAIAnthropicMessageStopEvent | AxAIAnthropicPingEvent | AxAIAnthropicErrorEvent;
538
540
 
541
+ declare const axAIAnthropicDefaultConfig: () => AxAIAnthropicConfig;
539
542
  interface AxAIAnthropicArgs {
540
543
  name: 'anthropic';
541
544
  apiKey?: string;
@@ -732,6 +735,10 @@ type AxAIOpenAIEmbedResponse = {
732
735
  usage: AxAIOpenAIUsage;
733
736
  };
734
737
 
738
+ declare const axAIOpenAIDefaultConfig: () => AxAIOpenAIConfig<AxAIOpenAIModel, AxAIOpenAIEmbedModel>;
739
+ declare const axAIOpenAIBestConfig: () => AxAIOpenAIConfig<AxAIOpenAIModel, AxAIOpenAIEmbedModel>;
740
+ declare const axAIOpenAICreativeConfig: () => AxAIOpenAIConfig<AxAIOpenAIModel, AxAIOpenAIEmbedModel>;
741
+ declare const axAIOpenAIFastConfig: () => AxAIOpenAIConfig<AxAIOpenAIModel, AxAIOpenAIEmbedModel>;
735
742
  interface AxAIOpenAIArgs<TName = 'openai', TModel = AxAIOpenAIModel, TEmbedModel = AxAIOpenAIEmbedModel> extends Omit<AxAIOpenAIBaseArgs<TModel, TEmbedModel>, 'config' | 'modelInfo'> {
736
743
  name: TName;
737
744
  config?: Partial<AxAIOpenAIBaseArgs<TModel, TEmbedModel>['config']>;
@@ -753,6 +760,10 @@ declare class AxAIOpenAI extends AxAIOpenAIBase<AxAIOpenAIModel, AxAIOpenAIEmbed
753
760
  constructor({ apiKey, config, options, models, }: Readonly<Omit<AxAIOpenAIArgs, 'name' | 'modelInfo'>>);
754
761
  }
755
762
 
763
+ declare const axAIAzureOpenAIDefaultConfig: () => AxAIOpenAIConfig<AxAIOpenAIModel, AxAIOpenAIEmbedModel>;
764
+ declare const axAIAzureOpenAICreativeConfig: () => AxAIOpenAIConfig<AxAIOpenAIModel, AxAIOpenAIEmbedModel>;
765
+ declare const axAIAzureOpenAIFastConfig: () => AxAIOpenAIConfig<AxAIOpenAIModel, AxAIOpenAIEmbedModel>;
766
+ declare const axAIAzureOpenAIBestConfig: () => AxAIOpenAIConfig<AxAIOpenAIModel, AxAIOpenAIEmbedModel>;
756
767
  type AxAIAzureOpenAIConfig = AxAIOpenAIConfig<AxAIOpenAIModel, AxAIOpenAIEmbedModel>;
757
768
  type AxAIAzureOpenAIArgs = AxAIOpenAIArgs<'azure-openai', AxAIOpenAIModel, AxAIOpenAIEmbedModel> & {
758
769
  resourceName: string;
@@ -862,6 +873,8 @@ type AxAICohereEmbedResponse = {
862
873
  embeddings: number[][];
863
874
  };
864
875
 
876
+ declare const axAICohereDefaultConfig: () => AxAICohereConfig;
877
+ declare const axAICohereCreativeConfig: () => AxAICohereConfig;
865
878
  interface AxAICohereArgs {
866
879
  name: 'cohere';
867
880
  apiKey: string;
@@ -881,6 +894,9 @@ declare enum AxAIDeepSeekModel {
881
894
  DeepSeekCoder = "deepseek-coder"
882
895
  }
883
896
 
897
+ type DeepSeekConfig = AxAIOpenAIConfig<AxAIDeepSeekModel, undefined>;
898
+ declare const axAIDeepSeekDefaultConfig: () => DeepSeekConfig;
899
+ declare const axAIDeepSeekCodeConfig: () => DeepSeekConfig;
884
900
  type AxAIDeepSeekArgs = AxAIOpenAIArgs<'deepseek', AxAIDeepSeekModel, undefined>;
885
901
  declare class AxAIDeepSeek extends AxAIOpenAIBase<AxAIDeepSeekModel, undefined> {
886
902
  constructor({ apiKey, config, options, models, }: Readonly<Omit<AxAIDeepSeekArgs, 'name'>>);
@@ -1066,6 +1082,11 @@ type AxAIGoogleVertexBatchEmbedResponse = {
1066
1082
  }[];
1067
1083
  };
1068
1084
 
1085
+ /**
1086
+ * AxAIGoogleGemini: Default Model options for text generation
1087
+ */
1088
+ declare const axAIGoogleGeminiDefaultConfig: () => AxAIGoogleGeminiConfig;
1089
+ declare const axAIGoogleGeminiDefaultCreativeConfig: () => AxAIGoogleGeminiConfig;
1069
1090
  interface AxAIGoogleGeminiOptionsTools {
1070
1091
  codeExecution?: boolean;
1071
1092
  googleSearchRetrieval?: {
@@ -1143,6 +1164,8 @@ type AxAIHuggingFaceResponse = {
1143
1164
  generated_text: string;
1144
1165
  };
1145
1166
 
1167
+ declare const axAIHuggingFaceDefaultConfig: () => AxAIHuggingFaceConfig;
1168
+ declare const axAIHuggingFaceCreativeConfig: () => AxAIHuggingFaceConfig;
1146
1169
  interface AxAIHuggingFaceArgs {
1147
1170
  name: 'huggingface';
1148
1171
  apiKey: string;
@@ -1168,6 +1191,9 @@ declare enum AxAIMistralEmbedModels {
1168
1191
  MistralEmbed = "mistral-embed"
1169
1192
  }
1170
1193
 
1194
+ type AxAIMistralConfig = AxAIOpenAIConfig<AxAIMistralModel, AxAIMistralEmbedModels>;
1195
+ declare const axAIMistralDefaultConfig: () => AxAIMistralConfig;
1196
+ declare const axAIMistralBestConfig: () => AxAIMistralConfig;
1171
1197
  type AxAIMistralArgs = AxAIOpenAIArgs<'mistral', AxAIMistralModel, AxAIMistralEmbedModels> & {
1172
1198
  options?: Readonly<AxAIServiceOptions> & {
1173
1199
  tokensPerMinute?: number;
@@ -1178,6 +1204,8 @@ declare class AxAIMistral extends AxAIOpenAIBase<AxAIMistralModel, AxAIMistralEm
1178
1204
  }
1179
1205
 
1180
1206
  type AxAIOllamaAIConfig = AxAIOpenAIConfig<string, string>;
1207
+ declare const axAIOllamaDefaultConfig: () => AxAIOllamaAIConfig;
1208
+ declare const axAIOllamaDefaultCreativeConfig: () => AxAIOllamaAIConfig;
1181
1209
  type AxAIOllamaArgs = AxAIOpenAIArgs<'ollama', string, string> & {
1182
1210
  model?: string;
1183
1211
  embedModel?: string;
@@ -1257,6 +1285,10 @@ type AxAIRekaChatResponseDelta = {
1257
1285
  usage?: AxAIRekaUsage;
1258
1286
  };
1259
1287
 
1288
+ declare const axAIRekaDefaultConfig: () => AxAIRekaConfig;
1289
+ declare const axAIRekaBestConfig: () => AxAIRekaConfig;
1290
+ declare const axAIRekaCreativeConfig: () => AxAIRekaConfig;
1291
+ declare const axAIRekaFastConfig: () => AxAIRekaConfig;
1260
1292
  interface AxAIRekaArgs {
1261
1293
  name: 'reka';
1262
1294
  apiKey: string;
@@ -1272,6 +1304,8 @@ declare class AxAIReka extends AxBaseAI<AxAIRekaModel, undefined, AxAIRekaChatRe
1272
1304
  constructor({ apiKey, config, options, apiURL, modelInfo, models, }: Readonly<Omit<AxAIRekaArgs, 'name'>>);
1273
1305
  }
1274
1306
 
1307
+ type TogetherAIConfig = AxAIOpenAIConfig<string, unknown>;
1308
+ declare const axAITogetherDefaultConfig: () => TogetherAIConfig;
1275
1309
  type AxAITogetherArgs = AxAIOpenAIArgs<'together', string, unknown>;
1276
1310
  declare class AxAITogether extends AxAIOpenAIBase<string, unknown> {
1277
1311
  constructor({ apiKey, config, options, models, }: Readonly<Omit<AxAITogetherArgs, 'name'>>);
@@ -2257,6 +2291,40 @@ declare class AxJSInterpreter {
2257
2291
  toFunction(): AxFunction;
2258
2292
  }
2259
2293
 
2294
+ declare const axSpanAttributes: {
2295
+ LLM_SYSTEM: string;
2296
+ LLM_REQUEST_MODEL: string;
2297
+ LLM_REQUEST_MAX_TOKENS: string;
2298
+ LLM_REQUEST_TEMPERATURE: string;
2299
+ LLM_REQUEST_TOP_K: string;
2300
+ LLM_REQUEST_FREQUENCY_PENALTY: string;
2301
+ LLM_REQUEST_PRESENCE_PENALTY: string;
2302
+ LLM_REQUEST_STOP_SEQUENCES: string;
2303
+ LLM_REQUEST_LLM_IS_STREAMING: string;
2304
+ LLM_REQUEST_TOP_P: string;
2305
+ LLM_USAGE_PROMPT_TOKENS: string;
2306
+ LLM_USAGE_COMPLETION_TOKENS: string;
2307
+ DB_SYSTEM: string;
2308
+ DB_TABLE: string;
2309
+ DB_NAMESPACE: string;
2310
+ DB_ID: string;
2311
+ DB_QUERY_TEXT: string;
2312
+ DB_VECTOR: string;
2313
+ DB_OPERATION_NAME: string;
2314
+ DB_VECTOR_QUERY_TOP_K: string;
2315
+ DB_QUERY_EMBEDDINGS: string;
2316
+ DB_QUERY_RESULT: string;
2317
+ DB_QUERY_EMBEDDINGS_VECTOR: string;
2318
+ DB_QUERY_RESULT_ID: string;
2319
+ DB_QUERY_RESULT_SCORE: string;
2320
+ DB_QUERY_RESULT_DISTANCE: string;
2321
+ DB_QUERY_RESULT_METADATA: string;
2322
+ DB_QUERY_RESULT_VECTOR: string;
2323
+ DB_QUERY_RESULT_DOCUMENT: string;
2324
+ };
2325
+ declare const axSpanEvents: {
2326
+ LLM_PROMPT: string;
2327
+ };
2260
2328
  declare enum AxLLMRequestTypeValues {
2261
2329
  COMPLETION = "completion",
2262
2330
  CHAT = "chat",
@@ -2395,6 +2463,49 @@ declare class AxEmbeddingAdapter {
2395
2463
  toFunction(): AxFunction;
2396
2464
  }
2397
2465
 
2466
+ /**
2467
+ * Calculates the Exact Match (EM) score between a prediction and ground truth.
2468
+ *
2469
+ * The EM score is a strict metric used in machine learning to assess if the predicted
2470
+ * answer matches the ground truth exactly, commonly used in tasks like question answering.
2471
+ *
2472
+ * @param prediction The predicted text.
2473
+ * @param groundTruth The actual correct text.
2474
+ * @returns A boolean indicating if the prediction exactly matches the ground truth.
2475
+ */
2476
+ declare function emScore(prediction: string, groundTruth: string): boolean;
2477
+ /**
2478
+ * Calculates the F1 score between a prediction and ground truth.
2479
+ *
2480
+ * The F1 score is a harmonic mean of precision and recall, widely used in NLP to measure
2481
+ * a model's accuracy in considering both false positives and false negatives, offering a
2482
+ * balance for evaluating classification models.
2483
+ *
2484
+ * @param prediction The predicted text.
2485
+ * @param groundTruth The actual correct text.
2486
+ * @returns The F1 score as a number.
2487
+ */
2488
+ declare function f1Score(prediction: string, groundTruth: string): number;
2489
+ /**
2490
+ * Calculates a novel F1 score, taking into account a history of interaction and excluding stopwords.
2491
+ *
2492
+ * This metric extends the F1 score by considering contextual relevance and filtering out common words
2493
+ * that might skew the assessment of the prediction's quality, especially in conversational models or
2494
+ * when historical context is relevant.
2495
+ *
2496
+ * @param history The historical context or preceding interactions.
2497
+ * @param prediction The predicted text.
2498
+ * @param groundTruth The actual correct text.
2499
+ * @param returnRecall Optionally return the recall score instead of F1.
2500
+ * @returns The novel F1 or recall score as a number.
2501
+ */
2502
+ declare function novelF1ScoreOptimized(history: string, prediction: string, groundTruth: string, returnRecall?: boolean): number;
2503
+ declare const AxEvalUtil: {
2504
+ emScore: typeof emScore;
2505
+ f1Score: typeof f1Score;
2506
+ novelF1ScoreOptimized: typeof novelF1ScoreOptimized;
2507
+ };
2508
+
2398
2509
  declare class AxInstanceRegistry<T> {
2399
2510
  private reg;
2400
2511
  constructor();
@@ -2613,4 +2724,51 @@ declare class AxRAG extends AxChainOfThought<{
2613
2724
  }>;
2614
2725
  }
2615
2726
 
2616
- 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, 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, AxTestPrompt, type AxTokenUsage, type AxTunable, type AxUsable };
2727
+ declare const AxStringUtil: {
2728
+ trimNonAlphaNum: (str: string) => string;
2729
+ splitIntoTwo: (str: string, separator: Readonly<RegExp | string>) => string[];
2730
+ dedup: (seq: readonly string[]) => string[];
2731
+ extractIdAndText: (input: string) => {
2732
+ id: number;
2733
+ text: string;
2734
+ };
2735
+ extractIndexPrefixedText: (input: string) => string;
2736
+ batchArray: <T>(arr: readonly T[], size: number) => T[][];
2737
+ };
2738
+
2739
+ declare const axModelInfoAnthropic: AxModelInfo[];
2740
+
2741
+ declare const axModelInfoCohere: AxModelInfo[];
2742
+
2743
+ declare const axModelInfoDeepSeek: AxModelInfo[];
2744
+
2745
+ /**
2746
+ * AxAIGoogleGemini: Model information
2747
+ */
2748
+ declare const axModelInfoGoogleGemini: AxModelInfo[];
2749
+
2750
+ /**
2751
+ * AxAIGroq: Model information
2752
+ */
2753
+ declare const axModelInfoGroq: AxModelInfo[];
2754
+
2755
+ /**
2756
+ * HuggingFace: Model information
2757
+ */
2758
+ declare const axModelInfoHuggingFace: AxModelInfo[];
2759
+
2760
+ declare const axModelInfoMistral: AxModelInfo[];
2761
+
2762
+ /**
2763
+ * OpenAI: Model information
2764
+ */
2765
+ declare const axModelInfoOpenAI: AxModelInfo[];
2766
+
2767
+ /**
2768
+ * OpenAI: Model information
2769
+ */
2770
+ declare const axModelInfoReka: AxModelInfo[];
2771
+
2772
+ declare const axModelInfoTogether: AxModelInfo[];
2773
+
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 };
package/index.d.ts CHANGED
@@ -300,6 +300,8 @@ interface AxBaseAIArgs<TModel, TEmbedModel> {
300
300
  supportFor: AxAIFeatures | ((model: TModel) => AxAIFeatures);
301
301
  models?: AxAIInputModelList<TModel>;
302
302
  }
303
+ declare const axBaseAIDefaultConfig: () => AxModelConfig;
304
+ declare const axBaseAIDefaultCreativeConfig: () => AxModelConfig;
303
305
  declare class AxBaseAI<TModel, TEmbedModel, TChatRequest, TEmbedRequest, TChatResponse, TChatResponseDelta, TEmbedResponse> implements AxAIService<TModel, TEmbedModel> {
304
306
  private readonly aiImpl;
305
307
  private debug;
@@ -536,6 +538,7 @@ interface AxAIAnthropicErrorEvent {
536
538
  }
537
539
  type AxAIAnthropicChatResponseDelta = AxAIAnthropicMessageStartEvent | AxAIAnthropicContentBlockStartEvent | AxAIAnthropicContentBlockDeltaEvent | AxAIAnthropicContentBlockStopEvent | AxAIAnthropicMessageDeltaEvent | AxAIAnthropicMessageStopEvent | AxAIAnthropicPingEvent | AxAIAnthropicErrorEvent;
538
540
 
541
+ declare const axAIAnthropicDefaultConfig: () => AxAIAnthropicConfig;
539
542
  interface AxAIAnthropicArgs {
540
543
  name: 'anthropic';
541
544
  apiKey?: string;
@@ -732,6 +735,10 @@ type AxAIOpenAIEmbedResponse = {
732
735
  usage: AxAIOpenAIUsage;
733
736
  };
734
737
 
738
+ declare const axAIOpenAIDefaultConfig: () => AxAIOpenAIConfig<AxAIOpenAIModel, AxAIOpenAIEmbedModel>;
739
+ declare const axAIOpenAIBestConfig: () => AxAIOpenAIConfig<AxAIOpenAIModel, AxAIOpenAIEmbedModel>;
740
+ declare const axAIOpenAICreativeConfig: () => AxAIOpenAIConfig<AxAIOpenAIModel, AxAIOpenAIEmbedModel>;
741
+ declare const axAIOpenAIFastConfig: () => AxAIOpenAIConfig<AxAIOpenAIModel, AxAIOpenAIEmbedModel>;
735
742
  interface AxAIOpenAIArgs<TName = 'openai', TModel = AxAIOpenAIModel, TEmbedModel = AxAIOpenAIEmbedModel> extends Omit<AxAIOpenAIBaseArgs<TModel, TEmbedModel>, 'config' | 'modelInfo'> {
736
743
  name: TName;
737
744
  config?: Partial<AxAIOpenAIBaseArgs<TModel, TEmbedModel>['config']>;
@@ -753,6 +760,10 @@ declare class AxAIOpenAI extends AxAIOpenAIBase<AxAIOpenAIModel, AxAIOpenAIEmbed
753
760
  constructor({ apiKey, config, options, models, }: Readonly<Omit<AxAIOpenAIArgs, 'name' | 'modelInfo'>>);
754
761
  }
755
762
 
763
+ declare const axAIAzureOpenAIDefaultConfig: () => AxAIOpenAIConfig<AxAIOpenAIModel, AxAIOpenAIEmbedModel>;
764
+ declare const axAIAzureOpenAICreativeConfig: () => AxAIOpenAIConfig<AxAIOpenAIModel, AxAIOpenAIEmbedModel>;
765
+ declare const axAIAzureOpenAIFastConfig: () => AxAIOpenAIConfig<AxAIOpenAIModel, AxAIOpenAIEmbedModel>;
766
+ declare const axAIAzureOpenAIBestConfig: () => AxAIOpenAIConfig<AxAIOpenAIModel, AxAIOpenAIEmbedModel>;
756
767
  type AxAIAzureOpenAIConfig = AxAIOpenAIConfig<AxAIOpenAIModel, AxAIOpenAIEmbedModel>;
757
768
  type AxAIAzureOpenAIArgs = AxAIOpenAIArgs<'azure-openai', AxAIOpenAIModel, AxAIOpenAIEmbedModel> & {
758
769
  resourceName: string;
@@ -862,6 +873,8 @@ type AxAICohereEmbedResponse = {
862
873
  embeddings: number[][];
863
874
  };
864
875
 
876
+ declare const axAICohereDefaultConfig: () => AxAICohereConfig;
877
+ declare const axAICohereCreativeConfig: () => AxAICohereConfig;
865
878
  interface AxAICohereArgs {
866
879
  name: 'cohere';
867
880
  apiKey: string;
@@ -881,6 +894,9 @@ declare enum AxAIDeepSeekModel {
881
894
  DeepSeekCoder = "deepseek-coder"
882
895
  }
883
896
 
897
+ type DeepSeekConfig = AxAIOpenAIConfig<AxAIDeepSeekModel, undefined>;
898
+ declare const axAIDeepSeekDefaultConfig: () => DeepSeekConfig;
899
+ declare const axAIDeepSeekCodeConfig: () => DeepSeekConfig;
884
900
  type AxAIDeepSeekArgs = AxAIOpenAIArgs<'deepseek', AxAIDeepSeekModel, undefined>;
885
901
  declare class AxAIDeepSeek extends AxAIOpenAIBase<AxAIDeepSeekModel, undefined> {
886
902
  constructor({ apiKey, config, options, models, }: Readonly<Omit<AxAIDeepSeekArgs, 'name'>>);
@@ -1066,6 +1082,11 @@ type AxAIGoogleVertexBatchEmbedResponse = {
1066
1082
  }[];
1067
1083
  };
1068
1084
 
1085
+ /**
1086
+ * AxAIGoogleGemini: Default Model options for text generation
1087
+ */
1088
+ declare const axAIGoogleGeminiDefaultConfig: () => AxAIGoogleGeminiConfig;
1089
+ declare const axAIGoogleGeminiDefaultCreativeConfig: () => AxAIGoogleGeminiConfig;
1069
1090
  interface AxAIGoogleGeminiOptionsTools {
1070
1091
  codeExecution?: boolean;
1071
1092
  googleSearchRetrieval?: {
@@ -1143,6 +1164,8 @@ type AxAIHuggingFaceResponse = {
1143
1164
  generated_text: string;
1144
1165
  };
1145
1166
 
1167
+ declare const axAIHuggingFaceDefaultConfig: () => AxAIHuggingFaceConfig;
1168
+ declare const axAIHuggingFaceCreativeConfig: () => AxAIHuggingFaceConfig;
1146
1169
  interface AxAIHuggingFaceArgs {
1147
1170
  name: 'huggingface';
1148
1171
  apiKey: string;
@@ -1168,6 +1191,9 @@ declare enum AxAIMistralEmbedModels {
1168
1191
  MistralEmbed = "mistral-embed"
1169
1192
  }
1170
1193
 
1194
+ type AxAIMistralConfig = AxAIOpenAIConfig<AxAIMistralModel, AxAIMistralEmbedModels>;
1195
+ declare const axAIMistralDefaultConfig: () => AxAIMistralConfig;
1196
+ declare const axAIMistralBestConfig: () => AxAIMistralConfig;
1171
1197
  type AxAIMistralArgs = AxAIOpenAIArgs<'mistral', AxAIMistralModel, AxAIMistralEmbedModels> & {
1172
1198
  options?: Readonly<AxAIServiceOptions> & {
1173
1199
  tokensPerMinute?: number;
@@ -1178,6 +1204,8 @@ declare class AxAIMistral extends AxAIOpenAIBase<AxAIMistralModel, AxAIMistralEm
1178
1204
  }
1179
1205
 
1180
1206
  type AxAIOllamaAIConfig = AxAIOpenAIConfig<string, string>;
1207
+ declare const axAIOllamaDefaultConfig: () => AxAIOllamaAIConfig;
1208
+ declare const axAIOllamaDefaultCreativeConfig: () => AxAIOllamaAIConfig;
1181
1209
  type AxAIOllamaArgs = AxAIOpenAIArgs<'ollama', string, string> & {
1182
1210
  model?: string;
1183
1211
  embedModel?: string;
@@ -1257,6 +1285,10 @@ type AxAIRekaChatResponseDelta = {
1257
1285
  usage?: AxAIRekaUsage;
1258
1286
  };
1259
1287
 
1288
+ declare const axAIRekaDefaultConfig: () => AxAIRekaConfig;
1289
+ declare const axAIRekaBestConfig: () => AxAIRekaConfig;
1290
+ declare const axAIRekaCreativeConfig: () => AxAIRekaConfig;
1291
+ declare const axAIRekaFastConfig: () => AxAIRekaConfig;
1260
1292
  interface AxAIRekaArgs {
1261
1293
  name: 'reka';
1262
1294
  apiKey: string;
@@ -1272,6 +1304,8 @@ declare class AxAIReka extends AxBaseAI<AxAIRekaModel, undefined, AxAIRekaChatRe
1272
1304
  constructor({ apiKey, config, options, apiURL, modelInfo, models, }: Readonly<Omit<AxAIRekaArgs, 'name'>>);
1273
1305
  }
1274
1306
 
1307
+ type TogetherAIConfig = AxAIOpenAIConfig<string, unknown>;
1308
+ declare const axAITogetherDefaultConfig: () => TogetherAIConfig;
1275
1309
  type AxAITogetherArgs = AxAIOpenAIArgs<'together', string, unknown>;
1276
1310
  declare class AxAITogether extends AxAIOpenAIBase<string, unknown> {
1277
1311
  constructor({ apiKey, config, options, models, }: Readonly<Omit<AxAITogetherArgs, 'name'>>);
@@ -2257,6 +2291,40 @@ declare class AxJSInterpreter {
2257
2291
  toFunction(): AxFunction;
2258
2292
  }
2259
2293
 
2294
+ declare const axSpanAttributes: {
2295
+ LLM_SYSTEM: string;
2296
+ LLM_REQUEST_MODEL: string;
2297
+ LLM_REQUEST_MAX_TOKENS: string;
2298
+ LLM_REQUEST_TEMPERATURE: string;
2299
+ LLM_REQUEST_TOP_K: string;
2300
+ LLM_REQUEST_FREQUENCY_PENALTY: string;
2301
+ LLM_REQUEST_PRESENCE_PENALTY: string;
2302
+ LLM_REQUEST_STOP_SEQUENCES: string;
2303
+ LLM_REQUEST_LLM_IS_STREAMING: string;
2304
+ LLM_REQUEST_TOP_P: string;
2305
+ LLM_USAGE_PROMPT_TOKENS: string;
2306
+ LLM_USAGE_COMPLETION_TOKENS: string;
2307
+ DB_SYSTEM: string;
2308
+ DB_TABLE: string;
2309
+ DB_NAMESPACE: string;
2310
+ DB_ID: string;
2311
+ DB_QUERY_TEXT: string;
2312
+ DB_VECTOR: string;
2313
+ DB_OPERATION_NAME: string;
2314
+ DB_VECTOR_QUERY_TOP_K: string;
2315
+ DB_QUERY_EMBEDDINGS: string;
2316
+ DB_QUERY_RESULT: string;
2317
+ DB_QUERY_EMBEDDINGS_VECTOR: string;
2318
+ DB_QUERY_RESULT_ID: string;
2319
+ DB_QUERY_RESULT_SCORE: string;
2320
+ DB_QUERY_RESULT_DISTANCE: string;
2321
+ DB_QUERY_RESULT_METADATA: string;
2322
+ DB_QUERY_RESULT_VECTOR: string;
2323
+ DB_QUERY_RESULT_DOCUMENT: string;
2324
+ };
2325
+ declare const axSpanEvents: {
2326
+ LLM_PROMPT: string;
2327
+ };
2260
2328
  declare enum AxLLMRequestTypeValues {
2261
2329
  COMPLETION = "completion",
2262
2330
  CHAT = "chat",
@@ -2395,6 +2463,49 @@ declare class AxEmbeddingAdapter {
2395
2463
  toFunction(): AxFunction;
2396
2464
  }
2397
2465
 
2466
+ /**
2467
+ * Calculates the Exact Match (EM) score between a prediction and ground truth.
2468
+ *
2469
+ * The EM score is a strict metric used in machine learning to assess if the predicted
2470
+ * answer matches the ground truth exactly, commonly used in tasks like question answering.
2471
+ *
2472
+ * @param prediction The predicted text.
2473
+ * @param groundTruth The actual correct text.
2474
+ * @returns A boolean indicating if the prediction exactly matches the ground truth.
2475
+ */
2476
+ declare function emScore(prediction: string, groundTruth: string): boolean;
2477
+ /**
2478
+ * Calculates the F1 score between a prediction and ground truth.
2479
+ *
2480
+ * The F1 score is a harmonic mean of precision and recall, widely used in NLP to measure
2481
+ * a model's accuracy in considering both false positives and false negatives, offering a
2482
+ * balance for evaluating classification models.
2483
+ *
2484
+ * @param prediction The predicted text.
2485
+ * @param groundTruth The actual correct text.
2486
+ * @returns The F1 score as a number.
2487
+ */
2488
+ declare function f1Score(prediction: string, groundTruth: string): number;
2489
+ /**
2490
+ * Calculates a novel F1 score, taking into account a history of interaction and excluding stopwords.
2491
+ *
2492
+ * This metric extends the F1 score by considering contextual relevance and filtering out common words
2493
+ * that might skew the assessment of the prediction's quality, especially in conversational models or
2494
+ * when historical context is relevant.
2495
+ *
2496
+ * @param history The historical context or preceding interactions.
2497
+ * @param prediction The predicted text.
2498
+ * @param groundTruth The actual correct text.
2499
+ * @param returnRecall Optionally return the recall score instead of F1.
2500
+ * @returns The novel F1 or recall score as a number.
2501
+ */
2502
+ declare function novelF1ScoreOptimized(history: string, prediction: string, groundTruth: string, returnRecall?: boolean): number;
2503
+ declare const AxEvalUtil: {
2504
+ emScore: typeof emScore;
2505
+ f1Score: typeof f1Score;
2506
+ novelF1ScoreOptimized: typeof novelF1ScoreOptimized;
2507
+ };
2508
+
2398
2509
  declare class AxInstanceRegistry<T> {
2399
2510
  private reg;
2400
2511
  constructor();
@@ -2613,4 +2724,51 @@ declare class AxRAG extends AxChainOfThought<{
2613
2724
  }>;
2614
2725
  }
2615
2726
 
2616
- 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, 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, AxTestPrompt, type AxTokenUsage, type AxTunable, type AxUsable };
2727
+ declare const AxStringUtil: {
2728
+ trimNonAlphaNum: (str: string) => string;
2729
+ splitIntoTwo: (str: string, separator: Readonly<RegExp | string>) => string[];
2730
+ dedup: (seq: readonly string[]) => string[];
2731
+ extractIdAndText: (input: string) => {
2732
+ id: number;
2733
+ text: string;
2734
+ };
2735
+ extractIndexPrefixedText: (input: string) => string;
2736
+ batchArray: <T>(arr: readonly T[], size: number) => T[][];
2737
+ };
2738
+
2739
+ declare const axModelInfoAnthropic: AxModelInfo[];
2740
+
2741
+ declare const axModelInfoCohere: AxModelInfo[];
2742
+
2743
+ declare const axModelInfoDeepSeek: AxModelInfo[];
2744
+
2745
+ /**
2746
+ * AxAIGoogleGemini: Model information
2747
+ */
2748
+ declare const axModelInfoGoogleGemini: AxModelInfo[];
2749
+
2750
+ /**
2751
+ * AxAIGroq: Model information
2752
+ */
2753
+ declare const axModelInfoGroq: AxModelInfo[];
2754
+
2755
+ /**
2756
+ * HuggingFace: Model information
2757
+ */
2758
+ declare const axModelInfoHuggingFace: AxModelInfo[];
2759
+
2760
+ declare const axModelInfoMistral: AxModelInfo[];
2761
+
2762
+ /**
2763
+ * OpenAI: Model information
2764
+ */
2765
+ declare const axModelInfoOpenAI: AxModelInfo[];
2766
+
2767
+ /**
2768
+ * OpenAI: Model information
2769
+ */
2770
+ declare const axModelInfoReka: AxModelInfo[];
2771
+
2772
+ declare const axModelInfoTogether: AxModelInfo[];
2773
+
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 };