@ax-llm/ax 10.0.39 → 10.0.40

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
@@ -1,4 +1,4 @@
1
- import { ReadableStream } from 'stream/web';
1
+ import { ReadableStream as ReadableStream$1 } from 'stream/web';
2
2
  import { Tracer, Span } from '@opentelemetry/api';
3
3
 
4
4
  /**
@@ -176,10 +176,10 @@ type AxEmbedRequest = {
176
176
  embedModel?: string;
177
177
  };
178
178
  type AxInternalEmbedRequest = Omit<AxEmbedRequest, 'embedModel'> & Required<Pick<AxEmbedRequest, 'embedModel'>>;
179
- type AxRateLimiterFunction = <T = unknown>(reqFunc: () => Promise<T | ReadableStream<T>>, info: Readonly<{
179
+ type AxRateLimiterFunction = <T = unknown>(reqFunc: () => Promise<T | ReadableStream$1<T>>, info: Readonly<{
180
180
  modelUsage?: AxTokenUsage;
181
181
  embedModelUsage?: AxTokenUsage;
182
- }>) => Promise<T | ReadableStream<T>>;
182
+ }>) => Promise<T | ReadableStream$1<T>>;
183
183
  type AxAIPromptConfig = {
184
184
  stream?: boolean;
185
185
  };
@@ -205,7 +205,7 @@ interface AxAIService {
205
205
  };
206
206
  getModelMap(): AxAIModelMap | undefined;
207
207
  getMetrics(): AxAIServiceMetrics;
208
- chat(req: Readonly<AxChatRequest>, options?: Readonly<AxAIPromptConfig & AxAIServiceActionOptions>): Promise<AxChatResponse | ReadableStream<AxChatResponse>>;
208
+ chat(req: Readonly<AxChatRequest>, options?: Readonly<AxAIPromptConfig & AxAIServiceActionOptions>): Promise<AxChatResponse | ReadableStream$1<AxChatResponse>>;
209
209
  embed(req: Readonly<AxEmbedRequest>, options?: Readonly<AxAIServiceActionOptions & AxAIServiceActionOptions>): Promise<AxEmbedResponse>;
210
210
  setOptions(options: Readonly<AxAIServiceOptions>): void;
211
211
  getOptions(): Readonly<AxAIServiceOptions>;
@@ -267,7 +267,7 @@ declare class AxBaseAI<TChatRequest, TEmbedRequest, TChatResponse, TChatResponse
267
267
  private updateLatencyMetrics;
268
268
  private updateErrorMetrics;
269
269
  getMetrics(): AxAIServiceMetrics;
270
- chat(req: Readonly<AxChatRequest>, options?: Readonly<AxAIPromptConfig & AxAIServiceActionOptions>): Promise<AxChatResponse | ReadableStream<AxChatResponse>>;
270
+ chat(req: Readonly<AxChatRequest>, options?: Readonly<AxAIPromptConfig & AxAIServiceActionOptions>): Promise<AxChatResponse | ReadableStream$1<AxChatResponse>>;
271
271
  private _chat1;
272
272
  private _chat2;
273
273
  embed(req: Readonly<AxEmbedRequest>, options?: Readonly<AxAIServiceActionOptions>): Promise<AxEmbedResponse>;
@@ -1224,7 +1224,7 @@ declare class AxAI implements AxAIService {
1224
1224
  };
1225
1225
  getModelMap(): AxAIModelMap | undefined;
1226
1226
  getMetrics(): AxAIServiceMetrics;
1227
- chat(req: Readonly<AxChatRequest>, options?: Readonly<AxAIPromptConfig & AxAIServiceActionOptions>): Promise<AxChatResponse | ReadableStream<AxChatResponse>>;
1227
+ chat(req: Readonly<AxChatRequest>, options?: Readonly<AxAIPromptConfig & AxAIServiceActionOptions>): Promise<AxChatResponse | ReadableStream$1<AxChatResponse>>;
1228
1228
  embed(req: Readonly<AxEmbedRequest>, options?: Readonly<AxAIServiceActionOptions & AxAIServiceActionOptions>): Promise<AxEmbedResponse>;
1229
1229
  setOptions(options: Readonly<AxAIServiceOptions>): void;
1230
1230
  getOptions(): Readonly<AxAIServiceOptions>;
@@ -1322,6 +1322,12 @@ type AxProgramForwardOptions = {
1322
1322
  functionCall?: AxChatRequest['functionCall'];
1323
1323
  stopFunction?: string;
1324
1324
  };
1325
+ type AxProgramStreamingForwardOptions = Omit<AxProgramForwardOptions, 'stream'>;
1326
+ type AxGenDeltaOut<OUT> = {
1327
+ version: number;
1328
+ delta: Partial<OUT>;
1329
+ };
1330
+ type AxGenStreamingOut<OUT> = AsyncGenerator<AxGenDeltaOut<OUT>, void | OUT, unknown>;
1325
1331
  interface AxTunable {
1326
1332
  setExamples: (examples: Readonly<AxProgramExamples>) => void;
1327
1333
  setId: (id: string) => void;
@@ -1353,6 +1359,7 @@ declare class AxProgramWithSignature<IN extends AxGenIn, OUT extends AxGenOut> i
1353
1359
  getSignature(): AxSignature;
1354
1360
  register(prog: Readonly<AxTunable & AxUsable>): void;
1355
1361
  forward(_ai: Readonly<AxAIService>, _values: IN, _options?: Readonly<AxProgramForwardOptions>): Promise<OUT>;
1362
+ streamingForward(_ai: Readonly<AxAIService>, _values: IN, _options?: Readonly<AxProgramStreamingForwardOptions>): AxGenStreamingOut<OUT>;
1356
1363
  setId(id: string): void;
1357
1364
  setParentId(parentId: string): void;
1358
1365
  setExamples(examples: Readonly<AxProgramExamples>): void;
@@ -1370,6 +1377,7 @@ declare class AxProgram<IN extends AxGenIn, OUT extends AxGenOut> implements AxT
1370
1377
  constructor();
1371
1378
  register(prog: Readonly<AxTunable & AxUsable>): void;
1372
1379
  forward(_ai: Readonly<AxAIService>, _values: IN, _options?: Readonly<AxProgramForwardOptions>): Promise<OUT>;
1380
+ streamingForward(_ai: Readonly<AxAIService>, _values: IN, _options?: Readonly<AxProgramStreamingForwardOptions>): AxGenStreamingOut<OUT>;
1373
1381
  setId(id: string): void;
1374
1382
  setParentId(parentId: string): void;
1375
1383
  setExamples(examples: Readonly<AxProgramExamples>): void;
@@ -1460,7 +1468,7 @@ declare class AxPromptTemplate {
1460
1468
  examples?: Record<string, AxFieldValue>[];
1461
1469
  demos?: Record<string, AxFieldValue>[];
1462
1470
  }>) => AxChatRequest["chatPrompt"];
1463
- renderExtraFields: (extraFields: readonly AxIField[]) => string | ({
1471
+ renderExtraFields: (extraFields: readonly AxIField[]) => ({
1464
1472
  type: "text";
1465
1473
  text: string;
1466
1474
  cache?: boolean;
@@ -1517,6 +1525,15 @@ interface AxResponseHandlerArgs<T> {
1517
1525
  traceId?: string;
1518
1526
  functions?: Readonly<AxFunction[]>;
1519
1527
  }
1528
+ interface AxStreamingEvent<T> {
1529
+ event: 'delta' | 'done' | 'error';
1530
+ data: {
1531
+ contentDelta?: string;
1532
+ partialValues?: Partial<T>;
1533
+ error?: string;
1534
+ functions?: AxChatResponseFunctionCall[];
1535
+ };
1536
+ }
1520
1537
  declare class AxGen<IN extends AxGenIn = AxGenIn, OUT extends AxGenerateResult<AxGenOut> = AxGenerateResult<AxGenOut>> extends AxProgramWithSignature<IN, OUT> {
1521
1538
  private promptTemplate;
1522
1539
  private asserts;
@@ -1529,10 +1546,19 @@ declare class AxGen<IN extends AxGenIn = AxGenIn, OUT extends AxGenerateResult<A
1529
1546
  addStreamingAssert: (fieldName: string, fn: AxStreamingAssertion["fn"], message?: string, optional?: boolean) => void;
1530
1547
  private forwardSendRequest;
1531
1548
  private forwardCore;
1532
- private processSteamingResponse;
1549
+ private processStreamingResponse;
1533
1550
  private processResponse;
1534
- private _forward;
1551
+ private _forward2;
1552
+ private shouldContinueSteps;
1553
+ _forward1(ai: Readonly<AxAIService>, values: IN, options: Readonly<AxProgramForwardOptions>): AsyncGenerator<{
1554
+ version: number;
1555
+ delta: Partial<OUT>;
1556
+ }, void, unknown>;
1535
1557
  forward(ai: Readonly<AxAIService>, values: IN, options?: Readonly<AxProgramForwardOptions>): Promise<OUT>;
1558
+ streamingForward(ai: Readonly<AxAIService>, values: IN, options?: Readonly<AxProgramStreamingForwardOptions>): AsyncGenerator<{
1559
+ version: number;
1560
+ delta: Partial<OUT>;
1561
+ }, void, unknown>;
1536
1562
  }
1537
1563
 
1538
1564
  interface AxAgentic extends AxTunable, AxUsable {
@@ -1567,7 +1593,9 @@ declare class AxAgent<IN extends AxGenIn, OUT extends AxGenOut> implements AxAge
1567
1593
  })[];
1568
1594
  resetUsage(): void;
1569
1595
  getFunction(): AxFunction;
1596
+ private init;
1570
1597
  forward(ai: Readonly<AxAIService>, values: IN, options?: Readonly<AxProgramForwardOptions>): Promise<OUT>;
1598
+ streamingForward(ai: Readonly<AxAIService>, values: IN, options?: Readonly<AxProgramStreamingForwardOptions>): AxGenStreamingOut<OUT>;
1571
1599
  }
1572
1600
 
1573
1601
  interface AxApacheTikaArgs {
@@ -1621,7 +1649,7 @@ declare class AxBalancer implements AxAIService {
1621
1649
  streaming: boolean;
1622
1650
  };
1623
1651
  getMetrics(): AxAIServiceMetrics;
1624
- chat(req: Readonly<AxChatRequest>, options?: Readonly<AxAIPromptConfig & AxAIServiceActionOptions> | undefined): Promise<AxChatResponse | ReadableStream<AxChatResponse>>;
1652
+ chat(req: Readonly<AxChatRequest>, options?: Readonly<AxAIPromptConfig & AxAIServiceActionOptions> | undefined): Promise<AxChatResponse | ReadableStream$1<AxChatResponse>>;
1625
1653
  embed(req: Readonly<AxEmbedRequest>, options?: Readonly<AxAIServiceActionOptions> | undefined): Promise<AxEmbedResponse>;
1626
1654
  setOptions(options: Readonly<AxAIServiceOptions>): void;
1627
1655
  getOptions(): Readonly<AxAIServiceOptions>;
@@ -2096,6 +2124,41 @@ declare class AxInstanceRegistry<T> {
2096
2124
  [Symbol.iterator](): Generator<T, void, unknown>;
2097
2125
  }
2098
2126
 
2127
+ declare class AxMockAIService implements AxAIService {
2128
+ private readonly config;
2129
+ private options;
2130
+ private metrics;
2131
+ constructor(config?: {
2132
+ name?: string;
2133
+ modelInfo?: Partial<AxModelInfoWithProvider>;
2134
+ embedModelInfo?: AxModelInfoWithProvider;
2135
+ features?: {
2136
+ functions?: boolean;
2137
+ streaming?: boolean;
2138
+ };
2139
+ modelMap?: AxAIModelMap;
2140
+ chatResponse?: AxChatResponse | ((req: Readonly<AxChatRequest>) => AxChatResponse | Promise<AxChatResponse>);
2141
+ embedResponse?: AxEmbedResponse | ((req: Readonly<AxEmbedRequest>) => AxEmbedResponse | Promise<AxEmbedResponse>);
2142
+ shouldError?: boolean;
2143
+ errorMessage?: string;
2144
+ latencyMs?: number;
2145
+ });
2146
+ getName(): string;
2147
+ getModelInfo(): Readonly<AxModelInfoWithProvider>;
2148
+ getEmbedModelInfo(): Readonly<AxModelInfoWithProvider> | undefined;
2149
+ getFeatures(_model?: string): {
2150
+ functions: boolean;
2151
+ streaming: boolean;
2152
+ };
2153
+ getModelMap(): AxAIModelMap | undefined;
2154
+ getMetrics(): AxAIServiceMetrics;
2155
+ chat(req: Readonly<AxChatRequest>, _options?: Readonly<AxAIPromptConfig & AxAIServiceActionOptions>): Promise<AxChatResponse | ReadableStream<AxChatResponse>>;
2156
+ embed(req: Readonly<AxEmbedRequest>, _options?: Readonly<AxAIServiceActionOptions>): Promise<AxEmbedResponse>;
2157
+ setOptions(options: Readonly<AxAIServiceOptions>): void;
2158
+ getOptions(): Readonly<AxAIServiceOptions>;
2159
+ private updateMetrics;
2160
+ }
2161
+
2099
2162
  declare class AxRAG extends AxChainOfThought<{
2100
2163
  context: string[];
2101
2164
  question: string;
@@ -2116,4 +2179,4 @@ declare class AxRAG extends AxChainOfThought<{
2116
2179
  }>;
2117
2180
  }
2118
2181
 
2119
- 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, type AxAIArgs, AxAIAzureOpenAI, type AxAIAzureOpenAIArgs, 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, 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 AxAIMemory, AxAIMistral, type AxAIMistralArgs, AxAIMistralEmbedModels, AxAIMistralModel, type AxAIModelMap, type AxAIModels, AxAIOllama, type AxAIOllamaAIConfig, type AxAIOllamaArgs, AxAIOpenAI, type AxAIOpenAIArgs, 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, type AxAIServiceImpl, type AxAIServiceMetrics, type AxAIServiceOptions, AxAITogether, type AxAITogetherArgs, type AxAPI, AxAgent, type AxAgentOptions, type AxAgentic, AxApacheTika, type AxApacheTikaArgs, type AxApacheTikaConvertOptions, type AxAssertion, AxAssertionError, AxBalancer, type AxBalancerOptions, AxBaseAI, type AxBaseAIArgs, type AxBaseAIFeatures, 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 AxFieldTemplateFn, type AxFieldValue, type AxFunction, type AxFunctionExec, type AxFunctionHandler, type AxFunctionJSONSchema, AxFunctionProcessor, AxGen, type AxGenIn, type AxGenOptions, type AxGenOut, type AxGenerateResult, AxHFDataLoader, type AxIField, type AxInputFunctionType, AxInstanceRegistry, type AxInternalChatRequest, type AxInternalEmbedRequest, AxJSInterpreter, AxJSInterpreterPermission, AxLLMRequestTypeValues, AxMemory, type AxMetricFn, type AxMetricFnArgs, type AxModelConfig, type AxModelInfo, type AxModelInfoWithProvider, type AxOptimizerArgs, AxProgram, type AxProgramDemos, type AxProgramExamples, type AxProgramForwardOptions, type AxProgramTrace, type AxProgramUsage, AxProgramWithSignature, type AxProgramWithSignatureOptions, AxPromptTemplate, AxRAG, type AxRateLimiterFunction, AxRateLimiterTokenUsage, type AxRateLimiterTokenUsageOptions, type AxRerankerIn, type AxRerankerOut, type AxResponseHandlerArgs, type AxRewriteIn, type AxRewriteOut, AxRoute, AxRouter, type AxRouterForwardOptions, AxSignature, AxSpanKindValues, type AxStreamingAssertion, AxTestPrompt, type AxTokenUsage, type AxTunable, type AxUsable };
2182
+ 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, type AxAIArgs, AxAIAzureOpenAI, type AxAIAzureOpenAIArgs, 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, 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 AxAIMemory, AxAIMistral, type AxAIMistralArgs, AxAIMistralEmbedModels, AxAIMistralModel, type AxAIModelMap, type AxAIModels, AxAIOllama, type AxAIOllamaAIConfig, type AxAIOllamaArgs, AxAIOpenAI, type AxAIOpenAIArgs, 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, type AxAIServiceImpl, type AxAIServiceMetrics, type AxAIServiceOptions, AxAITogether, type AxAITogetherArgs, type AxAPI, AxAgent, type AxAgentOptions, type AxAgentic, AxApacheTika, type AxApacheTikaArgs, type AxApacheTikaConvertOptions, type AxAssertion, AxAssertionError, AxBalancer, type AxBalancerOptions, AxBaseAI, type AxBaseAIArgs, type AxBaseAIFeatures, 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 AxFieldTemplateFn, type AxFieldValue, type AxFunction, type AxFunctionExec, 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, AxMemory, type AxMetricFn, type AxMetricFnArgs, AxMockAIService, type AxModelConfig, type AxModelInfo, type AxModelInfoWithProvider, 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, AxRoute, AxRouter, type AxRouterForwardOptions, AxSignature, AxSpanKindValues, type AxStreamingAssertion, type AxStreamingEvent, AxTestPrompt, type AxTokenUsage, type AxTunable, type AxUsable };
package/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { ReadableStream } from 'stream/web';
1
+ import { ReadableStream as ReadableStream$1 } from 'stream/web';
2
2
  import { Tracer, Span } from '@opentelemetry/api';
3
3
 
4
4
  /**
@@ -176,10 +176,10 @@ type AxEmbedRequest = {
176
176
  embedModel?: string;
177
177
  };
178
178
  type AxInternalEmbedRequest = Omit<AxEmbedRequest, 'embedModel'> & Required<Pick<AxEmbedRequest, 'embedModel'>>;
179
- type AxRateLimiterFunction = <T = unknown>(reqFunc: () => Promise<T | ReadableStream<T>>, info: Readonly<{
179
+ type AxRateLimiterFunction = <T = unknown>(reqFunc: () => Promise<T | ReadableStream$1<T>>, info: Readonly<{
180
180
  modelUsage?: AxTokenUsage;
181
181
  embedModelUsage?: AxTokenUsage;
182
- }>) => Promise<T | ReadableStream<T>>;
182
+ }>) => Promise<T | ReadableStream$1<T>>;
183
183
  type AxAIPromptConfig = {
184
184
  stream?: boolean;
185
185
  };
@@ -205,7 +205,7 @@ interface AxAIService {
205
205
  };
206
206
  getModelMap(): AxAIModelMap | undefined;
207
207
  getMetrics(): AxAIServiceMetrics;
208
- chat(req: Readonly<AxChatRequest>, options?: Readonly<AxAIPromptConfig & AxAIServiceActionOptions>): Promise<AxChatResponse | ReadableStream<AxChatResponse>>;
208
+ chat(req: Readonly<AxChatRequest>, options?: Readonly<AxAIPromptConfig & AxAIServiceActionOptions>): Promise<AxChatResponse | ReadableStream$1<AxChatResponse>>;
209
209
  embed(req: Readonly<AxEmbedRequest>, options?: Readonly<AxAIServiceActionOptions & AxAIServiceActionOptions>): Promise<AxEmbedResponse>;
210
210
  setOptions(options: Readonly<AxAIServiceOptions>): void;
211
211
  getOptions(): Readonly<AxAIServiceOptions>;
@@ -267,7 +267,7 @@ declare class AxBaseAI<TChatRequest, TEmbedRequest, TChatResponse, TChatResponse
267
267
  private updateLatencyMetrics;
268
268
  private updateErrorMetrics;
269
269
  getMetrics(): AxAIServiceMetrics;
270
- chat(req: Readonly<AxChatRequest>, options?: Readonly<AxAIPromptConfig & AxAIServiceActionOptions>): Promise<AxChatResponse | ReadableStream<AxChatResponse>>;
270
+ chat(req: Readonly<AxChatRequest>, options?: Readonly<AxAIPromptConfig & AxAIServiceActionOptions>): Promise<AxChatResponse | ReadableStream$1<AxChatResponse>>;
271
271
  private _chat1;
272
272
  private _chat2;
273
273
  embed(req: Readonly<AxEmbedRequest>, options?: Readonly<AxAIServiceActionOptions>): Promise<AxEmbedResponse>;
@@ -1224,7 +1224,7 @@ declare class AxAI implements AxAIService {
1224
1224
  };
1225
1225
  getModelMap(): AxAIModelMap | undefined;
1226
1226
  getMetrics(): AxAIServiceMetrics;
1227
- chat(req: Readonly<AxChatRequest>, options?: Readonly<AxAIPromptConfig & AxAIServiceActionOptions>): Promise<AxChatResponse | ReadableStream<AxChatResponse>>;
1227
+ chat(req: Readonly<AxChatRequest>, options?: Readonly<AxAIPromptConfig & AxAIServiceActionOptions>): Promise<AxChatResponse | ReadableStream$1<AxChatResponse>>;
1228
1228
  embed(req: Readonly<AxEmbedRequest>, options?: Readonly<AxAIServiceActionOptions & AxAIServiceActionOptions>): Promise<AxEmbedResponse>;
1229
1229
  setOptions(options: Readonly<AxAIServiceOptions>): void;
1230
1230
  getOptions(): Readonly<AxAIServiceOptions>;
@@ -1322,6 +1322,12 @@ type AxProgramForwardOptions = {
1322
1322
  functionCall?: AxChatRequest['functionCall'];
1323
1323
  stopFunction?: string;
1324
1324
  };
1325
+ type AxProgramStreamingForwardOptions = Omit<AxProgramForwardOptions, 'stream'>;
1326
+ type AxGenDeltaOut<OUT> = {
1327
+ version: number;
1328
+ delta: Partial<OUT>;
1329
+ };
1330
+ type AxGenStreamingOut<OUT> = AsyncGenerator<AxGenDeltaOut<OUT>, void | OUT, unknown>;
1325
1331
  interface AxTunable {
1326
1332
  setExamples: (examples: Readonly<AxProgramExamples>) => void;
1327
1333
  setId: (id: string) => void;
@@ -1353,6 +1359,7 @@ declare class AxProgramWithSignature<IN extends AxGenIn, OUT extends AxGenOut> i
1353
1359
  getSignature(): AxSignature;
1354
1360
  register(prog: Readonly<AxTunable & AxUsable>): void;
1355
1361
  forward(_ai: Readonly<AxAIService>, _values: IN, _options?: Readonly<AxProgramForwardOptions>): Promise<OUT>;
1362
+ streamingForward(_ai: Readonly<AxAIService>, _values: IN, _options?: Readonly<AxProgramStreamingForwardOptions>): AxGenStreamingOut<OUT>;
1356
1363
  setId(id: string): void;
1357
1364
  setParentId(parentId: string): void;
1358
1365
  setExamples(examples: Readonly<AxProgramExamples>): void;
@@ -1370,6 +1377,7 @@ declare class AxProgram<IN extends AxGenIn, OUT extends AxGenOut> implements AxT
1370
1377
  constructor();
1371
1378
  register(prog: Readonly<AxTunable & AxUsable>): void;
1372
1379
  forward(_ai: Readonly<AxAIService>, _values: IN, _options?: Readonly<AxProgramForwardOptions>): Promise<OUT>;
1380
+ streamingForward(_ai: Readonly<AxAIService>, _values: IN, _options?: Readonly<AxProgramStreamingForwardOptions>): AxGenStreamingOut<OUT>;
1373
1381
  setId(id: string): void;
1374
1382
  setParentId(parentId: string): void;
1375
1383
  setExamples(examples: Readonly<AxProgramExamples>): void;
@@ -1460,7 +1468,7 @@ declare class AxPromptTemplate {
1460
1468
  examples?: Record<string, AxFieldValue>[];
1461
1469
  demos?: Record<string, AxFieldValue>[];
1462
1470
  }>) => AxChatRequest["chatPrompt"];
1463
- renderExtraFields: (extraFields: readonly AxIField[]) => string | ({
1471
+ renderExtraFields: (extraFields: readonly AxIField[]) => ({
1464
1472
  type: "text";
1465
1473
  text: string;
1466
1474
  cache?: boolean;
@@ -1517,6 +1525,15 @@ interface AxResponseHandlerArgs<T> {
1517
1525
  traceId?: string;
1518
1526
  functions?: Readonly<AxFunction[]>;
1519
1527
  }
1528
+ interface AxStreamingEvent<T> {
1529
+ event: 'delta' | 'done' | 'error';
1530
+ data: {
1531
+ contentDelta?: string;
1532
+ partialValues?: Partial<T>;
1533
+ error?: string;
1534
+ functions?: AxChatResponseFunctionCall[];
1535
+ };
1536
+ }
1520
1537
  declare class AxGen<IN extends AxGenIn = AxGenIn, OUT extends AxGenerateResult<AxGenOut> = AxGenerateResult<AxGenOut>> extends AxProgramWithSignature<IN, OUT> {
1521
1538
  private promptTemplate;
1522
1539
  private asserts;
@@ -1529,10 +1546,19 @@ declare class AxGen<IN extends AxGenIn = AxGenIn, OUT extends AxGenerateResult<A
1529
1546
  addStreamingAssert: (fieldName: string, fn: AxStreamingAssertion["fn"], message?: string, optional?: boolean) => void;
1530
1547
  private forwardSendRequest;
1531
1548
  private forwardCore;
1532
- private processSteamingResponse;
1549
+ private processStreamingResponse;
1533
1550
  private processResponse;
1534
- private _forward;
1551
+ private _forward2;
1552
+ private shouldContinueSteps;
1553
+ _forward1(ai: Readonly<AxAIService>, values: IN, options: Readonly<AxProgramForwardOptions>): AsyncGenerator<{
1554
+ version: number;
1555
+ delta: Partial<OUT>;
1556
+ }, void, unknown>;
1535
1557
  forward(ai: Readonly<AxAIService>, values: IN, options?: Readonly<AxProgramForwardOptions>): Promise<OUT>;
1558
+ streamingForward(ai: Readonly<AxAIService>, values: IN, options?: Readonly<AxProgramStreamingForwardOptions>): AsyncGenerator<{
1559
+ version: number;
1560
+ delta: Partial<OUT>;
1561
+ }, void, unknown>;
1536
1562
  }
1537
1563
 
1538
1564
  interface AxAgentic extends AxTunable, AxUsable {
@@ -1567,7 +1593,9 @@ declare class AxAgent<IN extends AxGenIn, OUT extends AxGenOut> implements AxAge
1567
1593
  })[];
1568
1594
  resetUsage(): void;
1569
1595
  getFunction(): AxFunction;
1596
+ private init;
1570
1597
  forward(ai: Readonly<AxAIService>, values: IN, options?: Readonly<AxProgramForwardOptions>): Promise<OUT>;
1598
+ streamingForward(ai: Readonly<AxAIService>, values: IN, options?: Readonly<AxProgramStreamingForwardOptions>): AxGenStreamingOut<OUT>;
1571
1599
  }
1572
1600
 
1573
1601
  interface AxApacheTikaArgs {
@@ -1621,7 +1649,7 @@ declare class AxBalancer implements AxAIService {
1621
1649
  streaming: boolean;
1622
1650
  };
1623
1651
  getMetrics(): AxAIServiceMetrics;
1624
- chat(req: Readonly<AxChatRequest>, options?: Readonly<AxAIPromptConfig & AxAIServiceActionOptions> | undefined): Promise<AxChatResponse | ReadableStream<AxChatResponse>>;
1652
+ chat(req: Readonly<AxChatRequest>, options?: Readonly<AxAIPromptConfig & AxAIServiceActionOptions> | undefined): Promise<AxChatResponse | ReadableStream$1<AxChatResponse>>;
1625
1653
  embed(req: Readonly<AxEmbedRequest>, options?: Readonly<AxAIServiceActionOptions> | undefined): Promise<AxEmbedResponse>;
1626
1654
  setOptions(options: Readonly<AxAIServiceOptions>): void;
1627
1655
  getOptions(): Readonly<AxAIServiceOptions>;
@@ -2096,6 +2124,41 @@ declare class AxInstanceRegistry<T> {
2096
2124
  [Symbol.iterator](): Generator<T, void, unknown>;
2097
2125
  }
2098
2126
 
2127
+ declare class AxMockAIService implements AxAIService {
2128
+ private readonly config;
2129
+ private options;
2130
+ private metrics;
2131
+ constructor(config?: {
2132
+ name?: string;
2133
+ modelInfo?: Partial<AxModelInfoWithProvider>;
2134
+ embedModelInfo?: AxModelInfoWithProvider;
2135
+ features?: {
2136
+ functions?: boolean;
2137
+ streaming?: boolean;
2138
+ };
2139
+ modelMap?: AxAIModelMap;
2140
+ chatResponse?: AxChatResponse | ((req: Readonly<AxChatRequest>) => AxChatResponse | Promise<AxChatResponse>);
2141
+ embedResponse?: AxEmbedResponse | ((req: Readonly<AxEmbedRequest>) => AxEmbedResponse | Promise<AxEmbedResponse>);
2142
+ shouldError?: boolean;
2143
+ errorMessage?: string;
2144
+ latencyMs?: number;
2145
+ });
2146
+ getName(): string;
2147
+ getModelInfo(): Readonly<AxModelInfoWithProvider>;
2148
+ getEmbedModelInfo(): Readonly<AxModelInfoWithProvider> | undefined;
2149
+ getFeatures(_model?: string): {
2150
+ functions: boolean;
2151
+ streaming: boolean;
2152
+ };
2153
+ getModelMap(): AxAIModelMap | undefined;
2154
+ getMetrics(): AxAIServiceMetrics;
2155
+ chat(req: Readonly<AxChatRequest>, _options?: Readonly<AxAIPromptConfig & AxAIServiceActionOptions>): Promise<AxChatResponse | ReadableStream<AxChatResponse>>;
2156
+ embed(req: Readonly<AxEmbedRequest>, _options?: Readonly<AxAIServiceActionOptions>): Promise<AxEmbedResponse>;
2157
+ setOptions(options: Readonly<AxAIServiceOptions>): void;
2158
+ getOptions(): Readonly<AxAIServiceOptions>;
2159
+ private updateMetrics;
2160
+ }
2161
+
2099
2162
  declare class AxRAG extends AxChainOfThought<{
2100
2163
  context: string[];
2101
2164
  question: string;
@@ -2116,4 +2179,4 @@ declare class AxRAG extends AxChainOfThought<{
2116
2179
  }>;
2117
2180
  }
2118
2181
 
2119
- 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, type AxAIArgs, AxAIAzureOpenAI, type AxAIAzureOpenAIArgs, 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, 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 AxAIMemory, AxAIMistral, type AxAIMistralArgs, AxAIMistralEmbedModels, AxAIMistralModel, type AxAIModelMap, type AxAIModels, AxAIOllama, type AxAIOllamaAIConfig, type AxAIOllamaArgs, AxAIOpenAI, type AxAIOpenAIArgs, 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, type AxAIServiceImpl, type AxAIServiceMetrics, type AxAIServiceOptions, AxAITogether, type AxAITogetherArgs, type AxAPI, AxAgent, type AxAgentOptions, type AxAgentic, AxApacheTika, type AxApacheTikaArgs, type AxApacheTikaConvertOptions, type AxAssertion, AxAssertionError, AxBalancer, type AxBalancerOptions, AxBaseAI, type AxBaseAIArgs, type AxBaseAIFeatures, 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 AxFieldTemplateFn, type AxFieldValue, type AxFunction, type AxFunctionExec, type AxFunctionHandler, type AxFunctionJSONSchema, AxFunctionProcessor, AxGen, type AxGenIn, type AxGenOptions, type AxGenOut, type AxGenerateResult, AxHFDataLoader, type AxIField, type AxInputFunctionType, AxInstanceRegistry, type AxInternalChatRequest, type AxInternalEmbedRequest, AxJSInterpreter, AxJSInterpreterPermission, AxLLMRequestTypeValues, AxMemory, type AxMetricFn, type AxMetricFnArgs, type AxModelConfig, type AxModelInfo, type AxModelInfoWithProvider, type AxOptimizerArgs, AxProgram, type AxProgramDemos, type AxProgramExamples, type AxProgramForwardOptions, type AxProgramTrace, type AxProgramUsage, AxProgramWithSignature, type AxProgramWithSignatureOptions, AxPromptTemplate, AxRAG, type AxRateLimiterFunction, AxRateLimiterTokenUsage, type AxRateLimiterTokenUsageOptions, type AxRerankerIn, type AxRerankerOut, type AxResponseHandlerArgs, type AxRewriteIn, type AxRewriteOut, AxRoute, AxRouter, type AxRouterForwardOptions, AxSignature, AxSpanKindValues, type AxStreamingAssertion, AxTestPrompt, type AxTokenUsage, type AxTunable, type AxUsable };
2182
+ 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, type AxAIArgs, AxAIAzureOpenAI, type AxAIAzureOpenAIArgs, 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, 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 AxAIMemory, AxAIMistral, type AxAIMistralArgs, AxAIMistralEmbedModels, AxAIMistralModel, type AxAIModelMap, type AxAIModels, AxAIOllama, type AxAIOllamaAIConfig, type AxAIOllamaArgs, AxAIOpenAI, type AxAIOpenAIArgs, 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, type AxAIServiceImpl, type AxAIServiceMetrics, type AxAIServiceOptions, AxAITogether, type AxAITogetherArgs, type AxAPI, AxAgent, type AxAgentOptions, type AxAgentic, AxApacheTika, type AxApacheTikaArgs, type AxApacheTikaConvertOptions, type AxAssertion, AxAssertionError, AxBalancer, type AxBalancerOptions, AxBaseAI, type AxBaseAIArgs, type AxBaseAIFeatures, 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 AxFieldTemplateFn, type AxFieldValue, type AxFunction, type AxFunctionExec, 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, AxMemory, type AxMetricFn, type AxMetricFnArgs, AxMockAIService, type AxModelConfig, type AxModelInfo, type AxModelInfoWithProvider, 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, AxRoute, AxRouter, type AxRouterForwardOptions, AxSignature, AxSpanKindValues, type AxStreamingAssertion, type AxStreamingEvent, AxTestPrompt, type AxTokenUsage, type AxTunable, type AxUsable };