@ax-llm/ax 11.0.16 → 11.0.18

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
@@ -36,7 +36,6 @@ declare class AxAIServiceError extends Error {
36
36
  readonly context: Record<string, unknown>;
37
37
  constructor(message: string, url: string, requestBody?: unknown | undefined, context?: Record<string, unknown>);
38
38
  toString(): string;
39
- toJSON(): Record<string, unknown>;
40
39
  }
41
40
  declare class AxAIServiceStatusError extends AxAIServiceError {
42
41
  readonly status: number;
@@ -94,6 +93,8 @@ type AxModelConfig = {
94
93
  type AxFunctionHandler = (args?: any, extra?: Readonly<{
95
94
  sessionId?: string;
96
95
  traceId?: string;
96
+ debug?: boolean;
97
+ ai?: AxAIService;
97
98
  }>) => unknown;
98
99
  type AxFunctionJSONSchema = {
99
100
  type: string;
@@ -141,7 +142,7 @@ type AxModelInfoWithProvider = AxModelInfo & {
141
142
  provider: string;
142
143
  };
143
144
  type AxChatRequest<TModel = string> = {
144
- chatPrompt: Readonly<{
145
+ chatPrompt: ({
145
146
  role: 'system';
146
147
  content: string;
147
148
  cache?: boolean;
@@ -183,7 +184,7 @@ type AxChatRequest<TModel = string> = {
183
184
  isError?: boolean;
184
185
  functionId: string;
185
186
  cache?: boolean;
186
- }>[];
187
+ })[];
187
188
  functions?: Readonly<{
188
189
  name: string;
189
190
  description: string;
@@ -195,7 +196,7 @@ type AxChatRequest<TModel = string> = {
195
196
  name: string;
196
197
  };
197
198
  };
198
- modelConfig?: Readonly<AxModelConfig>;
199
+ modelConfig?: AxModelConfig;
199
200
  model?: TModel;
200
201
  };
201
202
  interface AxAIServiceMetrics {
@@ -250,6 +251,7 @@ type AxAIServiceActionOptions<TModel = unknown, TEmbedModel = unknown> = {
250
251
  sessionId?: string;
251
252
  traceId?: string;
252
253
  rateLimiter?: AxRateLimiterFunction;
254
+ debug?: boolean;
253
255
  };
254
256
  interface AxAIService<TModel = unknown, TEmbedModel = unknown> {
255
257
  getId(): string;
@@ -1285,12 +1287,17 @@ declare class AxAI implements AxAIService {
1285
1287
  }
1286
1288
 
1287
1289
  interface AxAIMemory {
1288
- add(result: Readonly<AxChatRequest['chatPrompt'] | AxChatRequest['chatPrompt'][0]>, sessionId?: string): void;
1290
+ add(result: Readonly<AxChatRequest['chatPrompt']> | Readonly<AxChatRequest['chatPrompt'][number]>, sessionId?: string): void;
1289
1291
  addResult(result: Readonly<AxChatResponseResult>, sessionId?: string): void;
1290
- updateResult(result: Readonly<AxChatResponseResult>, sessionId?: string): void;
1292
+ updateResult(result: Readonly<AxChatResponseResult> & {
1293
+ delta?: string;
1294
+ }, sessionId?: string): void;
1291
1295
  history(sessionId?: string): AxChatRequest['chatPrompt'];
1292
1296
  reset(sessionId?: string): void;
1293
- getLast(sessionId?: string): AxChatRequest['chatPrompt'][0] | undefined;
1297
+ getLast(sessionId?: string): {
1298
+ chat: AxChatRequest['chatPrompt'][number];
1299
+ tags?: string[];
1300
+ } | undefined;
1294
1301
  addTag(name: string, sessionId?: string): void;
1295
1302
  rewindToTag(name: string, sessionId?: string): AxChatRequest['chatPrompt'];
1296
1303
  }
@@ -1300,7 +1307,7 @@ interface AxField {
1300
1307
  title?: string;
1301
1308
  description?: string;
1302
1309
  type?: {
1303
- name: 'string' | 'number' | 'boolean' | 'json' | 'image' | 'audio' | 'date' | 'datetime' | 'class';
1310
+ name: 'string' | 'number' | 'boolean' | 'json' | 'image' | 'audio' | 'date' | 'datetime' | 'class' | 'code';
1304
1311
  isArray: boolean;
1305
1312
  classes?: string[];
1306
1313
  };
@@ -1375,7 +1382,8 @@ type AxProgramForwardOptions = {
1375
1382
  functions?: AxFunction[];
1376
1383
  functionCall?: AxChatRequest['functionCall'];
1377
1384
  stopFunction?: string;
1378
- earlyFail?: boolean;
1385
+ fastFail?: boolean;
1386
+ debug?: boolean;
1379
1387
  };
1380
1388
  type AxProgramStreamingForwardOptions = Omit<AxProgramForwardOptions, 'stream'>;
1381
1389
  type AxGenDeltaOut<OUT> = {
@@ -1462,19 +1470,122 @@ declare class AxAssertionError extends Error {
1462
1470
  }[];
1463
1471
  }
1464
1472
 
1473
+ interface AxFieldProcessor {
1474
+ field: Readonly<AxField>;
1475
+ /**
1476
+ * Process the field value and return a new value (or undefined if no update is needed).
1477
+ * The returned value may be merged back into memory.
1478
+ * @param value - The current field value.
1479
+ * @param context - Additional context (e.g. memory and session id).
1480
+ */
1481
+ process: (value: AxFieldValue, context?: Readonly<{
1482
+ values?: AxGenOut;
1483
+ sessionId?: string;
1484
+ done?: boolean;
1485
+ }>) => any | Promise<any>;
1486
+ }
1487
+
1465
1488
  declare class AxMemory implements AxAIMemory {
1466
1489
  private limit;
1490
+ private debug;
1467
1491
  private memories;
1468
1492
  private defaultMemory;
1469
- constructor(limit?: number);
1493
+ constructor(limit?: number, debug?: boolean);
1470
1494
  private getMemory;
1471
- add(value: Readonly<AxChatRequest['chatPrompt'][0] | AxChatRequest['chatPrompt']>, sessionId?: string): void;
1495
+ add(value: AxChatRequest['chatPrompt'][number] | AxChatRequest['chatPrompt'], sessionId?: string): void;
1472
1496
  addResult(result: Readonly<AxChatResponseResult>, sessionId?: string): void;
1473
1497
  updateResult(result: Readonly<AxChatResponseResult>, sessionId?: string): void;
1474
1498
  addTag(name: string, sessionId?: string): void;
1475
- rewindToTag(name: string, sessionId?: string): AxChatRequest['chatPrompt'];
1476
- history(sessionId?: string): AxChatRequest['chatPrompt'];
1477
- getLast(sessionId?: string): AxChatRequest['chatPrompt'][0] | undefined;
1499
+ rewindToTag(name: string, sessionId?: string): ({
1500
+ role: "system";
1501
+ content: string;
1502
+ cache?: boolean;
1503
+ } | {
1504
+ role: "user";
1505
+ name?: string;
1506
+ content: string | ({
1507
+ type: "text";
1508
+ text: string;
1509
+ cache?: boolean;
1510
+ } | {
1511
+ type: "image";
1512
+ mimeType: string;
1513
+ image: string;
1514
+ details?: "high" | "low" | "auto";
1515
+ cache?: boolean;
1516
+ } | {
1517
+ type: "audio";
1518
+ data: string;
1519
+ format?: "wav";
1520
+ cache?: boolean;
1521
+ })[];
1522
+ } | {
1523
+ role: "assistant";
1524
+ content?: string;
1525
+ name?: string;
1526
+ functionCalls?: {
1527
+ id: string;
1528
+ type: "function";
1529
+ function: {
1530
+ name: string;
1531
+ params?: string | object;
1532
+ };
1533
+ }[];
1534
+ cache?: boolean;
1535
+ } | {
1536
+ role: "function";
1537
+ result: string;
1538
+ isError?: boolean;
1539
+ functionId: string;
1540
+ cache?: boolean;
1541
+ })[];
1542
+ history(sessionId?: string): ({
1543
+ role: "system";
1544
+ content: string;
1545
+ cache?: boolean;
1546
+ } | {
1547
+ role: "user";
1548
+ name?: string;
1549
+ content: string | ({
1550
+ type: "text";
1551
+ text: string;
1552
+ cache?: boolean;
1553
+ } | {
1554
+ type: "image";
1555
+ mimeType: string;
1556
+ image: string;
1557
+ details?: "high" | "low" | "auto";
1558
+ cache?: boolean;
1559
+ } | {
1560
+ type: "audio";
1561
+ data: string;
1562
+ format?: "wav";
1563
+ cache?: boolean;
1564
+ })[];
1565
+ } | {
1566
+ role: "assistant";
1567
+ content?: string;
1568
+ name?: string;
1569
+ functionCalls?: {
1570
+ id: string;
1571
+ type: "function";
1572
+ function: {
1573
+ name: string;
1574
+ params?: string | object;
1575
+ };
1576
+ }[];
1577
+ cache?: boolean;
1578
+ } | {
1579
+ role: "function";
1580
+ result: string;
1581
+ isError?: boolean;
1582
+ functionId: string;
1583
+ cache?: boolean;
1584
+ })[];
1585
+ getLast(sessionId?: string): {
1586
+ chat: AxChatRequest["chatPrompt"][number];
1587
+ tags?: string[];
1588
+ } | undefined;
1478
1589
  reset(sessionId?: string): void;
1479
1590
  }
1480
1591
 
@@ -1543,8 +1654,6 @@ declare class AxPromptTemplate {
1543
1654
  private renderInputFields;
1544
1655
  private renderInField;
1545
1656
  private defaultRenderInField;
1546
- private renderDescFields;
1547
- private renderFields;
1548
1657
  }
1549
1658
 
1550
1659
  interface AxGenOptions {
@@ -1562,6 +1671,7 @@ interface AxGenOptions {
1562
1671
  promptTemplate?: typeof AxPromptTemplate;
1563
1672
  asserts?: AxAssertion[];
1564
1673
  streamingAsserts?: AxStreamingAssertion[];
1674
+ fastFail?: boolean;
1565
1675
  }
1566
1676
  type AxGenerateResult<OUT extends AxGenOut> = OUT & {
1567
1677
  functions?: AxChatResponseFunctionCall[];
@@ -1578,7 +1688,7 @@ interface AxResponseHandlerArgs<T> {
1578
1688
  sessionId?: string;
1579
1689
  traceId?: string;
1580
1690
  functions?: Readonly<AxFunction[]>;
1581
- earlyFail?: boolean;
1691
+ fastFail?: boolean;
1582
1692
  }
1583
1693
  interface AxStreamingEvent<T> {
1584
1694
  event: 'delta' | 'done' | 'error';
@@ -1596,9 +1706,12 @@ declare class AxGen<IN extends AxGenIn = AxGenIn, OUT extends AxGenerateResult<A
1596
1706
  private options?;
1597
1707
  private functions?;
1598
1708
  private functionsExecuted;
1709
+ private fieldProcessors;
1710
+ private streamingFieldProcessors;
1599
1711
  constructor(signature: Readonly<AxSignature | string>, options?: Readonly<AxGenOptions>);
1600
1712
  addAssert: (fn: AxAssertion["fn"], message?: string) => void;
1601
1713
  addStreamingAssert: (fieldName: string, fn: AxStreamingAssertion["fn"], message?: string) => void;
1714
+ addFieldProcessor: (fieldName: string, fn: AxFieldProcessor["process"], streaming?: boolean) => void;
1602
1715
  private forwardSendRequest;
1603
1716
  private forwardCore;
1604
1717
  private processStreamingResponse;
@@ -1628,6 +1741,7 @@ type AxAgentOptions = Omit<AxGenOptions, 'functions'> & {
1628
1741
  disableSmartModelRouting?: boolean;
1629
1742
  /** List of field names that should not be automatically passed from parent to child agents */
1630
1743
  excludeFieldsFromPassthrough?: string[];
1744
+ debug?: boolean;
1631
1745
  };
1632
1746
  interface AxAgentFeatures {
1633
1747
  /** Whether this agent can use smart model routing (requires an AI service) */
@@ -1646,6 +1760,7 @@ declare class AxAgent<IN extends AxGenIn, OUT extends AxGenOut = AxGenOut> imple
1646
1760
  private agents?;
1647
1761
  private disableSmartModelRouting?;
1648
1762
  private excludeFieldsFromPassthrough;
1763
+ private debug?;
1649
1764
  private name;
1650
1765
  private func;
1651
1766
  constructor({ ai, name, description, definition, signature, agents, functions, }: Readonly<{
@@ -1684,6 +1799,7 @@ declare class AxAgent<IN extends AxGenIn, OUT extends AxGenOut = AxGenOut> imple
1684
1799
  */
1685
1800
  setDescription(description: string): void;
1686
1801
  setDefinition(definition: string): void;
1802
+ private getDebug;
1687
1803
  }
1688
1804
 
1689
1805
  interface AxApacheTikaArgs {
@@ -2279,4 +2395,4 @@ declare class AxRAG extends AxChainOfThought<{
2279
2395
  }>;
2280
2396
  }
2281
2397
 
2282
- 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 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 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, 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 };
2398
+ 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 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 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, 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
@@ -36,7 +36,6 @@ declare class AxAIServiceError extends Error {
36
36
  readonly context: Record<string, unknown>;
37
37
  constructor(message: string, url: string, requestBody?: unknown | undefined, context?: Record<string, unknown>);
38
38
  toString(): string;
39
- toJSON(): Record<string, unknown>;
40
39
  }
41
40
  declare class AxAIServiceStatusError extends AxAIServiceError {
42
41
  readonly status: number;
@@ -94,6 +93,8 @@ type AxModelConfig = {
94
93
  type AxFunctionHandler = (args?: any, extra?: Readonly<{
95
94
  sessionId?: string;
96
95
  traceId?: string;
96
+ debug?: boolean;
97
+ ai?: AxAIService;
97
98
  }>) => unknown;
98
99
  type AxFunctionJSONSchema = {
99
100
  type: string;
@@ -141,7 +142,7 @@ type AxModelInfoWithProvider = AxModelInfo & {
141
142
  provider: string;
142
143
  };
143
144
  type AxChatRequest<TModel = string> = {
144
- chatPrompt: Readonly<{
145
+ chatPrompt: ({
145
146
  role: 'system';
146
147
  content: string;
147
148
  cache?: boolean;
@@ -183,7 +184,7 @@ type AxChatRequest<TModel = string> = {
183
184
  isError?: boolean;
184
185
  functionId: string;
185
186
  cache?: boolean;
186
- }>[];
187
+ })[];
187
188
  functions?: Readonly<{
188
189
  name: string;
189
190
  description: string;
@@ -195,7 +196,7 @@ type AxChatRequest<TModel = string> = {
195
196
  name: string;
196
197
  };
197
198
  };
198
- modelConfig?: Readonly<AxModelConfig>;
199
+ modelConfig?: AxModelConfig;
199
200
  model?: TModel;
200
201
  };
201
202
  interface AxAIServiceMetrics {
@@ -250,6 +251,7 @@ type AxAIServiceActionOptions<TModel = unknown, TEmbedModel = unknown> = {
250
251
  sessionId?: string;
251
252
  traceId?: string;
252
253
  rateLimiter?: AxRateLimiterFunction;
254
+ debug?: boolean;
253
255
  };
254
256
  interface AxAIService<TModel = unknown, TEmbedModel = unknown> {
255
257
  getId(): string;
@@ -1285,12 +1287,17 @@ declare class AxAI implements AxAIService {
1285
1287
  }
1286
1288
 
1287
1289
  interface AxAIMemory {
1288
- add(result: Readonly<AxChatRequest['chatPrompt'] | AxChatRequest['chatPrompt'][0]>, sessionId?: string): void;
1290
+ add(result: Readonly<AxChatRequest['chatPrompt']> | Readonly<AxChatRequest['chatPrompt'][number]>, sessionId?: string): void;
1289
1291
  addResult(result: Readonly<AxChatResponseResult>, sessionId?: string): void;
1290
- updateResult(result: Readonly<AxChatResponseResult>, sessionId?: string): void;
1292
+ updateResult(result: Readonly<AxChatResponseResult> & {
1293
+ delta?: string;
1294
+ }, sessionId?: string): void;
1291
1295
  history(sessionId?: string): AxChatRequest['chatPrompt'];
1292
1296
  reset(sessionId?: string): void;
1293
- getLast(sessionId?: string): AxChatRequest['chatPrompt'][0] | undefined;
1297
+ getLast(sessionId?: string): {
1298
+ chat: AxChatRequest['chatPrompt'][number];
1299
+ tags?: string[];
1300
+ } | undefined;
1294
1301
  addTag(name: string, sessionId?: string): void;
1295
1302
  rewindToTag(name: string, sessionId?: string): AxChatRequest['chatPrompt'];
1296
1303
  }
@@ -1300,7 +1307,7 @@ interface AxField {
1300
1307
  title?: string;
1301
1308
  description?: string;
1302
1309
  type?: {
1303
- name: 'string' | 'number' | 'boolean' | 'json' | 'image' | 'audio' | 'date' | 'datetime' | 'class';
1310
+ name: 'string' | 'number' | 'boolean' | 'json' | 'image' | 'audio' | 'date' | 'datetime' | 'class' | 'code';
1304
1311
  isArray: boolean;
1305
1312
  classes?: string[];
1306
1313
  };
@@ -1375,7 +1382,8 @@ type AxProgramForwardOptions = {
1375
1382
  functions?: AxFunction[];
1376
1383
  functionCall?: AxChatRequest['functionCall'];
1377
1384
  stopFunction?: string;
1378
- earlyFail?: boolean;
1385
+ fastFail?: boolean;
1386
+ debug?: boolean;
1379
1387
  };
1380
1388
  type AxProgramStreamingForwardOptions = Omit<AxProgramForwardOptions, 'stream'>;
1381
1389
  type AxGenDeltaOut<OUT> = {
@@ -1462,19 +1470,122 @@ declare class AxAssertionError extends Error {
1462
1470
  }[];
1463
1471
  }
1464
1472
 
1473
+ interface AxFieldProcessor {
1474
+ field: Readonly<AxField>;
1475
+ /**
1476
+ * Process the field value and return a new value (or undefined if no update is needed).
1477
+ * The returned value may be merged back into memory.
1478
+ * @param value - The current field value.
1479
+ * @param context - Additional context (e.g. memory and session id).
1480
+ */
1481
+ process: (value: AxFieldValue, context?: Readonly<{
1482
+ values?: AxGenOut;
1483
+ sessionId?: string;
1484
+ done?: boolean;
1485
+ }>) => any | Promise<any>;
1486
+ }
1487
+
1465
1488
  declare class AxMemory implements AxAIMemory {
1466
1489
  private limit;
1490
+ private debug;
1467
1491
  private memories;
1468
1492
  private defaultMemory;
1469
- constructor(limit?: number);
1493
+ constructor(limit?: number, debug?: boolean);
1470
1494
  private getMemory;
1471
- add(value: Readonly<AxChatRequest['chatPrompt'][0] | AxChatRequest['chatPrompt']>, sessionId?: string): void;
1495
+ add(value: AxChatRequest['chatPrompt'][number] | AxChatRequest['chatPrompt'], sessionId?: string): void;
1472
1496
  addResult(result: Readonly<AxChatResponseResult>, sessionId?: string): void;
1473
1497
  updateResult(result: Readonly<AxChatResponseResult>, sessionId?: string): void;
1474
1498
  addTag(name: string, sessionId?: string): void;
1475
- rewindToTag(name: string, sessionId?: string): AxChatRequest['chatPrompt'];
1476
- history(sessionId?: string): AxChatRequest['chatPrompt'];
1477
- getLast(sessionId?: string): AxChatRequest['chatPrompt'][0] | undefined;
1499
+ rewindToTag(name: string, sessionId?: string): ({
1500
+ role: "system";
1501
+ content: string;
1502
+ cache?: boolean;
1503
+ } | {
1504
+ role: "user";
1505
+ name?: string;
1506
+ content: string | ({
1507
+ type: "text";
1508
+ text: string;
1509
+ cache?: boolean;
1510
+ } | {
1511
+ type: "image";
1512
+ mimeType: string;
1513
+ image: string;
1514
+ details?: "high" | "low" | "auto";
1515
+ cache?: boolean;
1516
+ } | {
1517
+ type: "audio";
1518
+ data: string;
1519
+ format?: "wav";
1520
+ cache?: boolean;
1521
+ })[];
1522
+ } | {
1523
+ role: "assistant";
1524
+ content?: string;
1525
+ name?: string;
1526
+ functionCalls?: {
1527
+ id: string;
1528
+ type: "function";
1529
+ function: {
1530
+ name: string;
1531
+ params?: string | object;
1532
+ };
1533
+ }[];
1534
+ cache?: boolean;
1535
+ } | {
1536
+ role: "function";
1537
+ result: string;
1538
+ isError?: boolean;
1539
+ functionId: string;
1540
+ cache?: boolean;
1541
+ })[];
1542
+ history(sessionId?: string): ({
1543
+ role: "system";
1544
+ content: string;
1545
+ cache?: boolean;
1546
+ } | {
1547
+ role: "user";
1548
+ name?: string;
1549
+ content: string | ({
1550
+ type: "text";
1551
+ text: string;
1552
+ cache?: boolean;
1553
+ } | {
1554
+ type: "image";
1555
+ mimeType: string;
1556
+ image: string;
1557
+ details?: "high" | "low" | "auto";
1558
+ cache?: boolean;
1559
+ } | {
1560
+ type: "audio";
1561
+ data: string;
1562
+ format?: "wav";
1563
+ cache?: boolean;
1564
+ })[];
1565
+ } | {
1566
+ role: "assistant";
1567
+ content?: string;
1568
+ name?: string;
1569
+ functionCalls?: {
1570
+ id: string;
1571
+ type: "function";
1572
+ function: {
1573
+ name: string;
1574
+ params?: string | object;
1575
+ };
1576
+ }[];
1577
+ cache?: boolean;
1578
+ } | {
1579
+ role: "function";
1580
+ result: string;
1581
+ isError?: boolean;
1582
+ functionId: string;
1583
+ cache?: boolean;
1584
+ })[];
1585
+ getLast(sessionId?: string): {
1586
+ chat: AxChatRequest["chatPrompt"][number];
1587
+ tags?: string[];
1588
+ } | undefined;
1478
1589
  reset(sessionId?: string): void;
1479
1590
  }
1480
1591
 
@@ -1543,8 +1654,6 @@ declare class AxPromptTemplate {
1543
1654
  private renderInputFields;
1544
1655
  private renderInField;
1545
1656
  private defaultRenderInField;
1546
- private renderDescFields;
1547
- private renderFields;
1548
1657
  }
1549
1658
 
1550
1659
  interface AxGenOptions {
@@ -1562,6 +1671,7 @@ interface AxGenOptions {
1562
1671
  promptTemplate?: typeof AxPromptTemplate;
1563
1672
  asserts?: AxAssertion[];
1564
1673
  streamingAsserts?: AxStreamingAssertion[];
1674
+ fastFail?: boolean;
1565
1675
  }
1566
1676
  type AxGenerateResult<OUT extends AxGenOut> = OUT & {
1567
1677
  functions?: AxChatResponseFunctionCall[];
@@ -1578,7 +1688,7 @@ interface AxResponseHandlerArgs<T> {
1578
1688
  sessionId?: string;
1579
1689
  traceId?: string;
1580
1690
  functions?: Readonly<AxFunction[]>;
1581
- earlyFail?: boolean;
1691
+ fastFail?: boolean;
1582
1692
  }
1583
1693
  interface AxStreamingEvent<T> {
1584
1694
  event: 'delta' | 'done' | 'error';
@@ -1596,9 +1706,12 @@ declare class AxGen<IN extends AxGenIn = AxGenIn, OUT extends AxGenerateResult<A
1596
1706
  private options?;
1597
1707
  private functions?;
1598
1708
  private functionsExecuted;
1709
+ private fieldProcessors;
1710
+ private streamingFieldProcessors;
1599
1711
  constructor(signature: Readonly<AxSignature | string>, options?: Readonly<AxGenOptions>);
1600
1712
  addAssert: (fn: AxAssertion["fn"], message?: string) => void;
1601
1713
  addStreamingAssert: (fieldName: string, fn: AxStreamingAssertion["fn"], message?: string) => void;
1714
+ addFieldProcessor: (fieldName: string, fn: AxFieldProcessor["process"], streaming?: boolean) => void;
1602
1715
  private forwardSendRequest;
1603
1716
  private forwardCore;
1604
1717
  private processStreamingResponse;
@@ -1628,6 +1741,7 @@ type AxAgentOptions = Omit<AxGenOptions, 'functions'> & {
1628
1741
  disableSmartModelRouting?: boolean;
1629
1742
  /** List of field names that should not be automatically passed from parent to child agents */
1630
1743
  excludeFieldsFromPassthrough?: string[];
1744
+ debug?: boolean;
1631
1745
  };
1632
1746
  interface AxAgentFeatures {
1633
1747
  /** Whether this agent can use smart model routing (requires an AI service) */
@@ -1646,6 +1760,7 @@ declare class AxAgent<IN extends AxGenIn, OUT extends AxGenOut = AxGenOut> imple
1646
1760
  private agents?;
1647
1761
  private disableSmartModelRouting?;
1648
1762
  private excludeFieldsFromPassthrough;
1763
+ private debug?;
1649
1764
  private name;
1650
1765
  private func;
1651
1766
  constructor({ ai, name, description, definition, signature, agents, functions, }: Readonly<{
@@ -1684,6 +1799,7 @@ declare class AxAgent<IN extends AxGenIn, OUT extends AxGenOut = AxGenOut> imple
1684
1799
  */
1685
1800
  setDescription(description: string): void;
1686
1801
  setDefinition(definition: string): void;
1802
+ private getDebug;
1687
1803
  }
1688
1804
 
1689
1805
  interface AxApacheTikaArgs {
@@ -2279,4 +2395,4 @@ declare class AxRAG extends AxChainOfThought<{
2279
2395
  }>;
2280
2396
  }
2281
2397
 
2282
- 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 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 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, 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 };
2398
+ 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 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 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, 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 };