@ax-llm/ax 10.0.34 → 10.0.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.cjs +188 -104
- package/index.cjs.map +1 -1
- package/index.d.cts +15 -26
- package/index.d.ts +15 -26
- package/index.js +187 -102
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.d.cts
CHANGED
|
@@ -208,6 +208,7 @@ interface AxAIService {
|
|
|
208
208
|
chat(req: Readonly<AxChatRequest>, options?: Readonly<AxAIPromptConfig & AxAIServiceActionOptions>): Promise<AxChatResponse | ReadableStream<AxChatResponse>>;
|
|
209
209
|
embed(req: Readonly<AxEmbedRequest>, options?: Readonly<AxAIServiceActionOptions & AxAIServiceActionOptions>): Promise<AxEmbedResponse>;
|
|
210
210
|
setOptions(options: Readonly<AxAIServiceOptions>): void;
|
|
211
|
+
getOptions(): Readonly<AxAIServiceOptions>;
|
|
211
212
|
}
|
|
212
213
|
interface AxAIServiceImpl<TChatRequest, TEmbedRequest, TChatResponse, TChatResponseDelta, TEmbedResponse> {
|
|
213
214
|
createChatReq(req: Readonly<AxInternalChatRequest>, config: Readonly<AxAIPromptConfig>): [AxAPI, TChatRequest];
|
|
@@ -256,6 +257,7 @@ declare class AxBaseAI<TChatRequest, TEmbedRequest, TChatResponse, TChatResponse
|
|
|
256
257
|
setAPIURL(apiURL: string): void;
|
|
257
258
|
setHeaders(headers: Record<string, string>): void;
|
|
258
259
|
setOptions(options: Readonly<AxAIServiceOptions>): void;
|
|
260
|
+
getOptions(): Readonly<AxAIServiceOptions>;
|
|
259
261
|
getModelInfo(): Readonly<AxModelInfoWithProvider>;
|
|
260
262
|
getEmbedModelInfo(): AxModelInfoWithProvider | undefined;
|
|
261
263
|
getModelMap(): AxAIModelMap | undefined;
|
|
@@ -1205,6 +1207,7 @@ declare class AxAI implements AxAIService {
|
|
|
1205
1207
|
chat(req: Readonly<AxChatRequest>, options?: Readonly<AxAIPromptConfig & AxAIServiceActionOptions>): Promise<AxChatResponse | ReadableStream<AxChatResponse>>;
|
|
1206
1208
|
embed(req: Readonly<AxEmbedRequest>, options?: Readonly<AxAIServiceActionOptions & AxAIServiceActionOptions>): Promise<AxEmbedResponse>;
|
|
1207
1209
|
setOptions(options: Readonly<AxAIServiceOptions>): void;
|
|
1210
|
+
getOptions(): Readonly<AxAIServiceOptions>;
|
|
1208
1211
|
}
|
|
1209
1212
|
|
|
1210
1213
|
interface AxAIMemory {
|
|
@@ -1214,6 +1217,8 @@ interface AxAIMemory {
|
|
|
1214
1217
|
history(sessionId?: string): AxChatRequest['chatPrompt'];
|
|
1215
1218
|
reset(sessionId?: string): void;
|
|
1216
1219
|
getLast(sessionId?: string): AxChatRequest['chatPrompt'][0] | undefined;
|
|
1220
|
+
addTag(name: string, sessionId?: string): void;
|
|
1221
|
+
rewindToTag(name: string, sessionId?: string): AxChatRequest['chatPrompt'];
|
|
1217
1222
|
}
|
|
1218
1223
|
|
|
1219
1224
|
interface AxField {
|
|
@@ -1293,7 +1298,6 @@ type AxProgramForwardOptions = {
|
|
|
1293
1298
|
tracer?: Tracer;
|
|
1294
1299
|
rateLimiter?: AxRateLimiterFunction;
|
|
1295
1300
|
stream?: boolean;
|
|
1296
|
-
debug?: boolean;
|
|
1297
1301
|
functions?: AxFunction[];
|
|
1298
1302
|
functionCall?: AxChatRequest['functionCall'];
|
|
1299
1303
|
stopFunction?: string;
|
|
@@ -1376,7 +1380,7 @@ declare class AxAssertionError extends Error {
|
|
|
1376
1380
|
}>);
|
|
1377
1381
|
getValue: () => Record<string, unknown>;
|
|
1378
1382
|
getOptional: () => boolean | undefined;
|
|
1379
|
-
getFixingInstructions: (
|
|
1383
|
+
getFixingInstructions: () => {
|
|
1380
1384
|
name: string;
|
|
1381
1385
|
title: string;
|
|
1382
1386
|
description: string;
|
|
@@ -1384,17 +1388,19 @@ declare class AxAssertionError extends Error {
|
|
|
1384
1388
|
}
|
|
1385
1389
|
|
|
1386
1390
|
declare class AxMemory implements AxAIMemory {
|
|
1387
|
-
private data;
|
|
1388
|
-
private sdata;
|
|
1389
1391
|
private limit;
|
|
1392
|
+
private memories;
|
|
1393
|
+
private defaultMemory;
|
|
1390
1394
|
constructor(limit?: number);
|
|
1395
|
+
private getMemory;
|
|
1391
1396
|
add(value: Readonly<AxChatRequest['chatPrompt'][0] | AxChatRequest['chatPrompt']>, sessionId?: string): void;
|
|
1392
|
-
addResult(
|
|
1393
|
-
updateResult(
|
|
1397
|
+
addResult(result: Readonly<AxChatResponseResult>, sessionId?: string): void;
|
|
1398
|
+
updateResult(result: Readonly<AxChatResponseResult>, sessionId?: string): void;
|
|
1399
|
+
addTag(name: string, sessionId?: string): void;
|
|
1400
|
+
rewindToTag(name: string, sessionId?: string): AxChatRequest['chatPrompt'];
|
|
1394
1401
|
history(sessionId?: string): AxChatRequest['chatPrompt'];
|
|
1395
1402
|
getLast(sessionId?: string): AxChatRequest['chatPrompt'][0] | undefined;
|
|
1396
1403
|
reset(sessionId?: string): void;
|
|
1397
|
-
private get;
|
|
1398
1404
|
}
|
|
1399
1405
|
|
|
1400
1406
|
type AxChatResponseFunctionCall = {
|
|
@@ -1467,7 +1473,6 @@ interface AxGenOptions {
|
|
|
1467
1473
|
tracer?: Tracer;
|
|
1468
1474
|
rateLimiter?: AxRateLimiterFunction;
|
|
1469
1475
|
stream?: boolean;
|
|
1470
|
-
debug?: boolean;
|
|
1471
1476
|
description?: string;
|
|
1472
1477
|
functions?: AxInputFunctionType;
|
|
1473
1478
|
functionCall?: AxChatRequest['functionCall'];
|
|
@@ -1591,6 +1596,7 @@ declare class AxBalancer implements AxAIService {
|
|
|
1591
1596
|
chat(req: Readonly<AxChatRequest>, options?: Readonly<AxAIPromptConfig & AxAIServiceActionOptions> | undefined): Promise<AxChatResponse | ReadableStream<AxChatResponse>>;
|
|
1592
1597
|
embed(req: Readonly<AxEmbedRequest>, options?: Readonly<AxAIServiceActionOptions> | undefined): Promise<AxEmbedResponse>;
|
|
1593
1598
|
setOptions(options: Readonly<AxAIServiceOptions>): void;
|
|
1599
|
+
getOptions(): Readonly<AxAIServiceOptions>;
|
|
1594
1600
|
}
|
|
1595
1601
|
|
|
1596
1602
|
type AxExample = Record<string, AxFieldValue>;
|
|
@@ -2082,21 +2088,4 @@ declare class AxRAG extends AxChainOfThought<{
|
|
|
2082
2088
|
}>;
|
|
2083
2089
|
}
|
|
2084
2090
|
|
|
2085
|
-
|
|
2086
|
-
private field;
|
|
2087
|
-
private value;
|
|
2088
|
-
constructor({ message, field, value, }: Readonly<{
|
|
2089
|
-
message: string;
|
|
2090
|
-
field: AxField;
|
|
2091
|
-
value: string;
|
|
2092
|
-
}>);
|
|
2093
|
-
getField: () => AxField;
|
|
2094
|
-
getValue: () => string;
|
|
2095
|
-
getFixingInstructions: () => {
|
|
2096
|
-
name: string;
|
|
2097
|
-
title: string;
|
|
2098
|
-
description: string;
|
|
2099
|
-
}[];
|
|
2100
|
-
}
|
|
2101
|
-
|
|
2102
|
-
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, 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, AxValidationError };
|
|
2091
|
+
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, 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 };
|
package/index.d.ts
CHANGED
|
@@ -208,6 +208,7 @@ interface AxAIService {
|
|
|
208
208
|
chat(req: Readonly<AxChatRequest>, options?: Readonly<AxAIPromptConfig & AxAIServiceActionOptions>): Promise<AxChatResponse | ReadableStream<AxChatResponse>>;
|
|
209
209
|
embed(req: Readonly<AxEmbedRequest>, options?: Readonly<AxAIServiceActionOptions & AxAIServiceActionOptions>): Promise<AxEmbedResponse>;
|
|
210
210
|
setOptions(options: Readonly<AxAIServiceOptions>): void;
|
|
211
|
+
getOptions(): Readonly<AxAIServiceOptions>;
|
|
211
212
|
}
|
|
212
213
|
interface AxAIServiceImpl<TChatRequest, TEmbedRequest, TChatResponse, TChatResponseDelta, TEmbedResponse> {
|
|
213
214
|
createChatReq(req: Readonly<AxInternalChatRequest>, config: Readonly<AxAIPromptConfig>): [AxAPI, TChatRequest];
|
|
@@ -256,6 +257,7 @@ declare class AxBaseAI<TChatRequest, TEmbedRequest, TChatResponse, TChatResponse
|
|
|
256
257
|
setAPIURL(apiURL: string): void;
|
|
257
258
|
setHeaders(headers: Record<string, string>): void;
|
|
258
259
|
setOptions(options: Readonly<AxAIServiceOptions>): void;
|
|
260
|
+
getOptions(): Readonly<AxAIServiceOptions>;
|
|
259
261
|
getModelInfo(): Readonly<AxModelInfoWithProvider>;
|
|
260
262
|
getEmbedModelInfo(): AxModelInfoWithProvider | undefined;
|
|
261
263
|
getModelMap(): AxAIModelMap | undefined;
|
|
@@ -1205,6 +1207,7 @@ declare class AxAI implements AxAIService {
|
|
|
1205
1207
|
chat(req: Readonly<AxChatRequest>, options?: Readonly<AxAIPromptConfig & AxAIServiceActionOptions>): Promise<AxChatResponse | ReadableStream<AxChatResponse>>;
|
|
1206
1208
|
embed(req: Readonly<AxEmbedRequest>, options?: Readonly<AxAIServiceActionOptions & AxAIServiceActionOptions>): Promise<AxEmbedResponse>;
|
|
1207
1209
|
setOptions(options: Readonly<AxAIServiceOptions>): void;
|
|
1210
|
+
getOptions(): Readonly<AxAIServiceOptions>;
|
|
1208
1211
|
}
|
|
1209
1212
|
|
|
1210
1213
|
interface AxAIMemory {
|
|
@@ -1214,6 +1217,8 @@ interface AxAIMemory {
|
|
|
1214
1217
|
history(sessionId?: string): AxChatRequest['chatPrompt'];
|
|
1215
1218
|
reset(sessionId?: string): void;
|
|
1216
1219
|
getLast(sessionId?: string): AxChatRequest['chatPrompt'][0] | undefined;
|
|
1220
|
+
addTag(name: string, sessionId?: string): void;
|
|
1221
|
+
rewindToTag(name: string, sessionId?: string): AxChatRequest['chatPrompt'];
|
|
1217
1222
|
}
|
|
1218
1223
|
|
|
1219
1224
|
interface AxField {
|
|
@@ -1293,7 +1298,6 @@ type AxProgramForwardOptions = {
|
|
|
1293
1298
|
tracer?: Tracer;
|
|
1294
1299
|
rateLimiter?: AxRateLimiterFunction;
|
|
1295
1300
|
stream?: boolean;
|
|
1296
|
-
debug?: boolean;
|
|
1297
1301
|
functions?: AxFunction[];
|
|
1298
1302
|
functionCall?: AxChatRequest['functionCall'];
|
|
1299
1303
|
stopFunction?: string;
|
|
@@ -1376,7 +1380,7 @@ declare class AxAssertionError extends Error {
|
|
|
1376
1380
|
}>);
|
|
1377
1381
|
getValue: () => Record<string, unknown>;
|
|
1378
1382
|
getOptional: () => boolean | undefined;
|
|
1379
|
-
getFixingInstructions: (
|
|
1383
|
+
getFixingInstructions: () => {
|
|
1380
1384
|
name: string;
|
|
1381
1385
|
title: string;
|
|
1382
1386
|
description: string;
|
|
@@ -1384,17 +1388,19 @@ declare class AxAssertionError extends Error {
|
|
|
1384
1388
|
}
|
|
1385
1389
|
|
|
1386
1390
|
declare class AxMemory implements AxAIMemory {
|
|
1387
|
-
private data;
|
|
1388
|
-
private sdata;
|
|
1389
1391
|
private limit;
|
|
1392
|
+
private memories;
|
|
1393
|
+
private defaultMemory;
|
|
1390
1394
|
constructor(limit?: number);
|
|
1395
|
+
private getMemory;
|
|
1391
1396
|
add(value: Readonly<AxChatRequest['chatPrompt'][0] | AxChatRequest['chatPrompt']>, sessionId?: string): void;
|
|
1392
|
-
addResult(
|
|
1393
|
-
updateResult(
|
|
1397
|
+
addResult(result: Readonly<AxChatResponseResult>, sessionId?: string): void;
|
|
1398
|
+
updateResult(result: Readonly<AxChatResponseResult>, sessionId?: string): void;
|
|
1399
|
+
addTag(name: string, sessionId?: string): void;
|
|
1400
|
+
rewindToTag(name: string, sessionId?: string): AxChatRequest['chatPrompt'];
|
|
1394
1401
|
history(sessionId?: string): AxChatRequest['chatPrompt'];
|
|
1395
1402
|
getLast(sessionId?: string): AxChatRequest['chatPrompt'][0] | undefined;
|
|
1396
1403
|
reset(sessionId?: string): void;
|
|
1397
|
-
private get;
|
|
1398
1404
|
}
|
|
1399
1405
|
|
|
1400
1406
|
type AxChatResponseFunctionCall = {
|
|
@@ -1467,7 +1473,6 @@ interface AxGenOptions {
|
|
|
1467
1473
|
tracer?: Tracer;
|
|
1468
1474
|
rateLimiter?: AxRateLimiterFunction;
|
|
1469
1475
|
stream?: boolean;
|
|
1470
|
-
debug?: boolean;
|
|
1471
1476
|
description?: string;
|
|
1472
1477
|
functions?: AxInputFunctionType;
|
|
1473
1478
|
functionCall?: AxChatRequest['functionCall'];
|
|
@@ -1591,6 +1596,7 @@ declare class AxBalancer implements AxAIService {
|
|
|
1591
1596
|
chat(req: Readonly<AxChatRequest>, options?: Readonly<AxAIPromptConfig & AxAIServiceActionOptions> | undefined): Promise<AxChatResponse | ReadableStream<AxChatResponse>>;
|
|
1592
1597
|
embed(req: Readonly<AxEmbedRequest>, options?: Readonly<AxAIServiceActionOptions> | undefined): Promise<AxEmbedResponse>;
|
|
1593
1598
|
setOptions(options: Readonly<AxAIServiceOptions>): void;
|
|
1599
|
+
getOptions(): Readonly<AxAIServiceOptions>;
|
|
1594
1600
|
}
|
|
1595
1601
|
|
|
1596
1602
|
type AxExample = Record<string, AxFieldValue>;
|
|
@@ -2082,21 +2088,4 @@ declare class AxRAG extends AxChainOfThought<{
|
|
|
2082
2088
|
}>;
|
|
2083
2089
|
}
|
|
2084
2090
|
|
|
2085
|
-
|
|
2086
|
-
private field;
|
|
2087
|
-
private value;
|
|
2088
|
-
constructor({ message, field, value, }: Readonly<{
|
|
2089
|
-
message: string;
|
|
2090
|
-
field: AxField;
|
|
2091
|
-
value: string;
|
|
2092
|
-
}>);
|
|
2093
|
-
getField: () => AxField;
|
|
2094
|
-
getValue: () => string;
|
|
2095
|
-
getFixingInstructions: () => {
|
|
2096
|
-
name: string;
|
|
2097
|
-
title: string;
|
|
2098
|
-
description: string;
|
|
2099
|
-
}[];
|
|
2100
|
-
}
|
|
2101
|
-
|
|
2102
|
-
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, 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, AxValidationError };
|
|
2091
|
+
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, 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 };
|