AxAI
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/wrap.ts#L86
Implements
Constructors
Constructor
new AxAI(options: Readonly<AxAIArgs>): AxAI;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/wrap.ts#L89
Parameters
Parameter | Type |
---|---|
options | Readonly <AxAIArgs > |
Returns
AxAI
Methods
chat()
chat(req: Readonly<AxChatRequest>, options?: Readonly<AxAIPromptConfig & AxAIServiceActionOptions>): Promise<
| AxChatResponse
| ReadableStream<AxChatResponse>>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/wrap.ts#L167
Parameters
Parameter | Type |
---|---|
req | Readonly <AxChatRequest > |
options? | Readonly <AxAIPromptConfig & AxAIServiceActionOptions > |
Returns
Promise
<
| AxChatResponse
| ReadableStream
<AxChatResponse
>>
Implementation of
embed()
embed(req: Readonly<AxEmbedRequest>, options?: Readonly<AxAIServiceActionOptions>): Promise<AxEmbedResponse>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/wrap.ts#L174
Parameters
Parameter | Type |
---|---|
req | Readonly <AxEmbedRequest > |
options? | Readonly <AxAIServiceActionOptions > |
Returns
Promise
<AxEmbedResponse
>
Implementation of
getFeatures()
getFeatures(model?: string): object;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/wrap.ts#L143
Parameters
Parameter | Type |
---|---|
model? | string |
Returns
object
Name | Type |
---|---|
functions | boolean |
streaming | boolean |
Implementation of
getId()
getId(): string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/wrap.ts#L139
Returns
string
Implementation of
getLastUsedChatModel()
getLastUsedChatModel(): unknown;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/wrap.ts#L151
Returns
unknown
Implementation of
AxAIService
.getLastUsedChatModel
getLastUsedEmbedModel()
getLastUsedEmbedModel(): unknown;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/wrap.ts#L155
Returns
unknown
Implementation of
AxAIService
.getLastUsedEmbedModel
getLastUsedModelConfig()
getLastUsedModelConfig(): undefined | AxModelConfig;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/wrap.ts#L159
Returns
undefined
| AxModelConfig
Implementation of
AxAIService
.getLastUsedModelConfig
getLogger()
getLogger(): AxLoggerFunction;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/wrap.ts#L189
Returns
Implementation of
getMetrics()
getMetrics(): AxAIServiceMetrics;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/wrap.ts#L163
Returns
Implementation of
getModelList()
getModelList(): undefined | AxAIModelList;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/wrap.ts#L147
Returns
undefined
| AxAIModelList
Implementation of
getName()
getName(): string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/wrap.ts#L135
Returns
string
Implementation of
getOptions()
getOptions(): Readonly<AxAIServiceOptions>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/wrap.ts#L185
Returns
Readonly
<AxAIServiceOptions
>
Implementation of
setOptions()
setOptions(options: Readonly<AxAIServiceOptions>): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/wrap.ts#L181
Parameters
Parameter | Type |
---|---|
options | Readonly <AxAIServiceOptions > |
Returns
void
Implementation of
AxAIAnthropic
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/anthropic/api.ts#L509
Extends
AxBaseAI
< |AxAIAnthropicModel
|AxAIAnthropicVertexModel
,unknown
,AxAIAnthropicChatRequest
,unknown
,AxAIAnthropicChatResponse
,AxAIAnthropicChatResponseDelta
,unknown
>
Constructors
Constructor
new AxAIAnthropic(__namedParameters: Readonly<Omit<AxAIAnthropicArgs, "name">>): AxAIAnthropic;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/anthropic/api.ts#L518
Parameters
Parameter | Type |
---|---|
__namedParameters | Readonly <Omit <AxAIAnthropicArgs , "name" >> |
Returns
AxAIAnthropic
Overrides
Methods
chat()
chat(req: Readonly<AxChatRequest<TModel>>, options?: Readonly<AxAIPromptConfig & AxAIServiceActionOptions<
| AxAIAnthropicModel
| AxAIAnthropicVertexModel, unknown>>): Promise<
| AxChatResponse
| ReadableStream<AxChatResponse>>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L326
Parameters
Parameter | Type |
---|---|
req | Readonly <AxChatRequest <TModel >> |
options? | Readonly <AxAIPromptConfig & AxAIServiceActionOptions < | AxAIAnthropicModel | AxAIAnthropicVertexModel , unknown >> |
Returns
Promise
<
| AxChatResponse
| ReadableStream
<AxChatResponse
>>
Inherited from
embed()
embed(req: Readonly<AxEmbedRequest<TEmbedModel>>, options?: Readonly<AxAIServiceActionOptions<
| AxAIAnthropicModel
| AxAIAnthropicVertexModel, unknown>>): Promise<AxEmbedResponse>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L625
Parameters
Parameter | Type |
---|---|
req | Readonly <AxEmbedRequest <TEmbedModel >> |
options? | Readonly <AxAIServiceActionOptions < | AxAIAnthropicModel | AxAIAnthropicVertexModel , unknown >> |
Returns
Promise
<AxEmbedResponse
>
Inherited from
getFeatures()
getFeatures(model?:
| AxAIAnthropicModel
| AxAIAnthropicVertexModel): AxAIFeatures;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L265
Parameters
Parameter | Type |
---|---|
model? | | AxAIAnthropicModel | AxAIAnthropicVertexModel |
Returns
Inherited from
getId()
getId(): string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L194
Returns
string
Inherited from
getLastUsedChatModel()
getLastUsedChatModel():
| undefined
| AxAIAnthropicModel
| AxAIAnthropicVertexModel;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L271
Returns
| undefined
| AxAIAnthropicModel
| AxAIAnthropicVertexModel
Inherited from
getLastUsedEmbedModel()
getLastUsedEmbedModel(): unknown;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L275
Returns
unknown
Inherited from
AxBaseAI
.getLastUsedEmbedModel
getLastUsedModelConfig()
getLastUsedModelConfig(): undefined | AxModelConfig;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L279
Returns
undefined
| AxModelConfig
Inherited from
AxBaseAI
.getLastUsedModelConfig
getLogger()
getLogger(): AxLoggerFunction;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L230
Returns
Inherited from
getMetrics()
getMetrics(): AxAIServiceMetrics;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L322
Returns
Inherited from
getModelList()
getModelList(): undefined | AxAIModelList;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L234
Returns
undefined
| AxAIModelList
Inherited from
getName()
getName(): string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L261
Returns
string
Inherited from
getOptions()
getOptions(): Readonly<AxAIServiceOptions>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L217
Returns
Readonly
<AxAIServiceOptions
>
Inherited from
setAPIURL()
setAPIURL(apiURL: string): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L198
Parameters
Parameter | Type |
---|---|
apiURL | string |
Returns
void
Inherited from
setHeaders()
setHeaders(headers: () => Promise<Record<string, string>>): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L202
Parameters
Parameter | Type |
---|---|
headers | () => Promise <Record <string , string >> |
Returns
void
Inherited from
setName()
setName(name: string): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L190
Parameters
Parameter | Type |
---|---|
name | string |
Returns
void
Inherited from
setOptions()
setOptions(options: Readonly<AxAIServiceOptions>): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L206
Parameters
Parameter | Type |
---|---|
options | Readonly <AxAIServiceOptions > |
Returns
void
Inherited from
AxAIAzureOpenAI
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/azure-openai/api.ts#L40
Extends
Constructors
Constructor
new AxAIAzureOpenAI(__namedParameters: Readonly<Omit<AxAIAzureOpenAIArgs, "name">>): AxAIAzureOpenAI;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/azure-openai/api.ts#L44
Parameters
Parameter | Type |
---|---|
__namedParameters | Readonly <Omit <AxAIAzureOpenAIArgs , "name" >> |
Returns
AxAIAzureOpenAI
Overrides
Methods
chat()
chat(req: Readonly<AxChatRequest<TModel>>, options?: Readonly<AxAIPromptConfig & AxAIServiceActionOptions<AxAIOpenAIModel, AxAIOpenAIEmbedModel>>): Promise<
| AxChatResponse
| ReadableStream<AxChatResponse>>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L326
Parameters
Parameter | Type |
---|---|
req | Readonly <AxChatRequest <TModel >> |
options? | Readonly <AxAIPromptConfig & AxAIServiceActionOptions <AxAIOpenAIModel , AxAIOpenAIEmbedModel >> |
Returns
Promise
<
| AxChatResponse
| ReadableStream
<AxChatResponse
>>
Inherited from
embed()
embed(req: Readonly<AxEmbedRequest<TEmbedModel>>, options?: Readonly<AxAIServiceActionOptions<AxAIOpenAIModel, AxAIOpenAIEmbedModel>>): Promise<AxEmbedResponse>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L625
Parameters
Parameter | Type |
---|---|
req | Readonly <AxEmbedRequest <TEmbedModel >> |
options? | Readonly <AxAIServiceActionOptions <AxAIOpenAIModel , AxAIOpenAIEmbedModel >> |
Returns
Promise
<AxEmbedResponse
>
Inherited from
getFeatures()
getFeatures(model?: AxAIOpenAIModel): AxAIFeatures;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L265
Parameters
Parameter | Type |
---|---|
model? | AxAIOpenAIModel |
Returns
Inherited from
getId()
getId(): string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L194
Returns
string
Inherited from
getLastUsedChatModel()
getLastUsedChatModel(): undefined | AxAIOpenAIModel;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L271
Returns
undefined
| AxAIOpenAIModel
Inherited from
AxAIOpenAIBase
.getLastUsedChatModel
getLastUsedEmbedModel()
getLastUsedEmbedModel():
| undefined
| AxAIOpenAIEmbedModel;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L275
Returns
| undefined
| AxAIOpenAIEmbedModel
Inherited from
AxAIOpenAIBase
.getLastUsedEmbedModel
getLastUsedModelConfig()
getLastUsedModelConfig(): undefined | AxModelConfig;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L279
Returns
undefined
| AxModelConfig
Inherited from
AxAIOpenAIBase
.getLastUsedModelConfig
getLogger()
getLogger(): AxLoggerFunction;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L230
Returns
Inherited from
getMetrics()
getMetrics(): AxAIServiceMetrics;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L322
Returns
Inherited from
getModelList()
getModelList(): undefined | AxAIModelList;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L234
Returns
undefined
| AxAIModelList
Inherited from
getName()
getName(): string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L261
Returns
string
Inherited from
getOptions()
getOptions(): Readonly<AxAIServiceOptions>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L217
Returns
Readonly
<AxAIServiceOptions
>
Inherited from
setAPIURL()
setAPIURL(apiURL: string): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L198
Parameters
Parameter | Type |
---|---|
apiURL | string |
Returns
void
Inherited from
setHeaders()
setHeaders(headers: () => Promise<Record<string, string>>): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L202
Parameters
Parameter | Type |
---|---|
headers | () => Promise <Record <string , string >> |
Returns
void
Inherited from
setName()
setName(name: string): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L190
Parameters
Parameter | Type |
---|---|
name | string |
Returns
void
Inherited from
setOptions()
setOptions(options: Readonly<AxAIServiceOptions>): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L206
Parameters
Parameter | Type |
---|---|
options | Readonly <AxAIServiceOptions > |
Returns
void
Inherited from
AxAICohere
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/cohere/api.ts#L299
Extends
AxBaseAI
<AxAICohereModel
,AxAICohereEmbedModel
,AxAICohereChatRequest
,AxAICohereEmbedRequest
,AxAICohereChatResponse
,AxAICohereChatResponseDelta
,AxAICohereEmbedResponse
>
Constructors
Constructor
new AxAICohere(__namedParameters: Readonly<Omit<AxAICohereArgs, "name">>): AxAICohere;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/cohere/api.ts#L308
Parameters
Parameter | Type |
---|---|
__namedParameters | Readonly <Omit <AxAICohereArgs , "name" >> |
Returns
AxAICohere
Overrides
Methods
chat()
chat(req: Readonly<AxChatRequest<TModel>>, options?: Readonly<AxAIPromptConfig & AxAIServiceActionOptions<AxAICohereModel, AxAICohereEmbedModel>>): Promise<
| AxChatResponse
| ReadableStream<AxChatResponse>>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L326
Parameters
Parameter | Type |
---|---|
req | Readonly <AxChatRequest <TModel >> |
options? | Readonly <AxAIPromptConfig & AxAIServiceActionOptions <AxAICohereModel , AxAICohereEmbedModel >> |
Returns
Promise
<
| AxChatResponse
| ReadableStream
<AxChatResponse
>>
Inherited from
embed()
embed(req: Readonly<AxEmbedRequest<TEmbedModel>>, options?: Readonly<AxAIServiceActionOptions<AxAICohereModel, AxAICohereEmbedModel>>): Promise<AxEmbedResponse>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L625
Parameters
Parameter | Type |
---|---|
req | Readonly <AxEmbedRequest <TEmbedModel >> |
options? | Readonly <AxAIServiceActionOptions <AxAICohereModel , AxAICohereEmbedModel >> |
Returns
Promise
<AxEmbedResponse
>
Inherited from
getFeatures()
getFeatures(model?: AxAICohereModel): AxAIFeatures;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L265
Parameters
Parameter | Type |
---|---|
model? | AxAICohereModel |
Returns
Inherited from
getId()
getId(): string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L194
Returns
string
Inherited from
getLastUsedChatModel()
getLastUsedChatModel(): undefined | AxAICohereModel;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L271
Returns
undefined
| AxAICohereModel
Inherited from
getLastUsedEmbedModel()
getLastUsedEmbedModel():
| undefined
| AxAICohereEmbedModel;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L275
Returns
| undefined
| AxAICohereEmbedModel
Inherited from
AxBaseAI
.getLastUsedEmbedModel
getLastUsedModelConfig()
getLastUsedModelConfig(): undefined | AxModelConfig;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L279
Returns
undefined
| AxModelConfig
Inherited from
AxBaseAI
.getLastUsedModelConfig
getLogger()
getLogger(): AxLoggerFunction;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L230
Returns
Inherited from
getMetrics()
getMetrics(): AxAIServiceMetrics;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L322
Returns
Inherited from
getModelList()
getModelList(): undefined | AxAIModelList;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L234
Returns
undefined
| AxAIModelList
Inherited from
getName()
getName(): string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L261
Returns
string
Inherited from
getOptions()
getOptions(): Readonly<AxAIServiceOptions>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L217
Returns
Readonly
<AxAIServiceOptions
>
Inherited from
setAPIURL()
setAPIURL(apiURL: string): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L198
Parameters
Parameter | Type |
---|---|
apiURL | string |
Returns
void
Inherited from
setHeaders()
setHeaders(headers: () => Promise<Record<string, string>>): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L202
Parameters
Parameter | Type |
---|---|
headers | () => Promise <Record <string , string >> |
Returns
void
Inherited from
setName()
setName(name: string): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L190
Parameters
Parameter | Type |
---|---|
name | string |
Returns
void
Inherited from
setOptions()
setOptions(options: Readonly<AxAIServiceOptions>): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L206
Parameters
Parameter | Type |
---|---|
options | Readonly <AxAIServiceOptions > |
Returns
void
Inherited from
AxAIDeepSeek
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/deepseek/api.ts#L31
Extends
AxAIOpenAIBase
<AxAIDeepSeekModel
,undefined
>
Constructors
Constructor
new AxAIDeepSeek(__namedParameters: Readonly<Omit<AxAIDeepSeekArgs, "name">>): AxAIDeepSeek;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/deepseek/api.ts#L32
Parameters
Parameter | Type |
---|---|
__namedParameters | Readonly <Omit <AxAIDeepSeekArgs , "name" >> |
Returns
AxAIDeepSeek
Overrides
Methods
chat()
chat(req: Readonly<AxChatRequest<TModel>>, options?: Readonly<AxAIPromptConfig & AxAIServiceActionOptions<AxAIDeepSeekModel, undefined>>): Promise<
| AxChatResponse
| ReadableStream<AxChatResponse>>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L326
Parameters
Parameter | Type |
---|---|
req | Readonly <AxChatRequest <TModel >> |
options? | Readonly <AxAIPromptConfig & AxAIServiceActionOptions <AxAIDeepSeekModel , undefined >> |
Returns
Promise
<
| AxChatResponse
| ReadableStream
<AxChatResponse
>>
Inherited from
embed()
embed(req: Readonly<AxEmbedRequest<TEmbedModel>>, options?: Readonly<AxAIServiceActionOptions<AxAIDeepSeekModel, undefined>>): Promise<AxEmbedResponse>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L625
Parameters
Parameter | Type |
---|---|
req | Readonly <AxEmbedRequest <TEmbedModel >> |
options? | Readonly <AxAIServiceActionOptions <AxAIDeepSeekModel , undefined >> |
Returns
Promise
<AxEmbedResponse
>
Inherited from
getFeatures()
getFeatures(model?: AxAIDeepSeekModel): AxAIFeatures;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L265
Parameters
Parameter | Type |
---|---|
model? | AxAIDeepSeekModel |
Returns
Inherited from
getId()
getId(): string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L194
Returns
string
Inherited from
getLastUsedChatModel()
getLastUsedChatModel(): undefined | AxAIDeepSeekModel;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L271
Returns
undefined
| AxAIDeepSeekModel
Inherited from
AxAIOpenAIBase
.getLastUsedChatModel
getLastUsedEmbedModel()
getLastUsedEmbedModel(): undefined;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L275
Returns
undefined
Inherited from
AxAIOpenAIBase
.getLastUsedEmbedModel
getLastUsedModelConfig()
getLastUsedModelConfig(): undefined | AxModelConfig;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L279
Returns
undefined
| AxModelConfig
Inherited from
AxAIOpenAIBase
.getLastUsedModelConfig
getLogger()
getLogger(): AxLoggerFunction;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L230
Returns
Inherited from
getMetrics()
getMetrics(): AxAIServiceMetrics;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L322
Returns
Inherited from
getModelList()
getModelList(): undefined | AxAIModelList;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L234
Returns
undefined
| AxAIModelList
Inherited from
getName()
getName(): string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L261
Returns
string
Inherited from
getOptions()
getOptions(): Readonly<AxAIServiceOptions>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L217
Returns
Readonly
<AxAIServiceOptions
>
Inherited from
setAPIURL()
setAPIURL(apiURL: string): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L198
Parameters
Parameter | Type |
---|---|
apiURL | string |
Returns
void
Inherited from
setHeaders()
setHeaders(headers: () => Promise<Record<string, string>>): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L202
Parameters
Parameter | Type |
---|---|
headers | () => Promise <Record <string , string >> |
Returns
void
Inherited from
setName()
setName(name: string): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L190
Parameters
Parameter | Type |
---|---|
name | string |
Returns
void
Inherited from
setOptions()
setOptions(options: Readonly<AxAIServiceOptions>): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L206
Parameters
Parameter | Type |
---|---|
options | Readonly <AxAIServiceOptions > |
Returns
void
Inherited from
AxAIGoogleGemini
AxAIGoogleGemini: AI Service
Extends
AxBaseAI
<AxAIGoogleGeminiModel
,AxAIGoogleGeminiEmbedModel
,AxAIGoogleGeminiChatRequest
, |AxAIGoogleGeminiBatchEmbedRequest
|AxAIGoogleVertexBatchEmbedRequest
,AxAIGoogleGeminiChatResponse
,AxAIGoogleGeminiChatResponseDelta
, |AxAIGoogleGeminiBatchEmbedResponse
|AxAIGoogleVertexBatchEmbedResponse
>
Constructors
Constructor
new AxAIGoogleGemini(__namedParameters: Readonly<Omit<AxAIGoogleGeminiArgs, "name">>): AxAIGoogleGemini;
Parameters
Parameter | Type |
---|---|
__namedParameters | Readonly <Omit <AxAIGoogleGeminiArgs , "name" >> |
Returns
AxAIGoogleGemini
Overrides
Methods
chat()
chat(req: Readonly<AxChatRequest<TModel>>, options?: Readonly<AxAIPromptConfig & AxAIServiceActionOptions<AxAIGoogleGeminiModel, AxAIGoogleGeminiEmbedModel>>): Promise<
| AxChatResponse
| ReadableStream<AxChatResponse>>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L326
Parameters
Parameter | Type |
---|---|
req | Readonly <AxChatRequest <TModel >> |
options? | Readonly <AxAIPromptConfig & AxAIServiceActionOptions <AxAIGoogleGeminiModel , AxAIGoogleGeminiEmbedModel >> |
Returns
Promise
<
| AxChatResponse
| ReadableStream
<AxChatResponse
>>
Inherited from
embed()
embed(req: Readonly<AxEmbedRequest<TEmbedModel>>, options?: Readonly<AxAIServiceActionOptions<AxAIGoogleGeminiModel, AxAIGoogleGeminiEmbedModel>>): Promise<AxEmbedResponse>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L625
Parameters
Parameter | Type |
---|---|
req | Readonly <AxEmbedRequest <TEmbedModel >> |
options? | Readonly <AxAIServiceActionOptions <AxAIGoogleGeminiModel , AxAIGoogleGeminiEmbedModel >> |
Returns
Promise
<AxEmbedResponse
>
Inherited from
getFeatures()
getFeatures(model?: AxAIGoogleGeminiModel): AxAIFeatures;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L265
Parameters
Parameter | Type |
---|---|
model? | AxAIGoogleGeminiModel |
Returns
Inherited from
getId()
getId(): string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L194
Returns
string
Inherited from
getLastUsedChatModel()
getLastUsedChatModel():
| undefined
| AxAIGoogleGeminiModel;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L271
Returns
| undefined
| AxAIGoogleGeminiModel
Inherited from
getLastUsedEmbedModel()
getLastUsedEmbedModel():
| undefined
| AxAIGoogleGeminiEmbedModel;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L275
Returns
| undefined
| AxAIGoogleGeminiEmbedModel
Inherited from
AxBaseAI
.getLastUsedEmbedModel
getLastUsedModelConfig()
getLastUsedModelConfig(): undefined | AxModelConfig;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L279
Returns
undefined
| AxModelConfig
Inherited from
AxBaseAI
.getLastUsedModelConfig
getLogger()
getLogger(): AxLoggerFunction;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L230
Returns
Inherited from
getMetrics()
getMetrics(): AxAIServiceMetrics;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L322
Returns
Inherited from
getModelList()
getModelList(): undefined | AxAIModelList;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L234
Returns
undefined
| AxAIModelList
Inherited from
getName()
getName(): string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L261
Returns
string
Inherited from
getOptions()
getOptions(): Readonly<AxAIServiceOptions>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L217
Returns
Readonly
<AxAIServiceOptions
>
Inherited from
setAPIURL()
setAPIURL(apiURL: string): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L198
Parameters
Parameter | Type |
---|---|
apiURL | string |
Returns
void
Inherited from
setHeaders()
setHeaders(headers: () => Promise<Record<string, string>>): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L202
Parameters
Parameter | Type |
---|---|
headers | () => Promise <Record <string , string >> |
Returns
void
Inherited from
setName()
setName(name: string): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L190
Parameters
Parameter | Type |
---|---|
name | string |
Returns
void
Inherited from
setOptions()
setOptions(options: Readonly<AxAIServiceOptions>): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L206
Parameters
Parameter | Type |
---|---|
options | Readonly <AxAIServiceOptions > |
Returns
void
Inherited from
AxAIGrok
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/x-grok/api.ts#L76
Extends
Constructors
Constructor
new AxAIGrok(__namedParameters: Readonly<Omit<AxAIGrokArgs, "name">>): AxAIGrok;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/x-grok/api.ts#L81
Parameters
Parameter | Type |
---|---|
__namedParameters | Readonly <Omit <AxAIGrokArgs , "name" >> |
Returns
AxAIGrok
Overrides
Methods
chat()
chat(req: Readonly<AxChatRequest<TModel>>, options?: Readonly<AxAIPromptConfig & AxAIServiceActionOptions<AxAIGrokModel, GrokEmbedSmall>>): Promise<
| AxChatResponse
| ReadableStream<AxChatResponse>>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L326
Parameters
Parameter | Type |
---|---|
req | Readonly <AxChatRequest <TModel >> |
options? | Readonly <AxAIPromptConfig & AxAIServiceActionOptions <AxAIGrokModel , GrokEmbedSmall >> |
Returns
Promise
<
| AxChatResponse
| ReadableStream
<AxChatResponse
>>
Inherited from
embed()
embed(req: Readonly<AxEmbedRequest<TEmbedModel>>, options?: Readonly<AxAIServiceActionOptions<AxAIGrokModel, GrokEmbedSmall>>): Promise<AxEmbedResponse>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L625
Parameters
Parameter | Type |
---|---|
req | Readonly <AxEmbedRequest <TEmbedModel >> |
options? | Readonly <AxAIServiceActionOptions <AxAIGrokModel , GrokEmbedSmall >> |
Returns
Promise
<AxEmbedResponse
>
Inherited from
getFeatures()
getFeatures(model?: AxAIGrokModel): AxAIFeatures;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L265
Parameters
Parameter | Type |
---|---|
model? | AxAIGrokModel |
Returns
Inherited from
getId()
getId(): string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L194
Returns
string
Inherited from
getLastUsedChatModel()
getLastUsedChatModel(): undefined | AxAIGrokModel;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L271
Returns
undefined
| AxAIGrokModel
Inherited from
AxAIOpenAIBase
.getLastUsedChatModel
getLastUsedEmbedModel()
getLastUsedEmbedModel():
| undefined
| GrokEmbedSmall;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L275
Returns
| undefined
| GrokEmbedSmall
Inherited from
AxAIOpenAIBase
.getLastUsedEmbedModel
getLastUsedModelConfig()
getLastUsedModelConfig(): undefined | AxModelConfig;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L279
Returns
undefined
| AxModelConfig
Inherited from
AxAIOpenAIBase
.getLastUsedModelConfig
getLogger()
getLogger(): AxLoggerFunction;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L230
Returns
Inherited from
getMetrics()
getMetrics(): AxAIServiceMetrics;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L322
Returns
Inherited from
getModelList()
getModelList(): undefined | AxAIModelList;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L234
Returns
undefined
| AxAIModelList
Inherited from
getName()
getName(): string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L261
Returns
string
Inherited from
getOptions()
getOptions(): Readonly<AxAIServiceOptions>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L217
Returns
Readonly
<AxAIServiceOptions
>
Inherited from
setAPIURL()
setAPIURL(apiURL: string): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L198
Parameters
Parameter | Type |
---|---|
apiURL | string |
Returns
void
Inherited from
setHeaders()
setHeaders(headers: () => Promise<Record<string, string>>): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L202
Parameters
Parameter | Type |
---|---|
headers | () => Promise <Record <string , string >> |
Returns
void
Inherited from
setName()
setName(name: string): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L190
Parameters
Parameter | Type |
---|---|
name | string |
Returns
void
Inherited from
setOptions()
setOptions(options: Readonly<AxAIServiceOptions>): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L206
Parameters
Parameter | Type |
---|---|
options | Readonly <AxAIServiceOptions > |
Returns
void
Inherited from
AxAIGroq
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/groq/api.ts#L27
Extends
AxAIOpenAIBase
<AxAIGroqModel
,undefined
>
Constructors
Constructor
new AxAIGroq(__namedParameters: Readonly<Omit<AxAIGroqArgs, "name">>): AxAIGroq;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/groq/api.ts#L28
Parameters
Parameter | Type |
---|---|
__namedParameters | Readonly <Omit <AxAIGroqArgs , "name" >> |
Returns
AxAIGroq
Overrides
Methods
chat()
chat(req: Readonly<AxChatRequest<TModel>>, options?: Readonly<AxAIPromptConfig & AxAIServiceActionOptions<AxAIGroqModel, undefined>>): Promise<
| AxChatResponse
| ReadableStream<AxChatResponse>>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L326
Parameters
Parameter | Type |
---|---|
req | Readonly <AxChatRequest <TModel >> |
options? | Readonly <AxAIPromptConfig & AxAIServiceActionOptions <AxAIGroqModel , undefined >> |
Returns
Promise
<
| AxChatResponse
| ReadableStream
<AxChatResponse
>>
Inherited from
embed()
embed(req: Readonly<AxEmbedRequest<TEmbedModel>>, options?: Readonly<AxAIServiceActionOptions<AxAIGroqModel, undefined>>): Promise<AxEmbedResponse>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L625
Parameters
Parameter | Type |
---|---|
req | Readonly <AxEmbedRequest <TEmbedModel >> |
options? | Readonly <AxAIServiceActionOptions <AxAIGroqModel , undefined >> |
Returns
Promise
<AxEmbedResponse
>
Inherited from
getFeatures()
getFeatures(model?: AxAIGroqModel): AxAIFeatures;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L265
Parameters
Parameter | Type |
---|---|
model? | AxAIGroqModel |
Returns
Inherited from
getId()
getId(): string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L194
Returns
string
Inherited from
getLastUsedChatModel()
getLastUsedChatModel(): undefined | AxAIGroqModel;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L271
Returns
undefined
| AxAIGroqModel
Inherited from
AxAIOpenAIBase
.getLastUsedChatModel
getLastUsedEmbedModel()
getLastUsedEmbedModel(): undefined;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L275
Returns
undefined
Inherited from
AxAIOpenAIBase
.getLastUsedEmbedModel
getLastUsedModelConfig()
getLastUsedModelConfig(): undefined | AxModelConfig;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L279
Returns
undefined
| AxModelConfig
Inherited from
AxAIOpenAIBase
.getLastUsedModelConfig
getLogger()
getLogger(): AxLoggerFunction;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L230
Returns
Inherited from
getMetrics()
getMetrics(): AxAIServiceMetrics;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L322
Returns
Inherited from
getModelList()
getModelList(): undefined | AxAIModelList;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L234
Returns
undefined
| AxAIModelList
Inherited from
getName()
getName(): string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L261
Returns
string
Inherited from
getOptions()
getOptions(): Readonly<AxAIServiceOptions>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L217
Returns
Readonly
<AxAIServiceOptions
>
Inherited from
setAPIURL()
setAPIURL(apiURL: string): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L198
Parameters
Parameter | Type |
---|---|
apiURL | string |
Returns
void
Inherited from
setHeaders()
setHeaders(headers: () => Promise<Record<string, string>>): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L202
Parameters
Parameter | Type |
---|---|
headers | () => Promise <Record <string , string >> |
Returns
void
Inherited from
setName()
setName(name: string): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L190
Parameters
Parameter | Type |
---|---|
name | string |
Returns
void
Inherited from
setOptions()
setOptions(options: Readonly<AxAIServiceOptions>): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/groq/api.ts#L71
Parameters
Parameter | Type |
---|---|
options | Readonly <AxAIServiceOptions > |
Returns
void
Overrides
AxAIHuggingFace
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/huggingface/api.ts#L166
Extends
AxBaseAI
<AxAIHuggingFaceModel
,unknown
,AxAIHuggingFaceRequest
,unknown
,AxAIHuggingFaceResponse
,unknown
,unknown
>
Constructors
Constructor
new AxAIHuggingFace(__namedParameters: Readonly<Omit<AxAIHuggingFaceArgs, "name">>): AxAIHuggingFace;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/huggingface/api.ts#L175
Parameters
Parameter | Type |
---|---|
__namedParameters | Readonly <Omit <AxAIHuggingFaceArgs , "name" >> |
Returns
AxAIHuggingFace
Overrides
Methods
chat()
chat(req: Readonly<AxChatRequest<TModel>>, options?: Readonly<AxAIPromptConfig & AxAIServiceActionOptions<MetaLlama270BChatHF, unknown>>): Promise<
| AxChatResponse
| ReadableStream<AxChatResponse>>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L326
Parameters
Parameter | Type |
---|---|
req | Readonly <AxChatRequest <TModel >> |
options? | Readonly <AxAIPromptConfig & AxAIServiceActionOptions <MetaLlama270BChatHF , unknown >> |
Returns
Promise
<
| AxChatResponse
| ReadableStream
<AxChatResponse
>>
Inherited from
embed()
embed(req: Readonly<AxEmbedRequest<TEmbedModel>>, options?: Readonly<AxAIServiceActionOptions<MetaLlama270BChatHF, unknown>>): Promise<AxEmbedResponse>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L625
Parameters
Parameter | Type |
---|---|
req | Readonly <AxEmbedRequest <TEmbedModel >> |
options? | Readonly <AxAIServiceActionOptions <MetaLlama270BChatHF , unknown >> |
Returns
Promise
<AxEmbedResponse
>
Inherited from
getFeatures()
getFeatures(model?: MetaLlama270BChatHF): AxAIFeatures;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L265
Parameters
Parameter | Type |
---|---|
model? | MetaLlama270BChatHF |
Returns
Inherited from
getId()
getId(): string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L194
Returns
string
Inherited from
getLastUsedChatModel()
getLastUsedChatModel():
| undefined
| MetaLlama270BChatHF;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L271
Returns
| undefined
| MetaLlama270BChatHF
Inherited from
getLastUsedEmbedModel()
getLastUsedEmbedModel(): unknown;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L275
Returns
unknown
Inherited from
AxBaseAI
.getLastUsedEmbedModel
getLastUsedModelConfig()
getLastUsedModelConfig(): undefined | AxModelConfig;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L279
Returns
undefined
| AxModelConfig
Inherited from
AxBaseAI
.getLastUsedModelConfig
getLogger()
getLogger(): AxLoggerFunction;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L230
Returns
Inherited from
getMetrics()
getMetrics(): AxAIServiceMetrics;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L322
Returns
Inherited from
getModelList()
getModelList(): undefined | AxAIModelList;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L234
Returns
undefined
| AxAIModelList
Inherited from
getName()
getName(): string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L261
Returns
string
Inherited from
getOptions()
getOptions(): Readonly<AxAIServiceOptions>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L217
Returns
Readonly
<AxAIServiceOptions
>
Inherited from
setAPIURL()
setAPIURL(apiURL: string): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L198
Parameters
Parameter | Type |
---|---|
apiURL | string |
Returns
void
Inherited from
setHeaders()
setHeaders(headers: () => Promise<Record<string, string>>): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L202
Parameters
Parameter | Type |
---|---|
headers | () => Promise <Record <string , string >> |
Returns
void
Inherited from
setName()
setName(name: string): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L190
Parameters
Parameter | Type |
---|---|
name | string |
Returns
void
Inherited from
setOptions()
setOptions(options: Readonly<AxAIServiceOptions>): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L206
Parameters
Parameter | Type |
---|---|
options | Readonly <AxAIServiceOptions > |
Returns
void
Inherited from
AxAIMistral
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/mistral/api.ts#L79
Extends
Constructors
Constructor
new AxAIMistral(__namedParameters: Readonly<Omit<AxAIMistralArgs, "name">>): AxAIMistral;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/mistral/api.ts#L83
Parameters
Parameter | Type |
---|---|
__namedParameters | Readonly <Omit <AxAIMistralArgs , "name" >> |
Returns
AxAIMistral
Overrides
Methods
chat()
chat(req: Readonly<AxChatRequest<TModel>>, options?: Readonly<AxAIPromptConfig & AxAIServiceActionOptions<AxAIMistralModel, MistralEmbed>>): Promise<
| AxChatResponse
| ReadableStream<AxChatResponse>>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L326
Parameters
Parameter | Type |
---|---|
req | Readonly <AxChatRequest <TModel >> |
options? | Readonly <AxAIPromptConfig & AxAIServiceActionOptions <AxAIMistralModel , MistralEmbed >> |
Returns
Promise
<
| AxChatResponse
| ReadableStream
<AxChatResponse
>>
Inherited from
embed()
embed(req: Readonly<AxEmbedRequest<TEmbedModel>>, options?: Readonly<AxAIServiceActionOptions<AxAIMistralModel, MistralEmbed>>): Promise<AxEmbedResponse>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L625
Parameters
Parameter | Type |
---|---|
req | Readonly <AxEmbedRequest <TEmbedModel >> |
options? | Readonly <AxAIServiceActionOptions <AxAIMistralModel , MistralEmbed >> |
Returns
Promise
<AxEmbedResponse
>
Inherited from
getFeatures()
getFeatures(model?: AxAIMistralModel): AxAIFeatures;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L265
Parameters
Parameter | Type |
---|---|
model? | AxAIMistralModel |
Returns
Inherited from
getId()
getId(): string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L194
Returns
string
Inherited from
getLastUsedChatModel()
getLastUsedChatModel(): undefined | AxAIMistralModel;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L271
Returns
undefined
| AxAIMistralModel
Inherited from
AxAIOpenAIBase
.getLastUsedChatModel
getLastUsedEmbedModel()
getLastUsedEmbedModel():
| undefined
| MistralEmbed;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L275
Returns
| undefined
| MistralEmbed
Inherited from
AxAIOpenAIBase
.getLastUsedEmbedModel
getLastUsedModelConfig()
getLastUsedModelConfig(): undefined | AxModelConfig;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L279
Returns
undefined
| AxModelConfig
Inherited from
AxAIOpenAIBase
.getLastUsedModelConfig
getLogger()
getLogger(): AxLoggerFunction;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L230
Returns
Inherited from
getMetrics()
getMetrics(): AxAIServiceMetrics;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L322
Returns
Inherited from
getModelList()
getModelList(): undefined | AxAIModelList;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L234
Returns
undefined
| AxAIModelList
Inherited from
getName()
getName(): string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L261
Returns
string
Inherited from
getOptions()
getOptions(): Readonly<AxAIServiceOptions>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L217
Returns
Readonly
<AxAIServiceOptions
>
Inherited from
setAPIURL()
setAPIURL(apiURL: string): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L198
Parameters
Parameter | Type |
---|---|
apiURL | string |
Returns
void
Inherited from
setHeaders()
setHeaders(headers: () => Promise<Record<string, string>>): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L202
Parameters
Parameter | Type |
---|---|
headers | () => Promise <Record <string , string >> |
Returns
void
Inherited from
setName()
setName(name: string): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L190
Parameters
Parameter | Type |
---|---|
name | string |
Returns
void
Inherited from
setOptions()
setOptions(options: Readonly<AxAIServiceOptions>): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L206
Parameters
Parameter | Type |
---|---|
options | Readonly <AxAIServiceOptions > |
Returns
void
Inherited from
AxAIOllama
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/ollama/api.ts#L33
OllamaAI: AI Service
Extends
AxAIOpenAIBase
<string
,string
>
Constructors
Constructor
new AxAIOllama(__namedParameters: Readonly<Omit<AxAIOllamaArgs, "name">>): AxAIOllama;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/ollama/api.ts#L34
Parameters
Parameter | Type |
---|---|
__namedParameters | Readonly <Omit <AxAIOllamaArgs , "name" >> |
Returns
AxAIOllama
Overrides
Methods
chat()
chat(req: Readonly<AxChatRequest<TModel>>, options?: Readonly<AxAIPromptConfig & AxAIServiceActionOptions<string, string>>): Promise<
| AxChatResponse
| ReadableStream<AxChatResponse>>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L326
Parameters
Parameter | Type |
---|---|
req | Readonly <AxChatRequest <TModel >> |
options? | Readonly <AxAIPromptConfig & AxAIServiceActionOptions <string , string >> |
Returns
Promise
<
| AxChatResponse
| ReadableStream
<AxChatResponse
>>
Inherited from
embed()
embed(req: Readonly<AxEmbedRequest<TEmbedModel>>, options?: Readonly<AxAIServiceActionOptions<string, string>>): Promise<AxEmbedResponse>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L625
Parameters
Parameter | Type |
---|---|
req | Readonly <AxEmbedRequest <TEmbedModel >> |
options? | Readonly <AxAIServiceActionOptions <string , string >> |
Returns
Promise
<AxEmbedResponse
>
Inherited from
getFeatures()
getFeatures(model?: string): AxAIFeatures;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L265
Parameters
Parameter | Type |
---|---|
model? | string |
Returns
Inherited from
getId()
getId(): string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L194
Returns
string
Inherited from
getLastUsedChatModel()
getLastUsedChatModel(): undefined | string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L271
Returns
undefined
| string
Inherited from
AxAIOpenAIBase
.getLastUsedChatModel
getLastUsedEmbedModel()
getLastUsedEmbedModel(): undefined | string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L275
Returns
undefined
| string
Inherited from
AxAIOpenAIBase
.getLastUsedEmbedModel
getLastUsedModelConfig()
getLastUsedModelConfig(): undefined | AxModelConfig;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L279
Returns
undefined
| AxModelConfig
Inherited from
AxAIOpenAIBase
.getLastUsedModelConfig
getLogger()
getLogger(): AxLoggerFunction;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L230
Returns
Inherited from
getMetrics()
getMetrics(): AxAIServiceMetrics;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L322
Returns
Inherited from
getModelList()
getModelList(): undefined | AxAIModelList;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L234
Returns
undefined
| AxAIModelList
Inherited from
getName()
getName(): string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L261
Returns
string
Inherited from
getOptions()
getOptions(): Readonly<AxAIServiceOptions>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L217
Returns
Readonly
<AxAIServiceOptions
>
Inherited from
setAPIURL()
setAPIURL(apiURL: string): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L198
Parameters
Parameter | Type |
---|---|
apiURL | string |
Returns
void
Inherited from
setHeaders()
setHeaders(headers: () => Promise<Record<string, string>>): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L202
Parameters
Parameter | Type |
---|---|
headers | () => Promise <Record <string , string >> |
Returns
void
Inherited from
setName()
setName(name: string): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L190
Parameters
Parameter | Type |
---|---|
name | string |
Returns
void
Inherited from
setOptions()
setOptions(options: Readonly<AxAIServiceOptions>): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L206
Parameters
Parameter | Type |
---|---|
options | Readonly <AxAIServiceOptions > |
Returns
void
Inherited from
AxAIOpenAI
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/openai/api.ts#L616
Extends
Constructors
Constructor
new AxAIOpenAI(__namedParameters: Readonly<Omit<AxAIOpenAIArgs, "name">>): AxAIOpenAI;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/openai/api.ts#L620
Parameters
Parameter | Type |
---|---|
__namedParameters | Readonly <Omit <AxAIOpenAIArgs , "name" >> |
Returns
AxAIOpenAI
Overrides
Methods
chat()
chat(req: Readonly<AxChatRequest<TModel>>, options?: Readonly<AxAIPromptConfig & AxAIServiceActionOptions<AxAIOpenAIModel, AxAIOpenAIEmbedModel>>): Promise<
| AxChatResponse
| ReadableStream<AxChatResponse>>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L326
Parameters
Parameter | Type |
---|---|
req | Readonly <AxChatRequest <TModel >> |
options? | Readonly <AxAIPromptConfig & AxAIServiceActionOptions <AxAIOpenAIModel , AxAIOpenAIEmbedModel >> |
Returns
Promise
<
| AxChatResponse
| ReadableStream
<AxChatResponse
>>
Inherited from
embed()
embed(req: Readonly<AxEmbedRequest<TEmbedModel>>, options?: Readonly<AxAIServiceActionOptions<AxAIOpenAIModel, AxAIOpenAIEmbedModel>>): Promise<AxEmbedResponse>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L625
Parameters
Parameter | Type |
---|---|
req | Readonly <AxEmbedRequest <TEmbedModel >> |
options? | Readonly <AxAIServiceActionOptions <AxAIOpenAIModel , AxAIOpenAIEmbedModel >> |
Returns
Promise
<AxEmbedResponse
>
Inherited from
getFeatures()
getFeatures(model?: AxAIOpenAIModel): AxAIFeatures;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L265
Parameters
Parameter | Type |
---|---|
model? | AxAIOpenAIModel |
Returns
Inherited from
getId()
getId(): string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L194
Returns
string
Inherited from
getLastUsedChatModel()
getLastUsedChatModel(): undefined | AxAIOpenAIModel;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L271
Returns
undefined
| AxAIOpenAIModel
Inherited from
AxAIOpenAIBase
.getLastUsedChatModel
getLastUsedEmbedModel()
getLastUsedEmbedModel():
| undefined
| AxAIOpenAIEmbedModel;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L275
Returns
| undefined
| AxAIOpenAIEmbedModel
Inherited from
AxAIOpenAIBase
.getLastUsedEmbedModel
getLastUsedModelConfig()
getLastUsedModelConfig(): undefined | AxModelConfig;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L279
Returns
undefined
| AxModelConfig
Inherited from
AxAIOpenAIBase
.getLastUsedModelConfig
getLogger()
getLogger(): AxLoggerFunction;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L230
Returns
Inherited from
getMetrics()
getMetrics(): AxAIServiceMetrics;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L322
Returns
Inherited from
getModelList()
getModelList(): undefined | AxAIModelList;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L234
Returns
undefined
| AxAIModelList
Inherited from
getName()
getName(): string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L261
Returns
string
Inherited from
getOptions()
getOptions(): Readonly<AxAIServiceOptions>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L217
Returns
Readonly
<AxAIServiceOptions
>
Inherited from
setAPIURL()
setAPIURL(apiURL: string): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L198
Parameters
Parameter | Type |
---|---|
apiURL | string |
Returns
void
Inherited from
setHeaders()
setHeaders(headers: () => Promise<Record<string, string>>): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L202
Parameters
Parameter | Type |
---|---|
headers | () => Promise <Record <string , string >> |
Returns
void
Inherited from
setName()
setName(name: string): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L190
Parameters
Parameter | Type |
---|---|
name | string |
Returns
void
Inherited from
setOptions()
setOptions(options: Readonly<AxAIServiceOptions>): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L206
Parameters
Parameter | Type |
---|---|
options | Readonly <AxAIServiceOptions > |
Returns
void
Inherited from
AxAIOpenAIResponses
Base class for OpenAI AI services using the /v1/responses API endpoint
Extends
AxAIOpenAIResponsesBase
<AxAIOpenAIResponsesModel
,AxAIOpenAIEmbedModel
,AxAIOpenAIResponsesRequest
<AxAIOpenAIResponsesModel
>>
Constructors
Constructor
new AxAIOpenAIResponses(__namedParameters: Readonly<Omit<AxAIOpenAIResponsesArgs, "name">>): AxAIOpenAIResponses;
Parameters
Parameter | Type |
---|---|
__namedParameters | Readonly <Omit <AxAIOpenAIResponsesArgs , "name" >> |
Returns
AxAIOpenAIResponses
Overrides
AxAIOpenAIResponsesBase
.constructor
Methods
chat()
chat(req: Readonly<AxChatRequest<TModel>>, options?: Readonly<AxAIPromptConfig & AxAIServiceActionOptions<AxAIOpenAIResponsesModel, AxAIOpenAIEmbedModel>>): Promise<
| AxChatResponse
| ReadableStream<AxChatResponse>>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L326
Parameters
Parameter | Type |
---|---|
req | Readonly <AxChatRequest <TModel >> |
options? | Readonly <AxAIPromptConfig & AxAIServiceActionOptions <AxAIOpenAIResponsesModel , AxAIOpenAIEmbedModel >> |
Returns
Promise
<
| AxChatResponse
| ReadableStream
<AxChatResponse
>>
Inherited from
embed()
embed(req: Readonly<AxEmbedRequest<TEmbedModel>>, options?: Readonly<AxAIServiceActionOptions<AxAIOpenAIResponsesModel, AxAIOpenAIEmbedModel>>): Promise<AxEmbedResponse>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L625
Parameters
Parameter | Type |
---|---|
req | Readonly <AxEmbedRequest <TEmbedModel >> |
options? | Readonly <AxAIServiceActionOptions <AxAIOpenAIResponsesModel , AxAIOpenAIEmbedModel >> |
Returns
Promise
<AxEmbedResponse
>
Inherited from
getFeatures()
getFeatures(model?: AxAIOpenAIResponsesModel): AxAIFeatures;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L265
Parameters
Parameter | Type |
---|---|
model? | AxAIOpenAIResponsesModel |
Returns
Inherited from
AxAIOpenAIResponsesBase
.getFeatures
getId()
getId(): string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L194
Returns
string
Inherited from
getLastUsedChatModel()
getLastUsedChatModel():
| undefined
| AxAIOpenAIResponsesModel;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L271
Returns
| undefined
| AxAIOpenAIResponsesModel
Inherited from
AxAIOpenAIResponsesBase
.getLastUsedChatModel
getLastUsedEmbedModel()
getLastUsedEmbedModel():
| undefined
| AxAIOpenAIEmbedModel;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L275
Returns
| undefined
| AxAIOpenAIEmbedModel
Inherited from
AxAIOpenAIResponsesBase
.getLastUsedEmbedModel
getLastUsedModelConfig()
getLastUsedModelConfig(): undefined | AxModelConfig;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L279
Returns
undefined
| AxModelConfig
Inherited from
AxAIOpenAIResponsesBase
.getLastUsedModelConfig
getLogger()
getLogger(): AxLoggerFunction;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L230
Returns
Inherited from
AxAIOpenAIResponsesBase
.getLogger
getMetrics()
getMetrics(): AxAIServiceMetrics;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L322
Returns
Inherited from
AxAIOpenAIResponsesBase
.getMetrics
getModelList()
getModelList(): undefined | AxAIModelList;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L234
Returns
undefined
| AxAIModelList
Inherited from
AxAIOpenAIResponsesBase
.getModelList
getName()
getName(): string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L261
Returns
string
Inherited from
AxAIOpenAIResponsesBase
.getName
getOptions()
getOptions(): Readonly<AxAIServiceOptions>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L217
Returns
Readonly
<AxAIServiceOptions
>
Inherited from
AxAIOpenAIResponsesBase
.getOptions
setAPIURL()
setAPIURL(apiURL: string): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L198
Parameters
Parameter | Type |
---|---|
apiURL | string |
Returns
void
Inherited from
AxAIOpenAIResponsesBase
.setAPIURL
setHeaders()
setHeaders(headers: () => Promise<Record<string, string>>): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L202
Parameters
Parameter | Type |
---|---|
headers | () => Promise <Record <string , string >> |
Returns
void
Inherited from
AxAIOpenAIResponsesBase
.setHeaders
setName()
setName(name: string): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L190
Parameters
Parameter | Type |
---|---|
name | string |
Returns
void
Inherited from
AxAIOpenAIResponsesBase
.setName
setOptions()
setOptions(options: Readonly<AxAIServiceOptions>): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L206
Parameters
Parameter | Type |
---|---|
options | Readonly <AxAIServiceOptions > |
Returns
void
Inherited from
AxAIOpenAIBase
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/openai/api.ts#L564
Extends
AxBaseAI
<TModel
,TEmbedModel
,AxAIOpenAIChatRequest
<TModel
>,AxAIOpenAIEmbedRequest
<TEmbedModel
>,AxAIOpenAIChatResponse
,AxAIOpenAIChatResponseDelta
,AxAIOpenAIEmbedResponse
>
Extended by
Type Parameters
Type Parameter | Default type |
---|---|
TModel | - |
TEmbedModel | - |
TChatReq extends AxAIOpenAIChatRequest <TModel > | AxAIOpenAIChatRequest <TModel > |
Constructors
Constructor
new AxAIOpenAIBase<TModel, TEmbedModel, TChatReq>(__namedParameters: Readonly<Omit<AxAIOpenAIBaseArgs<TModel, TEmbedModel, TChatReq>, "name">>): AxAIOpenAIBase<TModel, TEmbedModel, TChatReq>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/openai/api.ts#L578
Parameters
Parameter | Type |
---|---|
__namedParameters | Readonly <Omit <AxAIOpenAIBaseArgs <TModel , TEmbedModel , TChatReq >, "name" >> |
Returns
AxAIOpenAIBase
<TModel
, TEmbedModel
, TChatReq
>
Overrides
Methods
chat()
chat(req: Readonly<AxChatRequest<TModel>>, options?: Readonly<AxAIPromptConfig & AxAIServiceActionOptions<TModel, TEmbedModel>>): Promise<
| AxChatResponse
| ReadableStream<AxChatResponse>>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L326
Parameters
Parameter | Type |
---|---|
req | Readonly <AxChatRequest <TModel >> |
options? | Readonly <AxAIPromptConfig & AxAIServiceActionOptions <TModel , TEmbedModel >> |
Returns
Promise
<
| AxChatResponse
| ReadableStream
<AxChatResponse
>>
Inherited from
embed()
embed(req: Readonly<AxEmbedRequest<TEmbedModel>>, options?: Readonly<AxAIServiceActionOptions<TModel, TEmbedModel>>): Promise<AxEmbedResponse>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L625
Parameters
Parameter | Type |
---|---|
req | Readonly <AxEmbedRequest <TEmbedModel >> |
options? | Readonly <AxAIServiceActionOptions <TModel , TEmbedModel >> |
Returns
Promise
<AxEmbedResponse
>
Inherited from
getFeatures()
getFeatures(model?: TModel): AxAIFeatures;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L265
Parameters
Parameter | Type |
---|---|
model? | TModel |
Returns
Inherited from
getId()
getId(): string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L194
Returns
string
Inherited from
getLastUsedChatModel()
getLastUsedChatModel(): undefined | TModel;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L271
Returns
undefined
| TModel
Inherited from
getLastUsedEmbedModel()
getLastUsedEmbedModel(): undefined | TEmbedModel;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L275
Returns
undefined
| TEmbedModel
Inherited from
AxBaseAI
.getLastUsedEmbedModel
getLastUsedModelConfig()
getLastUsedModelConfig(): undefined | AxModelConfig;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L279
Returns
undefined
| AxModelConfig
Inherited from
AxBaseAI
.getLastUsedModelConfig
getLogger()
getLogger(): AxLoggerFunction;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L230
Returns
Inherited from
getMetrics()
getMetrics(): AxAIServiceMetrics;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L322
Returns
Inherited from
getModelList()
getModelList(): undefined | AxAIModelList;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L234
Returns
undefined
| AxAIModelList
Inherited from
getName()
getName(): string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L261
Returns
string
Inherited from
getOptions()
getOptions(): Readonly<AxAIServiceOptions>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L217
Returns
Readonly
<AxAIServiceOptions
>
Inherited from
setAPIURL()
setAPIURL(apiURL: string): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L198
Parameters
Parameter | Type |
---|---|
apiURL | string |
Returns
void
Inherited from
setHeaders()
setHeaders(headers: () => Promise<Record<string, string>>): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L202
Parameters
Parameter | Type |
---|---|
headers | () => Promise <Record <string , string >> |
Returns
void
Inherited from
setName()
setName(name: string): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L190
Parameters
Parameter | Type |
---|---|
name | string |
Returns
void
Inherited from
setOptions()
setOptions(options: Readonly<AxAIServiceOptions>): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L206
Parameters
Parameter | Type |
---|---|
options | Readonly <AxAIServiceOptions > |
Returns
void
Inherited from
AxAIOpenAIResponsesBase
Base class for OpenAI AI services using the /v1/responses API endpoint
Extends
AxBaseAI
<TModel
,TEmbedModel
,AxAIOpenAIResponsesRequest
<TModel
>,AxAIOpenAIEmbedRequest
<TEmbedModel
>,AxAIOpenAIResponsesResponse
,AxAIOpenAIResponsesResponseDelta
,AxAIOpenAIEmbedResponse
>
Extended by
Type Parameters
Type Parameter |
---|
TModel |
TEmbedModel |
TResponsesReq extends AxAIOpenAIResponsesRequest <TModel > |
Constructors
Constructor
new AxAIOpenAIResponsesBase<TModel, TEmbedModel, TResponsesReq>(__namedParameters: Readonly<AxAIOpenAIResponsesBaseArgs<TModel, TEmbedModel, TResponsesReq>>): AxAIOpenAIResponsesBase<TModel, TEmbedModel, TResponsesReq>;
Parameters
Parameter | Type |
---|---|
__namedParameters | Readonly <AxAIOpenAIResponsesBaseArgs <TModel , TEmbedModel , TResponsesReq >> |
Returns
AxAIOpenAIResponsesBase
<TModel
, TEmbedModel
, TResponsesReq
>
Overrides
Methods
chat()
chat(req: Readonly<AxChatRequest<TModel>>, options?: Readonly<AxAIPromptConfig & AxAIServiceActionOptions<TModel, TEmbedModel>>): Promise<
| AxChatResponse
| ReadableStream<AxChatResponse>>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L326
Parameters
Parameter | Type |
---|---|
req | Readonly <AxChatRequest <TModel >> |
options? | Readonly <AxAIPromptConfig & AxAIServiceActionOptions <TModel , TEmbedModel >> |
Returns
Promise
<
| AxChatResponse
| ReadableStream
<AxChatResponse
>>
Inherited from
embed()
embed(req: Readonly<AxEmbedRequest<TEmbedModel>>, options?: Readonly<AxAIServiceActionOptions<TModel, TEmbedModel>>): Promise<AxEmbedResponse>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L625
Parameters
Parameter | Type |
---|---|
req | Readonly <AxEmbedRequest <TEmbedModel >> |
options? | Readonly <AxAIServiceActionOptions <TModel , TEmbedModel >> |
Returns
Promise
<AxEmbedResponse
>
Inherited from
getFeatures()
getFeatures(model?: TModel): AxAIFeatures;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L265
Parameters
Parameter | Type |
---|---|
model? | TModel |
Returns
Inherited from
getId()
getId(): string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L194
Returns
string
Inherited from
getLastUsedChatModel()
getLastUsedChatModel(): undefined | TModel;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L271
Returns
undefined
| TModel
Inherited from
getLastUsedEmbedModel()
getLastUsedEmbedModel(): undefined | TEmbedModel;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L275
Returns
undefined
| TEmbedModel
Inherited from
AxBaseAI
.getLastUsedEmbedModel
getLastUsedModelConfig()
getLastUsedModelConfig(): undefined | AxModelConfig;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L279
Returns
undefined
| AxModelConfig
Inherited from
AxBaseAI
.getLastUsedModelConfig
getLogger()
getLogger(): AxLoggerFunction;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L230
Returns
Inherited from
getMetrics()
getMetrics(): AxAIServiceMetrics;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L322
Returns
Inherited from
getModelList()
getModelList(): undefined | AxAIModelList;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L234
Returns
undefined
| AxAIModelList
Inherited from
getName()
getName(): string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L261
Returns
string
Inherited from
getOptions()
getOptions(): Readonly<AxAIServiceOptions>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L217
Returns
Readonly
<AxAIServiceOptions
>
Inherited from
setAPIURL()
setAPIURL(apiURL: string): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L198
Parameters
Parameter | Type |
---|---|
apiURL | string |
Returns
void
Inherited from
setHeaders()
setHeaders(headers: () => Promise<Record<string, string>>): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L202
Parameters
Parameter | Type |
---|---|
headers | () => Promise <Record <string , string >> |
Returns
void
Inherited from
setName()
setName(name: string): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L190
Parameters
Parameter | Type |
---|---|
name | string |
Returns
void
Inherited from
setOptions()
setOptions(options: Readonly<AxAIServiceOptions>): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L206
Parameters
Parameter | Type |
---|---|
options | Readonly <AxAIServiceOptions > |
Returns
void
Inherited from
AxAIOpenAIResponsesImpl
Type Parameters
Type Parameter |
---|
TModel |
TEmbedModel |
TResponsesReq extends AxAIOpenAIResponsesRequest <TModel > |
Implements
AxAIServiceImpl
<TModel
,TEmbedModel
,Readonly
<AxAIOpenAIResponsesRequest
<TModel
>>,Readonly
<AxAIOpenAIEmbedRequest
<TEmbedModel
>>,Readonly
<AxAIOpenAIResponsesResponse
>,Readonly
<AxAIOpenAIResponsesResponseDelta
>,Readonly
<AxAIOpenAIEmbedResponse
>>
Constructors
Constructor
new AxAIOpenAIResponsesImpl<TModel, TEmbedModel, TResponsesReq>(
config: Readonly<AxAIOpenAIResponsesConfig<TModel, TEmbedModel>>,
streamingUsage: boolean,
responsesReqUpdater?: ResponsesReqUpdater<TModel, TResponsesReq>): AxAIOpenAIResponsesImpl<TModel, TEmbedModel, TResponsesReq>;
Parameters
Parameter | Type |
---|---|
config | Readonly <AxAIOpenAIResponsesConfig <TModel , TEmbedModel >> |
streamingUsage | boolean |
responsesReqUpdater? | ResponsesReqUpdater <TModel , TResponsesReq > |
Returns
AxAIOpenAIResponsesImpl
<TModel
, TEmbedModel
, TResponsesReq
>
Methods
createChatReq()
createChatReq(req: Readonly<AxInternalChatRequest<TModel>>, config: Readonly<AxAIPromptConfig>): [Readonly<AxAPI>, Readonly<AxAIOpenAIResponsesRequest<TModel>>];
Parameters
Parameter | Type |
---|---|
req | Readonly <AxInternalChatRequest <TModel >> |
config | Readonly <AxAIPromptConfig > |
Returns
[Readonly
<AxAPI
>, Readonly
<AxAIOpenAIResponsesRequest
<TModel
>>]
Implementation of
createChatResp()
createChatResp(resp: Readonly<AxAIOpenAIResponsesResponse>): Readonly<AxChatResponse>;
Parameters
Parameter | Type |
---|---|
resp | Readonly <AxAIOpenAIResponsesResponse > |
Returns
Readonly
<AxChatResponse
>
Implementation of
AxAIServiceImpl
.createChatResp
createChatStreamResp()
createChatStreamResp(streamEvent: Readonly<AxAIOpenAIResponsesResponseDelta>): Readonly<AxChatResponse>;
Parameters
Parameter | Type |
---|---|
streamEvent | Readonly <AxAIOpenAIResponsesResponseDelta > |
Returns
Readonly
<AxChatResponse
>
Implementation of
AxAIServiceImpl
.createChatStreamResp
createEmbedReq()
createEmbedReq(req: Readonly<AxInternalEmbedRequest<TEmbedModel>>): [AxAPI, AxAIOpenAIEmbedRequest<TEmbedModel>];
Parameters
Parameter | Type |
---|---|
req | Readonly <AxInternalEmbedRequest <TEmbedModel >> |
Returns
[AxAPI
, AxAIOpenAIEmbedRequest
<TEmbedModel
>]
Implementation of
AxAIServiceImpl
.createEmbedReq
getModelConfig()
getModelConfig(): Readonly<AxModelConfig>;
Returns
Readonly
<AxModelConfig
>
Implementation of
AxAIServiceImpl
.getModelConfig
getTokenUsage()
getTokenUsage(): undefined | Readonly<AxTokenUsage>;
Returns
undefined
| Readonly
<AxTokenUsage
>
Implementation of
AxAIReka
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/reka/api.ts#L268
Extends
AxBaseAI
<AxAIRekaModel
,undefined
,AxAIRekaChatRequest
,unknown
,AxAIRekaChatResponse
,AxAIRekaChatResponseDelta
,unknown
>
Constructors
Constructor
new AxAIReka(__namedParameters: Readonly<Omit<AxAIRekaArgs, "name">>): AxAIReka;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/reka/api.ts#L277
Parameters
Parameter | Type |
---|---|
__namedParameters | Readonly <Omit <AxAIRekaArgs , "name" >> |
Returns
AxAIReka
Overrides
Methods
chat()
chat(req: Readonly<AxChatRequest<TModel>>, options?: Readonly<AxAIPromptConfig & AxAIServiceActionOptions<AxAIRekaModel, undefined>>): Promise<
| AxChatResponse
| ReadableStream<AxChatResponse>>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L326
Parameters
Parameter | Type |
---|---|
req | Readonly <AxChatRequest <TModel >> |
options? | Readonly <AxAIPromptConfig & AxAIServiceActionOptions <AxAIRekaModel , undefined >> |
Returns
Promise
<
| AxChatResponse
| ReadableStream
<AxChatResponse
>>
Inherited from
embed()
embed(req: Readonly<AxEmbedRequest<TEmbedModel>>, options?: Readonly<AxAIServiceActionOptions<AxAIRekaModel, undefined>>): Promise<AxEmbedResponse>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L625
Parameters
Parameter | Type |
---|---|
req | Readonly <AxEmbedRequest <TEmbedModel >> |
options? | Readonly <AxAIServiceActionOptions <AxAIRekaModel , undefined >> |
Returns
Promise
<AxEmbedResponse
>
Inherited from
getFeatures()
getFeatures(model?: AxAIRekaModel): AxAIFeatures;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L265
Parameters
Parameter | Type |
---|---|
model? | AxAIRekaModel |
Returns
Inherited from
getId()
getId(): string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L194
Returns
string
Inherited from
getLastUsedChatModel()
getLastUsedChatModel(): undefined | AxAIRekaModel;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L271
Returns
undefined
| AxAIRekaModel
Inherited from
getLastUsedEmbedModel()
getLastUsedEmbedModel(): undefined;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L275
Returns
undefined
Inherited from
AxBaseAI
.getLastUsedEmbedModel
getLastUsedModelConfig()
getLastUsedModelConfig(): undefined | AxModelConfig;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L279
Returns
undefined
| AxModelConfig
Inherited from
AxBaseAI
.getLastUsedModelConfig
getLogger()
getLogger(): AxLoggerFunction;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L230
Returns
Inherited from
getMetrics()
getMetrics(): AxAIServiceMetrics;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L322
Returns
Inherited from
getModelList()
getModelList(): undefined | AxAIModelList;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L234
Returns
undefined
| AxAIModelList
Inherited from
getName()
getName(): string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L261
Returns
string
Inherited from
getOptions()
getOptions(): Readonly<AxAIServiceOptions>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L217
Returns
Readonly
<AxAIServiceOptions
>
Inherited from
setAPIURL()
setAPIURL(apiURL: string): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L198
Parameters
Parameter | Type |
---|---|
apiURL | string |
Returns
void
Inherited from
setHeaders()
setHeaders(headers: () => Promise<Record<string, string>>): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L202
Parameters
Parameter | Type |
---|---|
headers | () => Promise <Record <string , string >> |
Returns
void
Inherited from
setName()
setName(name: string): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L190
Parameters
Parameter | Type |
---|---|
name | string |
Returns
void
Inherited from
setOptions()
setOptions(options: Readonly<AxAIServiceOptions>): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L206
Parameters
Parameter | Type |
---|---|
options | Readonly <AxAIServiceOptions > |
Returns
void
Inherited from
AxAIServiceAbortedError
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/util/apicall.ts#L214
Extends
Constructors
Constructor
new AxAIServiceAbortedError(
url: string,
reason?: string,
requestBody?: unknown,
context?: Record<string, unknown>): AxAIServiceAbortedError;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/util/apicall.ts#L215
Parameters
Parameter | Type |
---|---|
url | string |
reason? | string |
requestBody? | unknown |
context? | Record <string , unknown > |
Returns
AxAIServiceAbortedError
Overrides
Properties
Property | Modifier | Type | Description | Inherited from |
---|---|---|---|---|
cause? | public | unknown | - | AxAIServiceError .cause |
context | readonly | Record <string , unknown > | - | AxAIServiceError .context |
errorId | readonly | string | - | AxAIServiceError .errorId |
message | public | string | - | AxAIServiceError .message |
name | public | string | - | AxAIServiceError .name |
requestBody | readonly | unknown | - | AxAIServiceError .requestBody |
responseBody | readonly | unknown | - | AxAIServiceError .responseBody |
stack? | public | string | - | AxAIServiceError .stack |
timestamp | readonly | string | - | AxAIServiceError .timestamp |
url | readonly | string | - | AxAIServiceError .url |
stackTraceLimit | static | number | The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj) ). The default value is 10 but may be set to any valid JavaScript number. Changes will affect any stack trace captured after the value has been changed. If set to a non-number value, or set to a negative number, stack traces will not capture any frames. | AxAIServiceError .stackTraceLimit |
Methods
toString()
toString(): string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/util/apicall.ts#L97
Returns a string representation of an object.
Returns
string
Inherited from
captureStackTrace()
static captureStackTrace(targetObject: object, constructorOpt?: Function): void;
Defined in: node_modules/@types/node/globals.d.ts:145
Creates a .stack
property on targetObject
, which when accessed returns
a string representing the location in the code at which
Error.captureStackTrace()
was called.
const myObject = {};
Error.captureStackTrace(myObject);
myObject.stack; // Similar to `new Error().stack`
The first line of the trace will be prefixed with
${myObject.name}: ${myObject.message}
.
The optional constructorOpt
argument accepts a function. If given, all frames
above constructorOpt
, including constructorOpt
, will be omitted from the
generated stack trace.
The constructorOpt
argument is useful for hiding implementation
details of error generation from the user. For instance:
function a() {
b();
}
function b() {
c();
}
function c() {
// Create an error without stack trace to avoid calculating the stack trace twice.
const { stackTraceLimit } = Error;
Error.stackTraceLimit = 0;
const error = new Error();
Error.stackTraceLimit = stackTraceLimit;
// Capture the stack trace above function b
Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
throw error;
}
a();
Parameters
Parameter | Type |
---|---|
targetObject | object |
constructorOpt? | Function |
Returns
void
Inherited from
AxAIServiceError
.captureStackTrace
prepareStackTrace()
static prepareStackTrace(err: Error, stackTraces: CallSite[]): any;
Defined in: node_modules/@types/node/globals.d.ts:149
See
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
Parameters
Parameter | Type |
---|---|
err | Error |
stackTraces | CallSite [] |
Returns
any
Inherited from
AxAIServiceAuthenticationError
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/util/apicall.ts#L232
Extends
Constructors
Constructor
new AxAIServiceAuthenticationError(
url: string,
requestBody: unknown,
responseBody: unknown,
context?: Record<string, unknown>): AxAIServiceAuthenticationError;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/util/apicall.ts#L233
Parameters
Parameter | Type |
---|---|
url | string |
requestBody | unknown |
responseBody | unknown |
context? | Record <string , unknown > |
Returns
AxAIServiceAuthenticationError
Overrides
Properties
Property | Modifier | Type | Description | Inherited from |
---|---|---|---|---|
cause? | public | unknown | - | AxAIServiceError .cause |
context | readonly | Record <string , unknown > | - | AxAIServiceError .context |
errorId | readonly | string | - | AxAIServiceError .errorId |
message | public | string | - | AxAIServiceError .message |
name | public | string | - | AxAIServiceError .name |
requestBody | readonly | unknown | - | AxAIServiceError .requestBody |
responseBody | readonly | unknown | - | AxAIServiceError .responseBody |
stack? | public | string | - | AxAIServiceError .stack |
timestamp | readonly | string | - | AxAIServiceError .timestamp |
url | readonly | string | - | AxAIServiceError .url |
stackTraceLimit | static | number | The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj) ). The default value is 10 but may be set to any valid JavaScript number. Changes will affect any stack trace captured after the value has been changed. If set to a non-number value, or set to a negative number, stack traces will not capture any frames. | AxAIServiceError .stackTraceLimit |
Methods
toString()
toString(): string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/util/apicall.ts#L97
Returns a string representation of an object.
Returns
string
Inherited from
captureStackTrace()
static captureStackTrace(targetObject: object, constructorOpt?: Function): void;
Defined in: node_modules/@types/node/globals.d.ts:145
Creates a .stack
property on targetObject
, which when accessed returns
a string representing the location in the code at which
Error.captureStackTrace()
was called.
const myObject = {};
Error.captureStackTrace(myObject);
myObject.stack; // Similar to `new Error().stack`
The first line of the trace will be prefixed with
${myObject.name}: ${myObject.message}
.
The optional constructorOpt
argument accepts a function. If given, all frames
above constructorOpt
, including constructorOpt
, will be omitted from the
generated stack trace.
The constructorOpt
argument is useful for hiding implementation
details of error generation from the user. For instance:
function a() {
b();
}
function b() {
c();
}
function c() {
// Create an error without stack trace to avoid calculating the stack trace twice.
const { stackTraceLimit } = Error;
Error.stackTraceLimit = 0;
const error = new Error();
Error.stackTraceLimit = stackTraceLimit;
// Capture the stack trace above function b
Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
throw error;
}
a();
Parameters
Parameter | Type |
---|---|
targetObject | object |
constructorOpt? | Function |
Returns
void
Inherited from
AxAIServiceError
.captureStackTrace
prepareStackTrace()
static prepareStackTrace(err: Error, stackTraces: CallSite[]): any;
Defined in: node_modules/@types/node/globals.d.ts:149
See
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
Parameters
Parameter | Type |
---|---|
err | Error |
stackTraces | CallSite [] |
Returns
any
Inherited from
AxAIServiceNetworkError
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/util/apicall.ts#L139
Extends
Constructors
Constructor
new AxAIServiceNetworkError(
originalError: Error,
url: string,
requestBody: unknown,
responseBody: unknown,
context?: Record<string, unknown>): AxAIServiceNetworkError;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/util/apicall.ts#L140
Parameters
Parameter | Type |
---|---|
originalError | Error |
url | string |
requestBody | unknown |
responseBody | unknown |
context? | Record <string , unknown > |
Returns
AxAIServiceNetworkError
Overrides
Properties
Property | Modifier | Type | Description | Inherited from |
---|---|---|---|---|
cause? | public | unknown | - | AxAIServiceError .cause |
context | readonly | Record <string , unknown > | - | AxAIServiceError .context |
errorId | readonly | string | - | AxAIServiceError .errorId |
message | public | string | - | AxAIServiceError .message |
name | public | string | - | AxAIServiceError .name |
originalError | readonly | Error | - | - |
requestBody | readonly | unknown | - | AxAIServiceError .requestBody |
responseBody | readonly | unknown | - | AxAIServiceError .responseBody |
stack? | public | string | - | AxAIServiceError .stack |
timestamp | readonly | string | - | AxAIServiceError .timestamp |
url | readonly | string | - | AxAIServiceError .url |
stackTraceLimit | static | number | The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj) ). The default value is 10 but may be set to any valid JavaScript number. Changes will affect any stack trace captured after the value has been changed. If set to a non-number value, or set to a negative number, stack traces will not capture any frames. | AxAIServiceError .stackTraceLimit |
Methods
toString()
toString(): string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/util/apicall.ts#L97
Returns a string representation of an object.
Returns
string
Inherited from
captureStackTrace()
static captureStackTrace(targetObject: object, constructorOpt?: Function): void;
Defined in: node_modules/@types/node/globals.d.ts:145
Creates a .stack
property on targetObject
, which when accessed returns
a string representing the location in the code at which
Error.captureStackTrace()
was called.
const myObject = {};
Error.captureStackTrace(myObject);
myObject.stack; // Similar to `new Error().stack`
The first line of the trace will be prefixed with
${myObject.name}: ${myObject.message}
.
The optional constructorOpt
argument accepts a function. If given, all frames
above constructorOpt
, including constructorOpt
, will be omitted from the
generated stack trace.
The constructorOpt
argument is useful for hiding implementation
details of error generation from the user. For instance:
function a() {
b();
}
function b() {
c();
}
function c() {
// Create an error without stack trace to avoid calculating the stack trace twice.
const { stackTraceLimit } = Error;
Error.stackTraceLimit = 0;
const error = new Error();
Error.stackTraceLimit = stackTraceLimit;
// Capture the stack trace above function b
Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
throw error;
}
a();
Parameters
Parameter | Type |
---|---|
targetObject | object |
constructorOpt? | Function |
Returns
void
Inherited from
AxAIServiceError
.captureStackTrace
prepareStackTrace()
static prepareStackTrace(err: Error, stackTraces: CallSite[]): any;
Defined in: node_modules/@types/node/globals.d.ts:149
See
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
Parameters
Parameter | Type |
---|---|
err | Error |
stackTraces | CallSite [] |
Returns
any
Inherited from
AxAIServiceResponseError
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/util/apicall.ts#L163
Extends
Constructors
Constructor
new AxAIServiceResponseError(
message: string,
url: string,
requestBody?: unknown,
context?: Record<string, unknown>): AxAIServiceResponseError;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/util/apicall.ts#L164
Parameters
Parameter | Type |
---|---|
message | string |
url | string |
requestBody? | unknown |
context? | Record <string , unknown > |
Returns
AxAIServiceResponseError
Overrides
Properties
Property | Modifier | Type | Description | Inherited from |
---|---|---|---|---|
cause? | public | unknown | - | AxAIServiceError .cause |
context | readonly | Record <string , unknown > | - | AxAIServiceError .context |
errorId | readonly | string | - | AxAIServiceError .errorId |
message | public | string | - | AxAIServiceError .message |
name | public | string | - | AxAIServiceError .name |
requestBody | readonly | unknown | - | AxAIServiceError .requestBody |
responseBody | readonly | unknown | - | AxAIServiceError .responseBody |
stack? | public | string | - | AxAIServiceError .stack |
timestamp | readonly | string | - | AxAIServiceError .timestamp |
url | readonly | string | - | AxAIServiceError .url |
stackTraceLimit | static | number | The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj) ). The default value is 10 but may be set to any valid JavaScript number. Changes will affect any stack trace captured after the value has been changed. If set to a non-number value, or set to a negative number, stack traces will not capture any frames. | AxAIServiceError .stackTraceLimit |
Methods
toString()
toString(): string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/util/apicall.ts#L97
Returns a string representation of an object.
Returns
string
Inherited from
captureStackTrace()
static captureStackTrace(targetObject: object, constructorOpt?: Function): void;
Defined in: node_modules/@types/node/globals.d.ts:145
Creates a .stack
property on targetObject
, which when accessed returns
a string representing the location in the code at which
Error.captureStackTrace()
was called.
const myObject = {};
Error.captureStackTrace(myObject);
myObject.stack; // Similar to `new Error().stack`
The first line of the trace will be prefixed with
${myObject.name}: ${myObject.message}
.
The optional constructorOpt
argument accepts a function. If given, all frames
above constructorOpt
, including constructorOpt
, will be omitted from the
generated stack trace.
The constructorOpt
argument is useful for hiding implementation
details of error generation from the user. For instance:
function a() {
b();
}
function b() {
c();
}
function c() {
// Create an error without stack trace to avoid calculating the stack trace twice.
const { stackTraceLimit } = Error;
Error.stackTraceLimit = 0;
const error = new Error();
Error.stackTraceLimit = stackTraceLimit;
// Capture the stack trace above function b
Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
throw error;
}
a();
Parameters
Parameter | Type |
---|---|
targetObject | object |
constructorOpt? | Function |
Returns
void
Inherited from
AxAIServiceError
.captureStackTrace
prepareStackTrace()
static prepareStackTrace(err: Error, stackTraces: CallSite[]): any;
Defined in: node_modules/@types/node/globals.d.ts:149
See
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
Parameters
Parameter | Type |
---|---|
err | Error |
stackTraces | CallSite [] |
Returns
any
Inherited from
AxAIServiceStatusError
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/util/apicall.ts#L120
Extends
Constructors
Constructor
new AxAIServiceStatusError(
status: number,
statusText: string,
url: string,
requestBody: unknown,
responseBody: unknown,
context?: Record<string, unknown>): AxAIServiceStatusError;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/util/apicall.ts#L121
Parameters
Parameter | Type |
---|---|
status | number |
statusText | string |
url | string |
requestBody | unknown |
responseBody | unknown |
context? | Record <string , unknown > |
Returns
AxAIServiceStatusError
Overrides
Properties
Property | Modifier | Type | Description | Inherited from |
---|---|---|---|---|
cause? | public | unknown | - | AxAIServiceError .cause |
context | readonly | Record <string , unknown > | - | AxAIServiceError .context |
errorId | readonly | string | - | AxAIServiceError .errorId |
message | public | string | - | AxAIServiceError .message |
name | public | string | - | AxAIServiceError .name |
requestBody | readonly | unknown | - | AxAIServiceError .requestBody |
responseBody | readonly | unknown | - | AxAIServiceError .responseBody |
stack? | public | string | - | AxAIServiceError .stack |
status | readonly | number | - | - |
statusText | readonly | string | - | - |
timestamp | readonly | string | - | AxAIServiceError .timestamp |
url | readonly | string | - | AxAIServiceError .url |
stackTraceLimit | static | number | The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj) ). The default value is 10 but may be set to any valid JavaScript number. Changes will affect any stack trace captured after the value has been changed. If set to a non-number value, or set to a negative number, stack traces will not capture any frames. | AxAIServiceError .stackTraceLimit |
Methods
toString()
toString(): string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/util/apicall.ts#L97
Returns a string representation of an object.
Returns
string
Inherited from
captureStackTrace()
static captureStackTrace(targetObject: object, constructorOpt?: Function): void;
Defined in: node_modules/@types/node/globals.d.ts:145
Creates a .stack
property on targetObject
, which when accessed returns
a string representing the location in the code at which
Error.captureStackTrace()
was called.
const myObject = {};
Error.captureStackTrace(myObject);
myObject.stack; // Similar to `new Error().stack`
The first line of the trace will be prefixed with
${myObject.name}: ${myObject.message}
.
The optional constructorOpt
argument accepts a function. If given, all frames
above constructorOpt
, including constructorOpt
, will be omitted from the
generated stack trace.
The constructorOpt
argument is useful for hiding implementation
details of error generation from the user. For instance:
function a() {
b();
}
function b() {
c();
}
function c() {
// Create an error without stack trace to avoid calculating the stack trace twice.
const { stackTraceLimit } = Error;
Error.stackTraceLimit = 0;
const error = new Error();
Error.stackTraceLimit = stackTraceLimit;
// Capture the stack trace above function b
Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
throw error;
}
a();
Parameters
Parameter | Type |
---|---|
targetObject | object |
constructorOpt? | Function |
Returns
void
Inherited from
AxAIServiceError
.captureStackTrace
prepareStackTrace()
static prepareStackTrace(err: Error, stackTraces: CallSite[]): any;
Defined in: node_modules/@types/node/globals.d.ts:149
See
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
Parameters
Parameter | Type |
---|---|
err | Error |
stackTraces | CallSite [] |
Returns
any
Inherited from
AxAIServiceStreamTerminatedError
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/util/apicall.ts#L175
Extends
Constructors
Constructor
new AxAIServiceStreamTerminatedError(
url: string,
requestBody?: unknown,
lastChunk?: unknown,
context?: Record<string, unknown>): AxAIServiceStreamTerminatedError;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/util/apicall.ts#L176
Parameters
Parameter | Type |
---|---|
url | string |
requestBody? | unknown |
lastChunk? | unknown |
context? | Record <string , unknown > |
Returns
AxAIServiceStreamTerminatedError
Overrides
Properties
Property | Modifier | Type | Description | Inherited from |
---|---|---|---|---|
cause? | public | unknown | - | AxAIServiceError .cause |
context | readonly | Record <string , unknown > | - | AxAIServiceError .context |
errorId | readonly | string | - | AxAIServiceError .errorId |
lastChunk? | readonly | unknown | - | - |
message | public | string | - | AxAIServiceError .message |
name | public | string | - | AxAIServiceError .name |
requestBody | readonly | unknown | - | AxAIServiceError .requestBody |
responseBody | readonly | unknown | - | AxAIServiceError .responseBody |
stack? | public | string | - | AxAIServiceError .stack |
timestamp | readonly | string | - | AxAIServiceError .timestamp |
url | readonly | string | - | AxAIServiceError .url |
stackTraceLimit | static | number | The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj) ). The default value is 10 but may be set to any valid JavaScript number. Changes will affect any stack trace captured after the value has been changed. If set to a non-number value, or set to a negative number, stack traces will not capture any frames. | AxAIServiceError .stackTraceLimit |
Methods
toString()
toString(): string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/util/apicall.ts#L97
Returns a string representation of an object.
Returns
string
Inherited from
captureStackTrace()
static captureStackTrace(targetObject: object, constructorOpt?: Function): void;
Defined in: node_modules/@types/node/globals.d.ts:145
Creates a .stack
property on targetObject
, which when accessed returns
a string representing the location in the code at which
Error.captureStackTrace()
was called.
const myObject = {};
Error.captureStackTrace(myObject);
myObject.stack; // Similar to `new Error().stack`
The first line of the trace will be prefixed with
${myObject.name}: ${myObject.message}
.
The optional constructorOpt
argument accepts a function. If given, all frames
above constructorOpt
, including constructorOpt
, will be omitted from the
generated stack trace.
The constructorOpt
argument is useful for hiding implementation
details of error generation from the user. For instance:
function a() {
b();
}
function b() {
c();
}
function c() {
// Create an error without stack trace to avoid calculating the stack trace twice.
const { stackTraceLimit } = Error;
Error.stackTraceLimit = 0;
const error = new Error();
Error.stackTraceLimit = stackTraceLimit;
// Capture the stack trace above function b
Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
throw error;
}
a();
Parameters
Parameter | Type |
---|---|
targetObject | object |
constructorOpt? | Function |
Returns
void
Inherited from
AxAIServiceError
.captureStackTrace
prepareStackTrace()
static prepareStackTrace(err: Error, stackTraces: CallSite[]): any;
Defined in: node_modules/@types/node/globals.d.ts:149
See
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
Parameters
Parameter | Type |
---|---|
err | Error |
stackTraces | CallSite [] |
Returns
any
Inherited from
AxAIServiceTimeoutError
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/util/apicall.ts#L196
Extends
Constructors
Constructor
new AxAIServiceTimeoutError(
url: string,
timeoutMs: number,
requestBody?: unknown,
context?: Record<string, unknown>): AxAIServiceTimeoutError;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/util/apicall.ts#L197
Parameters
Parameter | Type |
---|---|
url | string |
timeoutMs | number |
requestBody? | unknown |
context? | Record <string , unknown > |
Returns
AxAIServiceTimeoutError
Overrides
Properties
Property | Modifier | Type | Description | Inherited from |
---|---|---|---|---|
cause? | public | unknown | - | AxAIServiceError .cause |
context | readonly | Record <string , unknown > | - | AxAIServiceError .context |
errorId | readonly | string | - | AxAIServiceError .errorId |
message | public | string | - | AxAIServiceError .message |
name | public | string | - | AxAIServiceError .name |
requestBody | readonly | unknown | - | AxAIServiceError .requestBody |
responseBody | readonly | unknown | - | AxAIServiceError .responseBody |
stack? | public | string | - | AxAIServiceError .stack |
timestamp | readonly | string | - | AxAIServiceError .timestamp |
url | readonly | string | - | AxAIServiceError .url |
stackTraceLimit | static | number | The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj) ). The default value is 10 but may be set to any valid JavaScript number. Changes will affect any stack trace captured after the value has been changed. If set to a non-number value, or set to a negative number, stack traces will not capture any frames. | AxAIServiceError .stackTraceLimit |
Methods
toString()
toString(): string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/util/apicall.ts#L97
Returns a string representation of an object.
Returns
string
Inherited from
captureStackTrace()
static captureStackTrace(targetObject: object, constructorOpt?: Function): void;
Defined in: node_modules/@types/node/globals.d.ts:145
Creates a .stack
property on targetObject
, which when accessed returns
a string representing the location in the code at which
Error.captureStackTrace()
was called.
const myObject = {};
Error.captureStackTrace(myObject);
myObject.stack; // Similar to `new Error().stack`
The first line of the trace will be prefixed with
${myObject.name}: ${myObject.message}
.
The optional constructorOpt
argument accepts a function. If given, all frames
above constructorOpt
, including constructorOpt
, will be omitted from the
generated stack trace.
The constructorOpt
argument is useful for hiding implementation
details of error generation from the user. For instance:
function a() {
b();
}
function b() {
c();
}
function c() {
// Create an error without stack trace to avoid calculating the stack trace twice.
const { stackTraceLimit } = Error;
Error.stackTraceLimit = 0;
const error = new Error();
Error.stackTraceLimit = stackTraceLimit;
// Capture the stack trace above function b
Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
throw error;
}
a();
Parameters
Parameter | Type |
---|---|
targetObject | object |
constructorOpt? | Function |
Returns
void
Inherited from
AxAIServiceError
.captureStackTrace
prepareStackTrace()
static prepareStackTrace(err: Error, stackTraces: CallSite[]): any;
Defined in: node_modules/@types/node/globals.d.ts:149
See
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
Parameters
Parameter | Type |
---|---|
err | Error |
stackTraces | CallSite [] |
Returns
any
Inherited from
AxAIRefusalError
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/util/apicall.ts#L244
Extends
Error
Constructors
Constructor
new AxAIRefusalError(
refusalMessage: string,
model?: string,
requestId?: string): AxAIRefusalError;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/util/apicall.ts#L248
Parameters
Parameter | Type |
---|---|
refusalMessage | string |
model? | string |
requestId? | string |
Returns
AxAIRefusalError
Overrides
Error.constructor
Properties
Methods
toString()
toString(): string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/util/apicall.ts#L259
Returns a string representation of an object.
Returns
string
captureStackTrace()
static captureStackTrace(targetObject: object, constructorOpt?: Function): void;
Defined in: node_modules/@types/node/globals.d.ts:145
Creates a .stack
property on targetObject
, which when accessed returns
a string representing the location in the code at which
Error.captureStackTrace()
was called.
const myObject = {};
Error.captureStackTrace(myObject);
myObject.stack; // Similar to `new Error().stack`
The first line of the trace will be prefixed with
${myObject.name}: ${myObject.message}
.
The optional constructorOpt
argument accepts a function. If given, all frames
above constructorOpt
, including constructorOpt
, will be omitted from the
generated stack trace.
The constructorOpt
argument is useful for hiding implementation
details of error generation from the user. For instance:
function a() {
b();
}
function b() {
c();
}
function c() {
// Create an error without stack trace to avoid calculating the stack trace twice.
const { stackTraceLimit } = Error;
Error.stackTraceLimit = 0;
const error = new Error();
Error.stackTraceLimit = stackTraceLimit;
// Capture the stack trace above function b
Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
throw error;
}
a();
Parameters
Parameter | Type |
---|---|
targetObject | object |
constructorOpt? | Function |
Returns
void
Inherited from
Error.captureStackTrace
prepareStackTrace()
static prepareStackTrace(err: Error, stackTraces: CallSite[]): any;
Defined in: node_modules/@types/node/globals.d.ts:149
See
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
Parameters
Parameter | Type |
---|---|
err | Error |
stackTraces | CallSite [] |
Returns
any
Inherited from
Error.prepareStackTrace
AxAIServiceError
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/util/apicall.ts#L76
Extends
Error
Extended by
AxAIServiceAbortedError
AxAIServiceAuthenticationError
AxAIServiceNetworkError
AxAIServiceResponseError
AxAIServiceStatusError
AxAIServiceStreamTerminatedError
AxAIServiceTimeoutError
Constructors
Constructor
new AxAIServiceError(
message: string,
url: string,
requestBody: unknown,
responseBody: unknown,
context: Record<string, unknown>): AxAIServiceError;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/util/apicall.ts#L81
Parameters
Parameter | Type |
---|---|
message | string |
url | string |
requestBody | unknown |
responseBody | unknown |
context | Record <string , unknown > |
Returns
AxAIServiceError
Overrides
Error.constructor
Properties
Methods
toString()
toString(): string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/util/apicall.ts#L97
Returns a string representation of an object.
Returns
string
captureStackTrace()
static captureStackTrace(targetObject: object, constructorOpt?: Function): void;
Defined in: node_modules/@types/node/globals.d.ts:145
Creates a .stack
property on targetObject
, which when accessed returns
a string representing the location in the code at which
Error.captureStackTrace()
was called.
const myObject = {};
Error.captureStackTrace(myObject);
myObject.stack; // Similar to `new Error().stack`
The first line of the trace will be prefixed with
${myObject.name}: ${myObject.message}
.
The optional constructorOpt
argument accepts a function. If given, all frames
above constructorOpt
, including constructorOpt
, will be omitted from the
generated stack trace.
The constructorOpt
argument is useful for hiding implementation
details of error generation from the user. For instance:
function a() {
b();
}
function b() {
c();
}
function c() {
// Create an error without stack trace to avoid calculating the stack trace twice.
const { stackTraceLimit } = Error;
Error.stackTraceLimit = 0;
const error = new Error();
Error.stackTraceLimit = stackTraceLimit;
// Capture the stack trace above function b
Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
throw error;
}
a();
Parameters
Parameter | Type |
---|---|
targetObject | object |
constructorOpt? | Function |
Returns
void
Inherited from
Error.captureStackTrace
prepareStackTrace()
static prepareStackTrace(err: Error, stackTraces: CallSite[]): any;
Defined in: node_modules/@types/node/globals.d.ts:149
See
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
Parameters
Parameter | Type |
---|---|
err | Error |
stackTraces | CallSite [] |
Returns
any
Inherited from
Error.prepareStackTrace
AxAITogether
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/together/api.ts#L18
Extends
AxAIOpenAIBase
<string
,unknown
>
Constructors
Constructor
new AxAITogether(__namedParameters: Readonly<Omit<AxAITogetherArgs, "name">>): AxAITogether;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/together/api.ts#L19
Parameters
Parameter | Type |
---|---|
__namedParameters | Readonly <Omit <AxAITogetherArgs , "name" >> |
Returns
AxAITogether
Overrides
Methods
chat()
chat(req: Readonly<AxChatRequest<TModel>>, options?: Readonly<AxAIPromptConfig & AxAIServiceActionOptions<string, unknown>>): Promise<
| AxChatResponse
| ReadableStream<AxChatResponse>>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L326
Parameters
Parameter | Type |
---|---|
req | Readonly <AxChatRequest <TModel >> |
options? | Readonly <AxAIPromptConfig & AxAIServiceActionOptions <string , unknown >> |
Returns
Promise
<
| AxChatResponse
| ReadableStream
<AxChatResponse
>>
Inherited from
embed()
embed(req: Readonly<AxEmbedRequest<TEmbedModel>>, options?: Readonly<AxAIServiceActionOptions<string, unknown>>): Promise<AxEmbedResponse>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L625
Parameters
Parameter | Type |
---|---|
req | Readonly <AxEmbedRequest <TEmbedModel >> |
options? | Readonly <AxAIServiceActionOptions <string , unknown >> |
Returns
Promise
<AxEmbedResponse
>
Inherited from
getFeatures()
getFeatures(model?: string): AxAIFeatures;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L265
Parameters
Parameter | Type |
---|---|
model? | string |
Returns
Inherited from
getId()
getId(): string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L194
Returns
string
Inherited from
getLastUsedChatModel()
getLastUsedChatModel(): undefined | string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L271
Returns
undefined
| string
Inherited from
AxAIOpenAIBase
.getLastUsedChatModel
getLastUsedEmbedModel()
getLastUsedEmbedModel(): unknown;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L275
Returns
unknown
Inherited from
AxAIOpenAIBase
.getLastUsedEmbedModel
getLastUsedModelConfig()
getLastUsedModelConfig(): undefined | AxModelConfig;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L279
Returns
undefined
| AxModelConfig
Inherited from
AxAIOpenAIBase
.getLastUsedModelConfig
getLogger()
getLogger(): AxLoggerFunction;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L230
Returns
Inherited from
getMetrics()
getMetrics(): AxAIServiceMetrics;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L322
Returns
Inherited from
getModelList()
getModelList(): undefined | AxAIModelList;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L234
Returns
undefined
| AxAIModelList
Inherited from
getName()
getName(): string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L261
Returns
string
Inherited from
getOptions()
getOptions(): Readonly<AxAIServiceOptions>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L217
Returns
Readonly
<AxAIServiceOptions
>
Inherited from
setAPIURL()
setAPIURL(apiURL: string): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L198
Parameters
Parameter | Type |
---|---|
apiURL | string |
Returns
void
Inherited from
setHeaders()
setHeaders(headers: () => Promise<Record<string, string>>): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L202
Parameters
Parameter | Type |
---|---|
headers | () => Promise <Record <string , string >> |
Returns
void
Inherited from
setName()
setName(name: string): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L190
Parameters
Parameter | Type |
---|---|
name | string |
Returns
void
Inherited from
setOptions()
setOptions(options: Readonly<AxAIServiceOptions>): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L206
Parameters
Parameter | Type |
---|---|
options | Readonly <AxAIServiceOptions > |
Returns
void
Inherited from
AxAgent
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/prompts/agent.ts#L160
An AI agent that can process inputs using an AI service and coordinate with child agents. Supports features like smart model routing and automatic input field passing to child agents.
Type Parameters
Type Parameter |
---|
IN extends AxGenIn |
OUT extends AxGenOut |
Implements
AxAgentic
<IN
,OUT
>
Constructors
Constructor
new AxAgent<IN, OUT>(__namedParameters: Readonly<{
agents?: AxAgentic<IN, OUT>[];
ai?: Readonly<AxAIService>;
definition?: string;
description: string;
functions?: AxInputFunctionType;
name: string;
signature: NonNullable<ConstructorParameters<typeof AxSignature>[0]>;
}>, options?: Readonly<AxAgentOptions>): AxAgent<IN, OUT>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/prompts/agent.ts#L175
Parameters
Parameter | Type |
---|---|
__namedParameters | Readonly <{ agents? : AxAgentic <IN , OUT >[]; ai? : Readonly <AxAIService >; definition? : string ; description : string ; functions? : AxInputFunctionType ; name : string ; signature : NonNullable <ConstructorParameters <typeof AxSignature >[0 ]>; }> |
options? | Readonly <AxAgentOptions > |
Returns
AxAgent
<IN
, OUT
>
Methods
forward()
forward(
parentAi: Readonly<AxAIService>,
values: IN | AxMessage<IN>[],
options?: Readonly<AxProgramForwardOptions>): Promise<OUT>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/prompts/agent.ts#L384
Parameters
Parameter | Type |
---|---|
parentAi | Readonly <AxAIService > |
values | IN | AxMessage <IN >[] |
options? | Readonly <AxProgramForwardOptions > |
Returns
Promise
<OUT
>
getFeatures()
getFeatures(): AxAgentFeatures;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/prompts/agent.ts#L332
Returns
Implementation of
getFunction()
getFunction(): AxFunction;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/prompts/agent.ts#L278
Returns
Implementation of
getTraces()
getTraces(): AxProgramTrace<IN, OUT>[];
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/prompts/agent.ts#L262
Returns
AxProgramTrace
<IN
, OUT
>[]
Implementation of
getUsage()
getUsage(): AxModelUsage & object[];
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/prompts/agent.ts#L270
Returns
AxModelUsage
& object
[]
Implementation of
resetUsage()
resetUsage(): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/prompts/agent.ts#L274
Returns
void
Implementation of
setDefinition()
setDefinition(definition: string): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/prompts/agent.ts#L426
Parameters
Parameter | Type |
---|---|
definition | string |
Returns
void
setDemos()
setDemos(demos: readonly AxProgramDemos<IN, OUT>[]): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/prompts/agent.ts#L266
Parameters
Parameter | Type |
---|---|
demos | readonly AxProgramDemos <IN , OUT >[] |
Returns
void
Implementation of
setDescription()
setDescription(description: string): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/prompts/agent.ts#L417
Updates the agent’s description. This updates both the stored description and the function’s description.
Parameters
Parameter | Type | Description |
---|---|---|
description | string | New description for the agent (must be at least 20 characters) |
Returns
void
Throws
Error if description is too short
setExamples()
setExamples(examples: Readonly<AxProgramExamples<IN, OUT>>, options?: Readonly<AxSetExamplesOptions>): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/prompts/agent.ts#L247
Parameters
Parameter | Type |
---|---|
examples | Readonly <AxProgramExamples <IN , OUT >> |
options? | Readonly <AxSetExamplesOptions > |
Returns
void
Implementation of
setId()
setId(id: string): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/prompts/agent.ts#L254
Parameters
Parameter | Type |
---|---|
id | string |
Returns
void
Implementation of
setParentId()
setParentId(parentId: string): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/prompts/agent.ts#L258
Parameters
Parameter | Type |
---|---|
parentId | string |
Returns
void
Implementation of
streamingForward()
streamingForward(
parentAi: Readonly<AxAIService>,
values: IN | AxMessage<IN>[],
options?: Readonly<AxProgramStreamingForwardOptions>): AxGenStreamingOut<OUT>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/prompts/agent.ts#L397
Parameters
Parameter | Type |
---|---|
parentAi | Readonly <AxAIService > |
values | IN | AxMessage <IN >[] |
options? | Readonly <AxProgramStreamingForwardOptions > |
Returns
AxGenStreamingOut
<OUT
>
AxApacheTika
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/docs/tika.ts#L12
Constructors
Constructor
new AxApacheTika(args?: Readonly<AxApacheTikaArgs>): AxApacheTika;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/docs/tika.ts#L16
Parameters
Parameter | Type |
---|---|
args? | Readonly <AxApacheTikaArgs > |
Returns
AxApacheTika
Methods
convert()
convert(files: Readonly<string[] | Blob[]>, options?: Readonly<{
batchSize?: number;
format?: "text" | "html";
}>): Promise<string[]>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/docs/tika.ts#L54
Parameters
Parameter | Type |
---|---|
files | Readonly <string [] | Blob []> |
options? | Readonly <{ batchSize? : number ; format? : "text" | "html" ; }> |
Returns
Promise
<string
[]>
AxAssertionError
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/asserts.ts#L16
Extends
Error
Constructors
Constructor
new AxAssertionError(__namedParameters: Readonly<{
message: string;
}>): AxAssertionError;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/asserts.ts#L17
Parameters
Parameter | Type |
---|---|
__namedParameters | Readonly <{ message : string ; }> |
Returns
AxAssertionError
Overrides
Error.constructor
Properties
Methods
getFixingInstructions()
getFixingInstructions(): object[];
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/asserts.ts#L26
Returns
object
[]
toString()
toString(): string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/asserts.ts#L39
Returns a string representation of an object.
Returns
string
captureStackTrace()
static captureStackTrace(targetObject: object, constructorOpt?: Function): void;
Defined in: node_modules/@types/node/globals.d.ts:145
Creates a .stack
property on targetObject
, which when accessed returns
a string representing the location in the code at which
Error.captureStackTrace()
was called.
const myObject = {};
Error.captureStackTrace(myObject);
myObject.stack; // Similar to `new Error().stack`
The first line of the trace will be prefixed with
${myObject.name}: ${myObject.message}
.
The optional constructorOpt
argument accepts a function. If given, all frames
above constructorOpt
, including constructorOpt
, will be omitted from the
generated stack trace.
The constructorOpt
argument is useful for hiding implementation
details of error generation from the user. For instance:
function a() {
b();
}
function b() {
c();
}
function c() {
// Create an error without stack trace to avoid calculating the stack trace twice.
const { stackTraceLimit } = Error;
Error.stackTraceLimit = 0;
const error = new Error();
Error.stackTraceLimit = stackTraceLimit;
// Capture the stack trace above function b
Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
throw error;
}
a();
Parameters
Parameter | Type |
---|---|
targetObject | object |
constructorOpt? | Function |
Returns
void
Inherited from
Error.captureStackTrace
prepareStackTrace()
static prepareStackTrace(err: Error, stackTraces: CallSite[]): any;
Defined in: node_modules/@types/node/globals.d.ts:149
See
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
Parameters
Parameter | Type |
---|---|
err | Error |
stackTraces | CallSite [] |
Returns
any
Inherited from
Error.prepareStackTrace
AxBalancer
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/balance.ts#L42
Balancer that rotates through services.
Implements
AxAIService
<unknown
,unknown
>
Constructors
Constructor
new AxBalancer(services: readonly AxAIService<unknown, unknown>[], options?: AxBalancerOptions): AxBalancer;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/balance.ts#L55
Parameters
Parameter | Type |
---|---|
services | readonly AxAIService <unknown , unknown >[] |
options? | AxBalancerOptions |
Returns
AxBalancer
Methods
chat()
chat(req: Readonly<AxChatRequest>, options?: Readonly<AxAIPromptConfig & AxAIServiceActionOptions>): Promise<
| AxChatResponse
| ReadableStream<AxChatResponse>>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/balance.ts#L201
Parameters
Parameter | Type |
---|---|
req | Readonly <AxChatRequest > |
options? | Readonly <AxAIPromptConfig & AxAIServiceActionOptions > |
Returns
Promise
<
| AxChatResponse
| ReadableStream
<AxChatResponse
>>
Implementation of
embed()
embed(req: Readonly<AxEmbedRequest>, options?: Readonly<AxAIServiceActionOptions>): Promise<AxEmbedResponse>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/balance.ts#L261
Parameters
Parameter | Type |
---|---|
req | Readonly <AxEmbedRequest > |
options? | Readonly <AxAIServiceActionOptions > |
Returns
Promise
<AxEmbedResponse
>
Implementation of
getFeatures()
getFeatures(model?: string): AxAIFeatures;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/balance.ts#L147
Parameters
Parameter | Type |
---|---|
model? | string |
Returns
Implementation of
getId()
getId(): string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/balance.ts#L143
Returns
string
Implementation of
getLastUsedChatModel()
getLastUsedChatModel(): unknown;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/balance.ts#L76
Returns
unknown
Implementation of
AxAIService
.getLastUsedChatModel
getLastUsedEmbedModel()
getLastUsedEmbedModel(): unknown;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/balance.ts#L79
Returns
unknown
Implementation of
AxAIService
.getLastUsedEmbedModel
getLastUsedModelConfig()
getLastUsedModelConfig(): undefined | AxModelConfig;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/balance.ts#L82
Returns
undefined
| AxModelConfig
Implementation of
AxAIService
.getLastUsedModelConfig
getLogger()
getLogger(): AxLoggerFunction;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/balance.ts#L295
Returns
Implementation of
getMetrics()
getMetrics(): AxAIServiceMetrics;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/balance.ts#L151
Returns
Implementation of
getModelList()
getModelList(): undefined | AxAIModelList;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/balance.ts#L117
Returns
undefined
| AxAIModelList
Implementation of
getName()
getName(): string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/balance.ts#L139
Returns
string
Implementation of
getOptions()
getOptions(): Readonly<AxAIServiceOptions>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/balance.ts#L291
Returns
Readonly
<AxAIServiceOptions
>
Implementation of
setOptions()
setOptions(options: Readonly<AxAIServiceOptions>): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/balance.ts#L287
Parameters
Parameter | Type |
---|---|
options | Readonly <AxAIServiceOptions > |
Returns
void
Implementation of
inputOrderComparator()
static inputOrderComparator(): number;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/balance.ts#L89
Service comparator that respects the input order of services.
Returns
number
metricComparator()
static metricComparator(a: AxAIService, b: AxAIService): number;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/balance.ts#L110
Service comparator that sorts services by cost.
Parameters
Parameter | Type |
---|---|
a | AxAIService |
b | AxAIService |
Returns
number
AxBaseAI
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L72
Extended by
AxAIAnthropic
AxAICohere
AxAIGoogleGemini
AxAIHuggingFace
AxAIOpenAIBase
AxAIOpenAIResponsesBase
AxAIReka
Type Parameters
Type Parameter |
---|
TModel |
TEmbedModel |
TChatRequest |
TEmbedRequest |
TChatResponse |
TChatResponseDelta |
TEmbedResponse |
Implements
AxAIService
<TModel
,TEmbedModel
>
Constructors
Constructor
new AxBaseAI<TModel, TEmbedModel, TChatRequest, TEmbedRequest, TChatResponse, TChatResponseDelta, TEmbedResponse>(aiImpl: Readonly<AxAIServiceImpl<TModel, TEmbedModel, TChatRequest, TEmbedRequest, TChatResponse, TChatResponseDelta, TEmbedResponse>>, __namedParameters: Readonly<AxBaseAIArgs<TModel, TEmbedModel>>): AxBaseAI<TModel, TEmbedModel, TChatRequest, TEmbedRequest, TChatResponse, TChatResponseDelta, TEmbedResponse>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L137
Parameters
Parameter | Type |
---|---|
aiImpl | Readonly <AxAIServiceImpl <TModel , TEmbedModel , TChatRequest , TEmbedRequest , TChatResponse , TChatResponseDelta , TEmbedResponse >> |
__namedParameters | Readonly <AxBaseAIArgs <TModel , TEmbedModel >> |
Returns
AxBaseAI
<TModel
, TEmbedModel
, TChatRequest
, TEmbedRequest
, TChatResponse
, TChatResponseDelta
, TEmbedResponse
>
Methods
chat()
chat(req: Readonly<AxChatRequest<TModel>>, options?: Readonly<AxAIPromptConfig & AxAIServiceActionOptions<TModel, TEmbedModel>>): Promise<
| AxChatResponse
| ReadableStream<AxChatResponse>>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L326
Parameters
Parameter | Type |
---|---|
req | Readonly <AxChatRequest <TModel >> |
options? | Readonly <AxAIPromptConfig & AxAIServiceActionOptions <TModel , TEmbedModel >> |
Returns
Promise
<
| AxChatResponse
| ReadableStream
<AxChatResponse
>>
Implementation of
embed()
embed(req: Readonly<AxEmbedRequest<TEmbedModel>>, options?: Readonly<AxAIServiceActionOptions<TModel, TEmbedModel>>): Promise<AxEmbedResponse>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L625
Parameters
Parameter | Type |
---|---|
req | Readonly <AxEmbedRequest <TEmbedModel >> |
options? | Readonly <AxAIServiceActionOptions <TModel , TEmbedModel >> |
Returns
Promise
<AxEmbedResponse
>
Implementation of
getFeatures()
getFeatures(model?: TModel): AxAIFeatures;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L265
Parameters
Parameter | Type |
---|---|
model? | TModel |
Returns
Implementation of
getId()
getId(): string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L194
Returns
string
Implementation of
getLastUsedChatModel()
getLastUsedChatModel(): undefined | TModel;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L271
Returns
undefined
| TModel
Implementation of
AxAIService
.getLastUsedChatModel
getLastUsedEmbedModel()
getLastUsedEmbedModel(): undefined | TEmbedModel;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L275
Returns
undefined
| TEmbedModel
Implementation of
AxAIService
.getLastUsedEmbedModel
getLastUsedModelConfig()
getLastUsedModelConfig(): undefined | AxModelConfig;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L279
Returns
undefined
| AxModelConfig
Implementation of
AxAIService
.getLastUsedModelConfig
getLogger()
getLogger(): AxLoggerFunction;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L230
Returns
Implementation of
getMetrics()
getMetrics(): AxAIServiceMetrics;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L322
Returns
Implementation of
getModelList()
getModelList(): undefined | AxAIModelList;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L234
Returns
undefined
| AxAIModelList
Implementation of
getName()
getName(): string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L261
Returns
string
Implementation of
getOptions()
getOptions(): Readonly<AxAIServiceOptions>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L217
Returns
Readonly
<AxAIServiceOptions
>
Implementation of
setAPIURL()
setAPIURL(apiURL: string): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L198
Parameters
Parameter | Type |
---|---|
apiURL | string |
Returns
void
setHeaders()
setHeaders(headers: () => Promise<Record<string, string>>): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L202
Parameters
Parameter | Type |
---|---|
headers | () => Promise <Record <string , string >> |
Returns
void
setName()
setName(name: string): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L190
Parameters
Parameter | Type |
---|---|
name | string |
Returns
void
setOptions()
setOptions(options: Readonly<AxAIServiceOptions>): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L206
Parameters
Parameter | Type |
---|---|
options | Readonly <AxAIServiceOptions > |
Returns
void
Implementation of
AxBaseOptimizer
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/optimizer.ts#L447
Abstract base class for optimizers that provides common functionality and standardized handling of AxOptimizerArgs
Extended by
Type Parameters
Type Parameter | Default type |
---|---|
IN extends AxGenIn | AxGenIn |
OUT extends AxGenOut | AxGenOut |
Implements
AxOptimizer
<IN
,OUT
>
Constructors
Constructor
new AxBaseOptimizer<IN, OUT>(args: Readonly<AxOptimizerArgs>): AxBaseOptimizer<IN, OUT>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/optimizer.ts#L487
Parameters
Parameter | Type |
---|---|
args | Readonly <AxOptimizerArgs > |
Returns
AxBaseOptimizer
<IN
, OUT
>
Methods
compile()
abstract compile(
program: Readonly<AxProgram<IN, OUT>>,
metricFn: AxMetricFn,
options?: AxCompileOptions): Promise<AxOptimizerResult<OUT>>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/optimizer.ts#L682
Abstract method that must be implemented by concrete optimizers
Parameters
Parameter | Type |
---|---|
program | Readonly <AxProgram <IN , OUT >> |
metricFn | AxMetricFn |
options? | AxCompileOptions |
Returns
Promise
<AxOptimizerResult
<OUT
>>
Implementation of
compilePareto()
compilePareto(
program: Readonly<AxProgram<IN, OUT>>,
metricFn: AxMultiMetricFn,
options?: AxCompileOptions): Promise<AxParetoResult<OUT>>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/optimizer.ts#L750
Multi-objective optimization using Pareto frontier Default implementation that leverages the single-objective compile method
Parameters
Parameter | Type | Description |
---|---|---|
program | Readonly <AxProgram <IN , OUT >> | The program to optimize |
metricFn | AxMultiMetricFn | Multi-objective metric function that returns multiple scores |
options? | AxCompileOptions | Optional configuration options |
Returns
Promise
<AxParetoResult
<OUT
>>
Pareto optimization result with frontier of non-dominated solutions
Implementation of
getStats()
getStats(): AxOptimizationStats;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/optimizer.ts#L691
Get current optimization statistics
Returns
Implementation of
reset()
reset(): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/optimizer.ts#L698
Reset optimizer state for reuse with different programs
Returns
void
Implementation of
validateProgram()
validateProgram(program: Readonly<AxProgram<IN, OUT>>): object;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/optimizer.ts#L709
Basic program validation that can be extended by concrete optimizers
Parameters
Parameter | Type |
---|---|
program | Readonly <AxProgram <IN , OUT >> |
Returns
object
Name | Type |
---|---|
issues | string [] |
isValid | boolean |
suggestions | string [] |
Implementation of
AxBootstrapFewShot
Abstract base class for optimizers that provides common functionality and standardized handling of AxOptimizerArgs
Extends
AxBaseOptimizer
<IN
,OUT
>
Type Parameters
Type Parameter | Default type |
---|---|
IN extends AxGenIn | AxGenIn |
OUT extends AxGenOut | AxGenOut |
Constructors
Constructor
new AxBootstrapFewShot<IN, OUT>(args: Readonly<AxOptimizerArgs & object>): AxBootstrapFewShot<IN, OUT>;
Parameters
Parameter | Type |
---|---|
args | Readonly <AxOptimizerArgs & object > |
Returns
AxBootstrapFewShot
<IN
, OUT
>
Overrides
Methods
compile()
compile(
program: Readonly<AxProgram<IN, OUT>>,
metricFn: AxMetricFn,
options?: AxBootstrapCompileOptions): Promise<AxOptimizerResult<OUT>>;
Abstract method that must be implemented by concrete optimizers
Parameters
Parameter | Type |
---|---|
program | Readonly <AxProgram <IN , OUT >> |
metricFn | AxMetricFn |
options? | AxBootstrapCompileOptions |
Returns
Promise
<AxOptimizerResult
<OUT
>>
Overrides
compilePareto()
compilePareto(
program: Readonly<AxProgram<IN, OUT>>,
metricFn: AxMultiMetricFn,
options?: AxCompileOptions): Promise<AxParetoResult<OUT>>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/optimizer.ts#L750
Multi-objective optimization using Pareto frontier Default implementation that leverages the single-objective compile method
Parameters
Parameter | Type | Description |
---|---|---|
program | Readonly <AxProgram <IN , OUT >> | The program to optimize |
metricFn | AxMultiMetricFn | Multi-objective metric function that returns multiple scores |
options? | AxCompileOptions | Optional configuration options |
Returns
Promise
<AxParetoResult
<OUT
>>
Pareto optimization result with frontier of non-dominated solutions
Inherited from
getStats()
getStats(): AxOptimizationStats;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/optimizer.ts#L691
Get current optimization statistics
Returns
Inherited from
reset()
reset(): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/optimizer.ts#L698
Reset optimizer state for reuse with different programs
Returns
void
Inherited from
validateProgram()
validateProgram(program: Readonly<AxProgram<IN, OUT>>): object;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/optimizer.ts#L709
Basic program validation that can be extended by concrete optimizers
Parameters
Parameter | Type |
---|---|
program | Readonly <AxProgram <IN , OUT >> |
Returns
object
Name | Type |
---|---|
issues | string [] |
isValid | boolean |
suggestions | string [] |
Inherited from
AxChainOfThought
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/prompts/cot.ts#L6
Extends
AxGen
<IN
,OUT
>
Extended by
Type Parameters
Type Parameter | Default type |
---|---|
IN extends AxGenIn | AxGenIn |
OUT extends AxGenOut | AxGenOut |
Constructors
Constructor
new AxChainOfThought<IN, OUT>(signature: Readonly<string | AxSignature>, options?: Readonly<AxProgramForwardOptions & object>): AxChainOfThought<IN, OUT>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/prompts/cot.ts#L10
Parameters
Parameter | Type |
---|---|
signature | Readonly <string | AxSignature > |
options? | Readonly <AxProgramForwardOptions & object > |
Returns
AxChainOfThought
<IN
, OUT
>
Overrides
Methods
_forward1()
_forward1(
ai: Readonly<AxAIService>,
values: IN | AxMessage<IN>[],
options: Readonly<AxProgramForwardOptions>): AxGenStreamingOut<OUT>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/generate.ts#L521
Parameters
Parameter | Type |
---|---|
ai | Readonly <AxAIService > |
values | IN | AxMessage <IN >[] |
options | Readonly <AxProgramForwardOptions > |
Returns
AxGenStreamingOut
<OUT
>
Inherited from
addAssert()
addAssert(fn: (values: Record<string, unknown>) => undefined | boolean | Promise<undefined | boolean>, message?: string): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/generate.ts#L154
Parameters
Parameter | Type |
---|---|
fn | (values : Record <string , unknown >) => undefined | boolean | Promise <undefined | boolean > |
message? | string |
Returns
void
Inherited from
addFieldProcessor()
addFieldProcessor(fieldName: string, fn:
| AxFieldProcessorProcess
| AxStreamingFieldProcessorProcess): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/generate.ts#L201
Parameters
Parameter | Type |
---|---|
fieldName | string |
fn | | AxFieldProcessorProcess | AxStreamingFieldProcessorProcess |
Returns
void
Inherited from
addStreamingAssert()
addStreamingAssert(
fieldName: string,
fn: (content: string, done?: boolean) => undefined | boolean,
message?: string): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/generate.ts#L158
Parameters
Parameter | Type |
---|---|
fieldName | string |
fn | (content : string , done? : boolean ) => undefined | boolean |
message? | string |
Returns
void
Inherited from
addStreamingFieldProcessor()
addStreamingFieldProcessor(fieldName: string, fn:
| AxFieldProcessorProcess
| AxStreamingFieldProcessorProcess): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/generate.ts#L194
Parameters
Parameter | Type |
---|---|
fieldName | string |
fn | | AxFieldProcessorProcess | AxStreamingFieldProcessorProcess |
Returns
void
Inherited from
AxGen
.addStreamingFieldProcessor
forward()
forward(
ai: Readonly<AxAIService>,
values: IN | AxMessage<IN>[],
options?: Readonly<AxProgramForwardOptions>): Promise<OUT>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/generate.ts#L602
Parameters
Parameter | Type |
---|---|
ai | Readonly <AxAIService > |
values | IN | AxMessage <IN >[] |
options? | Readonly <AxProgramForwardOptions > |
Returns
Promise
<OUT
>
Inherited from
getSignature()
getSignature(): AxSignature;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L210
Returns
Inherited from
getTraces()
getTraces(): AxProgramTrace<IN, OUT>[];
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L307
Returns
AxProgramTrace
<IN
, OUT
>[]
Inherited from
getUsage()
getUsage(): AxModelUsage & object[];
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L321
Returns
AxModelUsage
& object
[]
Inherited from
register()
register(prog: Readonly<AxTunable<IN, OUT> & AxUsable>): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L214
Parameters
Parameter | Type |
---|---|
prog | Readonly <AxTunable <IN , OUT > & AxUsable > |
Returns
void
Inherited from
resetUsage()
resetUsage(): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L331
Returns
void
Inherited from
setDemos()
setDemos(demos: readonly AxProgramDemos<IN, OUT>[]): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L338
Parameters
Parameter | Type |
---|---|
demos | readonly AxProgramDemos <IN , OUT >[] |
Returns
void
Inherited from
setExamples()
setExamples(examples: Readonly<AxProgramExamples<IN, OUT>>, options?: Readonly<AxSetExamplesOptions>): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/generate.ts#L695
Parameters
Parameter | Type |
---|---|
examples | Readonly <AxProgramExamples <IN , OUT >> |
options? | Readonly <AxSetExamplesOptions > |
Returns
void
Inherited from
setId()
setId(id: string): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L244
Parameters
Parameter | Type |
---|---|
id | string |
Returns
void
Inherited from
setParentId()
setParentId(parentId: string): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L251
Parameters
Parameter | Type |
---|---|
parentId | string |
Returns
void
Inherited from
streamingForward()
streamingForward(
ai: Readonly<AxAIService>,
values: IN | AxMessage<IN>[],
options?: Readonly<AxProgramStreamingForwardOptions>): AxGenStreamingOut<OUT>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/generate.ts#L640
Parameters
Parameter | Type |
---|---|
ai | Readonly <AxAIService > |
values | IN | AxMessage <IN >[] |
options? | Readonly <AxProgramStreamingForwardOptions > |
Returns
AxGenStreamingOut
<OUT
>
Inherited from
AxDB
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/db/wrap.ts#L19
Implements
Constructors
Constructor
new AxDB(args: Readonly<AxDBArgs>): AxDB;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/db/wrap.ts#L21
Parameters
Parameter | Type |
---|---|
args | Readonly <AxDBArgs > |
Returns
AxDB
Methods
batchUpsert()
batchUpsert(batchReq: readonly AxDBUpsertRequest[], update?: boolean): Promise<AxDBUpsertResponse>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/db/wrap.ts#L46
Parameters
Parameter | Type |
---|---|
batchReq | readonly AxDBUpsertRequest [] |
update? | boolean |
Returns
Promise
<AxDBUpsertResponse
>
Implementation of
query()
query(req: Readonly<AxDBQueryRequest>): Promise<AxDBQueryResponse>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/db/wrap.ts#L53
Parameters
Parameter | Type |
---|---|
req | Readonly <AxDBQueryRequest > |
Returns
Promise
<AxDBQueryResponse
>
Implementation of
upsert()
upsert(req: Readonly<AxDBUpsertRequest>, update?: boolean): Promise<AxDBUpsertResponse>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/db/wrap.ts#L39
Parameters
Parameter | Type |
---|---|
req | Readonly <AxDBUpsertRequest > |
update? | boolean |
Returns
Promise
<AxDBUpsertResponse
>
Implementation of
AxDBBase
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/db/base.ts#L22
Extended by
Implements
Constructors
Constructor
new AxDBBase(__namedParameters: Readonly<AxDBBaseArgs & object>): AxDBBase;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/db/base.ts#L44
Parameters
Parameter | Type |
---|---|
__namedParameters | Readonly <AxDBBaseArgs & object > |
Returns
AxDBBase
Properties
Property | Type |
---|---|
_batchUpsert? | (batchReq : readonly AxDBUpsertRequest [], update? : boolean , options? : Readonly <AxDBBaseOpOptions >) => Promise <AxDBUpsertResponse > |
_query? | (req : Readonly <AxDBQueryRequest >, options? : Readonly <AxDBBaseOpOptions >) => Promise <AxDBQueryResponse > |
_upsert? | (req : Readonly <AxDBUpsertRequest >, update? : boolean , options? : Readonly <AxDBBaseOpOptions >) => Promise <AxDBUpsertResponse > |
Methods
batchUpsert()
batchUpsert(req: readonly AxDBUpsertRequest[], update?: boolean): Promise<AxDBUpsertResponse>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/db/base.ts#L88
Parameters
Parameter | Type |
---|---|
req | readonly AxDBUpsertRequest [] |
update? | boolean |
Returns
Promise
<AxDBUpsertResponse
>
Implementation of
query()
query(req: Readonly<AxDBQueryRequest>): Promise<AxDBQueryResponse>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/db/base.ts#L128
Parameters
Parameter | Type |
---|---|
req | Readonly <AxDBQueryRequest > |
Returns
Promise
<AxDBQueryResponse
>
Implementation of
upsert()
upsert(req: Readonly<AxDBUpsertRequest>, update?: boolean): Promise<AxDBUpsertResponse>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/db/base.ts#L54
Parameters
Parameter | Type |
---|---|
req | Readonly <AxDBUpsertRequest > |
update? | boolean |
Returns
Promise
<AxDBUpsertResponse
>
Implementation of
AxDBCloudflare
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/db/cloudflare.ts#L44
Cloudflare: DB Service
Extends
Constructors
Constructor
new AxDBCloudflare(__namedParameters: Readonly<Omit<AxDBCloudflareArgs, "name">>): AxDBCloudflare;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/db/cloudflare.ts#L48
Parameters
Parameter | Type |
---|---|
__namedParameters | Readonly <Omit <AxDBCloudflareArgs , "name" >> |
Returns
AxDBCloudflare
Overrides
Properties
Property | Type | Inherited from |
---|---|---|
_batchUpsert? | (batchReq : readonly AxDBUpsertRequest [], update? : boolean , options? : Readonly <AxDBBaseOpOptions >) => Promise <AxDBUpsertResponse > | AxDBBase ._batchUpsert |
_query? | (req : Readonly <AxDBQueryRequest >, options? : Readonly <AxDBBaseOpOptions >) => Promise <AxDBQueryResponse > | AxDBBase ._query |
Methods
_upsert()
_upsert(
req: Readonly<AxDBUpsertRequest>,
_update?: boolean,
options?: Readonly<AxDBBaseOpOptions>): Promise<AxDBUpsertResponse>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/db/cloudflare.ts#L62
Parameters
Parameter | Type |
---|---|
req | Readonly <AxDBUpsertRequest > |
_update? | boolean |
options? | Readonly <AxDBBaseOpOptions > |
Returns
Promise
<AxDBUpsertResponse
>
Overrides
AxDBBase._upsert
batchUpsert()
batchUpsert(
batchReq: readonly AxDBUpsertRequest[],
update?: boolean,
options?: Readonly<AxDBBaseOpOptions>): Promise<AxDBUpsertResponse>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/db/cloudflare.ts#L98
Parameters
Parameter | Type |
---|---|
batchReq | readonly AxDBUpsertRequest [] |
update? | boolean |
options? | Readonly <AxDBBaseOpOptions > |
Returns
Promise
<AxDBUpsertResponse
>
Overrides
query()
query(req: Readonly<AxDBQueryRequest>, options?: Readonly<AxDBBaseOpOptions>): Promise<AxDBQueryResponse>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/db/cloudflare.ts#L147
Parameters
Parameter | Type |
---|---|
req | Readonly <AxDBQueryRequest > |
options? | Readonly <AxDBBaseOpOptions > |
Returns
Promise
<AxDBQueryResponse
>
Overrides
upsert()
upsert(req: Readonly<AxDBUpsertRequest>, update?: boolean): Promise<AxDBUpsertResponse>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/db/base.ts#L54
Parameters
Parameter | Type |
---|---|
req | Readonly <AxDBUpsertRequest > |
update? | boolean |
Returns
Promise
<AxDBUpsertResponse
>
Inherited from
AxDBManager
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/docs/manager.ts#L30
Constructors
Constructor
new AxDBManager(__namedParameters: Readonly<AxDBManagerArgs>): AxDBManager;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/docs/manager.ts#L37
Parameters
Parameter | Type |
---|---|
__namedParameters | Readonly <AxDBManagerArgs > |
Returns
AxDBManager
Methods
insert()
insert(text: Readonly<string | string[]>, options?: Readonly<{
abortSignal?: AbortSignal;
batchSize?: number;
maxWordsPerChunk?: number;
minWordsPerChunk?: number;
}>): Promise<void>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/docs/manager.ts#L50
Parameters
Parameter | Type |
---|---|
text | Readonly <string | string []> |
options? | Readonly <{ abortSignal? : AbortSignal ; batchSize? : number ; maxWordsPerChunk? : number ; minWordsPerChunk? : number ; }> |
Returns
Promise
<void
>
query()
query(query: Readonly<string | number | string[] | number[]>, __namedParameters:
| undefined
| Readonly<{
abortSignal?: AbortSignal;
topPercent?: number;
}>): Promise<AxDBMatch[][]>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/docs/manager.ts#L112
Parameters
Parameter | Type |
---|---|
query | Readonly <string | number | string [] | number []> |
__namedParameters | | undefined | Readonly <{ abortSignal? : AbortSignal ; topPercent? : number ; }> |
Returns
Promise
<AxDBMatch
[][]>
AxDBMemory
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/db/memory.ts#L20
MemoryDB: DB Service
Extends
Constructors
Constructor
new AxDBMemory(__namedParameters: Readonly<Omit<AxDBMemoryArgs, "name">>): AxDBMemory;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/db/memory.ts#L23
Parameters
Parameter | Type |
---|---|
__namedParameters | Readonly <Omit <AxDBMemoryArgs , "name" >> |
Returns
AxDBMemory
Overrides
Methods
_batchUpsert()
_batchUpsert(
batchReq: readonly AxDBUpsertRequest[],
update?: boolean,
_options?: Readonly<AxDBBaseOpOptions>): Promise<AxDBUpsertResponse>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/db/memory.ts#L50
Parameters
Parameter | Type |
---|---|
batchReq | readonly AxDBUpsertRequest [] |
update? | boolean |
_options? | Readonly <AxDBBaseOpOptions > |
Returns
Promise
<AxDBUpsertResponse
>
Overrides
AxDBBase._batchUpsert
_query()
_query(req: Readonly<AxDBQueryRequest>, _options?: Readonly<AxDBBaseOpOptions>): Promise<AxDBQueryResponse>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/db/memory.ts#L65
Parameters
Parameter | Type |
---|---|
req | Readonly <AxDBQueryRequest > |
_options? | Readonly <AxDBBaseOpOptions > |
Returns
Promise
<AxDBQueryResponse
>
Overrides
AxDBBase._query
_upsert()
_upsert(
req: Readonly<AxDBUpsertRequest>,
_update?: boolean,
_options?: Readonly<AxDBBaseOpOptions>): Promise<AxDBUpsertResponse>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/db/memory.ts#L28
Parameters
Parameter | Type |
---|---|
req | Readonly <AxDBUpsertRequest > |
_update? | boolean |
_options? | Readonly <AxDBBaseOpOptions > |
Returns
Promise
<AxDBUpsertResponse
>
Overrides
AxDBBase._upsert
batchUpsert()
batchUpsert(req: readonly AxDBUpsertRequest[], update?: boolean): Promise<AxDBUpsertResponse>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/db/base.ts#L88
Parameters
Parameter | Type |
---|---|
req | readonly AxDBUpsertRequest [] |
update? | boolean |
Returns
Promise
<AxDBUpsertResponse
>
Inherited from
clearDB()
clearDB(): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/db/memory.ts#L100
Returns
void
getDB()
getDB(): AxDBState;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/db/memory.ts#L92
Returns
query()
query(req: Readonly<AxDBQueryRequest>): Promise<AxDBQueryResponse>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/db/base.ts#L128
Parameters
Parameter | Type |
---|---|
req | Readonly <AxDBQueryRequest > |
Returns
Promise
<AxDBQueryResponse
>
Inherited from
setDB()
setDB(state: AxDBState): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/db/memory.ts#L96
Parameters
Parameter | Type |
---|---|
state | AxDBState |
Returns
void
upsert()
upsert(req: Readonly<AxDBUpsertRequest>, update?: boolean): Promise<AxDBUpsertResponse>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/db/base.ts#L54
Parameters
Parameter | Type |
---|---|
req | Readonly <AxDBUpsertRequest > |
update? | boolean |
Returns
Promise
<AxDBUpsertResponse
>
Inherited from
AxDBPinecone
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/db/pinecone.ts#L58
Pinecone: DB Service
Extends
Constructors
Constructor
new AxDBPinecone(__namedParameters: Readonly<Omit<AxDBPineconeArgs, "name">>): AxDBPinecone;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/db/pinecone.ts#L62
Parameters
Parameter | Type |
---|---|
__namedParameters | Readonly <Omit <AxDBPineconeArgs , "name" >> |
Returns
AxDBPinecone
Overrides
Properties
Property | Type | Inherited from |
---|---|---|
_query? | (req : Readonly <AxDBQueryRequest >, options? : Readonly <AxDBBaseOpOptions >) => Promise <AxDBQueryResponse > | AxDBBase ._query |
Methods
_batchUpsert()
_batchUpsert(
batchReq: readonly AxDBUpsertRequest[],
_update?: boolean,
options?: Readonly<AxDBBaseOpOptions>): Promise<AxDBUpsertResponse>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/db/pinecone.ts#L85
Parameters
Parameter | Type |
---|---|
batchReq | readonly AxDBUpsertRequest [] |
_update? | boolean |
options? | Readonly <AxDBBaseOpOptions > |
Returns
Promise
<AxDBUpsertResponse
>
Overrides
AxDBBase._batchUpsert
_upsert()
_upsert(
req: Readonly<AxDBUpsertRequest>,
update?: boolean,
options?: Readonly<AxDBBaseOpOptions>): Promise<AxDBUpsertResponse>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/db/pinecone.ts#L76
Parameters
Parameter | Type |
---|---|
req | Readonly <AxDBUpsertRequest > |
update? | boolean |
options? | Readonly <AxDBBaseOpOptions > |
Returns
Promise
<AxDBUpsertResponse
>
Overrides
AxDBBase._upsert
batchUpsert()
batchUpsert(req: readonly AxDBUpsertRequest[], update?: boolean): Promise<AxDBUpsertResponse>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/db/base.ts#L88
Parameters
Parameter | Type |
---|---|
req | readonly AxDBUpsertRequest [] |
update? | boolean |
Returns
Promise
<AxDBUpsertResponse
>
Inherited from
query()
query(req: Readonly<AxDBQueryRequest>, options?: Readonly<AxDBBaseOpOptions>): Promise<AxDBQueryResponse>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/db/pinecone.ts#L111
Parameters
Parameter | Type |
---|---|
req | Readonly <AxDBQueryRequest > |
options? | Readonly <AxDBBaseOpOptions > |
Returns
Promise
<AxDBQueryResponse
>
Overrides
upsert()
upsert(req: Readonly<AxDBUpsertRequest>, update?: boolean): Promise<AxDBUpsertResponse>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/db/base.ts#L54
Parameters
Parameter | Type |
---|---|
req | Readonly <AxDBUpsertRequest > |
update? | boolean |
Returns
Promise
<AxDBUpsertResponse
>
Inherited from
AxDBWeaviate
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/db/weaviate.ts#L39
Weaviate: DB Service
Extends
Constructors
Constructor
new AxDBWeaviate(__namedParameters: Readonly<Omit<AxDBWeaviateArgs, "name">>): AxDBWeaviate;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/db/weaviate.ts#L43
Parameters
Parameter | Type |
---|---|
__namedParameters | Readonly <Omit <AxDBWeaviateArgs , "name" >> |
Returns
AxDBWeaviate
Overrides
Methods
_batchUpsert()
_batchUpsert(
batchReq: readonly AxDBUpsertRequest[],
update?: boolean,
options?: Readonly<AxDBBaseOpOptions>): Promise<AxDBUpsertResponse>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/db/weaviate.ts#L93
Parameters
Parameter | Type |
---|---|
batchReq | readonly AxDBUpsertRequest [] |
update? | boolean |
options? | Readonly <AxDBBaseOpOptions > |
Returns
Promise
<AxDBUpsertResponse
>
Overrides
AxDBBase._batchUpsert
_query()
_query(req: Readonly<AxDBQueryRequest>, options?: Readonly<AxDBBaseOpOptions>): Promise<AxDBQueryResponse>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/db/weaviate.ts#L138
Parameters
Parameter | Type |
---|---|
req | Readonly <AxDBQueryRequest > |
options? | Readonly <AxDBBaseOpOptions > |
Returns
Promise
<AxDBQueryResponse
>
Overrides
AxDBBase._query
_upsert()
_upsert(
req: Readonly<AxDBUpsertRequest>,
update?: boolean,
options?: Readonly<AxDBBaseOpOptions>): Promise<AxDBUpsertResponse>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/db/weaviate.ts#L57
Parameters
Parameter | Type |
---|---|
req | Readonly <AxDBUpsertRequest > |
update? | boolean |
options? | Readonly <AxDBBaseOpOptions > |
Returns
Promise
<AxDBUpsertResponse
>
Overrides
AxDBBase._upsert
batchUpsert()
batchUpsert(req: readonly AxDBUpsertRequest[], update?: boolean): Promise<AxDBUpsertResponse>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/db/base.ts#L88
Parameters
Parameter | Type |
---|---|
req | readonly AxDBUpsertRequest [] |
update? | boolean |
Returns
Promise
<AxDBUpsertResponse
>
Inherited from
query()
query(req: Readonly<AxDBQueryRequest>): Promise<AxDBQueryResponse>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/db/base.ts#L128
Parameters
Parameter | Type |
---|---|
req | Readonly <AxDBQueryRequest > |
Returns
Promise
<AxDBQueryResponse
>
Inherited from
upsert()
upsert(req: Readonly<AxDBUpsertRequest>, update?: boolean): Promise<AxDBUpsertResponse>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/db/base.ts#L54
Parameters
Parameter | Type |
---|---|
req | Readonly <AxDBUpsertRequest > |
update? | boolean |
Returns
Promise
<AxDBUpsertResponse
>
Inherited from
AxDefaultCostTracker
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/optimizer.ts#L382
Implements
Constructors
Constructor
new AxDefaultCostTracker(options?: AxCostTrackerOptions): AxDefaultCostTracker;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/optimizer.ts#L391
Parameters
Parameter | Type |
---|---|
options? | AxCostTrackerOptions |
Returns
AxDefaultCostTracker
Methods
getCurrentCost()
getCurrentCost(): number;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/optimizer.ts#L402
Returns
number
Implementation of
getTokenUsage()
getTokenUsage(): Record<string, number>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/optimizer.ts#L412
Returns
Record
<string
, number
>
Implementation of
getTotalTokens()
getTotalTokens(): number;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/optimizer.ts#L416
Returns
number
Implementation of
isLimitReached()
isLimitReached(): boolean;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/optimizer.ts#L420
Returns
boolean
Implementation of
reset()
reset(): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/optimizer.ts#L437
Returns
void
Implementation of
trackTokens()
trackTokens(count: number, model: string): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/optimizer.ts#L397
Parameters
Parameter | Type |
---|---|
count | number |
model | string |
Returns
void
Implementation of
AxDefaultResultReranker
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/docs/reranker.ts#L8
Extends
Constructors
Constructor
new AxDefaultResultReranker(options?: Readonly<AxProgramForwardOptions>): AxDefaultResultReranker;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/docs/reranker.ts#L12
Parameters
Parameter | Type |
---|---|
options? | Readonly <AxProgramForwardOptions > |
Returns
AxDefaultResultReranker
Overrides
Methods
_forward1()
_forward1(
ai: Readonly<AxAIService>,
values:
| AxRerankerIn
| AxMessage<AxRerankerIn>[],
options: Readonly<AxProgramForwardOptions>): AxGenStreamingOut<AxRerankerOut>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/generate.ts#L521
Parameters
Parameter | Type |
---|---|
ai | Readonly <AxAIService > |
values | | AxRerankerIn | AxMessage <AxRerankerIn >[] |
options | Readonly <AxProgramForwardOptions > |
Returns
AxGenStreamingOut
<AxRerankerOut
>
Inherited from
addAssert()
addAssert(fn: (values: Record<string, unknown>) => undefined | boolean | Promise<undefined | boolean>, message?: string): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/generate.ts#L154
Parameters
Parameter | Type |
---|---|
fn | (values : Record <string , unknown >) => undefined | boolean | Promise <undefined | boolean > |
message? | string |
Returns
void
Inherited from
addFieldProcessor()
addFieldProcessor(fieldName: string, fn:
| AxFieldProcessorProcess
| AxStreamingFieldProcessorProcess): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/generate.ts#L201
Parameters
Parameter | Type |
---|---|
fieldName | string |
fn | | AxFieldProcessorProcess | AxStreamingFieldProcessorProcess |
Returns
void
Inherited from
addStreamingAssert()
addStreamingAssert(
fieldName: string,
fn: (content: string, done?: boolean) => undefined | boolean,
message?: string): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/generate.ts#L158
Parameters
Parameter | Type |
---|---|
fieldName | string |
fn | (content : string , done? : boolean ) => undefined | boolean |
message? | string |
Returns
void
Inherited from
addStreamingFieldProcessor()
addStreamingFieldProcessor(fieldName: string, fn:
| AxFieldProcessorProcess
| AxStreamingFieldProcessorProcess): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/generate.ts#L194
Parameters
Parameter | Type |
---|---|
fieldName | string |
fn | | AxFieldProcessorProcess | AxStreamingFieldProcessorProcess |
Returns
void
Inherited from
AxGen
.addStreamingFieldProcessor
forward()
forward(
ai: Readonly<AxAIService>,
input: Readonly<AxRerankerIn>,
options?: Readonly<AxProgramForwardOptions>): Promise<AxRerankerOut>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/docs/reranker.ts#L19
Parameters
Parameter | Type |
---|---|
ai | Readonly <AxAIService > |
input | Readonly <AxRerankerIn > |
options? | Readonly <AxProgramForwardOptions > |
Returns
Promise
<AxRerankerOut
>
Overrides
getSignature()
getSignature(): AxSignature;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L210
Returns
Inherited from
getTraces()
getTraces(): AxProgramTrace<AxRerankerIn, AxRerankerOut>[];
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L307
Returns
AxProgramTrace
<AxRerankerIn
, AxRerankerOut
>[]
Inherited from
getUsage()
getUsage(): AxModelUsage & object[];
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L321
Returns
AxModelUsage
& object
[]
Inherited from
register()
register(prog: Readonly<AxTunable<IN, OUT> & AxUsable>): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L214
Parameters
Parameter | Type |
---|---|
prog | Readonly <AxTunable <IN , OUT > & AxUsable > |
Returns
void
Inherited from
resetUsage()
resetUsage(): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L331
Returns
void
Inherited from
setDemos()
setDemos(demos: readonly AxProgramDemos<AxRerankerIn, AxRerankerOut>[]): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L338
Parameters
Parameter | Type |
---|---|
demos | readonly AxProgramDemos <AxRerankerIn , AxRerankerOut >[] |
Returns
void
Inherited from
setExamples()
setExamples(examples: Readonly<AxProgramExamples<AxRerankerIn, AxRerankerOut>>, options?: Readonly<AxSetExamplesOptions>): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/generate.ts#L695
Parameters
Parameter | Type |
---|---|
examples | Readonly <AxProgramExamples <AxRerankerIn , AxRerankerOut >> |
options? | Readonly <AxSetExamplesOptions > |
Returns
void
Inherited from
setId()
setId(id: string): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L244
Parameters
Parameter | Type |
---|---|
id | string |
Returns
void
Inherited from
setParentId()
setParentId(parentId: string): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L251
Parameters
Parameter | Type |
---|---|
parentId | string |
Returns
void
Inherited from
streamingForward()
streamingForward(
ai: Readonly<AxAIService>,
values:
| AxRerankerIn
| AxMessage<AxRerankerIn>[],
options?: Readonly<AxProgramStreamingForwardOptions>): AxGenStreamingOut<AxRerankerOut>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/generate.ts#L640
Parameters
Parameter | Type |
---|---|
ai | Readonly <AxAIService > |
values | | AxRerankerIn | AxMessage <AxRerankerIn >[] |
options? | Readonly <AxProgramStreamingForwardOptions > |
Returns
AxGenStreamingOut
<AxRerankerOut
>
Inherited from
AxDockerSession
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/funcs/docker.ts#L56
Constructors
Constructor
new AxDockerSession(apiUrl: string): AxDockerSession;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/funcs/docker.ts#L60
Parameters
Parameter | Type | Default value |
---|---|---|
apiUrl | string | 'http://localhost:2375' |
Returns
AxDockerSession
Methods
connectToContainer()
connectToContainer(containerId: string): Promise<void>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/funcs/docker.ts#L186
Parameters
Parameter | Type |
---|---|
containerId | string |
Returns
Promise
<void
>
createContainer()
createContainer(__namedParameters: Readonly<{
doNotPullImage?: boolean;
imageName: string;
tag?: string;
volumes?: object[];
}>): Promise<{
Id: string;
}>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/funcs/docker.ts#L80
Parameters
Parameter | Type |
---|---|
__namedParameters | Readonly <{ doNotPullImage? : boolean ; imageName : string ; tag? : string ; volumes? : object []; }> |
Returns
Promise
<{
Id
: string
;
}>
executeCommand()
executeCommand(command: string): Promise<string>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/funcs/docker.ts#L274
Parameters
Parameter | Type |
---|---|
command | string |
Returns
Promise
<string
>
findOrCreateContainer()
findOrCreateContainer(__namedParameters: Readonly<{
doNotPullImage?: boolean;
imageName: string;
tag: string;
volumes?: object[];
}>): Promise<{
Id: string;
isNew: boolean;
}>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/funcs/docker.ts#L128
Parameters
Parameter | Type |
---|---|
__namedParameters | Readonly <{ doNotPullImage? : boolean ; imageName : string ; tag : string ; volumes? : object []; }> |
Returns
Promise
<{
Id
: string
;
isNew
: boolean
;
}>
getContainerLogs()
getContainerLogs(): Promise<string>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/funcs/docker.ts#L263
Returns
Promise
<string
>
listContainers()
listContainers(all: boolean): Promise<AxDockerContainer[]>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/funcs/docker.ts#L256
Parameters
Parameter | Type | Default value |
---|---|---|
all | boolean | false |
Returns
Promise
<AxDockerContainer
[]>
pullImage()
pullImage(imageName: string): Promise<void>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/funcs/docker.ts#L64
Parameters
Parameter | Type |
---|---|
imageName | string |
Returns
Promise
<void
>
startContainer()
startContainer(): Promise<void>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/funcs/docker.ts#L169
Returns
Promise
<void
>
stopContainers()
stopContainers(__namedParameters: Readonly<{
remove?: boolean;
tag?: string;
timeout?: number;
}>): Promise<object[]>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/funcs/docker.ts#L198
Parameters
Parameter | Type |
---|---|
__namedParameters | Readonly <{ remove? : boolean ; tag? : string ; timeout? : number ; }> |
Returns
Promise
<object
[]>
toFunction()
toFunction(): AxFunction;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/funcs/docker.ts#L373
Returns
AxEmbeddingAdapter
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/funcs/embed.ts#L7
Constructors
Constructor
new AxEmbeddingAdapter(__namedParameters: Readonly<{
ai: AxAIService;
func: (args: readonly number[], extra?: Readonly<AxAIServiceActionOptions>) => Promise<unknown>;
info: Readonly<{
argumentDescription: string;
description: string;
name: string;
}>;
}>): AxEmbeddingAdapter;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/funcs/embed.ts#L19
Parameters
Parameter | Type |
---|---|
__namedParameters | Readonly <{ ai : AxAIService ; func : (args : readonly number [], extra? : Readonly <AxAIServiceActionOptions >) => Promise <unknown >; info : Readonly <{ argumentDescription : string ; description : string ; name : string ; }>; }> |
Returns
AxEmbeddingAdapter
Methods
toFunction()
toFunction(): AxFunction;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/funcs/embed.ts#L60
Returns
AxFlow
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/flow/flow.ts#L68
AxFlow - A fluent, chainable API for building and orchestrating complex, stateful AI programs.
Allows developers to define computational nodes declaratively and then compose them imperatively using loops, conditionals, and dynamic context.
Example
const flow = new AxFlow<{ topic: string }, { summary: string; analysis: string }>()
.node('summarizer', { 'text:string': { summary: f.string() } })
.node('analyzer', { 'text:string': { analysis: f.string() } })
.map(input => ({ originalText: `Some long text about ${input.topic}` }))
.execute('summarizer', state => ({ text: state.originalText }), { ai: cheapAI })
.execute('analyzer', state => ({ text: state.originalText }), { ai: powerfulAI })
.map(state => ({
summary: state.summarizerResult.summary,
analysis: state.analyzerResult.analysis
}))
const result = await flow.forward(ai, { topic: "the future of AI" })
Extends
AxProgramWithSignature
<IN
,OUT
>
Type Parameters
Type Parameter |
---|
IN extends AxGenIn |
OUT extends AxGenOut |
Constructors
Constructor
new AxFlow<IN, OUT>(signature: NonNullable<
| undefined
| Readonly<
| string
| AxSignatureConfig
| AxSignature>>): AxFlow<IN, OUT>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/flow/flow.ts#L78
Parameters
Parameter | Type | Default value |
---|---|---|
signature | NonNullable < | undefined | Readonly < | string | AxSignatureConfig | AxSignature >> | 'userInput:string -> flowOutput:string' |
Returns
AxFlow
<IN
, OUT
>
Overrides
AxProgramWithSignature
.constructor
Methods
endWhile()
endWhile(): this;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/flow/flow.ts#L292
Marks the end of a loop block.
Returns
this
this (for chaining)
execute()
execute(
nodeName: string,
mapping: (state: AxFlowState) => Record<string, AxFieldValue>,
dynamicContext?: AxFlowDynamicContext): this;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/flow/flow.ts#L212
Executes a previously defined node.
Example
flow.execute('summarizer', state => ({ text: state.originalText }), { ai: cheapAI })
Parameters
Parameter | Type | Description |
---|---|---|
nodeName | string | The name of the node to execute (must exist in the nodes map) |
mapping | (state : AxFlowState ) => Record <string , AxFieldValue > | Function that takes the current state and returns the input object required by the node |
dynamicContext? | AxFlowDynamicContext | Optional object to override the AI service or options for this specific step |
Returns
this
this (for chaining)
forward()
forward(
ai: Readonly<AxAIService>,
values: IN,
options?: Readonly<AxProgramForwardOptions>): Promise<OUT>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/flow/flow.ts#L340
Executes the flow with the given AI service and input values.
Parameters
Parameter | Type | Description |
---|---|---|
ai | Readonly <AxAIService > | The AI service to use as the default for all steps |
values | IN | The input values for the flow |
options? | Readonly <AxProgramForwardOptions > | Optional forward options to use as defaults |
Returns
Promise
<OUT
>
Promise that resolves to the final output
Overrides
AxProgramWithSignature
.forward
getSignature()
getSignature(): AxSignature;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L210
Returns
Inherited from
AxProgramWithSignature
.getSignature
getTraces()
getTraces(): AxProgramTrace<IN, OUT>[];
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L307
Returns
AxProgramTrace
<IN
, OUT
>[]
Inherited from
AxProgramWithSignature
.getTraces
getUsage()
getUsage(): AxModelUsage & object[];
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L321
Returns
AxModelUsage
& object
[]
Inherited from
AxProgramWithSignature
.getUsage
map()
map(transform: (state: AxFlowState) => AxFlowState): this;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/flow/flow.ts#L192
Applies a synchronous transformation to the state object.
Example
flow.map(state => ({ ...state, processedText: state.text.toLowerCase() }))
Parameters
Parameter | Type | Description |
---|---|---|
transform | (state : AxFlowState ) => AxFlowState | Function that takes the current state and returns a new state |
Returns
this
this (for chaining)
node()
node(name: string, signature: Record<string, Record<string, unknown>>): this;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/flow/flow.ts#L99
Declares a reusable computational node and its input/output signature.
Example
flow.node('summarizer', { 'text:string': { summary: f.string() } })
Parameters
Parameter | Type | Description |
---|---|---|
name | string | The name of the node |
signature | Record <string , Record <string , unknown >> | An object where the key is a string representation of inputs and the value is an object representing outputs |
Returns
this
this (for chaining)
register()
register(prog: Readonly<AxTunable<IN, OUT> & AxUsable>): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L214
Parameters
Parameter | Type |
---|---|
prog | Readonly <AxTunable <IN , OUT > & AxUsable > |
Returns
void
Inherited from
AxProgramWithSignature
.register
resetUsage()
resetUsage(): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L331
Returns
void
Inherited from
AxProgramWithSignature
.resetUsage
setDemos()
setDemos(demos: readonly AxProgramDemos<IN, OUT>[]): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L338
Parameters
Parameter | Type |
---|---|
demos | readonly AxProgramDemos <IN , OUT >[] |
Returns
void
Inherited from
AxProgramWithSignature
.setDemos
setExamples()
setExamples(examples: Readonly<AxProgramExamples<IN, OUT>>, options?: Readonly<AxSetExamplesOptions>): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L257
Parameters
Parameter | Type |
---|---|
examples | Readonly <AxProgramExamples <IN , OUT >> |
options? | Readonly <AxSetExamplesOptions > |
Returns
void
Inherited from
AxProgramWithSignature
.setExamples
setId()
setId(id: string): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L244
Parameters
Parameter | Type |
---|---|
id | string |
Returns
void
Inherited from
setParentId()
setParentId(parentId: string): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L251
Parameters
Parameter | Type |
---|---|
parentId | string |
Returns
void
Inherited from
AxProgramWithSignature
.setParentId
streamingForward()
streamingForward(
_ai: Readonly<AxAIService>,
_values: IN | AxMessage<IN>[],
_options?: Readonly<AxProgramStreamingForwardOptions>): AxGenStreamingOut<OUT>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L233
Parameters
Parameter | Type |
---|---|
_ai | Readonly <AxAIService > |
_values | IN | AxMessage <IN >[] |
_options? | Readonly <AxProgramStreamingForwardOptions > |
Returns
AxGenStreamingOut
<OUT
>
Inherited from
AxProgramWithSignature
.streamingForward
while()
while(condition: (state: AxFlowState) => boolean): this;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/flow/flow.ts#L262
Marks the beginning of a loop block.
Example
flow.while(state => state.iterations < 3)
.map(state => ({ ...state, iterations: (state.iterations || 0) + 1 }))
.endWhile()
Parameters
Parameter | Type | Description |
---|---|---|
condition | (state : AxFlowState ) => boolean | Function that takes the current state and returns a boolean |
Returns
this
this (for chaining)
AxFunctionProcessor
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/functions.ts#L107
Constructors
Constructor
new AxFunctionProcessor(funcList: readonly AxFunction[]): AxFunctionProcessor;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/functions.ts#L110
Parameters
Parameter | Type |
---|---|
funcList | readonly AxFunction [] |
Returns
AxFunctionProcessor
Methods
execute()
execute(func: Readonly<AxChatResponseFunctionCall>, options?: Readonly<AxAIServiceActionOptions>): Promise<string>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/functions.ts#L158
Parameters
Parameter | Type |
---|---|
func | Readonly <AxChatResponseFunctionCall > |
options? | Readonly <AxAIServiceActionOptions > |
Returns
Promise
<string
>
AxFunctionError
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/functions.ts#L13
Extends
Error
Constructors
Constructor
new AxFunctionError(fields: object[]): AxFunctionError;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/functions.ts#L14
Parameters
Parameter | Type |
---|---|
fields | object [] |
Returns
AxFunctionError
Overrides
Error.constructor
Properties
Methods
getFields()
getFields(): object[];
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/functions.ts#L24
Returns
object
[]
toString()
toString(): string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/functions.ts#L26
Returns a string representation of an object.
Returns
string
captureStackTrace()
static captureStackTrace(targetObject: object, constructorOpt?: Function): void;
Defined in: node_modules/@types/node/globals.d.ts:145
Creates a .stack
property on targetObject
, which when accessed returns
a string representing the location in the code at which
Error.captureStackTrace()
was called.
const myObject = {};
Error.captureStackTrace(myObject);
myObject.stack; // Similar to `new Error().stack`
The first line of the trace will be prefixed with
${myObject.name}: ${myObject.message}
.
The optional constructorOpt
argument accepts a function. If given, all frames
above constructorOpt
, including constructorOpt
, will be omitted from the
generated stack trace.
The constructorOpt
argument is useful for hiding implementation
details of error generation from the user. For instance:
function a() {
b();
}
function b() {
c();
}
function c() {
// Create an error without stack trace to avoid calculating the stack trace twice.
const { stackTraceLimit } = Error;
Error.stackTraceLimit = 0;
const error = new Error();
Error.stackTraceLimit = stackTraceLimit;
// Capture the stack trace above function b
Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
throw error;
}
a();
Parameters
Parameter | Type |
---|---|
targetObject | object |
constructorOpt? | Function |
Returns
void
Inherited from
Error.captureStackTrace
prepareStackTrace()
static prepareStackTrace(err: Error, stackTraces: CallSite[]): any;
Defined in: node_modules/@types/node/globals.d.ts:149
See
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
Parameters
Parameter | Type |
---|---|
err | Error |
stackTraces | CallSite [] |
Returns
any
Inherited from
Error.prepareStackTrace
AxGen
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/generate.ts#L99
Extends
AxProgramWithSignature
<IN
,OUT
>
Extended by
Type Parameters
Type Parameter | Default type |
---|---|
IN extends AxGenIn | AxGenIn |
OUT extends AxGenOut | AxGenOut |
Constructors
Constructor
new AxGen<IN, OUT>(signature: NonNullable<
| undefined
| Readonly<
| string
| AxSignatureConfig
| AxSignature>>, options?: Readonly<AxProgramForwardOptions>): AxGen<IN, OUT>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/generate.ts#L113
Parameters
Parameter | Type |
---|---|
signature | NonNullable < | undefined | Readonly < | string | AxSignatureConfig | AxSignature >> |
options? | Readonly <AxProgramForwardOptions > |
Returns
AxGen
<IN
, OUT
>
Overrides
AxProgramWithSignature
.constructor
Methods
_forward1()
_forward1(
ai: Readonly<AxAIService>,
values: IN | AxMessage<IN>[],
options: Readonly<AxProgramForwardOptions>): AxGenStreamingOut<OUT>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/generate.ts#L521
Parameters
Parameter | Type |
---|---|
ai | Readonly <AxAIService > |
values | IN | AxMessage <IN >[] |
options | Readonly <AxProgramForwardOptions > |
Returns
AxGenStreamingOut
<OUT
>
addAssert()
addAssert(fn: (values: Record<string, unknown>) => undefined | boolean | Promise<undefined | boolean>, message?: string): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/generate.ts#L154
Parameters
Parameter | Type |
---|---|
fn | (values : Record <string , unknown >) => undefined | boolean | Promise <undefined | boolean > |
message? | string |
Returns
void
addFieldProcessor()
addFieldProcessor(fieldName: string, fn:
| AxFieldProcessorProcess
| AxStreamingFieldProcessorProcess): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/generate.ts#L201
Parameters
Parameter | Type |
---|---|
fieldName | string |
fn | | AxFieldProcessorProcess | AxStreamingFieldProcessorProcess |
Returns
void
addStreamingAssert()
addStreamingAssert(
fieldName: string,
fn: (content: string, done?: boolean) => undefined | boolean,
message?: string): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/generate.ts#L158
Parameters
Parameter | Type |
---|---|
fieldName | string |
fn | (content : string , done? : boolean ) => undefined | boolean |
message? | string |
Returns
void
addStreamingFieldProcessor()
addStreamingFieldProcessor(fieldName: string, fn:
| AxFieldProcessorProcess
| AxStreamingFieldProcessorProcess): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/generate.ts#L194
Parameters
Parameter | Type |
---|---|
fieldName | string |
fn | | AxFieldProcessorProcess | AxStreamingFieldProcessorProcess |
Returns
void
forward()
forward(
ai: Readonly<AxAIService>,
values: IN | AxMessage<IN>[],
options?: Readonly<AxProgramForwardOptions>): Promise<OUT>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/generate.ts#L602
Parameters
Parameter | Type |
---|---|
ai | Readonly <AxAIService > |
values | IN | AxMessage <IN >[] |
options? | Readonly <AxProgramForwardOptions > |
Returns
Promise
<OUT
>
Overrides
AxProgramWithSignature
.forward
getSignature()
getSignature(): AxSignature;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L210
Returns
Inherited from
AxProgramWithSignature
.getSignature
getTraces()
getTraces(): AxProgramTrace<IN, OUT>[];
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L307
Returns
AxProgramTrace
<IN
, OUT
>[]
Inherited from
AxProgramWithSignature
.getTraces
getUsage()
getUsage(): AxModelUsage & object[];
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L321
Returns
AxModelUsage
& object
[]
Inherited from
AxProgramWithSignature
.getUsage
register()
register(prog: Readonly<AxTunable<IN, OUT> & AxUsable>): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L214
Parameters
Parameter | Type |
---|---|
prog | Readonly <AxTunable <IN , OUT > & AxUsable > |
Returns
void
Inherited from
AxProgramWithSignature
.register
resetUsage()
resetUsage(): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L331
Returns
void
Inherited from
AxProgramWithSignature
.resetUsage
setDemos()
setDemos(demos: readonly AxProgramDemos<IN, OUT>[]): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L338
Parameters
Parameter | Type |
---|---|
demos | readonly AxProgramDemos <IN , OUT >[] |
Returns
void
Inherited from
AxProgramWithSignature
.setDemos
setExamples()
setExamples(examples: Readonly<AxProgramExamples<IN, OUT>>, options?: Readonly<AxSetExamplesOptions>): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/generate.ts#L695
Parameters
Parameter | Type |
---|---|
examples | Readonly <AxProgramExamples <IN , OUT >> |
options? | Readonly <AxSetExamplesOptions > |
Returns
void
Overrides
AxProgramWithSignature
.setExamples
setId()
setId(id: string): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L244
Parameters
Parameter | Type |
---|---|
id | string |
Returns
void
Inherited from
setParentId()
setParentId(parentId: string): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L251
Parameters
Parameter | Type |
---|---|
parentId | string |
Returns
void
Inherited from
AxProgramWithSignature
.setParentId
streamingForward()
streamingForward(
ai: Readonly<AxAIService>,
values: IN | AxMessage<IN>[],
options?: Readonly<AxProgramStreamingForwardOptions>): AxGenStreamingOut<OUT>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/generate.ts#L640
Parameters
Parameter | Type |
---|---|
ai | Readonly <AxAIService > |
values | IN | AxMessage <IN >[] |
options? | Readonly <AxProgramStreamingForwardOptions > |
Returns
AxGenStreamingOut
<OUT
>
Overrides
AxGenerateError
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/generate.ts#L733
Extends
Error
Constructors
Constructor
new AxGenerateError(
message: string,
details: Readonly<AxGenerateErrorDetails>,
options?: ErrorOptions): AxGenerateError;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/generate.ts#L736
Parameters
Parameter | Type |
---|---|
message | string |
details | Readonly <AxGenerateErrorDetails > |
options? | ErrorOptions |
Returns
AxGenerateError
Overrides
Error.constructor
Properties
Property | Modifier | Type | Description | Inherited from |
---|---|---|---|---|
cause? | public | unknown | - | Error.cause |
details | readonly | AxGenerateErrorDetails | - | - |
message | public | string | - | Error.message |
name | public | string | - | Error.name |
stack? | public | string | - | Error.stack |
stackTraceLimit | static | number | The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj) ). The default value is 10 but may be set to any valid JavaScript number. Changes will affect any stack trace captured after the value has been changed. If set to a non-number value, or set to a negative number, stack traces will not capture any frames. | Error.stackTraceLimit |
Methods
captureStackTrace()
static captureStackTrace(targetObject: object, constructorOpt?: Function): void;
Defined in: node_modules/@types/node/globals.d.ts:145
Creates a .stack
property on targetObject
, which when accessed returns
a string representing the location in the code at which
Error.captureStackTrace()
was called.
const myObject = {};
Error.captureStackTrace(myObject);
myObject.stack; // Similar to `new Error().stack`
The first line of the trace will be prefixed with
${myObject.name}: ${myObject.message}
.
The optional constructorOpt
argument accepts a function. If given, all frames
above constructorOpt
, including constructorOpt
, will be omitted from the
generated stack trace.
The constructorOpt
argument is useful for hiding implementation
details of error generation from the user. For instance:
function a() {
b();
}
function b() {
c();
}
function c() {
// Create an error without stack trace to avoid calculating the stack trace twice.
const { stackTraceLimit } = Error;
Error.stackTraceLimit = 0;
const error = new Error();
Error.stackTraceLimit = stackTraceLimit;
// Capture the stack trace above function b
Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
throw error;
}
a();
Parameters
Parameter | Type |
---|---|
targetObject | object |
constructorOpt? | Function |
Returns
void
Inherited from
Error.captureStackTrace
prepareStackTrace()
static prepareStackTrace(err: Error, stackTraces: CallSite[]): any;
Defined in: node_modules/@types/node/globals.d.ts:149
See
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
Parameters
Parameter | Type |
---|---|
err | Error |
stackTraces | CallSite [] |
Returns
any
Inherited from
Error.prepareStackTrace
AxHFDataLoader
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/loader.ts#L5
Constructors
Constructor
new AxHFDataLoader(__namedParameters: Readonly<{
config: string;
dataset: string;
options?: Readonly<{
length?: number;
offset?: number;
}>;
split: string;
}>): AxHFDataLoader;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/loader.ts#L14
Parameters
Parameter | Type |
---|---|
__namedParameters | Readonly <{ config : string ; dataset : string ; options? : Readonly <{ length? : number ; offset? : number ; }>; split : string ; }> |
Returns
AxHFDataLoader
Methods
getData()
getData(): AxDataRow[];
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/loader.ts#L67
Returns
getRows()
getRows<T>(__namedParameters: Readonly<{
count: number;
fields: readonly string[];
renameMap?: Record<string, string>;
}>): Promise<T[]>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/loader.ts#L71
Type Parameters
Type Parameter |
---|
T |
Parameters
Parameter | Type |
---|---|
__namedParameters | Readonly <{ count : number ; fields : readonly string []; renameMap? : Record <string , string >; }> |
Returns
Promise
<T
[]>
loadData()
loadData(): Promise<AxDataRow[]>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/loader.ts#L51
Returns
Promise
<AxDataRow
[]>
setData()
setData(rows: AxDataRow[]): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/loader.ts#L63
Parameters
Parameter | Type |
---|---|
rows | AxDataRow [] |
Returns
void
AxInstanceRegistry
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/registry.ts#L10
Type Parameters
Type Parameter |
---|
T extends AxTunable <IN , OUT > |
IN extends AxGenIn |
OUT extends AxGenOut |
Constructors
Constructor
new AxInstanceRegistry<T, IN, OUT>(): AxInstanceRegistry<T, IN, OUT>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/registry.ts#L17
Returns
AxInstanceRegistry
<T
, IN
, OUT
>
Methods
[iterator]()
iterator: Generator<undefined | AxInstanceRegistryItem<T, IN, OUT>, void, unknown>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/registry.ts#L25
Returns
Generator
<undefined
| AxInstanceRegistryItem
<T
, IN
, OUT
>, void
, unknown
>
register()
register(instance: AxInstanceRegistryItem<T, IN, OUT>): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/registry.ts#L21
Parameters
Parameter | Type |
---|---|
instance | AxInstanceRegistryItem <T , IN , OUT > |
Returns
void
AxJSInterpreter
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/funcs/code.ts#L29
Constructors
Constructor
new AxJSInterpreter(__namedParameters:
| undefined
| Readonly<{
permissions?: readonly AxJSInterpreterPermission[];
}>): AxJSInterpreter;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/funcs/code.ts#L32
Parameters
Parameter | Type |
---|---|
__namedParameters | | undefined | Readonly <{ permissions? : readonly AxJSInterpreterPermission []; }> |
Returns
AxJSInterpreter
Methods
toFunction()
toFunction(): AxFunction;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/funcs/code.ts#L67
Returns
AxMCPHTTPSSETransport
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/mcp/httpTransport.ts#L8
Implements
Constructors
Constructor
new AxMCPHTTPSSETransport(sseUrl: string): AxMCPHTTPSSETransport;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/mcp/httpTransport.ts#L13
Parameters
Parameter | Type |
---|---|
sseUrl | string |
Returns
AxMCPHTTPSSETransport
Methods
connect()
connect(): Promise<void>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/mcp/httpTransport.ts#L17
Connects to the transport if needed This method is optional and only required for transports that need connection setup
Returns
Promise
<void
>
Implementation of
send()
send(message: JSONRPCNotification | JSONRPCRequest<unknown>): Promise<JSONRPCResponse<unknown>>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/mcp/httpTransport.ts#L41
Sends a JSON-RPC request or notification and returns the response
Parameters
Parameter | Type | Description |
---|---|---|
message | JSONRPCNotification | JSONRPCRequest <unknown > | The JSON-RPC request or notification to send |
Returns
Promise
<JSONRPCResponse
<unknown
>>
A Promise that resolves to the JSON-RPC response
Implementation of
sendNotification()
sendNotification(message: Readonly<JSONRPCNotification>): Promise<void>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/mcp/httpTransport.ts#L63
Sends a JSON-RPC notification
Parameters
Parameter | Type | Description |
---|---|---|
message | Readonly <JSONRPCNotification > | The JSON-RPC notification to send |
Returns
Promise
<void
>
Implementation of
AxMCPClient
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/mcp/client.ts#L58
Constructors
Constructor
new AxMCPClient(transport: AxMCPTransport, options: Readonly<AxMCPClientOptions>): AxMCPClient;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/mcp/client.ts#L69
Parameters
Parameter | Type |
---|---|
transport | AxMCPTransport |
options | Readonly <AxMCPClientOptions > |
Returns
AxMCPClient
Methods
cancelRequest()
cancelRequest(id: string): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/mcp/client.ts#L197
Parameters
Parameter | Type |
---|---|
id | string |
Returns
void
init()
init(): Promise<void>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/mcp/client.ts#L76
Returns
Promise
<void
>
ping()
ping(timeout: number): Promise<void>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/mcp/client.ts#L172
Parameters
Parameter | Type | Default value |
---|---|---|
timeout | number | 3000 |
Returns
Promise
<void
>
toFunction()
toFunction(): AxFunction[];
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/mcp/client.ts#L193
Returns
AxMCPStdioTransport
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/mcp/stdioTransport.ts#L17
Implements
Constructors
Constructor
new AxMCPStdioTransport(config: Readonly<StdioTransportConfig>): AxMCPStdioTransport;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/mcp/stdioTransport.ts#L25
Parameters
Parameter | Type |
---|---|
config | Readonly <StdioTransportConfig > |
Returns
AxMCPStdioTransport
Methods
connect()
connect(): Promise<void>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/mcp/stdioTransport.ts#L57
Connects to the transport if needed This method is optional and only required for transports that need connection setup
Returns
Promise
<void
>
Implementation of
send()
send(message: Readonly<JSONRPCRequest<unknown>>): Promise<JSONRPCResponse<unknown>>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/mcp/stdioTransport.ts#L40
Sends a JSON-RPC request or notification and returns the response
Parameters
Parameter | Type | Description |
---|---|---|
message | Readonly <JSONRPCRequest <unknown >> | The JSON-RPC request or notification to send |
Returns
Promise
<JSONRPCResponse
<unknown
>>
A Promise that resolves to the JSON-RPC response
Implementation of
sendNotification()
sendNotification(message: Readonly<JSONRPCNotification>): Promise<void>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/mcp/stdioTransport.ts#L51
Sends a JSON-RPC notification
Parameters
Parameter | Type | Description |
---|---|---|
message | Readonly <JSONRPCNotification > | The JSON-RPC notification to send |
Returns
Promise
<void
>
Implementation of
AxMCPStreambleHTTPTransport
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/mcp/httpTransport.ts#L97
AxMCPStreambleHTTPTransport implements the 2025-03-26 Streamable HTTP transport specification This transport uses a single HTTP endpoint that supports both POST and GET methods
Implements
Constructors
Constructor
new AxMCPStreambleHTTPTransport(mcpEndpoint: string, options?: AxMCPStreamableHTTPTransportOptions): AxMCPStreambleHTTPTransport;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/mcp/httpTransport.ts#L113
Parameters
Parameter | Type |
---|---|
mcpEndpoint | string |
options? | AxMCPStreamableHTTPTransportOptions |
Returns
AxMCPStreambleHTTPTransport
Methods
close()
close(): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/mcp/httpTransport.ts#L453
Close any open connections
Returns
void
connect()
connect(): Promise<void>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/mcp/httpTransport.ts#L171
Connects to the transport if needed This method is optional and only required for transports that need connection setup
Returns
Promise
<void
>
Implementation of
getHeaders()
getHeaders(): Record<string, string>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/mcp/httpTransport.ts#L143
Get a copy of the current custom headers
Returns
Record
<string
, string
>
openListeningStream()
openListeningStream(): Promise<void>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/mcp/httpTransport.ts#L180
Opens an SSE stream to listen for server-initiated messages
Returns
Promise
<void
>
send()
send(message: Readonly<JSONRPCRequest<unknown>>): Promise<JSONRPCResponse<unknown>>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/mcp/httpTransport.ts#L287
Sends a JSON-RPC request or notification and returns the response
Parameters
Parameter | Type | Description |
---|---|---|
message | Readonly <JSONRPCRequest <unknown >> | The JSON-RPC request or notification to send |
Returns
Promise
<JSONRPCResponse
<unknown
>>
A Promise that resolves to the JSON-RPC response
Implementation of
sendNotification()
sendNotification(message: Readonly<JSONRPCNotification>): Promise<void>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/mcp/httpTransport.ts#L394
Sends a JSON-RPC notification
Parameters
Parameter | Type | Description |
---|---|---|
message | Readonly <JSONRPCNotification > | The JSON-RPC notification to send |
Returns
Promise
<void
>
Implementation of
AxMCPTransport
.sendNotification
setAuthorization()
setAuthorization(authorization: string): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/mcp/httpTransport.ts#L136
Update authorization header (convenience method)
Parameters
Parameter | Type |
---|---|
authorization | string |
Returns
void
setHeaders()
setHeaders(headers: Record<string, string>): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/mcp/httpTransport.ts#L129
Update custom headers (useful for refreshing tokens)
Parameters
Parameter | Type |
---|---|
headers | Record <string , string > |
Returns
void
setMessageHandler()
setMessageHandler(handler: (message: JSONRPCNotification | JSONRPCRequest<unknown>) => void): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/mcp/httpTransport.ts#L165
Set a handler for incoming server messages (requests/notifications)
Parameters
Parameter | Type |
---|---|
handler | (message : JSONRPCNotification | JSONRPCRequest <unknown >) => void |
Returns
void
terminateSession()
terminateSession(): Promise<void>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/mcp/httpTransport.ts#L426
Explicitly terminate the session (if supported by server)
Returns
Promise
<void
>
AxMiPRO
Abstract base class for optimizers that provides common functionality and standardized handling of AxOptimizerArgs
Extends
AxBaseOptimizer
<IN
,OUT
>
Type Parameters
Type Parameter | Default type |
---|---|
IN extends AxGenIn | AxGenIn |
OUT extends AxGenOut | AxGenOut |
Constructors
Constructor
new AxMiPRO<IN, OUT>(args: Readonly<AxOptimizerArgs & object>): AxMiPRO<IN, OUT>;
Parameters
Parameter | Type |
---|---|
args | Readonly <AxOptimizerArgs & object > |
Returns
AxMiPRO
<IN
, OUT
>
Overrides
Methods
compile()
compile(
program: Readonly<AxProgram<IN, OUT>>,
metricFn: AxMetricFn,
options?: AxCompileOptions): Promise<AxMiPROResult<IN, OUT>>;
The main compile method to run MIPROv2 optimization
Parameters
Parameter | Type |
---|---|
program | Readonly <AxProgram <IN , OUT >> |
metricFn | AxMetricFn |
options? | AxCompileOptions |
Returns
Promise
<AxMiPROResult
<IN
, OUT
>>
Overrides
compilePareto()
compilePareto(
program: Readonly<AxProgram<IN, OUT>>,
metricFn: AxMultiMetricFn,
options?: AxCompileOptions): Promise<AxParetoResult<OUT>>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/optimizer.ts#L750
Multi-objective optimization using Pareto frontier Default implementation that leverages the single-objective compile method
Parameters
Parameter | Type | Description |
---|---|---|
program | Readonly <AxProgram <IN , OUT >> | The program to optimize |
metricFn | AxMultiMetricFn | Multi-objective metric function that returns multiple scores |
options? | AxCompileOptions | Optional configuration options |
Returns
Promise
<AxParetoResult
<OUT
>>
Pareto optimization result with frontier of non-dominated solutions
Inherited from
configureAuto()
configureAuto(level: "medium" | "light" | "heavy"): void;
Configures the optimizer for light, medium, or heavy optimization
Parameters
Parameter | Type | Description |
---|---|---|
level | "medium" | "light" | "heavy" | The optimization level: “light”, “medium”, or “heavy” |
Returns
void
getConfiguration()
getConfiguration(): Record<string, unknown>;
Get optimizer-specific configuration
Returns
Record
<string
, unknown
>
Current optimizer configuration
getStats()
getStats(): AxOptimizationStats;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/optimizer.ts#L691
Get current optimization statistics
Returns
Inherited from
reset()
reset(): void;
Reset optimizer state for reuse with different programs
Returns
void
Overrides
updateConfiguration()
updateConfiguration(config: Readonly<Record<string, unknown>>): void;
Update optimizer configuration
Parameters
Parameter | Type | Description |
---|---|---|
config | Readonly <Record <string , unknown >> | New configuration to merge with existing |
Returns
void
validateProgram()
validateProgram(program: Readonly<AxProgram<IN, OUT>>): object;
Validate that the optimizer can handle the given program
Parameters
Parameter | Type | Description |
---|---|---|
program | Readonly <AxProgram <IN , OUT >> | Program to validate |
Returns
object
Validation result with any issues found
Name | Type |
---|---|
issues | string [] |
isValid | boolean |
suggestions | string [] |
Overrides
AxMemory
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/mem/memory.ts#L214
Implements
Constructors
Constructor
new AxMemory(options?: object): AxMemory;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/mem/memory.ts#L218
Parameters
Parameter | Type |
---|---|
options? | { debug? : boolean ; debugHideSystemPrompt? : boolean ; } |
options.debug? | boolean |
options.debugHideSystemPrompt? | boolean |
Returns
AxMemory
Methods
addFunctionResults()
addFunctionResults(results: readonly AxFunctionResult[], sessionId?: string): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/mem/memory.ts#L254
Parameters
Parameter | Type |
---|---|
results | readonly AxFunctionResult [] |
sessionId? | string |
Returns
void
Implementation of
addRequest()
addRequest(value: (
| {
cache?: boolean;
content: string;
role: "system";
}
| {
content: | string
| (
| {
cache?: boolean;
text: string;
type: "text";
}
| {
cache?: boolean;
details?: "high" | "low" | "auto";
image: string;
mimeType: string;
type: "image";
}
| {
cache?: boolean;
data: string;
format?: "wav";
type: "audio";
})[];
name?: string;
role: "user";
}
| {
cache?: boolean;
content?: string;
functionCalls?: object[];
name?: string;
role: "assistant";
}
| {
cache?: boolean;
functionId: string;
isError?: boolean;
result: string;
role: "function";
})[], sessionId?: string): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/mem/memory.ts#L239
Parameters
Parameter | Type |
---|---|
value | ( | { cache? : boolean ; content : string ; role : "system" ; } | { content : | string | ( | { cache? : boolean ; text : string ; type : "text" ; } | { cache? : boolean ; details? : "high" | "low" | "auto" ; image : string ; mimeType : string ; type : "image" ; } | { cache? : boolean ; data : string ; format? : "wav" ; type : "audio" ; })[]; name? : string ; role : "user" ; } | { cache? : boolean ; content? : string ; functionCalls? : object []; name? : string ; role : "assistant" ; } | { cache? : boolean ; functionId : string ; isError? : boolean ; result : string ; role : "function" ; })[] |
sessionId? | string |
Returns
void
Implementation of
addResponse()
addResponse(results: readonly AxChatResponseResult[], sessionId?: string): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/mem/memory.ts#L246
Parameters
Parameter | Type |
---|---|
results | readonly AxChatResponseResult [] |
sessionId? | string |
Returns
void
Implementation of
addTag()
addTag(name: string, sessionId?: string): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/mem/memory.ts#L268
Parameters
Parameter | Type |
---|---|
name | string |
sessionId? | string |
Returns
void
Implementation of
getLast()
getLast(sessionId?: string):
| undefined
| {
chat: object[];
role: "function" | "system" | "user" | "assistant";
tags?: string[];
updatable?: boolean;
};
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/mem/memory.ts#L280
Parameters
Parameter | Type |
---|---|
sessionId? | string |
Returns
| undefined
| {
chat
: object
[];
role
: "function"
| "system"
| "user"
| "assistant"
;
tags?
: string
[];
updatable?
: boolean
;
}
Implementation of
history()
history(index: number, sessionId?: string): (
| {
cache?: boolean;
content: string;
role: "system";
}
| {
content: | string
| (
| {
cache?: boolean;
text: string;
type: "text";
}
| {
cache?: boolean;
details?: "high" | "low" | "auto";
image: string;
mimeType: string;
type: "image";
}
| {
cache?: boolean;
data: string;
format?: "wav";
type: "audio";
})[];
name?: string;
role: "user";
}
| {
cache?: boolean;
content?: string;
functionCalls?: object[];
name?: string;
role: "assistant";
}
| {
cache?: boolean;
functionId: string;
isError?: boolean;
result: string;
role: "function";
})[];
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/mem/memory.ts#L276
Parameters
Parameter | Type |
---|---|
index | number |
sessionId? | string |
Returns
(
| {
cache?
: boolean
;
content
: string
;
role
: "system"
;
}
| {
content
: | string
| (
| {
cache?
: boolean
;
text
: string
;
type
: "text"
;
}
| {
cache?
: boolean
;
details?
: "high"
| "low"
| "auto"
;
image
: string
;
mimeType
: string
;
type
: "image"
;
}
| {
cache?
: boolean
;
data
: string
;
format?
: "wav"
;
type
: "audio"
;
})[];
name?
: string
;
role
: "user"
;
}
| {
cache?
: boolean
;
content?
: string
;
functionCalls?
: object
[];
name?
: string
;
role
: "assistant"
;
}
| {
cache?
: boolean
;
functionId
: string
;
isError?
: boolean
;
result
: string
;
role
: "function"
;
})[]
Implementation of
reset()
reset(sessionId?: string): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/mem/memory.ts#L284
Parameters
Parameter | Type |
---|---|
sessionId? | string |
Returns
void
Implementation of
rewindToTag()
rewindToTag(name: string, sessionId?: string): AxMemoryData;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/mem/memory.ts#L272
Parameters
Parameter | Type |
---|---|
name | string |
sessionId? | string |
Returns
Implementation of
updateResult()
updateResult(result: Readonly<AxChatResponseResult & object>, sessionId?: string): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/mem/memory.ts#L261
Parameters
Parameter | Type |
---|---|
result | Readonly <AxChatResponseResult & object > |
sessionId? | string |
Returns
void
Implementation of
AxMockAIService
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/mock/api.ts#L49
Implements
Constructors
Constructor
new AxMockAIService(config: AxMockAIServiceConfig): AxMockAIService;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/mock/api.ts#L61
Parameters
Parameter | Type |
---|---|
config | AxMockAIServiceConfig |
Returns
AxMockAIService
Methods
chat()
chat(req: Readonly<AxChatRequest<unknown>>, options?: Readonly<AxAIPromptConfig & AxAIServiceActionOptions<unknown, unknown>>): Promise<
| AxChatResponse
| ReadableStream<AxChatResponse>>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/mock/api.ts#L104
Parameters
Parameter | Type |
---|---|
req | Readonly <AxChatRequest <unknown >> |
options? | Readonly <AxAIPromptConfig & AxAIServiceActionOptions <unknown , unknown >> |
Returns
Promise
<
| AxChatResponse
| ReadableStream
<AxChatResponse
>>
Implementation of
embed()
embed(req: Readonly<AxEmbedRequest>, _options?: Readonly<AxAIServiceActionOptions>): Promise<AxEmbedResponse>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/mock/api.ts#L147
Parameters
Parameter | Type |
---|---|
req | Readonly <AxEmbedRequest > |
_options? | Readonly <AxAIServiceActionOptions > |
Returns
Promise
<AxEmbedResponse
>
Implementation of
getFeatures()
getFeatures(_model?: string): object;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/mock/api.ts#L89
Parameters
Parameter | Type |
---|---|
_model? | string |
Returns
object
Name | Type |
---|---|
functions | boolean |
streaming | boolean |
Implementation of
getId()
getId(): string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/mock/api.ts#L84
Returns
string
Implementation of
getLastUsedChatModel()
getLastUsedChatModel(): unknown;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/mock/api.ts#L64
Returns
unknown
Implementation of
AxAIService
.getLastUsedChatModel
getLastUsedEmbedModel()
getLastUsedEmbedModel(): unknown;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/mock/api.ts#L67
Returns
unknown
Implementation of
AxAIService
.getLastUsedEmbedModel
getLastUsedModelConfig()
getLastUsedModelConfig(): undefined | AxModelConfig;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/mock/api.ts#L70
Returns
undefined
| AxModelConfig
Implementation of
AxAIService
.getLastUsedModelConfig
getLogger()
getLogger(): AxLoggerFunction;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/mock/api.ts#L190
Returns
Implementation of
getMetrics()
getMetrics(): AxAIServiceMetrics;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/mock/api.ts#L100
Returns
Implementation of
getModelList()
getModelList(): undefined | AxAIModelList;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/mock/api.ts#L96
Returns
undefined
| AxAIModelList
Implementation of
getName()
getName(): string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/mock/api.ts#L80
Returns
string
Implementation of
getOptions()
getOptions(): Readonly<AxAIServiceOptions>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/mock/api.ts#L186
Returns
Readonly
<AxAIServiceOptions
>
Implementation of
setOptions()
setOptions(options: Readonly<AxAIServiceOptions>): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/mock/api.ts#L182
Parameters
Parameter | Type |
---|---|
options | Readonly <AxAIServiceOptions > |
Returns
void
Implementation of
AxMultiServiceRouter
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/multiservice.ts#L25
Implements
AxAIService
<string
,string
>
Constructors
Constructor
new AxMultiServiceRouter(services: (
| AxAIService<string, string>
| AxAIServiceListItem<string, string>)[]): AxMultiServiceRouter;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/multiservice.ts#L44
Constructs a new multi-service router. It validates that each service provides a unique set of model keys, then builds a lookup (map) for routing the chat/embed requests.
Parameters
Parameter | Type |
---|---|
services | ( | AxAIService <string , string > | AxAIServiceListItem <string , string >)[] |
Returns
AxMultiServiceRouter
Methods
chat()
chat(req: Readonly<AxChatRequest<string>>, options?: Readonly<AxAIPromptConfig & AxAIServiceActionOptions<string, string>>): Promise<
| AxChatResponse
| ReadableStream<AxChatResponse>>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/multiservice.ts#L122
Delegates the chat call to the service matching the provided model key.
Parameters
Parameter | Type |
---|---|
req | Readonly <AxChatRequest <string >> |
options? | Readonly <AxAIPromptConfig & AxAIServiceActionOptions <string , string >> |
Returns
Promise
<
| AxChatResponse
| ReadableStream
<AxChatResponse
>>
Implementation of
embed()
embed(req: Readonly<AxEmbedRequest<string>>, options?: Readonly<AxAIServiceActionOptions<string, string>>): Promise<AxEmbedResponse>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/multiservice.ts#L152
Delegates the embed call to the service matching the provided embed model key.
Parameters
Parameter | Type |
---|---|
req | Readonly <AxEmbedRequest <string >> |
options? | Readonly <AxAIServiceActionOptions <string , string >> |
Returns
Promise
<AxEmbedResponse
>
Implementation of
getFeatures()
getFeatures(model?: string): object;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/multiservice.ts#L220
If a model key is provided, delegate to the corresponding service’s features. Otherwise, returns a default feature set.
Parameters
Parameter | Type |
---|---|
model? | string |
Returns
object
Name | Type |
---|---|
functionCot? | boolean |
functions | boolean |
streaming | boolean |
Implementation of
getId()
getId(): string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/multiservice.ts#L183
Returns a composite ID built from the IDs of the underlying services.
Returns
string
Implementation of
getLastUsedChatModel()
getLastUsedChatModel(): undefined | string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/multiservice.ts#L109
Returns
undefined
| string
Implementation of
AxAIService
.getLastUsedChatModel
getLastUsedEmbedModel()
getLastUsedEmbedModel(): undefined | string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/multiservice.ts#L112
Returns
undefined
| string
Implementation of
AxAIService
.getLastUsedEmbedModel
getLastUsedModelConfig()
getLastUsedModelConfig(): undefined | AxModelConfig;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/multiservice.ts#L115
Returns
undefined
| AxModelConfig
Implementation of
AxAIService
.getLastUsedModelConfig
getLogger()
getLogger(): AxLoggerFunction;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/multiservice.ts#L280
Returns the logger from the last used service, or falls back to the first service if none has been used.
Returns
Implementation of
getMetrics()
getMetrics(): AxAIServiceMetrics;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/multiservice.ts#L239
Returns aggregated metrics from the underlying service. Uses the metrics from the last service that was used, or falls back to the first service if none has been used.
Returns
Implementation of
getModelList()
getModelList(): AxAIModelList;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/multiservice.ts#L202
Aggregates all available models across the underlying services.
Returns
Implementation of
getName()
getName(): string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/multiservice.ts#L195
Returns the name of this router.
Returns
string
Implementation of
getOptions()
getOptions(): Readonly<AxAIServiceOptions>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/multiservice.ts#L272
Returns the options from the last used service, or falls back to the first service if none has been used.
Returns
Readonly
<AxAIServiceOptions
>
Implementation of
setOptions()
setOptions(options: Readonly<AxAIServiceOptions>): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/multiservice.ts#L261
Sets options on all underlying services.
Parameters
Parameter | Type |
---|---|
options | Readonly <AxAIServiceOptions > |
Returns
void
Implementation of
AxProgram
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L361
Type Parameters
Type Parameter |
---|
IN extends AxGenIn |
OUT extends AxGenOut |
Implements
Constructors
Constructor
new AxProgram<IN, OUT>(): AxProgram<IN, OUT>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L374
Returns
AxProgram
<IN
, OUT
>
Methods
forward()
forward(
_ai: Readonly<AxAIService>,
_values: IN | AxMessage<IN>[],
_options?: Readonly<AxProgramForwardOptions>): Promise<OUT>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L386
Parameters
Parameter | Type |
---|---|
_ai | Readonly <AxAIService > |
_values | IN | AxMessage <IN >[] |
_options? | Readonly <AxProgramForwardOptions > |
Returns
Promise
<OUT
>
getTraces()
getTraces(): AxProgramTrace<IN, OUT>[];
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L435
Returns
AxProgramTrace
<IN
, OUT
>[]
Implementation of
getUsage()
getUsage(): AxModelUsage & object[];
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L449
Returns
AxModelUsage
& object
[]
Implementation of
register()
register(prog: Readonly<AxTunable<IN, OUT> & AxUsable>): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L379
Parameters
Parameter | Type |
---|---|
prog | Readonly <AxTunable <IN , OUT > & AxUsable > |
Returns
void
resetUsage()
resetUsage(): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L459
Returns
void
Implementation of
setDemos()
setDemos(demos: readonly AxProgramDemos<IN, OUT>[]): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L466
Parameters
Parameter | Type |
---|---|
demos | readonly AxProgramDemos <IN , OUT >[] |
Returns
void
Implementation of
setExamples()
setExamples(examples: Readonly<AxProgramExamples<IN, OUT>>, options?: Readonly<AxSetExamplesOptions>): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L422
Parameters
Parameter | Type |
---|---|
examples | Readonly <AxProgramExamples <IN , OUT >> |
options? | Readonly <AxSetExamplesOptions > |
Returns
void
Implementation of
setId()
setId(id: string): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L409
Parameters
Parameter | Type |
---|---|
id | string |
Returns
void
Implementation of
setParentId()
setParentId(parentId: string): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L416
Parameters
Parameter | Type |
---|---|
parentId | string |
Returns
void
Implementation of
streamingForward()
streamingForward(
_ai: Readonly<AxAIService>,
_values: IN | AxMessage<IN>[],
_options?: Readonly<AxProgramStreamingForwardOptions>): AxGenStreamingOut<OUT>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L398
Parameters
Parameter | Type |
---|---|
_ai | Readonly <AxAIService > |
_values | IN | AxMessage <IN >[] |
_options? | Readonly <AxProgramStreamingForwardOptions > |
Returns
AxGenStreamingOut
<OUT
>
AxProgramWithSignature
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L177
Extended by
Type Parameters
Type Parameter |
---|
IN extends AxGenIn |
OUT extends AxGenOut |
Implements
Constructors
Constructor
new AxProgramWithSignature<IN, OUT>(signature: NonNullable<
| undefined
| Readonly<
| string
| AxSignatureConfig
| AxSignature>>, options?: Readonly<AxProgramWithSignatureOptions>): AxProgramWithSignature<IN, OUT>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L192
Parameters
Parameter | Type |
---|---|
signature | NonNullable < | undefined | Readonly < | string | AxSignatureConfig | AxSignature >> |
options? | Readonly <AxProgramWithSignatureOptions > |
Returns
AxProgramWithSignature
<IN
, OUT
>
Methods
forward()
forward(
_ai: Readonly<AxAIService>,
_values: IN | AxMessage<IN>[],
_options?: Readonly<AxProgramForwardOptions>): Promise<OUT>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L221
Parameters
Parameter | Type |
---|---|
_ai | Readonly <AxAIService > |
_values | IN | AxMessage <IN >[] |
_options? | Readonly <AxProgramForwardOptions > |
Returns
Promise
<OUT
>
getSignature()
getSignature(): AxSignature;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L210
Returns
getTraces()
getTraces(): AxProgramTrace<IN, OUT>[];
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L307
Returns
AxProgramTrace
<IN
, OUT
>[]
Implementation of
getUsage()
getUsage(): AxModelUsage & object[];
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L321
Returns
AxModelUsage
& object
[]
Implementation of
register()
register(prog: Readonly<AxTunable<IN, OUT> & AxUsable>): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L214
Parameters
Parameter | Type |
---|---|
prog | Readonly <AxTunable <IN , OUT > & AxUsable > |
Returns
void
resetUsage()
resetUsage(): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L331
Returns
void
Implementation of
setDemos()
setDemos(demos: readonly AxProgramDemos<IN, OUT>[]): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L338
Parameters
Parameter | Type |
---|---|
demos | readonly AxProgramDemos <IN , OUT >[] |
Returns
void
Implementation of
setExamples()
setExamples(examples: Readonly<AxProgramExamples<IN, OUT>>, options?: Readonly<AxSetExamplesOptions>): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L257
Parameters
Parameter | Type |
---|---|
examples | Readonly <AxProgramExamples <IN , OUT >> |
options? | Readonly <AxSetExamplesOptions > |
Returns
void
Implementation of
setId()
setId(id: string): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L244
Parameters
Parameter | Type |
---|---|
id | string |
Returns
void
Implementation of
setParentId()
setParentId(parentId: string): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L251
Parameters
Parameter | Type |
---|---|
parentId | string |
Returns
void
Implementation of
streamingForward()
streamingForward(
_ai: Readonly<AxAIService>,
_values: IN | AxMessage<IN>[],
_options?: Readonly<AxProgramStreamingForwardOptions>): AxGenStreamingOut<OUT>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L233
Parameters
Parameter | Type |
---|---|
_ai | Readonly <AxAIService > |
_values | IN | AxMessage <IN >[] |
_options? | Readonly <AxProgramStreamingForwardOptions > |
Returns
AxGenStreamingOut
<OUT
>
AxRAG
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/prompts/rag.ts#L10
Extends
AxChainOfThought
<{context
:string
[];question
:string
; }, {answer
:string
; }>
Constructors
Constructor
new AxRAG(queryFn: (query: string) => Promise<string>, options: Readonly<AxProgramForwardOptions & object>): AxRAG;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/prompts/rag.ts#L21
Parameters
Parameter | Type |
---|---|
queryFn | (query : string ) => Promise <string > |
options | Readonly <AxProgramForwardOptions & object > |
Returns
AxRAG
Overrides
Methods
_forward1()
_forward1(
ai: Readonly<AxAIService>,
values:
| {
context: string[];
question: string;
}
| AxMessage<{
context: string[];
question: string;
}>[],
options: Readonly<AxProgramForwardOptions>): AxGenStreamingOut<{
answer: string;
}>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/generate.ts#L521
Parameters
Parameter | Type |
---|---|
ai | Readonly <AxAIService > |
values | | { context : string []; question : string ; } | AxMessage <{ context : string []; question : string ; }>[] |
options | Readonly <AxProgramForwardOptions > |
Returns
AxGenStreamingOut
<{
answer
: string
;
}>
Inherited from
addAssert()
addAssert(fn: (values: Record<string, unknown>) => undefined | boolean | Promise<undefined | boolean>, message?: string): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/generate.ts#L154
Parameters
Parameter | Type |
---|---|
fn | (values : Record <string , unknown >) => undefined | boolean | Promise <undefined | boolean > |
message? | string |
Returns
void
Inherited from
addFieldProcessor()
addFieldProcessor(fieldName: string, fn:
| AxFieldProcessorProcess
| AxStreamingFieldProcessorProcess): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/generate.ts#L201
Parameters
Parameter | Type |
---|---|
fieldName | string |
fn | | AxFieldProcessorProcess | AxStreamingFieldProcessorProcess |
Returns
void
Inherited from
AxChainOfThought
.addFieldProcessor
addStreamingAssert()
addStreamingAssert(
fieldName: string,
fn: (content: string, done?: boolean) => undefined | boolean,
message?: string): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/generate.ts#L158
Parameters
Parameter | Type |
---|---|
fieldName | string |
fn | (content : string , done? : boolean ) => undefined | boolean |
message? | string |
Returns
void
Inherited from
AxChainOfThought
.addStreamingAssert
addStreamingFieldProcessor()
addStreamingFieldProcessor(fieldName: string, fn:
| AxFieldProcessorProcess
| AxStreamingFieldProcessorProcess): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/generate.ts#L194
Parameters
Parameter | Type |
---|---|
fieldName | string |
fn | | AxFieldProcessorProcess | AxStreamingFieldProcessorProcess |
Returns
void
Inherited from
AxChainOfThought
.addStreamingFieldProcessor
forward()
forward(
ai: Readonly<AxAIService>,
values:
| {
context: string[];
question: string;
}
| AxMessage<{
context: string[];
question: string;
}>[],
options?: Readonly<AxProgramForwardOptions>): Promise<{
answer: string;
}>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/prompts/rag.ts#L42
Parameters
Parameter | Type |
---|---|
ai | Readonly <AxAIService > |
values | | { context : string []; question : string ; } | AxMessage <{ context : string []; question : string ; }>[] |
options? | Readonly <AxProgramForwardOptions > |
Returns
Promise
<{
answer
: string
;
}>
Overrides
getSignature()
getSignature(): AxSignature;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L210
Returns
Inherited from
getTraces()
getTraces(): AxProgramTrace<{
context: string[];
question: string;
}, {
answer: string;
}>[];
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L307
Returns
AxProgramTrace
<{
context
: string
[];
question
: string
;
}, {
answer
: string
;
}>[]
Inherited from
getUsage()
getUsage(): AxModelUsage & object[];
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L321
Returns
AxModelUsage
& object
[]
Inherited from
register()
register(prog: Readonly<AxTunable<IN, OUT> & AxUsable>): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L214
Parameters
Parameter | Type |
---|---|
prog | Readonly <AxTunable <IN , OUT > & AxUsable > |
Returns
void
Inherited from
resetUsage()
resetUsage(): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L331
Returns
void
Inherited from
setDemos()
setDemos(demos: readonly AxProgramDemos<{
context: string[];
question: string;
}, {
answer: string;
}>[]): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L338
Parameters
Parameter | Type |
---|---|
demos | readonly AxProgramDemos <{ context : string []; question : string ; }, { answer : string ; }>[] |
Returns
void
Inherited from
setExamples()
setExamples(examples: Readonly<AxProgramExamples<{
context: string[];
question: string;
}, {
answer: string;
}>>, options?: Readonly<AxSetExamplesOptions>): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/generate.ts#L695
Parameters
Parameter | Type |
---|---|
examples | Readonly <AxProgramExamples <{ context : string []; question : string ; }, { answer : string ; }>> |
options? | Readonly <AxSetExamplesOptions > |
Returns
void
Inherited from
setId()
setId(id: string): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L244
Parameters
Parameter | Type |
---|---|
id | string |
Returns
void
Inherited from
setParentId()
setParentId(parentId: string): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L251
Parameters
Parameter | Type |
---|---|
parentId | string |
Returns
void
Inherited from
streamingForward()
streamingForward(
ai: Readonly<AxAIService>,
values:
| {
context: string[];
question: string;
}
| AxMessage<{
context: string[];
question: string;
}>[],
options?: Readonly<AxProgramStreamingForwardOptions>): AxGenStreamingOut<{
answer: string;
}>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/generate.ts#L640
Parameters
Parameter | Type |
---|---|
ai | Readonly <AxAIService > |
values | | { context : string []; question : string ; } | AxMessage <{ context : string []; question : string ; }>[] |
options? | Readonly <AxProgramStreamingForwardOptions > |
Returns
AxGenStreamingOut
<{
answer
: string
;
}>
Inherited from
AxPromptTemplate
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/prompt.ts#L42
Constructors
Constructor
new AxPromptTemplate(
sig: Readonly<AxSignature>,
options?: Readonly<AxPromptTemplateOptions>,
fieldTemplates?: Record<string, AxFieldTemplateFn>): AxPromptTemplate;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/prompt.ts#L49
Parameters
Parameter | Type |
---|---|
sig | Readonly <AxSignature > |
options? | Readonly <AxPromptTemplateOptions > |
fieldTemplates? | Record <string , AxFieldTemplateFn > |
Returns
AxPromptTemplate
Methods
render()
render<T>(values: T | readonly AxMessage<T>[], __namedParameters: Readonly<{
demos?: Record<string, AxFieldValue>[];
examples?: Record<string, AxFieldValue>[];
skipSystemPrompt?: boolean;
}>): (
| {
cache?: boolean;
content: string;
role: "system";
}
| {
content: | string
| (
| {
cache?: boolean;
text: string;
type: "text";
}
| {
cache?: boolean;
details?: "high" | "low" | "auto";
image: string;
mimeType: string;
type: "image";
}
| {
cache?: boolean;
data: string;
format?: "wav";
type: "audio";
})[];
name?: string;
role: "user";
}
| {
cache?: boolean;
content?: string;
functionCalls?: object[];
name?: string;
role: "assistant";
})[];
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/prompt.ts#L122
Type Parameters
Type Parameter |
---|
T extends AxGenIn |
Parameters
Parameter | Type |
---|---|
values | T | readonly AxMessage <T >[] |
__namedParameters | Readonly <{ demos? : Record <string , AxFieldValue >[]; examples? : Record <string , AxFieldValue >[]; skipSystemPrompt? : boolean ; }> |
Returns
(
| {
cache?
: boolean
;
content
: string
;
role
: "system"
;
}
| {
content
: | string
| (
| {
cache?
: boolean
;
text
: string
;
type
: "text"
;
}
| {
cache?
: boolean
;
details?
: "high"
| "low"
| "auto"
;
image
: string
;
mimeType
: string
;
type
: "image"
;
}
| {
cache?
: boolean
;
data
: string
;
format?
: "wav"
;
type
: "audio"
;
})[];
name?
: string
;
role
: "user"
;
}
| {
cache?
: boolean
;
content?
: string
;
functionCalls?
: object
[];
name?
: string
;
role
: "assistant"
;
})[]
renderExtraFields()
renderExtraFields(extraFields: readonly AxIField[]): (
| {
cache?: boolean;
text: string;
type: "text";
}
| {
cache?: boolean;
details?: "high" | "low" | "auto";
image: string;
mimeType: string;
type: "image";
}
| {
cache?: boolean;
data: string;
format?: "wav";
type: "audio";
})[];
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/prompt.ts#L231
Parameters
Parameter | Type |
---|---|
extraFields | readonly AxIField [] |
Returns
(
| {
cache?
: boolean
;
text
: string
;
type
: "text"
;
}
| {
cache?
: boolean
;
details?
: "high"
| "low"
| "auto"
;
image
: string
;
mimeType
: string
;
type
: "image"
;
}
| {
cache?
: boolean
;
data
: string
;
format?
: "wav"
;
type
: "audio"
;
})[]
AxRateLimiterTokenUsage
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/util/rate-limit.ts#L9
Constructors
Constructor
new AxRateLimiterTokenUsage(
maxTokens: number,
refillRate: number,
options?: Readonly<AxRateLimiterTokenUsageOptions>): AxRateLimiterTokenUsage;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/util/rate-limit.ts#L16
Parameters
Parameter | Type |
---|---|
maxTokens | number |
refillRate | number |
options? | Readonly <AxRateLimiterTokenUsageOptions > |
Returns
AxRateLimiterTokenUsage
Methods
acquire()
acquire(tokens: number): Promise<void>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/util/rate-limit.ts#L56
Parameters
Parameter | Type |
---|---|
tokens | number |
Returns
Promise
<void
>
AxSignature
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/sig.ts#L55
Constructors
Constructor
new AxSignature(signature?: Readonly<
| string
| AxSignatureConfig
| AxSignature>): AxSignature;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/sig.ts#L66
Parameters
Parameter | Type |
---|---|
signature? | Readonly < | string | AxSignatureConfig | AxSignature > |
Returns
AxSignature
Methods
addInputField()
addInputField(field: Readonly<AxField>): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/sig.ts#L214
Parameters
Parameter | Type |
---|---|
field | Readonly <AxField > |
Returns
void
addOutputField()
addOutputField(field: Readonly<AxField>): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/sig.ts#L255
Parameters
Parameter | Type |
---|---|
field | Readonly <AxField > |
Returns
void
getDescription()
getDescription(): undefined | string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/sig.ts#L354
Returns
undefined
| string
getInputFields()
getInputFields(): readonly AxIField[];
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/sig.ts#L352
Returns
readonly AxIField
[]
getOutputFields()
getOutputFields(): readonly AxIField[];
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/sig.ts#L353
Returns
readonly AxIField
[]
hash()
hash(): string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/sig.ts#L541
Returns
string
setDescription()
setDescription(desc: string): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/sig.ts#L201
Parameters
Parameter | Type |
---|---|
desc | string |
Returns
void
setInputFields()
setInputFields(fields: readonly AxField[]): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/sig.ts#L296
Parameters
Parameter | Type |
---|---|
fields | readonly AxField [] |
Returns
void
setOutputFields()
setOutputFields(fields: readonly AxField[]): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/sig.ts#L324
Parameters
Parameter | Type |
---|---|
fields | readonly AxField [] |
Returns
void
toJSON()
toJSON(): object;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/sig.ts#L545
Returns
object
Name | Type |
---|---|
description | undefined | string |
id | string |
inputFields | AxIField [] |
outputFields | AxIField [] |
toJSONSchema()
toJSONSchema(): AxFunctionJSONSchema;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/sig.ts#L366
Returns
toString()
toString(): string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/sig.ts#L543
Returns
string
validate()
validate(): boolean;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/sig.ts#L520
Returns
boolean
AxSimpleClassifier
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/classifier.ts#L30
Constructors
Constructor
new AxSimpleClassifier(ai: AxAIService): AxSimpleClassifier;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/classifier.ts#L36
Parameters
Parameter | Type |
---|---|
ai | AxAIService |
Returns
AxSimpleClassifier
Methods
forward()
forward(text: string, options?: Readonly<AxSimpleClassifierForwardOptions>): Promise<string>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/classifier.ts#L68
Parameters
Parameter | Type |
---|---|
text | string |
options? | Readonly <AxSimpleClassifierForwardOptions > |
Returns
Promise
<string
>
getState()
getState(): undefined | AxDBState;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/classifier.ts#L41
Returns
undefined
| AxDBState
setClasses()
setClasses(classes: readonly AxSimpleClassifierClass[], options?: Readonly<{
abortSignal?: AbortSignal;
}>): Promise<void>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/classifier.ts#L49
Parameters
Parameter | Type |
---|---|
classes | readonly AxSimpleClassifierClass [] |
options? | Readonly <{ abortSignal? : AbortSignal ; }> |
Returns
Promise
<void
>
setOptions()
setOptions(options: Readonly<{
debug?: boolean;
}>): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/classifier.ts#L108
Parameters
Parameter | Type |
---|---|
options | Readonly <{ debug? : boolean ; }> |
Returns
void
setState()
setState(state: AxDBState): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/classifier.ts#L45
Parameters
Parameter | Type |
---|---|
state | AxDBState |
Returns
void
AxTestPrompt
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/evaluate.ts#L14
Type Parameters
Type Parameter | Default type |
---|---|
IN extends AxGenIn | AxGenIn |
OUT extends AxGenOut | AxGenOut |
Constructors
Constructor
new AxTestPrompt<IN, OUT>(__namedParameters: Readonly<AxEvaluateArgs<IN, OUT>>): AxTestPrompt<IN, OUT>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/evaluate.ts#L22
Parameters
Parameter | Type |
---|---|
__namedParameters | Readonly <AxEvaluateArgs <IN , OUT >> |
Returns
AxTestPrompt
<IN
, OUT
>
Methods
run()
run(metricFn: AxMetricFn): Promise<void>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/evaluate.ts#L35
Parameters
Parameter | Type |
---|---|
metricFn | AxMetricFn |
Returns
Promise
<void
>
AxSimpleClassifierClass
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/classifier.ts#L12
Constructors
Constructor
new AxSimpleClassifierClass(name: string, context: readonly string[]): AxSimpleClassifierClass;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/classifier.ts#L16
Parameters
Parameter | Type |
---|---|
name | string |
context | readonly string [] |
Returns
AxSimpleClassifierClass
Methods
getContext()
getContext(): readonly string[];
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/classifier.ts#L25
Returns
readonly string
[]
getName()
getName(): string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/classifier.ts#L21
Returns
string
AxAIAnthropicModel
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/anthropic/types.ts#L3
Enumeration Members
AxAIAnthropicVertexModel
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/anthropic/types.ts#L19
Enumeration Members
AxAICohereModel
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/cohere/types.ts#L6
Cohere: Models for text generation
Enumeration Members
Enumeration Member | Value |
---|---|
Command | "command" |
CommandLight | "command-light" |
CommandR | "command-r" |
CommandRPlus | "command-r-plus" |
AxAIDeepSeekModel
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/deepseek/types.ts#L4
DeepSeek: Models for text generation
Enumeration Members
Enumeration Member | Value |
---|---|
DeepSeekChat | "deepseek-chat" |
DeepSeekCoder | "deepseek-coder" |
DeepSeekReasoner | "deepseek-reasoner" |
AxAICohereEmbedModel
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/cohere/types.ts#L16
Cohere: Models for use in embeddings
Enumeration Members
AxAIGoogleGeminiEmbedModel
AxAIGoogleGeminiEmbedTypes
Enumeration Members
AxAIGoogleGeminiSafetyCategory
AxAIGoogleGeminiModel
Enumeration Members
AxAIGoogleGeminiSafetyThreshold
AxAIGrokEmbedModels
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/x-grok/types.ts#L10
Enumeration Members
Enumeration Member | Value |
---|---|
GrokEmbedSmall | "grok-embed-small" |
AxAIGrokModel
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/x-grok/types.ts#L3
Enumeration Members
Enumeration Member | Value |
---|---|
Grok3 | "grok-3" |
Grok3Fast | "grok-3-fast" |
Grok3Mini | "grok-3-mini" |
Grok3MiniFast | "grok-3-mini-fast" |
AxAIGroqModel
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/groq/types.ts#L1
Enumeration Members
Enumeration Member | Value |
---|---|
Gemma2_9B | "gemma2-9b-it" |
Llama3_8B | "llama3-8b-8192" |
Llama33_70B | "llama-3.3-70b-versatile" |
Mixtral_8x7B | "mixtral-8x7b-32768" |
AxAIMistralEmbedModels
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/mistral/types.ts#L14
Enumeration Members
Enumeration Member | Value |
---|---|
MistralEmbed | "mistral-embed" |
AxAIHuggingFaceModel
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/huggingface/types.ts#L3
Enumeration Members
Enumeration Member | Value |
---|---|
MetaLlama270BChatHF | "meta-llama/Llama-2-70b-chat-hf" |
AxAIMistralModel
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/mistral/types.ts#L3
Enumeration Members
AxAIOpenAIEmbedModel
AxAIOpenAIModel
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/openai/chat_types.ts#L3
Enumeration Members
AxJSInterpreterPermission
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/funcs/code.ts#L11
Enumeration Members
Enumeration Member | Value |
---|---|
CRYPTO | "crypto" |
FS | "node:fs" |
NET | "net" |
OS | "os" |
PROCESS | "process" |
AxAIRekaModel
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/reka/types.ts#L3
Enumeration Members
Enumeration Member | Value |
---|---|
RekaCore | "reka-core" |
RekaEdge | "reka-edge" |
RekaFlash | "reka-flash" |
AxAIOpenAIResponsesModel
Enumeration Members
AxSpanKindValues
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/trace/trace.ts#L61
Enumeration Members
Enumeration Member | Value |
---|---|
AGENT | "agent" |
TASK | "task" |
TOOL | "tool" |
UNKNOWN | "unknown" |
WORKFLOW | "workflow" |
AxLLMRequestTypeValues
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/trace/trace.ts#L54
Enumeration Members
Enumeration Member | Value |
---|---|
CHAT | "chat" |
COMPLETION | "completion" |
RERANK | "rerank" |
UNKNOWN | "unknown" |
ax
function ax<IN, OUT>(strings: TemplateStringsArray, ...values: readonly AxSignatureTemplateValue[]): AxGen<IN, OUT>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/template.ts#L95
Type Parameters
Type Parameter | Default type |
---|---|
IN extends AxGenIn | AxGenIn |
OUT extends AxGenerateResult <AxGenOut > | AxGenerateResult <AxGenOut > |
Parameters
Parameter | Type |
---|---|
strings | TemplateStringsArray |
…values | readonly AxSignatureTemplateValue [] |
Returns
AxGen
<IN
, OUT
>
axAIAnthropicDefaultConfig
function axAIAnthropicDefaultConfig(): AxAIAnthropicConfig;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/anthropic/api.ts#L37
Returns
axAIAnthropicVertexDefaultConfig
function axAIAnthropicVertexDefaultConfig(): AxAIAnthropicConfig;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/anthropic/api.ts#L51
Returns
axAICohereCreativeConfig
function axAICohereCreativeConfig(): AxAICohereConfig;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/cohere/api.ts#L40
Returns
axAICohereDefaultConfig
function axAICohereDefaultConfig(): AxAICohereConfig;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/cohere/api.ts#L33
Returns
axAIDeepSeekCodeConfig
function axAIDeepSeekCodeConfig(): DeepSeekConfig;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/deepseek/api.ts#L19
Returns
DeepSeekConfig
axAIDeepSeekDefaultConfig
function axAIDeepSeekDefaultConfig(): DeepSeekConfig;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/deepseek/api.ts#L13
Returns
DeepSeekConfig
axAIGoogleGeminiDefaultConfig
function axAIGoogleGeminiDefaultConfig(): AxAIGoogleGeminiConfig;
AxAIGoogleGemini: Default Model options for text generation
Returns
axAIGoogleGeminiDefaultCreativeConfig
function axAIGoogleGeminiDefaultCreativeConfig(): AxAIGoogleGeminiConfig;
Returns
axAIGrokBestConfig
function axAIGrokBestConfig(): AxAIOpenAIConfig<AxAIGrokModel, GrokEmbedSmall>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/x-grok/api.ts#L23
Returns
axAIGrokDefaultConfig
function axAIGrokDefaultConfig(): AxAIOpenAIConfig<AxAIGrokModel, GrokEmbedSmall>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/x-grok/api.ts#L14
Returns
axAIHuggingFaceCreativeConfig
function axAIHuggingFaceCreativeConfig(): AxAIHuggingFaceConfig;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/huggingface/api.ts#L32
Returns
axAIHuggingFaceDefaultConfig
function axAIHuggingFaceDefaultConfig(): AxAIHuggingFaceConfig;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/huggingface/api.ts#L26
Returns
axAIMistralBestConfig
function axAIMistralBestConfig(): AxAIMistralConfig;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/mistral/api.ts#L24
Returns
AxAIMistralConfig
axAIMistralDefaultConfig
function axAIMistralDefaultConfig(): AxAIMistralConfig;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/mistral/api.ts#L17
Returns
AxAIMistralConfig
axAIOllamaDefaultConfig
function axAIOllamaDefaultConfig(): AxAIOllamaAIConfig;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/ollama/api.ts#L10
Returns
axAIOllamaDefaultCreativeConfig
function axAIOllamaDefaultCreativeConfig(): AxAIOllamaAIConfig;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/ollama/api.ts#L17
Returns
axAIOpenAIBestConfig
function axAIOpenAIBestConfig(): AxAIOpenAIConfig<AxAIOpenAIModel, AxAIOpenAIEmbedModel>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/openai/api.ts#L48
Returns
axAIOpenAICreativeConfig
function axAIOpenAICreativeConfig(): AxAIOpenAIConfig<AxAIOpenAIModel, AxAIOpenAIEmbedModel>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/openai/api.ts#L57
Returns
axAIOpenAIDefaultConfig
function axAIOpenAIDefaultConfig(): AxAIOpenAIConfig<AxAIOpenAIModel, AxAIOpenAIEmbedModel>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/openai/api.ts#L38
Returns
axAIOpenAIFastConfig
function axAIOpenAIFastConfig(): AxAIOpenAIConfig<AxAIOpenAIModel, AxAIOpenAIEmbedModel>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/openai/api.ts#L67
Returns
axAIOpenAIResponsesBestConfig
function axAIOpenAIResponsesBestConfig(): AxAIOpenAIResponsesConfig<AxAIOpenAIResponsesModel, AxAIOpenAIEmbedModel>;
Returns
AxAIOpenAIResponsesConfig
<AxAIOpenAIResponsesModel
, AxAIOpenAIEmbedModel
>
axAIOpenAIResponsesCreativeConfig
function axAIOpenAIResponsesCreativeConfig(): AxAIOpenAIResponsesConfig<AxAIOpenAIResponsesModel, AxAIOpenAIEmbedModel>;
Returns
AxAIOpenAIResponsesConfig
<AxAIOpenAIResponsesModel
, AxAIOpenAIEmbedModel
>
axAIOpenAIResponsesDefaultConfig
function axAIOpenAIResponsesDefaultConfig(): AxAIOpenAIResponsesConfig<AxAIOpenAIResponsesModel, AxAIOpenAIEmbedModel>;
Returns
AxAIOpenAIResponsesConfig
<AxAIOpenAIResponsesModel
, AxAIOpenAIEmbedModel
>
axAIRekaCreativeConfig
function axAIRekaCreativeConfig(): AxAIRekaConfig;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/reka/api.ts#L42
Returns
axAIRekaBestConfig
function axAIRekaBestConfig(): AxAIRekaConfig;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/reka/api.ts#L36
Returns
axAIRekaDefaultConfig
function axAIRekaDefaultConfig(): AxAIRekaConfig;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/reka/api.ts#L30
Returns
axAITogetherDefaultConfig
function axAITogetherDefaultConfig(): TogetherAIConfig;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/together/api.ts#L9
Returns
TogetherAIConfig
axAIRekaFastConfig
function axAIRekaFastConfig(): AxAIRekaConfig;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/reka/api.ts#L48
Returns
axBaseAIDefaultCreativeConfig
function axBaseAIDefaultCreativeConfig(): AxModelConfig;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L56
Returns
axBaseAIDefaultConfig
function axBaseAIDefaultConfig(): AxModelConfig;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L49
Returns
axCreateDefaultTextLogger
function axCreateDefaultTextLogger(output: (message: string) => void): AxLoggerFunction;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/loggers.ts#L67
Parameters
Parameter | Type | Default value |
---|---|---|
output | (message : string ) => void | defaultOutput |
Returns
axCreateDefaultLogger
function axCreateDefaultLogger(output: (message: string) => void): AxLoggerFunction;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/loggers.ts#L12
Parameters
Parameter | Type | Default value |
---|---|---|
output | (message : string ) => void | defaultOutput |
Returns
axCreateOptimizerLogger
function axCreateOptimizerLogger(output: (message: string) => void): AxLoggerFunction;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/loggers.ts#L103
Factory function to create an enhanced optimizer logger with clean visual formatting that works for all optimizer types using semantic tags for proper categorization
Parameters
Parameter | Type |
---|---|
output | (message : string ) => void |
Returns
axValidateChatRequestMessage
function axValidateChatRequestMessage(item:
| {
cache?: boolean;
content: string;
role: "system";
}
| {
content: | string
| (
| {
cache?: boolean;
text: string;
type: "text";
}
| {
cache?: boolean;
details?: "high" | "low" | "auto";
image: string;
mimeType: string;
type: "image";
}
| {
cache?: boolean;
data: string;
format?: "wav";
type: "audio";
})[];
name?: string;
role: "user";
}
| {
cache?: boolean;
content?: string;
functionCalls?: object[];
name?: string;
role: "assistant";
}
| {
cache?: boolean;
functionId: string;
isError?: boolean;
result: string;
role: "function";
}): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/validate.ts#L10
Validates a chat request message item to ensure it meets the required criteria
Parameters
Parameter | Type | Description |
---|---|---|
item | | { cache? : boolean ; content : string ; role : "system" ; } | { content : | string | ( | { cache? : boolean ; text : string ; type : "text" ; } | { cache? : boolean ; details? : "high" | "low" | "auto" ; image : string ; mimeType : string ; type : "image" ; } | { cache? : boolean ; data : string ; format? : "wav" ; type : "audio" ; })[]; name? : string ; role : "user" ; } | { cache? : boolean ; content? : string ; functionCalls? : object []; name? : string ; role : "assistant" ; } | { cache? : boolean ; functionId : string ; isError? : boolean ; result : string ; role : "function" ; } | The chat request message to validate |
Returns
void
Throws
When validation fails with a descriptive error message
s
function s(strings: TemplateStringsArray, ...values: readonly AxSignatureTemplateValue[]): AxSignature;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/template.ts#L44
Parameters
Parameter | Type |
---|---|
strings | TemplateStringsArray |
…values | readonly AxSignatureTemplateValue [] |
Returns
AxAIAnthropicArgs
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/anthropic/api.ts#L65
Properties
Property | Type |
---|---|
apiKey? | string |
config? | Readonly <Partial <AxAIAnthropicConfig >> |
models? | AxAIInputModelList < | AxAIAnthropicModel | AxAIAnthropicVertexModel , undefined > |
name | "anthropic" |
options? | Readonly <AxAIServiceOptions > |
projectId? | string |
region? | string |
axValidateChatResponseResult
function axValidateChatResponseResult(results:
| readonly AxChatResponseResult[]
| Readonly<AxChatResponseResult>): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/validate.ts#L190
Validates a chat response result to ensure it meets the required criteria
Parameters
Parameter | Type | Description |
---|---|---|
results | | readonly AxChatResponseResult [] | Readonly <AxChatResponseResult > | The chat response results to validate (single result or array) |
Returns
void
Throws
When validation fails with a descriptive error message
AxAIAnthropicContentBlockStartEvent
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/anthropic/types.ts#L195
Properties
AxAIAnthropicContentBlockDeltaEvent
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/anthropic/types.ts#L216
Properties
AxAIAnthropicContentBlockStopEvent
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/anthropic/types.ts#L239
Properties
Property | Type |
---|---|
index | number |
type | "content_block_stop" |
AxAIAnthropicErrorEvent
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/anthropic/types.ts#L267
Properties
Property | Type |
---|---|
error | object |
error.message | string |
error.type | "overloaded_error" |
type | "error" |
AxAIAnthropicMessageDeltaEvent
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/anthropic/types.ts#L245
Properties
Property | Type |
---|---|
delta | object |
delta.stop_reason | null | "end_turn" | "max_tokens" | "stop_sequence" |
delta.stop_sequence | null | string |
type | "message_delta" |
usage | object |
usage.output_tokens | number |
AxAIAnthropicMessageStartEvent
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/anthropic/types.ts#L177
Properties
AxAIAnthropicMessageStopEvent
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/anthropic/types.ts#L257
Properties
Property | Type |
---|---|
type | "message_stop" |
AxAIAnthropicPingEvent
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/anthropic/types.ts#L262
Properties
Property | Type |
---|---|
type | "ping" |
AxAICohereArgs
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/cohere/api.ts#L47
Properties
Property | Type |
---|---|
apiKey | string |
config? | Readonly <Partial <AxAICohereConfig >> |
models? | AxAIInputModelList <AxAICohereModel , AxAICohereEmbedModel > |
name | "cohere" |
options? | Readonly <AxAIServiceOptions > |
AxAIFeatures
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L30
Properties
Property | Type |
---|---|
functionCot? | boolean |
functions | boolean |
hasShowThoughts? | boolean |
hasThinkingBudget? | boolean |
streaming | boolean |
AxAIGoogleGeminiArgs
Properties
Property | Type |
---|---|
apiKey? | string |
config? | Readonly <Partial <AxAIGoogleGeminiConfig >> |
endpointId? | string |
modelInfo? | AxModelInfo [] |
models? | AxAIInputModelList <AxAIGoogleGeminiModel , AxAIGoogleGeminiEmbedModel > |
name | "google-gemini" |
options? | Readonly <AxAIServiceOptions & AxAIGoogleGeminiOptionsTools > |
projectId? | string |
region? | string |
AxAIGoogleGeminiOptionsTools
AxAIGrokOptionsTools
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/x-grok/api.ts#L42
Properties
Property | Type |
---|---|
searchParameters? | object |
searchParameters.fromDate? | string |
searchParameters.maxSearchResults? | number |
searchParameters.mode? | "auto" | "on" | "off" |
searchParameters.returnCitations? | boolean |
searchParameters.sources? | AxAIGrokSearchSource [] |
searchParameters.toDate? | string |
AxAIGrokSearchSource
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/x-grok/api.ts#L32
Properties
Property | Type |
---|---|
allowedWebsites? | string [] |
country? | string |
excludedWebsites? | string [] |
links? | string [] |
safeSearch? | boolean |
type | "web" | "x" | "news" | "rss" |
xHandles? | string [] |
AxAIHuggingFaceArgs
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/huggingface/api.ts#L38
Properties
Property | Type |
---|---|
apiKey | string |
config? | Readonly <Partial <AxAIHuggingFaceConfig >> |
models? | AxAIInputModelList <MetaLlama270BChatHF , undefined > |
name | "huggingface" |
options? | Readonly <AxAIServiceOptions > |
AxAIMemory
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/mem/types.ts#L17
Methods
addFunctionResults()
addFunctionResults(results: readonly AxFunctionResult[], sessionId?: string): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/mem/types.ts#L30
Parameters
Parameter | Type |
---|---|
results | readonly AxFunctionResult [] |
sessionId? | string |
Returns
void
addRequest()
addRequest(result: (
| {
cache?: boolean;
content: string;
role: "system";
}
| {
content: | string
| (
| {
cache?: boolean;
text: string;
type: "text";
}
| {
cache?: boolean;
details?: "high" | "low" | "auto";
image: string;
mimeType: string;
type: "image";
}
| {
cache?: boolean;
data: string;
format?: "wav";
type: "audio";
})[];
name?: string;
role: "user";
}
| {
cache?: boolean;
content?: string;
functionCalls?: object[];
name?: string;
role: "assistant";
}
| {
cache?: boolean;
functionId: string;
isError?: boolean;
result: string;
role: "function";
})[], sessionId?: string): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/mem/types.ts#L18
Parameters
Parameter | Type |
---|---|
result | ( | { cache? : boolean ; content : string ; role : "system" ; } | { content : | string | ( | { cache? : boolean ; text : string ; type : "text" ; } | { cache? : boolean ; details? : "high" | "low" | "auto" ; image : string ; mimeType : string ; type : "image" ; } | { cache? : boolean ; data : string ; format? : "wav" ; type : "audio" ; })[]; name? : string ; role : "user" ; } | { cache? : boolean ; content? : string ; functionCalls? : object []; name? : string ; role : "assistant" ; } | { cache? : boolean ; functionId : string ; isError? : boolean ; result : string ; role : "function" ; })[] |
sessionId? | string |
Returns
void
addResponse()
addResponse(results: readonly AxChatResponseResult[], sessionId?: string): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/mem/types.ts#L20
Parameters
Parameter | Type |
---|---|
results | readonly AxChatResponseResult [] |
sessionId? | string |
Returns
void
addTag()
addTag(name: string, sessionId?: string): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/mem/types.ts#L40
Parameters
Parameter | Type |
---|---|
name | string |
sessionId? | string |
Returns
void
getLast()
getLast(sessionId?: string):
| undefined
| {
chat: object[];
role: "function" | "system" | "user" | "assistant";
tags?: string[];
updatable?: boolean;
};
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/mem/types.ts#L38
Parameters
Parameter | Type |
---|---|
sessionId? | string |
Returns
| undefined
| {
chat
: object
[];
role
: "function"
| "system"
| "user"
| "assistant"
;
tags?
: string
[];
updatable?
: boolean
;
}
history()
history(index: number, sessionId?: string): (
| {
cache?: boolean;
content: string;
role: "system";
}
| {
content: | string
| (
| {
cache?: boolean;
text: string;
type: "text";
}
| {
cache?: boolean;
details?: "high" | "low" | "auto";
image: string;
mimeType: string;
type: "image";
}
| {
cache?: boolean;
data: string;
format?: "wav";
type: "audio";
})[];
name?: string;
role: "user";
}
| {
cache?: boolean;
content?: string;
functionCalls?: object[];
name?: string;
role: "assistant";
}
| {
cache?: boolean;
functionId: string;
isError?: boolean;
result: string;
role: "function";
})[];
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/mem/types.ts#L35
Parameters
Parameter | Type |
---|---|
index | number |
sessionId? | string |
Returns
(
| {
cache?
: boolean
;
content
: string
;
role
: "system"
;
}
| {
content
: | string
| (
| {
cache?
: boolean
;
text
: string
;
type
: "text"
;
}
| {
cache?
: boolean
;
details?
: "high"
| "low"
| "auto"
;
image
: string
;
mimeType
: string
;
type
: "image"
;
}
| {
cache?
: boolean
;
data
: string
;
format?
: "wav"
;
type
: "audio"
;
})[];
name?
: string
;
role
: "user"
;
}
| {
cache?
: boolean
;
content?
: string
;
functionCalls?
: object
[];
name?
: string
;
role
: "assistant"
;
}
| {
cache?
: boolean
;
functionId
: string
;
isError?
: boolean
;
result
: string
;
role
: "function"
;
})[]
reset()
reset(sessionId?: string): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/mem/types.ts#L36
Parameters
Parameter | Type |
---|---|
sessionId? | string |
Returns
void
rewindToTag()
rewindToTag(name: string, sessionId?: string): AxMemoryData;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/mem/types.ts#L41
Parameters
Parameter | Type |
---|---|
name | string |
sessionId? | string |
Returns
updateResult()
updateResult(results: Readonly<AxChatResponseResult> & object, sessionId?: string): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/mem/types.ts#L25
Parameters
Parameter | Type |
---|---|
results | Readonly <AxChatResponseResult > & object |
sessionId? | string |
Returns
void
AxAIOpenAIBaseArgs
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/openai/api.ts#L94
Type Parameters
Type Parameter |
---|
TModel |
TEmbedModel |
TChatReq extends AxAIOpenAIChatRequest <TModel > |
Properties
Property | Type |
---|---|
apiKey | string |
apiURL? | string |
chatReqUpdater? | ChatReqUpdater <TModel , TChatReq > |
config | Readonly <AxAIOpenAIConfig <TModel , TEmbedModel >> |
modelInfo | readonly AxModelInfo [] |
models? | AxAIInputModelList <TModel , TEmbedModel > |
options? | Readonly <AxAIServiceOptions & object > |
supportFor | | AxAIFeatures | (model : TModel ) => AxAIFeatures |
AxAIOpenAIArgs
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/openai/api.ts#L75
Extends
Omit
<AxAIOpenAIBaseArgs
<TModel
,TEmbedModel
,TChatReq
>,"config"
|"supportFor"
|"modelInfo"
>
Type Parameters
Type Parameter | Default type |
---|---|
TName | "openai" |
TModel | AxAIOpenAIModel |
TEmbedModel | AxAIOpenAIEmbedModel |
TChatReq extends AxAIOpenAIChatRequest <TModel > | AxAIOpenAIChatRequest <TModel > |
Properties
Property | Type | Inherited from |
---|---|---|
apiKey | string | Omit.apiKey |
apiURL? | string | Omit.apiURL |
chatReqUpdater? | ChatReqUpdater <TModel , TChatReq > | Omit.chatReqUpdater |
config? | Partial <Readonly <AxAIOpenAIConfig <TModel , TEmbedModel >>> | - |
modelInfo? | AxModelInfo [] | - |
models? | AxAIInputModelList <TModel , TEmbedModel > | Omit.models |
name | TName | - |
options? | Readonly <AxAIServiceOptions & object > | Omit.options |
AxAIOpenAIResponseDelta
Type Parameters
Type Parameter |
---|
T |
Properties
Property | Type |
---|---|
choices | object [] |
created | number |
id | string |
model | string |
object | string |
system_fingerprint | string |
usage? | AxAIOpenAIUsage |
AxAIOpenAIResponsesArgs
Ready-to-use implementation of the OpenAI Responses API client This class uses OpenAI’s /v1/responses API endpoint which supports text, image, and audio inputs
Extends
Omit
<AxAIOpenAIResponsesBaseArgs
<TModel
,TEmbedModel
,TChatReq
>,"config"
|"supportFor"
|"modelInfo"
>
Type Parameters
Type Parameter | Default type |
---|---|
TName | "openai-responses" |
TModel | AxAIOpenAIResponsesModel |
TEmbedModel | AxAIOpenAIEmbedModel |
TChatReq extends AxAIOpenAIResponsesRequest <TModel > | AxAIOpenAIResponsesRequest <TModel > |
Properties
Property | Type | Inherited from |
---|---|---|
apiKey | string | Omit.apiKey |
apiURL? | string | Omit.apiURL |
config? | Partial <AxAIOpenAIResponsesConfig <TModel , TEmbedModel >> | - |
modelInfo? | AxModelInfo [] | - |
models? | AxAIInputModelList <TModel , TEmbedModel > | Omit.models |
name | TName | - |
options? | object & AxAIServiceOptions | Omit.options |
responsesReqUpdater? | (req : Readonly <TResponsesReq >) => Readonly <TResponsesReq > | Omit.responsesReqUpdater |
AxAIOpenAIResponsesCodeInterpreterToolCall
Extends
Properties
Property | Type | Overrides | Inherited from |
---|---|---|---|
code | string | - | - |
id | string | - | AxAIOpenAIResponsesToolCallBase .id |
results? | unknown [] | - | - |
status? | string | - | AxAIOpenAIResponsesToolCallBase .status |
type | "code_interpreter_call" | AxAIOpenAIResponsesToolCallBase .type | - |
AxAIOpenAIResponsesComputerToolCall
Extends
Properties
Property | Type | Overrides | Inherited from |
---|---|---|---|
action | object | - | - |
id | string | - | AxAIOpenAIResponsesToolCallBase .id |
status? | string | - | AxAIOpenAIResponsesToolCallBase .status |
type | "computer_call" | AxAIOpenAIResponsesToolCallBase .type | - |
AxAIOpenAIResponsesContentPartAddedEvent
Extends
Properties
Property | Modifier | Type | Overrides | Inherited from |
---|---|---|---|---|
content_index | readonly | number | - | - |
item_id | readonly | string | - | - |
output_index | readonly | number | - | - |
part | readonly | Readonly < | AxAIOpenAIResponsesOutputTextContentPart | AxAIOpenAIResponsesOutputRefusalContentPart > | - | - |
sequence_number | readonly | number | - | AxAIOpenAIResponsesStreamEventBase .sequence_number |
type | readonly | "response.content_part.added" | AxAIOpenAIResponsesStreamEventBase .type | - |
AxAIOpenAIResponsesContentPartDoneEvent
Extends
Properties
Property | Modifier | Type | Overrides | Inherited from |
---|---|---|---|---|
content_index | readonly | number | - | - |
item_id | readonly | string | - | - |
output_index | readonly | number | - | - |
part | readonly | Readonly < | AxAIOpenAIResponsesOutputTextContentPart | AxAIOpenAIResponsesOutputRefusalContentPart > | - | - |
sequence_number | readonly | number | - | AxAIOpenAIResponsesStreamEventBase .sequence_number |
type | readonly | "response.content_part.done" | AxAIOpenAIResponsesStreamEventBase .type | - |
AxAIOpenAIResponsesDefineFunctionTool
AxAIOpenAIResponsesErrorEvent
Extends
Properties
Property | Modifier | Type | Overrides | Inherited from |
---|---|---|---|---|
code | readonly | null | string | - | - |
message | readonly | string | - | - |
param | readonly | null | string | - | - |
sequence_number | readonly | number | - | AxAIOpenAIResponsesStreamEventBase .sequence_number |
type | readonly | "error" | AxAIOpenAIResponsesStreamEventBase .type | - |
AxAIOpenAIResponsesFileSearchCallCompletedEvent
Extends
Properties
Property | Modifier | Type | Overrides | Inherited from |
---|---|---|---|---|
item_id | readonly | string | - | - |
output_index | readonly | number | - | - |
sequence_number | readonly | number | - | AxAIOpenAIResponsesStreamEventBase .sequence_number |
type | readonly | "response.file_search_call.completed" | AxAIOpenAIResponsesStreamEventBase .type | - |
AxAIOpenAIResponsesFileSearchCallInProgressEvent
Extends
Properties
Property | Modifier | Type | Overrides | Inherited from |
---|---|---|---|---|
item_id | readonly | string | - | - |
output_index | readonly | number | - | - |
sequence_number | readonly | number | - | AxAIOpenAIResponsesStreamEventBase .sequence_number |
type | readonly | "response.file_search_call.in_progress" | AxAIOpenAIResponsesStreamEventBase .type | - |
AxAIOpenAIResponsesFileSearchCallSearchingEvent
Extends
Properties
Property | Modifier | Type | Overrides | Inherited from |
---|---|---|---|---|
item_id | readonly | string | - | - |
output_index | readonly | number | - | - |
sequence_number | readonly | number | - | AxAIOpenAIResponsesStreamEventBase .sequence_number |
type | readonly | "response.file_search_call.searching" | AxAIOpenAIResponsesStreamEventBase .type | - |
AxAIOpenAIResponsesFileSearchToolCall
Extends
Properties
Property | Type | Overrides | Inherited from |
---|---|---|---|
id | string | - | AxAIOpenAIResponsesToolCallBase .id |
queries | string [] | - | - |
results? | object [] | - | - |
status? | string | - | AxAIOpenAIResponsesToolCallBase .status |
type | "file_search_call" | AxAIOpenAIResponsesToolCallBase .type | - |
AxAIOpenAIResponsesFunctionCallArgumentsDeltaEvent
Extends
Properties
Property | Modifier | Type | Overrides | Inherited from |
---|---|---|---|---|
delta | readonly | string | - | - |
item_id | readonly | string | - | - |
output_index | readonly | number | - | - |
sequence_number | readonly | number | - | AxAIOpenAIResponsesStreamEventBase .sequence_number |
type | readonly | "response.function_call_arguments.delta" | AxAIOpenAIResponsesStreamEventBase .type | - |
AxAIOpenAIResponsesFunctionCallArgumentsDoneEvent
Extends
Properties
Property | Modifier | Type | Overrides | Inherited from |
---|---|---|---|---|
arguments | readonly | string | - | - |
item_id | readonly | string | - | - |
output_index | readonly | number | - | - |
sequence_number | readonly | number | - | AxAIOpenAIResponsesStreamEventBase .sequence_number |
type | readonly | "response.function_call_arguments.done" | AxAIOpenAIResponsesStreamEventBase .type | - |
AxAIOpenAIResponsesFunctionCallItem
AxAIOpenAIResponsesImageGenerationCallCompletedEvent
Extends
Properties
Property | Modifier | Type | Overrides | Inherited from |
---|---|---|---|---|
item_id | readonly | string | - | - |
output_index | readonly | number | - | - |
sequence_number | readonly | number | - | AxAIOpenAIResponsesStreamEventBase .sequence_number |
type | readonly | "response.image_generation_call.completed" | AxAIOpenAIResponsesStreamEventBase .type | - |
AxAIOpenAIResponsesImageGenerationCallGeneratingEvent
Extends
Properties
Property | Modifier | Type | Overrides | Inherited from |
---|---|---|---|---|
item_id | readonly | string | - | - |
output_index | readonly | number | - | - |
sequence_number | readonly | number | - | AxAIOpenAIResponsesStreamEventBase .sequence_number |
type | readonly | "response.image_generation_call.generating" | AxAIOpenAIResponsesStreamEventBase .type | - |
AxAIOpenAIResponsesImageGenerationCallInProgressEvent
Extends
Properties
Property | Modifier | Type | Overrides | Inherited from |
---|---|---|---|---|
item_id | readonly | string | - | - |
output_index | readonly | number | - | - |
sequence_number | readonly | number | - | AxAIOpenAIResponsesStreamEventBase .sequence_number |
type | readonly | "response.image_generation_call.in_progress" | AxAIOpenAIResponsesStreamEventBase .type | - |
AxAIOpenAIResponsesImageGenerationCallPartialImageEvent
Extends
Properties
Property | Modifier | Type | Overrides | Inherited from |
---|---|---|---|---|
item_id | readonly | string | - | - |
output_index | readonly | number | - | - |
partial_image_b64 | readonly | string | - | - |
partial_image_index | readonly | number | - | - |
sequence_number | readonly | number | - | AxAIOpenAIResponsesStreamEventBase .sequence_number |
type | readonly | "response.image_generation_call.partial_image" | AxAIOpenAIResponsesStreamEventBase .type | - |
AxAIOpenAIResponsesImageGenerationToolCall
Extends
Properties
Property | Type | Overrides | Inherited from |
---|---|---|---|
id | string | - | AxAIOpenAIResponsesToolCallBase .id |
result? | string | - | - |
status? | string | - | AxAIOpenAIResponsesToolCallBase .status |
type | "image_generation_call" | AxAIOpenAIResponsesToolCallBase .type | - |
AxAIOpenAIResponsesInputAudioContentPart
AxAIOpenAIResponsesInputFunctionCallOutputItem
AxAIOpenAIResponsesInputFunctionCallItem
AxAIOpenAIResponsesInputImageUrlContentPart
AxAIOpenAIResponsesInputMessageItem
Properties
Property | Modifier | Type |
---|---|---|
content | readonly | | string | readonly AxAIOpenAIResponsesInputContentPart [] |
name? | readonly | string |
role | readonly | "system" | "user" | "assistant" | "developer" |
type | readonly | "message" |
AxAIOpenAIResponsesInputTextContentPart
AxAIOpenAIResponsesLocalShellToolCall
Extends
Properties
Property | Type | Overrides | Inherited from |
---|---|---|---|
action | object | - | - |
id | string | - | AxAIOpenAIResponsesToolCallBase .id |
status? | string | - | AxAIOpenAIResponsesToolCallBase .status |
type | "local_shell_call" | AxAIOpenAIResponsesToolCallBase .type | - |
AxAIOpenAIResponsesMCPCallArgumentsDeltaEvent
Extends
Properties
Property | Modifier | Type | Overrides | Inherited from |
---|---|---|---|---|
delta | readonly | object | - | - |
item_id | readonly | string | - | - |
output_index | readonly | number | - | - |
sequence_number | readonly | number | - | AxAIOpenAIResponsesStreamEventBase .sequence_number |
type | readonly | "response.mcp_call.arguments.delta" | AxAIOpenAIResponsesStreamEventBase .type | - |
AxAIOpenAIResponsesMCPCallArgumentsDoneEvent
Extends
Properties
Property | Modifier | Type | Overrides | Inherited from |
---|---|---|---|---|
arguments | readonly | object | - | - |
item_id | readonly | string | - | - |
output_index | readonly | number | - | - |
sequence_number | readonly | number | - | AxAIOpenAIResponsesStreamEventBase .sequence_number |
type | readonly | "response.mcp_call.arguments.done" | AxAIOpenAIResponsesStreamEventBase .type | - |
AxAIOpenAIResponsesMCPCallCompletedEvent
Extends
Properties
Property | Modifier | Type | Overrides | Inherited from |
---|---|---|---|---|
sequence_number | readonly | number | - | AxAIOpenAIResponsesStreamEventBase .sequence_number |
type | readonly | "response.mcp_call.completed" | AxAIOpenAIResponsesStreamEventBase .type | - |
AxAIOpenAIResponsesMCPCallFailedEvent
Extends
Properties
Property | Modifier | Type | Overrides | Inherited from |
---|---|---|---|---|
sequence_number | readonly | number | - | AxAIOpenAIResponsesStreamEventBase .sequence_number |
type | readonly | "response.mcp_call.failed" | AxAIOpenAIResponsesStreamEventBase .type | - |
AxAIOpenAIResponsesMCPCallInProgressEvent
Extends
Properties
Property | Modifier | Type | Overrides | Inherited from |
---|---|---|---|---|
item_id | readonly | string | - | - |
output_index | readonly | number | - | - |
sequence_number | readonly | number | - | AxAIOpenAIResponsesStreamEventBase .sequence_number |
type | readonly | "response.mcp_call.in_progress" | AxAIOpenAIResponsesStreamEventBase .type | - |
AxAIOpenAIResponsesMCPListToolsCompletedEvent
Extends
Properties
Property | Modifier | Type | Overrides | Inherited from |
---|---|---|---|---|
sequence_number | readonly | number | - | AxAIOpenAIResponsesStreamEventBase .sequence_number |
type | readonly | "response.mcp_list_tools.completed" | AxAIOpenAIResponsesStreamEventBase .type | - |
AxAIOpenAIResponsesMCPListToolsFailedEvent
Extends
Properties
Property | Modifier | Type | Overrides | Inherited from |
---|---|---|---|---|
sequence_number | readonly | number | - | AxAIOpenAIResponsesStreamEventBase .sequence_number |
type | readonly | "response.mcp_list_tools.failed" | AxAIOpenAIResponsesStreamEventBase .type | - |
AxAIOpenAIResponsesMCPToolCall
Extends
Properties
Property | Type | Overrides | Inherited from |
---|---|---|---|
args | string | - | - |
error? | string | - | - |
id | string | - | AxAIOpenAIResponsesToolCallBase .id |
name | string | - | - |
output? | string | - | - |
server_label | string | - | - |
status? | string | - | AxAIOpenAIResponsesToolCallBase .status |
type | "mcp_call" | AxAIOpenAIResponsesToolCallBase .type | - |
AxAIOpenAIResponsesMCPListToolsInProgressEvent
Extends
Properties
Property | Modifier | Type | Overrides | Inherited from |
---|---|---|---|---|
sequence_number | readonly | number | - | AxAIOpenAIResponsesStreamEventBase .sequence_number |
type | readonly | "response.mcp_list_tools.in_progress" | AxAIOpenAIResponsesStreamEventBase .type | - |
AxAIOpenAIResponsesOutputItemAddedEvent
Extends
Properties
Property | Modifier | Type | Overrides | Inherited from |
---|---|---|---|---|
item | readonly | Readonly <AxAIOpenAIResponsesOutputItem > | - | - |
output_index | readonly | number | - | - |
sequence_number | readonly | number | - | AxAIOpenAIResponsesStreamEventBase .sequence_number |
type | readonly | "response.output_item.added" | AxAIOpenAIResponsesStreamEventBase .type | - |
AxAIOpenAIResponsesOutputItemDoneEvent
Extends
Properties
Property | Modifier | Type | Overrides | Inherited from |
---|---|---|---|---|
item | readonly | Readonly <AxAIOpenAIResponsesOutputItem > | - | - |
output_index | readonly | number | - | - |
sequence_number | readonly | number | - | AxAIOpenAIResponsesStreamEventBase .sequence_number |
type | readonly | "response.output_item.done" | AxAIOpenAIResponsesStreamEventBase .type | - |
AxAIOpenAIResponsesOutputMessageItem
Properties
Property | Type |
---|---|
content | readonly ( | AxAIOpenAIResponsesOutputTextContentPart | AxAIOpenAIResponsesOutputRefusalContentPart )[] |
id | string |
role | "assistant" |
status | "in_progress" | "completed" | "incomplete" |
type | "message" |
AxAIOpenAIResponsesOutputRefusalContentPart
AxAIOpenAIResponsesOutputTextAnnotationAddedEvent
Extends
Properties
Property | Modifier | Type | Overrides | Inherited from |
---|---|---|---|---|
annotation | readonly | object | - | - |
annotation_index | readonly | number | - | - |
content_index | readonly | number | - | - |
item_id | readonly | string | - | - |
output_index | readonly | number | - | - |
sequence_number | readonly | number | - | AxAIOpenAIResponsesStreamEventBase .sequence_number |
type | readonly | "response.output_text_annotation.added" | AxAIOpenAIResponsesStreamEventBase .type | - |
AxAIOpenAIResponsesOutputTextDoneEvent
Extends
Properties
Property | Modifier | Type | Overrides | Inherited from |
---|---|---|---|---|
content_index | readonly | number | - | - |
item_id | readonly | string | - | - |
output_index | readonly | number | - | - |
sequence_number | readonly | number | - | AxAIOpenAIResponsesStreamEventBase .sequence_number |
text | readonly | string | - | - |
type | readonly | "response.output_text.done" | AxAIOpenAIResponsesStreamEventBase .type | - |
AxAIOpenAIResponsesOutputTextContentPart
AxAIOpenAIResponsesOutputTextDeltaEvent
Extends
Properties
Property | Modifier | Type | Overrides | Inherited from |
---|---|---|---|---|
content_index | readonly | number | - | - |
delta | readonly | string | - | - |
item_id | readonly | string | - | - |
output_index | readonly | number | - | - |
sequence_number | readonly | number | - | AxAIOpenAIResponsesStreamEventBase .sequence_number |
type | readonly | "response.output_text.delta" | AxAIOpenAIResponsesStreamEventBase .type | - |
AxAIOpenAIResponsesReasoningDeltaEvent
Extends
Properties
Property | Modifier | Type | Overrides | Inherited from |
---|---|---|---|---|
content_index | readonly | number | - | - |
delta | readonly | object | - | - |
item_id | readonly | string | - | - |
output_index | readonly | number | - | - |
sequence_number | readonly | number | - | AxAIOpenAIResponsesStreamEventBase .sequence_number |
type | readonly | "response.reasoning.delta" | AxAIOpenAIResponsesStreamEventBase .type | - |
AxAIOpenAIResponsesReasoningItem
AxAIOpenAIResponsesReasoningDoneEvent
Extends
Properties
Property | Modifier | Type | Overrides | Inherited from |
---|---|---|---|---|
content_index | readonly | number | - | - |
item_id | readonly | string | - | - |
output_index | readonly | number | - | - |
sequence_number | readonly | number | - | AxAIOpenAIResponsesStreamEventBase .sequence_number |
text | readonly | string | - | - |
type | readonly | "response.reasoning.done" | AxAIOpenAIResponsesStreamEventBase .type | - |
AxAIOpenAIResponsesReasoningSummaryDeltaEvent
Extends
Properties
Property | Modifier | Type | Overrides | Inherited from |
---|---|---|---|---|
delta | readonly | object | - | - |
item_id | readonly | string | - | - |
output_index | readonly | number | - | - |
sequence_number | readonly | number | - | AxAIOpenAIResponsesStreamEventBase .sequence_number |
summary_index | readonly | number | - | - |
type | readonly | "response.reasoning_summary.delta" | AxAIOpenAIResponsesStreamEventBase .type | - |
AxAIOpenAIResponsesReasoningSummaryDoneEvent
Extends
Properties
Property | Modifier | Type | Overrides | Inherited from |
---|---|---|---|---|
item_id | readonly | string | - | - |
output_index | readonly | number | - | - |
sequence_number | readonly | number | - | AxAIOpenAIResponsesStreamEventBase .sequence_number |
summary_index | readonly | number | - | - |
text | readonly | string | - | - |
type | readonly | "response.reasoning_summary.done" | AxAIOpenAIResponsesStreamEventBase .type | - |
AxAIOpenAIResponsesReasoningSummaryPart
AxAIOpenAIResponsesReasoningSummaryPartAddedEvent
Extends
Properties
Property | Modifier | Type | Overrides | Inherited from |
---|---|---|---|---|
item_id | readonly | string | - | - |
output_index | readonly | number | - | - |
part | readonly | Readonly <AxAIOpenAIResponsesReasoningSummaryPart > | - | - |
sequence_number | readonly | number | - | AxAIOpenAIResponsesStreamEventBase .sequence_number |
summary_index | readonly | number | - | - |
type | readonly | "response.reasoning_summary_part.added" | AxAIOpenAIResponsesStreamEventBase .type | - |
AxAIOpenAIResponsesReasoningSummaryPartDoneEvent
Extends
Properties
Property | Modifier | Type | Overrides | Inherited from |
---|---|---|---|---|
item_id | readonly | string | - | - |
output_index | readonly | number | - | - |
part | readonly | Readonly <AxAIOpenAIResponsesReasoningSummaryPart > | - | - |
sequence_number | readonly | number | - | AxAIOpenAIResponsesStreamEventBase .sequence_number |
summary_index | readonly | number | - | - |
type | readonly | "response.reasoning_summary_part.done" | AxAIOpenAIResponsesStreamEventBase .type | - |
AxAIOpenAIResponsesReasoningSummaryTextDeltaEvent
Extends
Properties
Property | Modifier | Type | Overrides | Inherited from |
---|---|---|---|---|
delta | readonly | string | - | - |
item_id | readonly | string | - | - |
output_index | readonly | number | - | - |
sequence_number | readonly | number | - | AxAIOpenAIResponsesStreamEventBase .sequence_number |
summary_index | readonly | number | - | - |
type | readonly | "response.reasoning_summary_text.delta" | AxAIOpenAIResponsesStreamEventBase .type | - |
AxAIOpenAIResponsesReasoningSummaryTextDoneEvent
Extends
Properties
Property | Modifier | Type | Overrides | Inherited from |
---|---|---|---|---|
item_id | readonly | string | - | - |
output_index | readonly | number | - | - |
sequence_number | readonly | number | - | AxAIOpenAIResponsesStreamEventBase .sequence_number |
summary_index | readonly | number | - | - |
text | readonly | string | - | - |
type | readonly | "response.reasoning_summary_text.done" | AxAIOpenAIResponsesStreamEventBase .type | - |
AxAIOpenAIResponsesRefusalDeltaEvent
Extends
Properties
Property | Modifier | Type | Overrides | Inherited from |
---|---|---|---|---|
content_index | readonly | number | - | - |
delta | readonly | string | - | - |
item_id | readonly | string | - | - |
output_index | readonly | number | - | - |
sequence_number | readonly | number | - | AxAIOpenAIResponsesStreamEventBase .sequence_number |
type | readonly | "response.refusal.delta" | AxAIOpenAIResponsesStreamEventBase .type | - |
AxAIOpenAIResponsesRefusalDoneEvent
Extends
Properties
Property | Modifier | Type | Overrides | Inherited from |
---|---|---|---|---|
content_index | readonly | number | - | - |
item_id | readonly | string | - | - |
output_index | readonly | number | - | - |
refusal | readonly | string | - | - |
sequence_number | readonly | number | - | AxAIOpenAIResponsesStreamEventBase .sequence_number |
type | readonly | "response.refusal.done" | AxAIOpenAIResponsesStreamEventBase .type | - |
AxAIOpenAIResponsesRequest
Type Parameters
Type Parameter | Default type |
---|---|
TModel | AxAIOpenAIResponsesModel |
Properties
Property | Modifier | Type |
---|---|---|
background? | readonly | null | boolean |
include? | readonly | | null | readonly ( | "file_search_call.results" | "message.input_image.image_url" | "computer_call_output.output.image_url" | "reasoning.encrypted_content" | "code_interpreter_call.outputs" )[] |
input | readonly | | string | readonly AxAIOpenAIResponsesInputItem [] |
instructions? | readonly | null | string |
max_output_tokens? | readonly | null | number |
metadata? | readonly | null | Readonly <Record <string , string >> |
model | readonly | TModel |
parallel_tool_calls? | readonly | null | boolean |
previous_response_id? | readonly | null | string |
reasoning? | readonly | | null | { effort? : null | "high" | "low" | "medium" ; summary? : null | "auto" | "concise" | "detailed" ; } |
seed? | readonly | null | number |
service_tier? | readonly | null | "auto" | "default" | "flex" |
store? | readonly | null | boolean |
stream? | readonly | null | boolean |
temperature? | readonly | null | number |
text? | readonly | | null | { format? : | null | { type : "text" ; } | { type : "json_object" ; } | { json_schema? : object ; type : "json_schema" ; }; } |
tool_choice? | readonly | | null | AxAIOpenAIResponsesToolChoice |
tools? | readonly | | null | readonly AxAIOpenAIResponsesDefineFunctionTool [] |
top_p? | readonly | null | number |
truncation? | readonly | null | "auto" | "disabled" |
user? | readonly | null | string |
AxAIOpenAIResponsesResponse
Properties
Property | Modifier | Type |
---|---|---|
created | readonly | number |
id | readonly | string |
model | readonly | string |
object | readonly | string |
output | readonly | readonly AxAIOpenAIResponsesOutputItem [] |
usage? | readonly | | null | { completion_tokens : number ; prompt_tokens : number ; total_tokens : number ; } |
AxAIOpenAIResponsesResponseCompletedEvent
Extends
Properties
Property | Modifier | Type | Overrides | Inherited from |
---|---|---|---|---|
response | readonly | Readonly <AxAIOpenAIResponsesResponse > | - | - |
sequence_number | readonly | number | - | AxAIOpenAIResponsesStreamEventBase .sequence_number |
type | readonly | "response.completed" | AxAIOpenAIResponsesStreamEventBase .type | - |
AxAIOpenAIResponsesResponseCreatedEvent
Extends
Properties
Property | Modifier | Type | Overrides | Inherited from |
---|---|---|---|---|
response | readonly | Readonly <AxAIOpenAIResponsesResponse > | - | - |
sequence_number | readonly | number | - | AxAIOpenAIResponsesStreamEventBase .sequence_number |
type | readonly | "response.created" | AxAIOpenAIResponsesStreamEventBase .type | - |
AxAIOpenAIResponsesResponseFailedEvent
Extends
Properties
Property | Modifier | Type | Overrides | Inherited from |
---|---|---|---|---|
response | readonly | Readonly <AxAIOpenAIResponsesResponse > | - | - |
sequence_number | readonly | number | - | AxAIOpenAIResponsesStreamEventBase .sequence_number |
type | readonly | "response.failed" | AxAIOpenAIResponsesStreamEventBase .type | - |
AxAIOpenAIResponsesResponseDelta
Properties
Property | Modifier | Type |
---|---|---|
delta? | readonly | object |
delta.arguments? | readonly | string |
delta.content? | readonly | string |
event? | readonly | string |
id? | readonly | string |
item? | readonly | Partial <Readonly <AxAIOpenAIResponsesOutputItem >> |
item_index? | readonly | number |
model? | readonly | string |
response? | readonly | Readonly <AxAIOpenAIResponsesResponse > |
usage? | readonly | | null | { completion_tokens : number ; prompt_tokens : number ; total_tokens : number ; } |
AxAIOpenAIResponsesResponseInProgressEvent
Extends
Properties
Property | Modifier | Type | Overrides | Inherited from |
---|---|---|---|---|
response | readonly | Readonly <AxAIOpenAIResponsesResponse > | - | - |
sequence_number | readonly | number | - | AxAIOpenAIResponsesStreamEventBase .sequence_number |
type | readonly | "response.in_progress" | AxAIOpenAIResponsesStreamEventBase .type | - |
AxAIOpenAIResponsesResponseIncompleteEvent
Extends
Properties
Property | Modifier | Type | Overrides | Inherited from |
---|---|---|---|---|
response | readonly | Readonly <AxAIOpenAIResponsesResponse > | - | - |
sequence_number | readonly | number | - | AxAIOpenAIResponsesStreamEventBase .sequence_number |
type | readonly | "response.incomplete" | AxAIOpenAIResponsesStreamEventBase .type | - |
AxAIOpenAIResponsesResponseQueuedEvent
Extends
Properties
Property | Modifier | Type | Overrides | Inherited from |
---|---|---|---|---|
response | readonly | Readonly <AxAIOpenAIResponsesResponse > | - | - |
sequence_number | readonly | number | - | AxAIOpenAIResponsesStreamEventBase .sequence_number |
type | readonly | "response.queued" | AxAIOpenAIResponsesStreamEventBase .type | - |
AxAIOpenAIResponsesStreamEventBase
Extended by
AxAIOpenAIResponsesContentPartAddedEvent
AxAIOpenAIResponsesContentPartDoneEvent
AxAIOpenAIResponsesErrorEvent
AxAIOpenAIResponsesFileSearchCallCompletedEvent
AxAIOpenAIResponsesFileSearchCallInProgressEvent
AxAIOpenAIResponsesFileSearchCallSearchingEvent
AxAIOpenAIResponsesFunctionCallArgumentsDeltaEvent
AxAIOpenAIResponsesFunctionCallArgumentsDoneEvent
AxAIOpenAIResponsesImageGenerationCallCompletedEvent
AxAIOpenAIResponsesImageGenerationCallGeneratingEvent
AxAIOpenAIResponsesImageGenerationCallInProgressEvent
AxAIOpenAIResponsesImageGenerationCallPartialImageEvent
AxAIOpenAIResponsesMCPCallArgumentsDeltaEvent
AxAIOpenAIResponsesMCPCallArgumentsDoneEvent
AxAIOpenAIResponsesMCPCallCompletedEvent
AxAIOpenAIResponsesMCPCallFailedEvent
AxAIOpenAIResponsesMCPCallInProgressEvent
AxAIOpenAIResponsesMCPListToolsCompletedEvent
AxAIOpenAIResponsesMCPListToolsFailedEvent
AxAIOpenAIResponsesMCPListToolsInProgressEvent
AxAIOpenAIResponsesOutputItemAddedEvent
AxAIOpenAIResponsesOutputItemDoneEvent
AxAIOpenAIResponsesOutputTextAnnotationAddedEvent
AxAIOpenAIResponsesOutputTextDeltaEvent
AxAIOpenAIResponsesOutputTextDoneEvent
AxAIOpenAIResponsesReasoningDeltaEvent
AxAIOpenAIResponsesReasoningDoneEvent
AxAIOpenAIResponsesReasoningSummaryDeltaEvent
AxAIOpenAIResponsesReasoningSummaryDoneEvent
AxAIOpenAIResponsesReasoningSummaryPartAddedEvent
AxAIOpenAIResponsesReasoningSummaryPartDoneEvent
AxAIOpenAIResponsesReasoningSummaryTextDeltaEvent
AxAIOpenAIResponsesReasoningSummaryTextDoneEvent
AxAIOpenAIResponsesRefusalDeltaEvent
AxAIOpenAIResponsesRefusalDoneEvent
AxAIOpenAIResponsesResponseCompletedEvent
AxAIOpenAIResponsesResponseCreatedEvent
AxAIOpenAIResponsesResponseFailedEvent
AxAIOpenAIResponsesResponseInProgressEvent
AxAIOpenAIResponsesResponseIncompleteEvent
AxAIOpenAIResponsesResponseQueuedEvent
AxAIOpenAIResponsesWebSearchCallCompletedEvent
AxAIOpenAIResponsesWebSearchCallInProgressEvent
AxAIOpenAIResponsesWebSearchCallSearchingEvent
Properties
Property | Modifier | Type |
---|---|---|
sequence_number | readonly | number |
type | readonly | string |
AxAIOpenAIResponsesToolCallBase
Extended by
AxAIOpenAIResponsesCodeInterpreterToolCall
AxAIOpenAIResponsesComputerToolCall
AxAIOpenAIResponsesFileSearchToolCall
AxAIOpenAIResponsesImageGenerationToolCall
AxAIOpenAIResponsesLocalShellToolCall
AxAIOpenAIResponsesMCPToolCall
AxAIOpenAIResponsesWebSearchToolCall
Properties
Property | Type |
---|---|
id | string |
status? | string |
type | string |
AxAIOpenAIResponsesWebSearchCallCompletedEvent
Extends
Properties
Property | Modifier | Type | Overrides | Inherited from |
---|---|---|---|---|
item_id | readonly | string | - | - |
output_index | readonly | number | - | - |
sequence_number | readonly | number | - | AxAIOpenAIResponsesStreamEventBase .sequence_number |
type | readonly | "response.web_search_call.completed" | AxAIOpenAIResponsesStreamEventBase .type | - |
AxAIOpenAIResponsesWebSearchCallInProgressEvent
Extends
Properties
Property | Modifier | Type | Overrides | Inherited from |
---|---|---|---|---|
item_id | readonly | string | - | - |
output_index | readonly | number | - | - |
sequence_number | readonly | number | - | AxAIOpenAIResponsesStreamEventBase .sequence_number |
type | readonly | "response.web_search_call.in_progress" | AxAIOpenAIResponsesStreamEventBase .type | - |
AxAIOpenAIResponsesWebSearchCallSearchingEvent
Extends
Properties
Property | Modifier | Type | Overrides | Inherited from |
---|---|---|---|---|
item_id | readonly | string | - | - |
output_index | readonly | number | - | - |
sequence_number | readonly | number | - | AxAIOpenAIResponsesStreamEventBase .sequence_number |
type | readonly | "response.web_search_call.searching" | AxAIOpenAIResponsesStreamEventBase .type | - |
AxAIOpenAIResponsesWebSearchToolCall
Extends
Properties
Property | Type | Overrides | Inherited from |
---|---|---|---|
id | string | - | AxAIOpenAIResponsesToolCallBase .id |
queries | string [] | - | - |
status? | string | - | AxAIOpenAIResponsesToolCallBase .status |
type | "web_search_call" | AxAIOpenAIResponsesToolCallBase .type | - |
AxAIRekaArgs
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/reka/api.ts#L53
Properties
Property | Type |
---|---|
apiKey | string |
apiURL? | string |
config? | Readonly <Partial <AxAIRekaConfig >> |
modelInfo? | readonly AxModelInfo [] |
models? | AxAIInputModelList <AxAIRekaModel , undefined > |
name | "reka" |
options? | Readonly <AxAIServiceOptions & object > |
AxAIService
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L326
Type Parameters
Type Parameter | Default type |
---|---|
TModel | unknown |
TEmbedModel | unknown |
Methods
chat()
chat(req: Readonly<AxChatRequest<TModel>>, options?: Readonly<AxAIPromptConfig & AxAIServiceActionOptions<TModel, TEmbedModel>>): Promise<
| AxChatResponse
| ReadableStream<AxChatResponse>>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L338
Parameters
Parameter | Type |
---|---|
req | Readonly <AxChatRequest <TModel >> |
options? | Readonly <AxAIPromptConfig & AxAIServiceActionOptions <TModel , TEmbedModel >> |
Returns
Promise
<
| AxChatResponse
| ReadableStream
<AxChatResponse
>>
embed()
embed(req: Readonly<AxEmbedRequest<TEmbedModel>>, options?: Readonly<AxAIServiceActionOptions<TModel, TEmbedModel>>): Promise<AxEmbedResponse>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L344
Parameters
Parameter | Type |
---|---|
req | Readonly <AxEmbedRequest <TEmbedModel >> |
options? | Readonly <AxAIServiceActionOptions <TModel , TEmbedModel >> |
Returns
Promise
<AxEmbedResponse
>
getFeatures()
getFeatures(model?: TModel): AxAIFeatures;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L329
Parameters
Parameter | Type |
---|---|
model? | TModel |
Returns
getId()
getId(): string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L327
Returns
string
getLastUsedChatModel()
getLastUsedChatModel(): undefined | TModel;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L334
Returns
undefined
| TModel
getLastUsedEmbedModel()
getLastUsedEmbedModel(): undefined | TEmbedModel;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L335
Returns
undefined
| TEmbedModel
getLastUsedModelConfig()
getLastUsedModelConfig(): undefined | AxModelConfig;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L336
Returns
undefined
| AxModelConfig
getLogger()
getLogger(): AxLoggerFunction;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L332
Returns
getMetrics()
getMetrics(): AxAIServiceMetrics;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L331
Returns
getModelList()
getModelList(): undefined | AxAIModelList;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L330
Returns
undefined
| AxAIModelList
getName()
getName(): string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L328
Returns
string
getOptions()
getOptions(): Readonly<AxAIServiceOptions>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L350
Returns
Readonly
<AxAIServiceOptions
>
setOptions()
setOptions(options: Readonly<AxAIServiceOptions>): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L349
Parameters
Parameter | Type |
---|---|
options | Readonly <AxAIServiceOptions > |
Returns
void
AxAIServiceImpl
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L353
Type Parameters
Type Parameter |
---|
TModel |
TEmbedModel |
TChatRequest |
TEmbedRequest |
TChatResponse |
TChatResponseDelta |
TEmbedResponse |
Methods
createChatReq()
createChatReq(req: Readonly<AxInternalChatRequest<TModel>>, config: Readonly<AxAIPromptConfig>): [AxAPI, TChatRequest];
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L362
Parameters
Parameter | Type |
---|---|
req | Readonly <AxInternalChatRequest <TModel >> |
config | Readonly <AxAIPromptConfig > |
Returns
[AxAPI
, TChatRequest
]
createChatResp()
createChatResp(resp: Readonly<TChatResponse>): AxChatResponse;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L367
Parameters
Parameter | Type |
---|---|
resp | Readonly <TChatResponse > |
Returns
createChatStreamResp()?
optional createChatStreamResp(resp: Readonly<TChatResponseDelta>, state: object): AxChatResponse;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L369
Parameters
Parameter | Type |
---|---|
resp | Readonly <TChatResponseDelta > |
state | object |
Returns
createEmbedReq()?
optional createEmbedReq(req: Readonly<AxInternalEmbedRequest<TEmbedModel>>): [AxAPI, TEmbedRequest];
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L374
Parameters
Parameter | Type |
---|---|
req | Readonly <AxInternalEmbedRequest <TEmbedModel >> |
Returns
[AxAPI
, TEmbedRequest
]
createEmbedResp()?
optional createEmbedResp(resp: Readonly<TEmbedResponse>): AxEmbedResponse;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L378
Parameters
Parameter | Type |
---|---|
resp | Readonly <TEmbedResponse > |
Returns
getModelConfig()
getModelConfig(): AxModelConfig;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L380
Returns
getTokenUsage()
getTokenUsage(): undefined | AxTokenUsage;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L382
Returns
undefined
| AxTokenUsage
AxAIServiceMetrics
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L200
Properties
AxAPI
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/util/apicall.ts#L42
Extended by
Properties
Property | Type |
---|---|
headers? | Record <string , string > |
name? | string |
put? | boolean |
AxAPIConfig
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/util/apicall.ts#L49
Extends
AxAPI
.RequestValidation
.ResponseValidation
Properties
Property | Type | Inherited from |
---|---|---|
abortSignal? | AbortSignal | - |
debug? | boolean | - |
fetch? | (input : string | URL | Request , init? : RequestInit ) => Promise <Response > | - |
headers? | Record <string , string > | AxAPI .headers |
name? | string | AxAPI .name |
put? | boolean | AxAPI .put |
retry? | Partial <RetryConfig > | - |
span? | Span | - |
stream? | boolean | - |
timeout? | number | - |
url | string | URL | - |
validateRequest? | (request : unknown ) => boolean | Promise <boolean > | RequestValidation.validateRequest |
validateResponse? | (response : unknown ) => boolean | Promise <boolean > | ResponseValidation.validateResponse |
AxAgentFeatures
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/prompts/agent.ts#L42
Properties
AxAgentic
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/prompts/agent.ts#L28
Interface for agents that can be used as child agents. Provides methods to get the agent’s function definition and features.
Extends
Type Parameters
Type Parameter |
---|
IN extends AxGenIn |
OUT extends AxGenOut |
Properties
Property | Type | Inherited from |
---|---|---|
getTraces | () => AxProgramTrace <IN , OUT >[] | AxTunable .getTraces |
getUsage | () => AxModelUsage & object [] | AxUsable .getUsage |
resetUsage | () => void | AxUsable .resetUsage |
setDemos | (demos : readonly AxProgramDemos <IN , OUT >[]) => void | AxTunable .setDemos |
setExamples | (examples : Readonly <AxProgramExamples <IN , OUT >>, options? : Readonly <AxSetExamplesOptions >) => void | AxTunable .setExamples |
setId | (id : string ) => void | AxTunable .setId |
setParentId | (parentId : string ) => void | AxTunable .setParentId |
Methods
getFeatures()
getFeatures(): AxAgentFeatures;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/prompts/agent.ts#L32
Returns
getFunction()
getFunction(): AxFunction;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/prompts/agent.ts#L31
Returns
AxApacheTikaArgs
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/docs/tika.ts#L3
Properties
Property | Type |
---|---|
fetch? | (input : string | URL | Request , init? : RequestInit ) => Promise <Response > |
url? | string | URL |
AxApacheTikaConvertOptions
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/docs/tika.ts#L8
Properties
Property | Type |
---|---|
format? | "text" | "html" |
AxAssertion
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/asserts.ts#L3
Properties
Property | Type |
---|---|
message? | string |
Methods
fn()
fn(values: Record<string, unknown>): undefined | boolean | Promise<undefined | boolean>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/asserts.ts#L4
Parameters
Parameter | Type |
---|---|
values | Record <string , unknown > |
Returns
undefined
| boolean
| Promise
<undefined
| boolean
>
AxBaseAIArgs
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/base.ts#L38
Type Parameters
Type Parameter |
---|
TModel |
TEmbedModel |
Properties
Property | Type |
---|---|
apiURL | string |
defaults | Readonly <{ embedModel? : TEmbedModel ; model : TModel ; }> |
headers | () => Promise <Record <string , string >> |
modelInfo | readonly AxModelInfo [] |
models? | AxAIInputModelList <TModel , TEmbedModel > |
name | string |
options? | Readonly <AxAIServiceOptions > |
supportFor | | AxAIFeatures | (model : TModel ) => AxAIFeatures |
AxBootstrapCompileOptions
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/optimizer.ts#L359
Extends
Properties
AxBootstrapOptimizerOptions
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/optimizer.ts#L309
Properties
Property | Type |
---|---|
adaptiveBatching? | boolean |
batchSize? | number |
costMonitoring? | boolean |
debugMode? | boolean |
diversityWeight? | number |
dynamicTemperature? | boolean |
earlyStoppingPatience? | number |
maxDemos? | number |
maxExamples? | number |
maxRounds? | number |
maxTokensPerGeneration? | number |
qualityThreshold? | number |
teacherAI? | AxAIService <unknown , unknown > |
verboseMode? | boolean |
AxCompileOptions
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/optimizer.ts#L196
Extended by
Properties
Property | Type |
---|---|
earlyStoppingPatience? | number |
maxIterations? | number |
overrideCheckpointInterval? | number |
overrideCheckpointLoad? | AxCheckpointLoadFn |
overrideCheckpointSave? | AxCheckpointSaveFn |
overrideCostTracker? | AxCostTracker |
overrideOnEarlyStop? | (reason : string , stats : Readonly <AxOptimizationStats >) => void |
overrideOnProgress? | (progress : Readonly <AxOptimizationProgress >) => void |
overrideTargetScore? | number |
overrideTeacherAI? | AxAIService <unknown , unknown > |
overrideValidationSet? | readonly AxExample [] |
saveCheckpointOnComplete? | boolean |
verbose? | boolean |
AxCostTracker
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/optimizer.ts#L42
Methods
getCurrentCost()
getCurrentCost(): number;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/optimizer.ts#L44
Returns
number
getTokenUsage()
getTokenUsage(): Record<string, number>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/optimizer.ts#L45
Returns
Record
<string
, number
>
getTotalTokens()
getTotalTokens(): number;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/optimizer.ts#L46
Returns
number
isLimitReached()
isLimitReached(): boolean;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/optimizer.ts#L47
Returns
boolean
reset()
reset(): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/optimizer.ts#L48
Returns
void
trackTokens()
trackTokens(count: number, model: string): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/optimizer.ts#L43
Parameters
Parameter | Type |
---|---|
count | number |
model | string |
Returns
void
AxCostTrackerOptions
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/optimizer.ts#L88
Properties
Property | Type |
---|---|
costPerModel? | Record <string , number > |
maxCost? | number |
maxTokens? | number |
AxDBBaseOpOptions
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/db/base.ts#L18
Properties
Property | Type |
---|---|
span? | Span |
AxDBBaseArgs
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/db/base.ts#L13
Extended by
Properties
Property | Type |
---|---|
fetch? | (input : string | URL | Request , init? : RequestInit ) => Promise <Response > |
tracer? | Tracer |
AxDBCloudflareArgs
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/db/cloudflare.ts#L34
Extends
Properties
Property | Type | Overrides | Inherited from |
---|---|---|---|
accountId | string | - | - |
apiKey | string | - | - |
fetch? | (input : string | URL | Request , init? : RequestInit ) => Promise <Response > | AxDBBaseArgs .fetch | - |
name | "cloudflare" | - | - |
tracer? | Tracer | - | AxDBBaseArgs .tracer |
AxDBLoaderOptions
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/docs/manager.ts#L11
Properties
Property | Type |
---|---|
chunker? | (text : string ) => string [] |
reranker? | AxProgram <AxRerankerIn , AxRerankerOut > |
rewriter? | AxProgram <AxRewriteIn , AxRewriteOut > |
AxDBManagerArgs
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/docs/manager.ts#L17
Properties
Property | Type |
---|---|
ai | AxAIService |
config? | AxDBLoaderOptions |
db | AxDBService |
AxDBMatch
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/docs/manager.ts#L23
Properties
Property | Type |
---|---|
score | number |
text | string |
AxDBMemoryArgs
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/db/memory.ts#L11
Extends
Properties
Property | Type | Inherited from |
---|---|---|
fetch? | (input : string | URL | Request , init? : RequestInit ) => Promise <Response > | AxDBBaseArgs .fetch |
name | "memory" | - |
tracer? | Tracer | AxDBBaseArgs .tracer |
AxDBPineconeArgs
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/db/pinecone.ts#L48
Extends
Properties
Property | Type | Overrides | Inherited from |
---|---|---|---|
apiKey | string | - | - |
fetch? | (input : string | URL | Request , init? : RequestInit ) => Promise <Response > | AxDBBaseArgs .fetch | - |
host | string | - | - |
name | "pinecone" | - | - |
tracer? | Tracer | - | AxDBBaseArgs .tracer |
AxDBQueryService
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/db/types.ts#L48
Extended by
Methods
query()
query(req: Readonly<AxDBQueryRequest>): Promise<AxDBQueryResponse>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/db/types.ts#L49
Parameters
Parameter | Type |
---|---|
req | Readonly <AxDBQueryRequest > |
Returns
Promise
<AxDBQueryResponse
>
AxDBService
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/db/types.ts#L36
Extends
Methods
batchUpsert()
batchUpsert(batchReq: readonly AxDBUpsertRequest[], update?: boolean): Promise<AxDBUpsertResponse>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/db/types.ts#L42
Parameters
Parameter | Type |
---|---|
batchReq | readonly AxDBUpsertRequest [] |
update? | boolean |
Returns
Promise
<AxDBUpsertResponse
>
query()
query(req: Readonly<AxDBQueryRequest>): Promise<AxDBQueryResponse>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/db/types.ts#L49
Parameters
Parameter | Type |
---|---|
req | Readonly <AxDBQueryRequest > |
Returns
Promise
<AxDBQueryResponse
>
Inherited from
upsert()
upsert(req: Readonly<AxDBUpsertRequest>, update?: boolean): Promise<AxDBUpsertResponse>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/db/types.ts#L37
Parameters
Parameter | Type |
---|---|
req | Readonly <AxDBUpsertRequest > |
update? | boolean |
Returns
Promise
<AxDBUpsertResponse
>
AxDBWeaviateArgs
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/db/weaviate.ts#L29
Extends
Properties
Property | Type | Overrides | Inherited from |
---|---|---|---|
apiKey | string | - | - |
fetch? | (input : string | URL | Request , init? : RequestInit ) => Promise <Response > | AxDBBaseArgs .fetch | - |
host | string | - | - |
name | "weaviate" | - | - |
tracer? | Tracer | - | AxDBBaseArgs .tracer |
AxDockerContainer
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/funcs/docker.ts#L3
Properties
AxFieldDescriptor
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/template.ts#L35
Properties
Property | Modifier | Type |
---|---|---|
description? | readonly | string |
isInternal? | readonly | boolean |
isOptional? | readonly | boolean |
name | readonly | string |
type? | readonly | AxFieldType |
AxField
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/sig.ts#L13
Properties
AxFieldProcessor
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/fieldProcessor.ts#L24
Properties
Property | Type | Description |
---|---|---|
field | Readonly <AxField > | - |
process | | AxFieldProcessorProcess | AxStreamingFieldProcessorProcess | Process the field value and return a new value (or undefined if no update is needed). The returned value may be merged back into memory. Param The current field value. Param Additional context (e.g. memory and session id). |
AxFieldType
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/template.ts#L16
Properties
AxMCPStreamableHTTPTransportOptions
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/mcp/httpTransport.ts#L79
Properties
AxMCPTransport
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/mcp/transport.ts#L7
Methods
connect()?
optional connect(): Promise<void>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/mcp/transport.ts#L27
Connects to the transport if needed This method is optional and only required for transports that need connection setup
Returns
Promise
<void
>
send()
send(message: Readonly<JSONRPCRequest<unknown>>): Promise<JSONRPCResponse<unknown>>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/mcp/transport.ts#L13
Sends a JSON-RPC request or notification and returns the response
Parameters
Parameter | Type | Description |
---|---|---|
message | Readonly <JSONRPCRequest <unknown >> | The JSON-RPC request or notification to send |
Returns
Promise
<JSONRPCResponse
<unknown
>>
A Promise that resolves to the JSON-RPC response
sendNotification()
sendNotification(message: Readonly<JSONRPCNotification>): Promise<void>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/mcp/transport.ts#L21
Sends a JSON-RPC notification
Parameters
Parameter | Type | Description |
---|---|---|
message | Readonly <JSONRPCNotification > | The JSON-RPC notification to send |
Returns
Promise
<void
>
AxMiPROCompileOptions
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/optimizer.ts#L365
Extends
Properties
Property | Type | Inherited from |
---|---|---|
auto? | "medium" | "light" | "heavy" | - |
customProposer? | (context : Readonly <{ dataSummary : string ; previousInstructions : string []; programSummary : string ; }>) => Promise <string []> | - |
earlyStoppingPatience? | number | AxCompileOptions .earlyStoppingPatience |
instructionCandidates? | string [] | - |
maxIterations? | number | AxCompileOptions .maxIterations |
overrideCheckpointInterval? | number | AxCompileOptions .overrideCheckpointInterval |
overrideCheckpointLoad? | AxCheckpointLoadFn | AxCompileOptions .overrideCheckpointLoad |
overrideCheckpointSave? | AxCheckpointSaveFn | AxCompileOptions .overrideCheckpointSave |
overrideCostTracker? | AxCostTracker | AxCompileOptions .overrideCostTracker |
overrideOnEarlyStop? | (reason : string , stats : Readonly <AxOptimizationStats >) => void | AxCompileOptions .overrideOnEarlyStop |
overrideOnProgress? | (progress : Readonly <AxOptimizationProgress >) => void | AxCompileOptions .overrideOnProgress |
overrideTargetScore? | number | AxCompileOptions .overrideTargetScore |
overrideTeacherAI? | AxAIService <unknown , unknown > | AxCompileOptions .overrideTeacherAI |
overrideValidationSet? | readonly AxExample [] | AxCompileOptions .overrideValidationSet |
saveCheckpointOnComplete? | boolean | AxCompileOptions .saveCheckpointOnComplete |
teacher? | Readonly <AxProgram <AxGenIn , AxGenOut >> | - |
validationExamples? | readonly AxExample [] | - |
verbose? | boolean | AxCompileOptions .verbose |
AxMiPROResult
Extends
AxOptimizerResult
<OUT
>
Type Parameters
Type Parameter |
---|
IN extends AxGenIn |
OUT extends AxGenOut |
Properties
Property | Type | Inherited from |
---|---|---|
bestScore | number | AxOptimizerResult .bestScore |
configurationHistory? | Record <string , unknown >[] | AxOptimizerResult .configurationHistory |
demos? | AxProgramDemos <AxGenIn , OUT >[] | AxOptimizerResult .demos |
finalConfiguration? | Record <string , unknown > | AxOptimizerResult .finalConfiguration |
optimizedGen? | AxGen <IN , OUT > | - |
scoreHistory? | number [] | AxOptimizerResult .scoreHistory |
stats | AxOptimizationStats | AxOptimizerResult .stats |
AxOptimizationCheckpoint
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/optimizer.ts#L52
Properties
Property | Type |
---|---|
bestConfiguration? | Record <string , unknown > |
bestScore | number |
configurationHistory | Record <string , unknown >[] |
currentRound | number |
examples | readonly AxExample [] |
optimizerConfig | Record <string , unknown > |
optimizerState | Record <string , unknown > |
optimizerType | string |
scoreHistory | number [] |
stats | AxOptimizationStats |
timestamp | number |
totalRounds | number |
validationSet? | readonly AxExample [] |
version | string |
AxOptimizationProgress
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/optimizer.ts#L24
Properties
AxOptimizationStats
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/optimizer.ts#L130
Properties
AxMiPROOptimizerOptions
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/optimizer.ts#L328
Properties
AxOptimizerResult
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/optimizer.ts#L168
Extended by
Type Parameters
Type Parameter |
---|
OUT extends AxGenOut |
Properties
Property | Type |
---|---|
bestScore | number |
configurationHistory? | Record <string , unknown >[] |
demos? | AxProgramDemos <AxGenIn , OUT >[] |
finalConfiguration? | Record <string , unknown > |
scoreHistory? | number [] |
stats | AxOptimizationStats |
AxOptimizer
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/optimizer.ts#L223
Type Parameters
Type Parameter | Default type |
---|---|
IN extends AxGenIn | AxGenIn |
OUT extends AxGenOut | AxGenOut |
Methods
cancel()?
optional cancel(): Promise<void>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/optimizer.ts#L276
Cancel ongoing optimization gracefully
Returns
Promise
<void
>
Promise that resolves when cancellation is complete
compile()
compile(
program: Readonly<AxProgram<IN, OUT>>,
metricFn: AxMetricFn,
options?: AxCompileOptions): Promise<AxOptimizerResult<OUT>>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/optimizer.ts#L234
Optimize a program using the provided metric function
Parameters
Parameter | Type | Description |
---|---|---|
program | Readonly <AxProgram <IN , OUT >> | The program to optimize (moved from constructor) |
metricFn | AxMetricFn | Evaluation metric function to assess program performance |
options? | AxCompileOptions | Optional configuration options that can override constructor settings |
Returns
Promise
<AxOptimizerResult
<OUT
>>
Optimization result containing demos, stats, and configuration
compilePareto()?
optional compilePareto(
program: Readonly<AxProgram<IN, OUT>>,
metricFn: AxMultiMetricFn,
options?: AxCompileOptions): Promise<AxParetoResult<OUT>>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/optimizer.ts#L260
Multi-objective optimization using Pareto frontier
Parameters
Parameter | Type | Description |
---|---|---|
program | Readonly <AxProgram <IN , OUT >> | The program to optimize |
metricFn | AxMultiMetricFn | Multi-objective metric function |
options? | AxCompileOptions | Optional configuration options |
Returns
Promise
<AxParetoResult
<OUT
>>
Pareto optimization result
compileStream()?
optional compileStream(
program: Readonly<AxProgram<IN, OUT>>,
metricFn: AxMetricFn,
options?: AxCompileOptions): AsyncIterableIterator<AxOptimizationProgress>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/optimizer.ts#L247
Optimize a program with real-time streaming updates
Parameters
Parameter | Type | Description |
---|---|---|
program | Readonly <AxProgram <IN , OUT >> | The program to optimize |
metricFn | AxMetricFn | Evaluation metric function |
options? | AxCompileOptions | Optional configuration options |
Returns
AsyncIterableIterator
<AxOptimizationProgress
>
Async iterator yielding optimization progress
getConfiguration()?
optional getConfiguration(): Record<string, unknown>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/optimizer.ts#L287
Get optimizer-specific configuration
Returns
Record
<string
, unknown
>
Current optimizer configuration
getStats()
getStats(): AxOptimizationStats;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/optimizer.ts#L270
Get current optimization statistics
Returns
Current optimization statistics
reset()?
optional reset(): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/optimizer.ts#L281
Reset optimizer state for reuse with different programs
Returns
void
updateConfiguration()?
optional updateConfiguration(config: Readonly<Record<string, unknown>>): void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/optimizer.ts#L293
Update optimizer configuration
Parameters
Parameter | Type | Description |
---|---|---|
config | Readonly <Record <string , unknown >> | New configuration to merge with existing |
Returns
void
validateProgram()?
optional validateProgram(program: Readonly<AxProgram<IN, OUT>>): object;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/optimizer.ts#L300
Validate that the optimizer can handle the given program
Parameters
Parameter | Type | Description |
---|---|---|
program | Readonly <AxProgram <IN , OUT >> | Program to validate |
Returns
object
Validation result with any issues found
Name | Type |
---|---|
issues | string [] |
isValid | boolean |
suggestions | string [] |
AxParetoResult
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/optimizer.ts#L180
Extends
AxOptimizerResult
<OUT
>
Type Parameters
Type Parameter | Default type |
---|---|
OUT extends AxGenOut | AxGenOut |
Properties
Property | Type | Inherited from |
---|---|---|
bestScore | number | AxOptimizerResult .bestScore |
configurationHistory? | Record <string , unknown >[] | AxOptimizerResult .configurationHistory |
convergenceMetrics? | Record <string , number > | - |
demos? | AxProgramDemos <AxGenIn , OUT >[] | AxOptimizerResult .demos |
finalConfiguration? | Record <string , unknown > | AxOptimizerResult .finalConfiguration |
hypervolume? | number | - |
paretoFront | readonly object [] | - |
paretoFrontSize | number | - |
scoreHistory? | number [] | AxOptimizerResult .scoreHistory |
stats | AxOptimizationStats | AxOptimizerResult .stats |
AxPromptTemplateOptions
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/prompt.ts#L12
Properties
Property | Type |
---|---|
functions? | readonly ( | AxFunction | { toFunction : () => | AxFunction | AxFunction []; })[] |
thoughtFieldName? | string |
AxProgramWithSignatureOptions
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L173
Properties
Property | Type |
---|---|
description? | string |
AxRateLimiterTokenUsageOptions
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/util/rate-limit.ts#L5
Properties
Property | Type |
---|---|
debug? | boolean |
AxResponseHandlerArgs
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/generate.ts#L68
Type Parameters
Type Parameter |
---|
T |
Properties
Property | Type |
---|---|
ai | Readonly <AxAIService > |
functions | readonly AxFunction [] |
mem | AxAIMemory |
model? | string |
res | T |
sessionId? | string |
span? | Span |
strictMode? | boolean |
traceId? | string |
AxSamplePickerOptions
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/samples.ts#L10
Type Parameters
Type Parameter |
---|
OUT extends AxGenOut |
Properties
Property | Type |
---|---|
resultPicker? | AxResultPickerFunction <OUT > |
AxSignatureConfig
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/sig.ts#L49
Properties
Property | Type |
---|---|
description? | string |
inputs | readonly AxField [] |
outputs | readonly AxField [] |
AxSimpleClassifierForwardOptions
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/classifier.ts#L7
Properties
Property | Type |
---|---|
abortSignal? | AbortSignal |
cutoff? | number |
AxStreamingAssertion
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/asserts.ts#L10
Properties
Property | Type |
---|---|
fieldName | string |
message? | string |
Methods
fn()
fn(content: string, done?: boolean): undefined | boolean;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/asserts.ts#L12
Parameters
Parameter | Type |
---|---|
content | string |
done? | boolean |
Returns
undefined
| boolean
AxStreamingEvent
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/generate.ts#L80
Type Parameters
Type Parameter |
---|
T |
Properties
Property | Type |
---|---|
data | object |
data.contentDelta? | string |
data.error? | string |
data.functions? | AxChatResponseFunctionCall [] |
data.partialValues? | Partial <T > |
event | "error" | "done" | "delta" |
AxTunable
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L152
Extended by
Type Parameters
Type Parameter |
---|
IN extends AxGenIn |
OUT extends AxGenOut |
Properties
Property | Type |
---|---|
getTraces | () => AxProgramTrace <IN , OUT >[] |
setDemos | (demos : readonly AxProgramDemos <IN , OUT >[]) => void |
setExamples | (examples : Readonly <AxProgramExamples <IN , OUT >>, options? : Readonly <AxSetExamplesOptions >) => void |
setId | (id : string ) => void |
setParentId | (parentId : string ) => void |
AxUsable
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L163
Extended by
Properties
Property | Type |
---|---|
getUsage | () => AxModelUsage & object [] |
resetUsage | () => void |
@ax-llm/ax
Enumerations
Enumeration | Description |
---|---|
AxAIAnthropicModel | - |
AxAIAnthropicVertexModel | - |
AxAICohereEmbedModel | Cohere: Models for use in embeddings |
AxAICohereModel | Cohere: Models for text generation |
AxAIDeepSeekModel | DeepSeek: Models for text generation |
AxAIGoogleGeminiEmbedModel | - |
AxAIGoogleGeminiEmbedTypes | - |
AxAIGoogleGeminiModel | - |
AxAIGoogleGeminiSafetyCategory | - |
AxAIGoogleGeminiSafetyThreshold | - |
AxAIGrokEmbedModels | - |
AxAIGrokModel | - |
AxAIGroqModel | - |
AxAIHuggingFaceModel | - |
AxAIMistralEmbedModels | - |
AxAIMistralModel | - |
AxAIOpenAIEmbedModel | - |
AxAIOpenAIModel | - |
AxAIOpenAIResponsesModel | - |
AxAIRekaModel | - |
AxJSInterpreterPermission | - |
AxLLMRequestTypeValues | - |
AxSpanKindValues | - |
Classes
Class | Description |
---|---|
AxAgent | An AI agent that can process inputs using an AI service and coordinate with child agents. Supports features like smart model routing and automatic input field passing to child agents. |
AxAI | - |
AxAIAnthropic | - |
AxAIAzureOpenAI | - |
AxAICohere | - |
AxAIDeepSeek | - |
AxAIGoogleGemini | AxAIGoogleGemini: AI Service |
AxAIGrok | - |
AxAIGroq | - |
AxAIHuggingFace | - |
AxAIMistral | - |
AxAIOllama | OllamaAI: AI Service |
AxAIOpenAI | - |
AxAIOpenAIBase | - |
AxAIOpenAIResponses | Base class for OpenAI AI services using the /v1/responses API endpoint |
AxAIOpenAIResponsesBase | Base class for OpenAI AI services using the /v1/responses API endpoint |
AxAIOpenAIResponsesImpl | - |
AxAIRefusalError | - |
AxAIReka | - |
AxAIServiceAbortedError | - |
AxAIServiceAuthenticationError | - |
AxAIServiceError | - |
AxAIServiceNetworkError | - |
AxAIServiceResponseError | - |
AxAIServiceStatusError | - |
AxAIServiceStreamTerminatedError | - |
AxAIServiceTimeoutError | - |
AxAITogether | - |
AxApacheTika | - |
AxAssertionError | - |
AxBalancer | Balancer that rotates through services. |
AxBaseAI | - |
AxBaseOptimizer | Abstract base class for optimizers that provides common functionality and standardized handling of AxOptimizerArgs |
AxBootstrapFewShot | Abstract base class for optimizers that provides common functionality and standardized handling of AxOptimizerArgs |
AxChainOfThought | - |
AxDB | - |
AxDBBase | - |
AxDBCloudflare | Cloudflare: DB Service |
AxDBManager | - |
AxDBMemory | MemoryDB: DB Service |
AxDBPinecone | Pinecone: DB Service |
AxDBWeaviate | Weaviate: DB Service |
AxDefaultCostTracker | - |
AxDefaultResultReranker | - |
AxDockerSession | - |
AxEmbeddingAdapter | - |
AxFlow | AxFlow - A fluent, chainable API for building and orchestrating complex, stateful AI programs. |
AxFunctionError | - |
AxFunctionProcessor | - |
AxGen | - |
AxGenerateError | - |
AxHFDataLoader | - |
AxInstanceRegistry | - |
AxJSInterpreter | - |
AxMCPClient | - |
AxMCPHTTPSSETransport | - |
AxMCPStdioTransport | - |
AxMCPStreambleHTTPTransport | AxMCPStreambleHTTPTransport implements the 2025-03-26 Streamable HTTP transport specification This transport uses a single HTTP endpoint that supports both POST and GET methods |
AxMemory | - |
AxMiPRO | Abstract base class for optimizers that provides common functionality and standardized handling of AxOptimizerArgs |
AxMockAIService | - |
AxMultiServiceRouter | - |
AxProgram | - |
AxProgramWithSignature | - |
AxPromptTemplate | - |
AxRAG | - |
AxRateLimiterTokenUsage | - |
AxSignature | - |
AxSimpleClassifier | - |
AxSimpleClassifierClass | - |
AxTestPrompt | - |
Interfaces
Type Aliases
Variables
Variable | Description |
---|---|
axAIAzureOpenAIBestConfig | - |
axAIAzureOpenAICreativeConfig | - |
axAIAzureOpenAIDefaultConfig | - |
axAIAzureOpenAIFastConfig | - |
axDefaultOptimizerLogger | Default optimizer logger instance |
AxEvalUtil | - |
axGlobals | - |
axModelInfoAnthropic | - |
axModelInfoCohere | - |
axModelInfoDeepSeek | - |
axModelInfoGoogleGemini | AxAIGoogleGemini: Model information |
axModelInfoGrok | - |
axModelInfoGroq | AxAIGroq: Model information |
axModelInfoHuggingFace | HuggingFace: Model information |
axModelInfoMistral | - |
axModelInfoOpenAI | OpenAI: Model information |
axModelInfoReka | OpenAI: Model information |
axModelInfoTogether | - |
axSpanAttributes | - |
axSpanEvents | - |
AxStringUtil | - |
f | - |
Functions
AxAIAnthropicChatError
type AxAIAnthropicChatError = object;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/anthropic/types.ts#L168
Properties
error
error: object;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/anthropic/types.ts#L170
message
message: string;
type
type: "authentication_error";
type
type: "error";
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/anthropic/types.ts#L169
AxAIAnthropicChatRequest
type AxAIAnthropicChatRequest = object;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/anthropic/types.ts#L52
Properties
anthropic_version?
optional anthropic_version: string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/anthropic/types.ts#L54
max_tokens?
optional max_tokens: number;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/anthropic/types.ts#L114
messages
messages: (
| {
content: | string
| (
| ... & ...
| ... & ...
| {
content: ... | ...;
is_error?: boolean;
tool_use_id: string;
type: "tool_result";
})[];
role: "user";
}
| {
content: | string
| (
| {
text: string;
type: "text";
}
| {
id: string;
input: object;
name: string;
type: "tool_use";
}
| {
signature?: string;
thinking: string;
type: "thinking";
}
| {
signature?: string;
thinking: string;
type: "redacted_thinking";
})[];
role: "assistant";
})[];
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/anthropic/types.ts#L55
metadata?
optional metadata: object;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/anthropic/types.ts#L128
user_id
user_id: string;
model?
optional model: string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/anthropic/types.ts#L53
stop_sequences?
optional stop_sequences: string[];
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/anthropic/types.ts#L116
stream?
optional stream: boolean;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/anthropic/types.ts#L117
system?
optional system:
| string
| object & AxAIAnthropicChatRequestCacheParam[];
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/anthropic/types.ts#L118
temperature?
optional temperature: number;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/anthropic/types.ts#L124
thinking?
optional thinking: AxAIAnthropicThinkingConfig;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/anthropic/types.ts#L127
tool_choice?
optional tool_choice:
| {
type: "auto" | "any";
}
| {
name?: string;
type: "tool";
};
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/anthropic/types.ts#L113
tools?
optional tools: object & AxAIAnthropicChatRequestCacheParam[];
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/anthropic/types.ts#L108
top_k?
optional top_k: number;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/anthropic/types.ts#L126
top_p?
optional top_p: number;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/anthropic/types.ts#L125
AxAIAnthropicChatRequestCacheParam
type AxAIAnthropicChatRequestCacheParam = object;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/anthropic/types.ts#L47
Properties
cache_control?
optional cache_control: object;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/anthropic/types.ts#L48
type
type: "ephemeral";
AxAIAnthropicChatResponse
type AxAIAnthropicChatResponse = object;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/anthropic/types.ts#L133
Properties
content
content: (
| {
text: string;
type: "text";
}
| {
id: string;
input?: string;
name: string;
type: "tool_use";
}
| {
signature?: string;
thinking: string;
type: "thinking";
}
| {
signature?: string;
thinking: string;
type: "redacted_thinking";
})[];
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/anthropic/types.ts#L137
id
id: string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/anthropic/types.ts#L134
model
model: string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/anthropic/types.ts#L159
role
role: "assistant";
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/anthropic/types.ts#L136
stop_reason
stop_reason: "end_turn" | "max_tokens" | "stop_sequence" | "tool_use";
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/anthropic/types.ts#L160
stop_sequence?
optional stop_sequence: string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/anthropic/types.ts#L161
type
type: "message";
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/anthropic/types.ts#L135
usage
usage: object;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/anthropic/types.ts#L162
input_tokens
input_tokens: number;
output_tokens
output_tokens: number;
AxAIAnthropicChatResponseDelta
type AxAIAnthropicChatResponseDelta =
| AxAIAnthropicMessageStartEvent
| AxAIAnthropicContentBlockStartEvent
| AxAIAnthropicContentBlockDeltaEvent
| AxAIAnthropicContentBlockStopEvent
| AxAIAnthropicMessageDeltaEvent
| AxAIAnthropicMessageStopEvent
| AxAIAnthropicPingEvent
| AxAIAnthropicErrorEvent;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/anthropic/types.ts#L276
AxAIAnthropicConfig
type AxAIAnthropicConfig = AxModelConfig & object;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/anthropic/types.ts#L41
Type declaration
Name | Type |
---|---|
model | | AxAIAnthropicModel | AxAIAnthropicVertexModel |
thinking? | AxAIAnthropicThinkingConfig |
thinkingTokenBudgetLevels? | AxAIAnthropicThinkingTokenBudgetLevels |
AxAIAnthropicThinkingConfig
type AxAIAnthropicThinkingConfig = object;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/anthropic/types.ts#L28
Properties
budget_tokens
budget_tokens: number;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/anthropic/types.ts#L30
type
type: "enabled";
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/anthropic/types.ts#L29
AxAIAnthropicThinkingTokenBudgetLevels
type AxAIAnthropicThinkingTokenBudgetLevels = object;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/anthropic/types.ts#L33
Properties
high?
optional high: number;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/anthropic/types.ts#L37
highest?
optional highest: number;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/anthropic/types.ts#L38
low?
optional low: number;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/anthropic/types.ts#L35
medium?
optional medium: number;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/anthropic/types.ts#L36
minimal?
optional minimal: number;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/anthropic/types.ts#L34
AxAIAzureOpenAIArgs
type AxAIAzureOpenAIArgs = AxAIOpenAIArgs<"azure-openai", AxAIOpenAIModel, AxAIOpenAIEmbedModel> & object;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/azure-openai/api.ts#L30
Type declaration
Name | Type |
---|---|
deploymentName | string |
resourceName | string |
version? | string |
AxAIArgs
type AxAIArgs =
| AxAIOpenAIArgs
| AxAIOpenAIResponsesArgs
| AxAIAzureOpenAIArgs
| AxAITogetherArgs
| AxAIAnthropicArgs
| AxAIGroqArgs
| AxAIGoogleGeminiArgs
| AxAICohereArgs
| AxAIHuggingFaceArgs
| AxAIMistralArgs
| AxAIDeepSeekArgs
| AxAIOllamaArgs
| AxAIRekaArgs;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/wrap.ts#L56
AxAIAzureOpenAIConfig
type AxAIAzureOpenAIConfig = AxAIOpenAIConfig<AxAIOpenAIModel, AxAIOpenAIEmbedModel>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/azure-openai/api.ts#L26
AxAICohereChatRequest
type AxAICohereChatRequest = object;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/cohere/types.ts#L41
Properties
chat_history
chat_history: (
| {
message: string;
role: "CHATBOT";
tool_calls?: AxAICohereChatResponseToolCalls;
}
| {
message: string;
role: "SYSTEM";
}
| {
message: string;
role: "USER";
}
| {
message?: string;
role: "TOOL";
tool_results: AxAICohereChatRequestToolResults;
})[];
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/cohere/types.ts#L44
end_sequences?
optional end_sequences: readonly string[];
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/cohere/types.ts#L72
frequency_penalty?
optional frequency_penalty: number;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/cohere/types.ts#L70
k?
optional k: number;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/cohere/types.ts#L68
max_tokens?
optional max_tokens: number;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/cohere/types.ts#L66
message?
optional message: string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/cohere/types.ts#L42
model
model: AxAICohereModel;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/cohere/types.ts#L65
p?
optional p: number;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/cohere/types.ts#L69
preamble?
optional preamble: string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/cohere/types.ts#L43
presence_penalty?
optional presence_penalty: number;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/cohere/types.ts#L71
stop_sequences?
optional stop_sequences: string[];
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/cohere/types.ts#L73
temperature?
optional temperature: number;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/cohere/types.ts#L67
tool_results?
optional tool_results: AxAICohereChatRequestToolResults;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/cohere/types.ts#L86
tools?
optional tools: object[];
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/cohere/types.ts#L74
description
description: string;
name
name: string;
parameter_definitions
parameter_definitions: Record<string, {
description: string;
required: boolean;
type: string;
}>;
AxAICohereChatRequestToolResults
type AxAICohereChatRequestToolResults = object[];
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/cohere/types.ts#L36
Type declaration
Name | Type |
---|---|
call | AxAICohereChatResponseToolCalls [0 ] |
outputs | object [] |
AxAICohereChatResponse
type AxAICohereChatResponse = object;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/cohere/types.ts#L89
Properties
finish_reason
finish_reason:
| "COMPLETE"
| "ERROR"
| "ERROR_TOXIC"
| "ERROR_LIMIT"
| "USER_CANCEL"
| "MAX_TOKENS";
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/cohere/types.ts#L99
generation_id
generation_id: string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/cohere/types.ts#L97
meta
meta: object;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/cohere/types.ts#L91
billed_units
{
input_tokens: number;
output_tokens: number;
}
response_id
response_id: string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/cohere/types.ts#L90
text
text: string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/cohere/types.ts#L98
tool_calls
tool_calls: AxAICohereChatResponseToolCalls;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/cohere/types.ts#L106
AxAICohereChatResponseDelta
type AxAICohereChatResponseDelta = AxAICohereChatResponse & object;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/cohere/types.ts#L109
Type declaration
Name | Type |
---|---|
event_type | | "stream-start" | "text-generation" | "tool-calls-generation" | "stream-end" |
AxAICohereChatResponseToolCalls
type AxAICohereChatResponseToolCalls = object[];
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/cohere/types.ts#L31
Type declaration
Name | Type |
---|---|
name | string |
parameters? | object |
AxAICohereConfig
type AxAICohereConfig = AxModelConfig & object;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/cohere/types.ts#L26
Cohere: Model options for text generation
Type declaration
Name | Type |
---|---|
embedModel? | AxAICohereEmbedModel |
model | AxAICohereModel |
AxAICohereEmbedResponse
type AxAICohereEmbedResponse = object;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/cohere/types.ts#L123
Properties
embeddings
embeddings: number[][];
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/cohere/types.ts#L127
id
id: string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/cohere/types.ts#L124
model
model: AxAICohereEmbedModel;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/cohere/types.ts#L126
texts
texts: string[];
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/cohere/types.ts#L125
AxAIDeepSeekArgs
type AxAIDeepSeekArgs = AxAIOpenAIArgs<"deepseek", AxAIDeepSeekModel, undefined>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/deepseek/api.ts#L25
AxAICohereEmbedRequest
type AxAICohereEmbedRequest = object;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/cohere/types.ts#L117
Properties
model
model: AxAICohereEmbedModel;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/cohere/types.ts#L119
texts
texts: readonly string[];
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/cohere/types.ts#L118
truncate
truncate: string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/cohere/types.ts#L120
AxAIGoogleGeminiBatchEmbedRequest
type AxAIGoogleGeminiBatchEmbedRequest = object;
AxAIGoogleGeminiEmbedRequest: Structure for making an embedding request to the Google Gemini API.
Properties
requests
requests: object[];
content
{
parts: object[];
}
model
model: string;
AxAIGoogleGeminiBatchEmbedResponse
type AxAIGoogleGeminiBatchEmbedResponse = object;
AxAIGoogleGeminiEmbedResponse: Structure for handling responses from the Google Gemini API embedding requests.
Properties
embeddings
embeddings: object[];
values
values: number[];
AxAIEmbedModels
type AxAIEmbedModels =
| AxAIOpenAIEmbedModel
| AxAIGoogleGeminiEmbedModel
| AxAICohereEmbedModel;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/wrap.ts#L81
AxAIGoogleGeminiChatRequest
type AxAIGoogleGeminiChatRequest = object;
Properties
contents
contents: AxAIGoogleGeminiContent[];
generationConfig
generationConfig: AxAIGoogleGeminiGenerationConfig;
safetySettings?
optional safetySettings: AxAIGoogleGeminiSafetySettings;
systemInstruction?
optional systemInstruction: AxAIGoogleGeminiContent;
toolConfig?
optional toolConfig: AxAIGoogleGeminiToolConfig;
tools?
optional tools: AxAIGoogleGeminiTool[];
AxAIGoogleGeminiChatResponse
type AxAIGoogleGeminiChatResponse = object;
Properties
candidates
candidates: object[];
citationMetadata
{
citations: object[];
}
content
content: AxAIGoogleGeminiContent;
finishReason
finishReason:
| "STOP"
| "MAX_TOKENS"
| "SAFETY"
| "RECITATION"
| "OTHER"
| "MALFORMED_FUNCTION_CALL";
usageMetadata
usageMetadata: object;
candidatesTokenCount
candidatesTokenCount: number;
promptTokenCount
promptTokenCount: number;
thoughtsTokenCount
thoughtsTokenCount: number;
totalTokenCount
totalTokenCount: number;
AxAIGoogleGeminiChatResponseDelta
type AxAIGoogleGeminiChatResponseDelta = AxAIGoogleGeminiChatResponse;
AxAIGoogleGeminiContent
type AxAIGoogleGeminiContent = object;
Properties
parts
parts: AxAIGoogleGeminiContentPart[];
role
role: "user" | "model";
AxAIGoogleGeminiConfig
type AxAIGoogleGeminiConfig = AxModelConfig & object;
AxAIGoogleGeminiConfig: Configuration options for Google Gemini API
Type declaration
Name | Type |
---|---|
autoTruncate? | boolean |
dimensions? | number |
embedModel? | AxAIGoogleGeminiEmbedModel |
embedType? | AxAIGoogleGeminiEmbedTypes |
model | AxAIGoogleGeminiModel |
safetySettings? | AxAIGoogleGeminiSafetySettings |
thinking? | AxAIGoogleGeminiThinkingConfig |
thinkingTokenBudgetLevels? | AxAIGoogleGeminiThinkingTokenBudgetLevels |
urlContext? | string |
AxAIGoogleGeminiContentPart
type AxAIGoogleGeminiContentPart = object &
| {
text: string;
}
| {
inlineData: {
data: string;
mimeType: string;
};
}
| {
functionCall: {
args: object;
name: string;
};
}
| {
functionResponse: {
name: string;
response: object;
};
}
| {
fileData: {
fileUri: string;
mimeType: string;
};
}
| {
executableCode: object;
}
| {
codeExecutionResult: object;
};
Type declaration
Name | Type |
---|---|
metadata? | { videoMetadata : object ; } |
thought? | boolean |
AxAIGoogleGeminiGenerationConfig
type AxAIGoogleGeminiGenerationConfig = object;
Properties
candidateCount?
optional candidateCount: number;
frequencyPenalty?
optional frequencyPenalty: number;
maxOutputTokens?
optional maxOutputTokens: number;
responseMimeType?
optional responseMimeType: string;
stopSequences?
optional stopSequences: readonly string[];
temperature?
optional temperature: number;
thinkingConfig?
optional thinkingConfig: object;
includeThoughts?
optional includeThoughts: boolean;
thinkingBudget?
optional thinkingBudget: number;
topK?
optional topK: number;
topP?
optional topP: number;
AxAIGoogleGeminiSafetySettings
type AxAIGoogleGeminiSafetySettings = object[];
Type declaration
Name | Type |
---|---|
category | AxAIGoogleGeminiSafetyCategory |
threshold | AxAIGoogleGeminiSafetyThreshold |
AxAIGoogleGeminiThinkingConfig
type AxAIGoogleGeminiThinkingConfig = object;
Properties
includeThoughts?
optional includeThoughts: boolean;
thinkingTokenBudget?
optional thinkingTokenBudget: number;
AxAIGoogleGeminiThinkingTokenBudgetLevels
type AxAIGoogleGeminiThinkingTokenBudgetLevels = object;
Properties
high?
optional high: number;
highest?
optional highest: number;
low?
optional low: number;
medium?
optional medium: number;
minimal?
optional minimal: number;
AxAIGoogleGeminiTool
type AxAIGoogleGeminiTool = object;
Properties
code_execution?
optional code_execution: object;
function_declarations?
optional function_declarations: AxAIGoogleGeminiToolFunctionDeclaration[];
google_search?
optional google_search: object;
google_search_retrieval?
optional google_search_retrieval: AxAIGoogleGeminiToolGoogleSearchRetrieval;
url_context?
optional url_context: object;
AxAIGoogleGeminiToolFunctionDeclaration
type AxAIGoogleGeminiToolFunctionDeclaration = object;
Properties
description?
optional description: string;
name
name: string;
parameters?
optional parameters: object;
AxAIGoogleGeminiToolConfig
type AxAIGoogleGeminiToolConfig = object;
Properties
function_calling_config
function_calling_config: object;
allowed_function_names?
optional allowed_function_names: string[];
mode
mode: "ANY" | "NONE" | "AUTO";
AxAIGoogleVertexBatchEmbedRequest
type AxAIGoogleVertexBatchEmbedRequest = object;
AxAIGoogleVertexBatchEmbedRequest: Structure for making an embedding request to the Google Vertex API.
Properties
instances
instances: object[];
content
content: string;
task_type?
optional task_type: AxAIGoogleGeminiEmbedTypes;
parameters
parameters: object;
autoTruncate?
optional autoTruncate: boolean;
outputDimensionality?
optional outputDimensionality: number;
AxAIGoogleGeminiToolGoogleSearchRetrieval
type AxAIGoogleGeminiToolGoogleSearchRetrieval = object;
Properties
dynamic_retrieval_config
dynamic_retrieval_config: object;
dynamic_threshold?
optional dynamic_threshold: number;
mode?
optional mode: "MODE_DYNAMIC";
AxAIGrokArgs
type AxAIGrokArgs = AxAIOpenAIArgs<"grok", AxAIGrokModel, AxAIGrokEmbedModels, AxAIGrokChatRequest> & object;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/x-grok/api.ts#L64
Type declaration
Name | Type |
---|---|
modelInfo? | AxModelInfo [] |
options? | Readonly <AxAIServiceOptions & AxAIGrokOptionsTools > & object |
AxAIGoogleVertexBatchEmbedResponse
type AxAIGoogleVertexBatchEmbedResponse = object;
AxAIGoogleVertexBatchEmbedResponse: Structure for handling responses from the Google Vertex API embedding requests.
Properties
predictions
predictions: object[];
embeddings
{
values: number[];
}
AxAIGrokChatRequest
type AxAIGrokChatRequest = AxAIOpenAIChatRequest<AxAIGrokModel> & object;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/x-grok/api.ts#L53
Type declaration
Name | Type |
---|---|
search_parameters? | { from_date? : string ; max_search_results? : number ; mode? : "auto" | "on" | "off" ; return_citations? : boolean ; sources? : AxAIGrokSearchSource []; to_date? : string ; } |
AxAIGroqArgs
type AxAIGroqArgs = AxAIOpenAIArgs<"groq", AxAIGroqModel, undefined> & object;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/groq/api.ts#L22
Type declaration
Name | Type |
---|---|
modelInfo? | AxModelInfo [] |
options? | Readonly <AxAIServiceOptions > & object |
AxAIHuggingFaceConfig
type AxAIHuggingFaceConfig = AxModelConfig & object;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/huggingface/types.ts#L7
Type declaration
Name | Type |
---|---|
doSample? | boolean |
maxTime? | number |
model | AxAIHuggingFaceModel |
returnFullText? | boolean |
useCache? | boolean |
waitForModel? | boolean |
AxAIHuggingFaceRequest
type AxAIHuggingFaceRequest = object;
Properties
inputs
inputs: string;
model
model: AxAIHuggingFaceModel;
options?
optional options: object;
use_cache?
optional use_cache: boolean;
wait_for_model?
optional wait_for_model: boolean;
parameters
parameters: object;
do_sample?
optional do_sample: boolean;
max_new_tokens?
optional max_new_tokens: number;
max_time?
optional max_time: number;
num_return_sequences?
optional num_return_sequences: number;
repetition_penalty?
optional repetition_penalty: number;
return_full_text?
optional return_full_text: boolean;
temperature?
optional temperature: number;
top_k?
optional top_k: number;
top_p?
optional top_p: number;
AxAIHuggingFaceResponse
type AxAIHuggingFaceResponse = object;
Properties
generated_text
generated_text: string;
AxAIInputModelList
type AxAIInputModelList<TModel, TEmbedModel> = AxAIModelListBase & object &
| {
model: TModel;
}
| {
embedModel: TEmbedModel;
}[];
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L9
Type Parameters
Type Parameter |
---|
TModel |
TEmbedModel |
AxAIMistralArgs
type AxAIMistralArgs = AxAIOpenAIArgs<"mistral", AxAIMistralModel, AxAIMistralEmbedModels> & object;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/mistral/api.ts#L70
Type declaration
Name | Type |
---|---|
modelInfo? | AxModelInfo [] |
options? | Readonly <AxAIServiceOptions > & object |
AxAIMistralChatRequest
type AxAIMistralChatRequest = Omit<AxAIOpenAIChatRequest<AxAIMistralModel>, "max_completion_tokens" | "stream_options" | "messages"> & object;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/mistral/api.ts#L30
Type declaration
Name | Type |
---|---|
max_tokens? | number |
messages | ( | { content : string ; role : "system" ; } | { content : | string | ( | { text : …; type : …; } | { image_url : …; type : …; })[]; name? : string ; role : "user" ; } | { content : string ; name? : string ; role : "assistant" ; tool_calls? : object []; } | { content : string ; role : "tool" ; tool_call_id : string ; })[] |
AxAIModelList
type AxAIModelList = AxAIModelListBase &
| {
model: string;
}
| {
embedModel: string;
}[];
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L18
AxAIModelListBase
type AxAIModelListBase = object;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L13
Properties
description
description: string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L15
key
key: string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L14
AxAIOllamaAIConfig
type AxAIOllamaAIConfig = AxAIOpenAIConfig<string, string>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/ollama/api.ts#L8
AxAIModels
type AxAIModels =
| AxAIOpenAIModel
| AxAIAnthropicModel
| AxAIGroqModel
| AxAIGoogleGeminiModel
| AxAICohereModel
| AxAIHuggingFaceModel
| AxAIMistralModel
| AxAIDeepSeekModel;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/wrap.ts#L71
AxAIOllamaArgs
type AxAIOllamaArgs = AxAIOpenAIArgs<"ollama", string, string> & object;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/ollama/api.ts#L24
Type declaration
Name | Type |
---|---|
embedModel? | string |
model? | string |
url? | string |
AxAIOpenAIAnnotation
type AxAIOpenAIAnnotation = object;
Properties
type
type: "url_citation";
url_citation
url_citation: AxAIOpenAIUrlCitation;
AxAIOpenAIChatRequest
type AxAIOpenAIChatRequest<TModel> = object;
Type Parameters
Type Parameter |
---|
TModel |
Properties
frequency_penalty?
optional frequency_penalty: number;
logit_bias?
optional logit_bias: Map<string, number>;
max_completion_tokens?
optional max_completion_tokens: number;
messages
messages: (
| {
content: string;
role: "system";
}
| {
content: | string
| (
| {
text: string;
type: string;
}
| {
image_url: {
details?: ...;
url: ...;
};
type: "image_url";
}
| {
input_audio: {
data: ...;
format?: ...;
};
type: "input_audio";
}
| {
file: {
file_data: ...;
filename: ...;
};
type: "file";
})[];
name?: string;
role: "user";
}
| {
content: | string
| {
text: string;
type: string;
};
name?: string;
role: "assistant";
}
| {
content?: | string
| {
text: string;
type: string;
};
name?: string;
role: "assistant";
tool_calls: object[];
}
| {
content: string;
role: "tool";
tool_call_id: string;
})[];
model
model: TModel;
n?
optional n: number;
organization?
optional organization: string;
presence_penalty?
optional presence_penalty: number;
reasoning_effort?
optional reasoning_effort: "low" | "medium" | "high";
response_format?
optional response_format: object;
type
type: string;
stop?
optional stop: readonly string[];
store?
optional store: boolean;
stream?
optional stream: boolean;
temperature?
optional temperature: number;
tool_choice?
optional tool_choice:
| "none"
| "auto"
| "required"
| {
function: {
name: string;
};
type: "function";
};
tools?
optional tools: object[];
function
{
description: string;
name: string;
parameters?: object;
}
type
type: "function";
top_p?
optional top_p: number;
user?
optional user: string;
web_search_options?
optional web_search_options: object;
search_context_size?
optional search_context_size: "low" | "medium" | "high";
user_location?
optional user_location:
| {
approximate: {
city?: string;
country?: string;
region?: string;
timezone?: string;
type: "approximate";
};
}
| null;
AxAIOpenAIChatResponseDelta
type AxAIOpenAIChatResponseDelta = AxAIOpenAIResponseDelta<{
annotations?: AxAIOpenAIAnnotation[];
content: string | null;
reasoning_content?: string;
refusal?: string | null;
role?: string;
tool_calls?: NonNullable<...[...][0]["message"]["tool_calls"]>[0] & object[];
}>;
AxAIOpenAIChatResponse
type AxAIOpenAIChatResponse = object;
Properties
choices
choices: object[];
finish_reason
finish_reason: "stop" | "length" | "content_filter" | "tool_calls";
index
index: number;
message
{
annotations?: AxAIOpenAIAnnotation[];
content: string | null;
reasoning_content?: string;
refusal: string | null;
role: string;
tool_calls?: object[];
}
created
created: number;
error?
optional error: object;
code
code: number;
message
message: string;
param
param: string;
type
type: string;
id
id: string;
model
model: string;
object
object: "chat.completion";
system_fingerprint
system_fingerprint: string;
usage?
optional usage: AxAIOpenAIUsage;
AxAIOpenAIConfig
type AxAIOpenAIConfig<TModel, TEmbedModel> = Omit<AxModelConfig, "topK"> & object;
Type declaration
Name | Type |
---|---|
bestOf? | number |
dimensions? | number |
echo? | boolean |
embedModel? | TEmbedModel |
logitBias? | Map <string , number > |
logprobs? | number |
model | TModel |
reasoningEffort? | "low" | "medium" | "high" |
responseFormat? | "json_object" |
serviceTier? | "auto" | "default" | "flex" |
stop? | string [] |
store? | boolean |
suffix? | string | null |
user? | string |
webSearchOptions? | { searchContextSize? : "low" | "medium" | "high" ; userLocation? : | { approximate : { city? : string ; country? : string ; region? : string ; timezone? : string ; type : "approximate" ; }; } | null ; } |
Type Parameters
Type Parameter |
---|
TModel |
TEmbedModel |
AxAIOpenAIEmbedRequest
type AxAIOpenAIEmbedRequest<TEmbedModel> = object;
Type Parameters
Type Parameter |
---|
TEmbedModel |
Properties
dimensions?
optional dimensions: number;
input
input: readonly string[];
model
model: TEmbedModel;
user?
optional user: string;
AxAIOpenAIEmbedResponse
type AxAIOpenAIEmbedResponse = object;
Properties
data
data: object[];
embedding
embedding: readonly number[];
index
index: number;
model
model: string;
usage
usage: AxAIOpenAIUsage;
AxAIOpenAILogprob
type AxAIOpenAILogprob = object;
Properties
text_offset
text_offset: number[];
token_logprobs
token_logprobs: number[];
tokens
tokens: string[];
top_logprobs
top_logprobs: Map<string, number>;
AxAIOpenAIResponsesConfig
type AxAIOpenAIResponsesConfig<TModel, TEmbedModel> = Omit<AxModelConfig, "topK"> & object;
Type declaration
Name | Type |
---|---|
bestOf? | number |
dimensions? | number |
echo? | boolean |
embedModel? | TEmbedModel |
logitBias? | Map <string , number > |
logprobs? | number |
model | TModel |
parallelToolCalls? | boolean |
reasoningEffort? | "low" | "medium" | "high" |
responseFormat? | "text" | "json_object" | "json_schema" |
seed? | number |
serviceTier? | "auto" | "default" | "flex" |
stop? | string [] |
store? | boolean |
suffix? | string | null |
systemPrompt? | string |
user? | string |
Type Parameters
Type Parameter |
---|
TModel |
TEmbedModel |
AxAIOpenAIResponsesInputContentPart
type AxAIOpenAIResponsesInputContentPart =
| AxAIOpenAIResponsesInputTextContentPart
| AxAIOpenAIResponsesInputImageUrlContentPart
| AxAIOpenAIResponsesInputAudioContentPart;
AxAIOpenAIResponsesInputItem
type AxAIOpenAIResponsesInputItem =
| string
| AxAIOpenAIResponsesInputMessageItem
| AxAIOpenAIResponsesInputFunctionCallItem
| AxAIOpenAIResponsesInputFunctionCallOutputItem;
AxAIOpenAIResponsesOutputItem
type AxAIOpenAIResponsesOutputItem =
| AxAIOpenAIResponsesOutputMessageItem
| AxAIOpenAIResponsesFunctionCallItem
| AxAIOpenAIResponsesReasoningItem
| AxAIOpenAIResponsesFileSearchToolCall
| AxAIOpenAIResponsesWebSearchToolCall
| AxAIOpenAIResponsesComputerToolCall
| AxAIOpenAIResponsesCodeInterpreterToolCall
| AxAIOpenAIResponsesImageGenerationToolCall
| AxAIOpenAIResponsesLocalShellToolCall
| AxAIOpenAIResponsesMCPToolCall;
AxAIOpenAIResponsesStreamEvent
type AxAIOpenAIResponsesStreamEvent =
| AxAIOpenAIResponsesResponseCreatedEvent
| AxAIOpenAIResponsesResponseInProgressEvent
| AxAIOpenAIResponsesResponseCompletedEvent
| AxAIOpenAIResponsesResponseFailedEvent
| AxAIOpenAIResponsesResponseIncompleteEvent
| AxAIOpenAIResponsesResponseQueuedEvent
| AxAIOpenAIResponsesOutputItemAddedEvent
| AxAIOpenAIResponsesOutputItemDoneEvent
| AxAIOpenAIResponsesContentPartAddedEvent
| AxAIOpenAIResponsesContentPartDoneEvent
| AxAIOpenAIResponsesOutputTextDeltaEvent
| AxAIOpenAIResponsesOutputTextDoneEvent
| AxAIOpenAIResponsesRefusalDeltaEvent
| AxAIOpenAIResponsesRefusalDoneEvent
| AxAIOpenAIResponsesFunctionCallArgumentsDeltaEvent
| AxAIOpenAIResponsesFunctionCallArgumentsDoneEvent
| AxAIOpenAIResponsesFileSearchCallInProgressEvent
| AxAIOpenAIResponsesFileSearchCallSearchingEvent
| AxAIOpenAIResponsesFileSearchCallCompletedEvent
| AxAIOpenAIResponsesWebSearchCallInProgressEvent
| AxAIOpenAIResponsesWebSearchCallSearchingEvent
| AxAIOpenAIResponsesWebSearchCallCompletedEvent
| AxAIOpenAIResponsesReasoningDeltaEvent
| AxAIOpenAIResponsesReasoningDoneEvent
| AxAIOpenAIResponsesReasoningSummaryPartAddedEvent
| AxAIOpenAIResponsesReasoningSummaryPartDoneEvent
| AxAIOpenAIResponsesReasoningSummaryTextDeltaEvent
| AxAIOpenAIResponsesReasoningSummaryTextDoneEvent
| AxAIOpenAIResponsesReasoningSummaryDeltaEvent
| AxAIOpenAIResponsesReasoningSummaryDoneEvent
| AxAIOpenAIResponsesImageGenerationCallInProgressEvent
| AxAIOpenAIResponsesImageGenerationCallGeneratingEvent
| AxAIOpenAIResponsesImageGenerationCallCompletedEvent
| AxAIOpenAIResponsesImageGenerationCallPartialImageEvent
| AxAIOpenAIResponsesMCPCallInProgressEvent
| AxAIOpenAIResponsesMCPCallArgumentsDeltaEvent
| AxAIOpenAIResponsesMCPCallArgumentsDoneEvent
| AxAIOpenAIResponsesMCPCallCompletedEvent
| AxAIOpenAIResponsesMCPCallFailedEvent
| AxAIOpenAIResponsesMCPListToolsInProgressEvent
| AxAIOpenAIResponsesMCPListToolsCompletedEvent
| AxAIOpenAIResponsesMCPListToolsFailedEvent
| AxAIOpenAIResponsesOutputTextAnnotationAddedEvent
| AxAIOpenAIResponsesErrorEvent;
AxAIOpenAIResponsesToolCall
type AxAIOpenAIResponsesToolCall =
| AxAIOpenAIResponsesFunctionCallItem
| AxAIOpenAIResponsesFileSearchToolCall
| AxAIOpenAIResponsesWebSearchToolCall
| AxAIOpenAIResponsesComputerToolCall
| AxAIOpenAIResponsesCodeInterpreterToolCall
| AxAIOpenAIResponsesImageGenerationToolCall
| AxAIOpenAIResponsesLocalShellToolCall
| AxAIOpenAIResponsesMCPToolCall;
AxAIOpenAIResponsesToolDefinition
type AxAIOpenAIResponsesToolDefinition = AxAIOpenAIResponsesDefineFunctionTool;
AxAIOpenAIUrlCitation
type AxAIOpenAIUrlCitation = object;
Properties
description?
optional description: string;
title?
optional title: string;
url
url: string;
AxAIOpenAIResponsesToolChoice
type AxAIOpenAIResponsesToolChoice =
| "none"
| "auto"
| "required"
| {
name: string;
type: "function";
}
| {
type: "file_search";
};
AxAIOpenAIUsage
type AxAIOpenAIUsage = object;
Properties
completion_tokens
completion_tokens: number;
prompt_tokens
prompt_tokens: number;
total_tokens
total_tokens: number;
AxAIPromptConfig
type AxAIPromptConfig = object;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L287
Properties
showThoughts?
optional showThoughts: boolean;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L296
stream?
optional stream: boolean;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L288
thinkingTokenBudget?
optional thinkingTokenBudget: "minimal" | "low" | "medium" | "high" | "highest" | "none";
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L289
AxAIRekaChatRequest
type AxAIRekaChatRequest = object;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/reka/types.ts#L20
Properties
frequency_penalty?
optional frequency_penalty: number;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/reka/types.ts#L51
max_tokens?
optional max_tokens: number;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/reka/types.ts#L44
messages
messages: (
| {
content: string | object[];
role: "user";
}
| {
content: string | object[];
role: "assistant";
})[];
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/reka/types.ts#L22
model
model: string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/reka/types.ts#L21
presence_penalty?
optional presence_penalty: number;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/reka/types.ts#L50
response_format?
optional response_format: object;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/reka/types.ts#L43
type
type: string;
stop?
optional stop: readonly string[];
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/reka/types.ts#L49
stream?
optional stream: boolean;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/reka/types.ts#L48
temperature?
optional temperature: number;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/reka/types.ts#L45
top_k?
optional top_k: number;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/reka/types.ts#L47
top_p?
optional top_p: number;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/reka/types.ts#L46
usage?
optional usage: AxAIRekaUsage;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/reka/types.ts#L42
use_search_engine?
optional use_search_engine: boolean;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/reka/types.ts#L52
AxAIRekaChatResponse
type AxAIRekaChatResponse = object;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/reka/types.ts#L55
Properties
id
id: string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/reka/types.ts#L56
model
model: string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/reka/types.ts#L57
responses
responses: object[];
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/reka/types.ts#L58
finish_reason
finish_reason: "stop" | "length" | "context";
message
{
content: | string
| {
text: string;
type: "text";
};
}
usage?
optional usage: AxAIRekaUsage;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/reka/types.ts#L69
AxAIRekaChatResponseDelta
type AxAIRekaChatResponseDelta = object;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/reka/types.ts#L72
Properties
id
id: string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/reka/types.ts#L73
model
model: string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/reka/types.ts#L74
responses
responses: object[];
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/reka/types.ts#L75
chunk
chunk: AxAIRekaChatResponse["responses"][0]["message"];
finish_reason
finish_reason: AxAIRekaChatResponse["responses"][0]["finish_reason"];
usage?
optional usage: AxAIRekaUsage;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/reka/types.ts#L79
AxAIRekaConfig
type AxAIRekaConfig = Omit<AxModelConfig, "topK"> & object;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/reka/types.ts#L9
Type declaration
Name | Type |
---|---|
model | AxAIRekaModel |
stop? | readonly string [] |
useSearchEngine? | boolean |
AxAIRekaUsage
type AxAIRekaUsage = object;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/reka/types.ts#L15
Properties
input_tokens
input_tokens: number;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/reka/types.ts#L16
output_tokens
output_tokens: number;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/reka/types.ts#L17
AxAIServiceActionOptions
type AxAIServiceActionOptions<TModel, TEmbedModel> = object;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L310
Type Parameters
Type Parameter | Default type |
---|---|
TModel | unknown |
TEmbedModel | unknown |
Properties
abortSignal?
optional abortSignal: AbortSignal;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L322
ai?
optional ai: Readonly<AxAIService<TModel, TEmbedModel>>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L314
debug?
optional debug: boolean;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L319
debugHideSystemPrompt?
optional debugHideSystemPrompt: boolean;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L320
logger?
optional logger: AxLoggerFunction;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L323
rateLimiter?
optional rateLimiter: AxRateLimiterFunction;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L318
sessionId?
optional sessionId: string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L315
timeout?
optional timeout: number;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L317
traceContext?
optional traceContext: Context;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L321
traceId?
optional traceId: string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L316
AxAIServiceOptions
type AxAIServiceOptions = object;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L299
Properties
abortSignal?
optional abortSignal: AbortSignal;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L306
debug?
optional debug: boolean;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L300
excludeContentFromTrace?
optional excludeContentFromTrace: boolean;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L305
fetch?
optional fetch: typeof fetch;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L302
logger?
optional logger: AxLoggerFunction;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L307
rateLimiter?
optional rateLimiter: AxRateLimiterFunction;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L301
timeout?
optional timeout: number;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L304
tracer?
optional tracer: Tracer;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L303
AxAITogetherArgs
type AxAITogetherArgs = AxAIOpenAIArgs<"together", string, unknown>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/together/api.ts#L16
AxBalancerOptions
type AxBalancerOptions = object;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/balance.ts#L31
Options for the balancer.
Properties
comparator()?
optional comparator: (a: AxAIService, b: AxAIService) => number;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/balance.ts#L32
Parameters
Parameter | Type |
---|---|
a | AxAIService |
b | AxAIService |
Returns
number
debug?
optional debug: boolean;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/balance.ts#L33
initialBackoffMs?
optional initialBackoffMs: number;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/balance.ts#L34
maxBackoffMs?
optional maxBackoffMs: number;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/balance.ts#L35
maxRetries?
optional maxRetries: number;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/balance.ts#L36
AxAgentOptions
type AxAgentOptions = Omit<AxProgramForwardOptions, "functions"> & object;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/prompts/agent.ts#L35
Type declaration
Name | Type | Description |
---|---|---|
debug? | boolean | - |
disableSmartModelRouting? | boolean | - |
excludeFieldsFromPassthrough? | string [] | List of field names that should not be automatically passed from parent to child agents |
AxChatResponse
type AxChatResponse = object;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L122
Properties
modelUsage?
optional modelUsage: AxModelUsage;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L126
remoteId?
optional remoteId: string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L124
results
results: readonly AxChatResponseResult[];
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L125
sessionId?
optional sessionId: string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L123
AxChatRequest
type AxChatRequest<TModel> = object;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L138
Type Parameters
Type Parameter | Default type |
---|---|
TModel | string |
Properties
chatPrompt
chatPrompt: (
| {
cache?: boolean;
content: string;
role: "system";
}
| {
content: | string
| (
| {
cache?: boolean;
text: string;
type: "text";
}
| {
cache?: boolean;
details?: ... | ... | ...;
image: string;
mimeType: string;
type: "image";
}
| {
cache?: boolean;
data: string;
format?: "wav";
type: "audio";
})[];
name?: string;
role: "user";
}
| {
cache?: boolean;
content?: string;
functionCalls?: object[];
name?: string;
role: "assistant";
}
| {
cache?: boolean;
functionId: string;
isError?: boolean;
result: string;
role: "function";
})[];
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L139
functionCall?
optional functionCall:
| "none"
| "auto"
| "required"
| {
function: {
name: string;
};
type: "function";
};
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L191
functions?
optional functions: Readonly<{
description: string;
name: string;
parameters?: AxFunctionJSONSchema;
}>[];
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L186
model?
optional model: TModel;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L197
modelConfig?
optional modelConfig: AxModelConfig;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L196
AxChatResponseFunctionCall
type AxChatResponseFunctionCall = object;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/functions.ts#L101
Properties
args
args: string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/functions.ts#L104
id
id: string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/functions.ts#L102
name
name: string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/functions.ts#L103
AxChatResponseResult
type AxChatResponseResult = object;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L89
Properties
annotations?
optional annotations: object[];
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L100
type
type: "url_citation";
url_citation
{
description?: string;
title?: string;
url: string;
}
content?
optional content: string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L91
finishReason?
optional finishReason: "stop" | "length" | "function_call" | "content_filter" | "error";
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L108
functionCalls?
optional functionCalls: object[];
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L95
function
{
name: string;
params?: string | object;
}
id
id: string;
type
type: "function";
id?
optional id: string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L94
index
index: number;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L90
name?
optional name: string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L93
thought?
optional thought: string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L92
AxCheckpointLoadFn
type AxCheckpointLoadFn = (checkpointId: string) => Promise<
| AxOptimizationCheckpoint
| null>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/optimizer.ts#L83
Parameters
Parameter | Type |
---|---|
checkpointId | string |
Returns
Promise
<
| AxOptimizationCheckpoint
| null
>
AxDBArgs
type AxDBArgs =
| AxDBCloudflareArgs
| AxDBPineconeArgs
| AxDBWeaviateArgs
| AxDBMemoryArgs;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/db/wrap.ts#L13
AxCheckpointSaveFn
type AxCheckpointSaveFn = (checkpoint: Readonly<AxOptimizationCheckpoint>) => Promise<string>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/optimizer.ts#L80
Parameters
Parameter | Type |
---|---|
checkpoint | Readonly <AxOptimizationCheckpoint > |
Returns
Promise
<string
>
AxDBCloudflareOpOptions
type AxDBCloudflareOpOptions = AxDBBaseOpOptions;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/db/cloudflare.ts#L13
AxDBMemoryOpOptions
type AxDBMemoryOpOptions = AxDBBaseOpOptions;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/db/memory.ts#L9
AxDBPineconeOpOptions
type AxDBPineconeOpOptions = AxDBBaseOpOptions;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/db/pinecone.ts#L11
AxDBQueryRequest
type AxDBQueryRequest = object;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/db/types.ts#L17
Properties
columns?
optional columns: string[];
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/db/types.ts#L22
id?
optional id: string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/db/types.ts#L18
limit?
optional limit: number;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/db/types.ts#L23
namespace?
optional namespace: string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/db/types.ts#L24
table
table: string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/db/types.ts#L21
text?
optional text: string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/db/types.ts#L19
values?
optional values: readonly number[];
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/db/types.ts#L20
AxDBQueryResponse
type AxDBQueryResponse = object;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/db/types.ts#L27
Properties
matches
matches: object[];
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/db/types.ts#L28
id
id: string;
metadata?
optional metadata: Record<string, string>;
score
score: number;
table?
optional table: string;
AxDBState
type AxDBState = Record<string, Record<string, AxDBUpsertRequest>>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/db/memory.ts#L15
AxDBUpsertRequest
type AxDBUpsertRequest = object;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/db/types.ts#L3
Properties
id
id: string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/db/types.ts#L4
metadata?
optional metadata: Record<string, string>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/db/types.ts#L7
namespace?
optional namespace: string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/db/types.ts#L9
table
table: string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/db/types.ts#L8
text?
optional text: string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/db/types.ts#L5
values?
optional values: readonly number[];
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/db/types.ts#L6
AxDBUpsertResponse
type AxDBUpsertResponse = object;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/db/types.ts#L12
Properties
ids
ids: string[];
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/db/types.ts#L13
AxDBWeaviateOpOptions
type AxDBWeaviateOpOptions = AxDBBaseOpOptions;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/db/weaviate.ts#L11
AxDataRow
type AxDataRow = object;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/loader.ts#L3
Properties
row
row: Record<string, AxFieldValue>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/loader.ts#L3
AxEmbedRequest
type AxEmbedRequest<TEmbedModel> = object;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L232
Type Parameters
Type Parameter | Default type |
---|---|
TEmbedModel | string |
Properties
embedModel?
optional embedModel: TEmbedModel;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L234
texts?
optional texts: readonly string[];
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L233
AxEmbedResponse
type AxEmbedResponse = object;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L129
Properties
embeddings
embeddings: readonly readonly number[][];
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L132
modelUsage?
optional modelUsage: AxModelUsage;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L133
remoteId?
optional remoteId: string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L130
sessionId?
optional sessionId: string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L131
AxEvaluateArgs
type AxEvaluateArgs<IN, OUT> = object;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/evaluate.ts#L8
Type Parameters
Type Parameter |
---|
IN extends AxGenIn |
OUT extends AxGenOut |
Properties
ai
ai: AxAIService;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/evaluate.ts#L9
examples
examples: Readonly<AxExample[]>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/evaluate.ts#L11
program
program: Readonly<AxProgram<IN, OUT>>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/evaluate.ts#L10
AxExample
type AxExample = Record<string, AxFieldValue>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/optimizer.ts#L10
AxFieldProcessorProcess
type AxFieldProcessorProcess = (value: AxFieldValue, context?: Readonly<{
done?: boolean;
sessionId?: string;
values?: AxGenOut;
}>) => unknown | Promise<unknown>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/fieldProcessor.ts#L7
Parameters
Parameter | Type |
---|---|
value | AxFieldValue |
context? | Readonly <{ done? : boolean ; sessionId? : string ; values? : AxGenOut ; }> |
Returns
unknown
| Promise
<unknown
>
AxFieldValue
type AxFieldValue =
| string
| string[]
| number
| boolean
| object
| null
| undefined
| {
data: string;
mimeType: string;
}
| object[]
| {
data: string;
format?: "wav";
}
| object[];
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/types.ts#L1
AxFieldTemplateFn
type AxFieldTemplateFn = (field: Readonly<AxField>, value: Readonly<AxFieldValue>) => any[];
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/prompt.ts#L37
Parameters
Parameter | Type |
---|---|
field | Readonly <AxField > |
value | Readonly <AxFieldValue > |
Returns
any
[]
AxFunction
type AxFunction = object;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L77
Properties
description
description: string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L79
func
func: AxFunctionHandler;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L81
name
name: string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L78
parameters?
optional parameters: AxFunctionJSONSchema;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L80
AxFunctionHandler
type AxFunctionHandler = (args?: any, extra?: Readonly<{
ai?: AxAIService;
debug?: boolean;
sessionId?: string;
traceId?: string;
}>) => unknown;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L53
Parameters
Parameter | Type |
---|---|
args? | any |
extra? | Readonly <{ ai? : AxAIService ; debug? : boolean ; sessionId? : string ; traceId? : string ; }> |
Returns
unknown
AxFunctionJSONSchema
type AxFunctionJSONSchema = object;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L64
Properties
items?
optional items: AxFunctionJSONSchema;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L74
properties?
optional properties: Record<string, AxFunctionJSONSchema & object>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L66
required?
optional required: string[];
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L73
type
type: string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L65
AxFunctionResult
type AxFunctionResult = Extract<AxChatRequest["chatPrompt"][number], {
role: "function";
}> & object;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L84
Type declaration
Name | Type |
---|---|
index | number |
AxGenIn
type AxGenIn = object;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/types.ts#L14
Index Signature
[key: string]: AxFieldValue
AxGenDeltaOut
type AxGenDeltaOut<OUT> = object;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L121
Type Parameters
Type Parameter |
---|
OUT extends AxGenOut |
Properties
delta
delta: Partial<OUT>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L124
index
index: number;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L123
version
version: number;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L122
AxGenOut
type AxGenOut = object;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/types.ts#L16
Index Signature
[key: string]: AxFieldValue
AxGenStreamingOut
type AxGenStreamingOut<OUT> = AsyncGenerator<AxGenDeltaOut<OUT>, void, unknown>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L127
Type Parameters
Type Parameter |
---|
OUT extends AxGenOut |
AxGenerateErrorDetails
type AxGenerateErrorDetails = object;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/generate.ts#L720
Properties
maxTokens?
optional maxTokens: number;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/generate.ts#L722
model?
optional model: string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/generate.ts#L721
signature
signature: object;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/generate.ts#L724
description?
optional description: string;
input
input: Readonly<AxIField[]>;
output
output: Readonly<AxIField[]>;
streaming
streaming: boolean;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/generate.ts#L723
AxIField
type AxIField = Omit<AxField, "title"> & object;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/sig.ts#L36
Type declaration
Name | Type |
---|---|
title | string |
AxGenerateResult
type AxGenerateResult<OUT> = OUT & object;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/generate.ts#L64
Type declaration
Name | Type |
---|---|
thought? | string |
Type Parameters
Type Parameter |
---|
OUT extends AxGenOut |
AxInputFunctionType
type AxInputFunctionType = (
| AxFunction
| {
toFunction: () =>
| AxFunction
| AxFunction[];
})[];
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/functions.ts#L184
AxInternalChatRequest
type AxInternalChatRequest<TModel> = Omit<AxChatRequest, "model"> & Required<Pick<AxChatRequest<TModel>, "model">>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L229
Type Parameters
Type Parameter |
---|
TModel |
AxInternalEmbedRequest
type AxInternalEmbedRequest<TEmbedModel> = Omit<AxEmbedRequest, "embedModel"> & Required<Pick<AxEmbedRequest<TEmbedModel>, "embedModel">>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L237
Type Parameters
Type Parameter |
---|
TEmbedModel |
AxLoggerFunction
type AxLoggerFunction = (message: string, options?: object) => void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L282
Parameters
Parameter | Type |
---|---|
message | string |
options? | { tags? : AxLoggerTag []; } |
options.tags? | AxLoggerTag [] |
Returns
void
AxLoggerTag
type AxLoggerTag =
| "error"
| "warning"
| "success"
| "functionName"
| "functionArg"
| "functionEnd"
| "firstFunction"
| "multipleFunctions"
| "responseStart"
| "responseContent"
| "responseEnd"
| "requestStart"
| "requestContent"
| "requestEnd"
| "systemStart"
| "systemContent"
| "systemEnd"
| "userStart"
| "userContent"
| "userEnd"
| "assistantStart"
| "assistantContent"
| "assistantEnd"
| "discovery"
| "optimizer"
| "start"
| "config"
| "phase"
| "progress"
| "result"
| "complete"
| "checkpoint";
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L248
AxMemoryData
type AxMemoryData = object[];
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/mem/types.ts#L7
Type declaration
Name | Type |
---|---|
chat | object [] |
role | AxChatRequest ["chatPrompt" ][number ]["role" ] |
tags? | string [] |
updatable? | boolean |
AxMessage
type AxMessage<IN> =
| {
role: "user";
values: IN;
}
| {
role: "assistant";
values: IN;
};
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/types.ts#L18
Type Parameters
Type Parameter |
---|
IN extends AxGenIn |
AxMetricFn
type AxMetricFn = <T>(arg0: Readonly<{
example: AxExample;
prediction: T;
}>) => number | Promise<number>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/optimizer.ts#L12
Type Parameters
Type Parameter | Default type |
---|---|
T extends AxGenOut | AxGenOut |
Parameters
Parameter | Type |
---|---|
arg0 | Readonly <{ example : AxExample ; prediction : T ; }> |
Returns
number
| Promise
<number
>
AxMetricFnArgs
type AxMetricFnArgs = Parameters<AxMetricFn>[0];
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/optimizer.ts#L16
AxMockAIServiceConfig
type AxMockAIServiceConfig = object;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/mock/api.ts#L20
Properties
chatResponse?
optional chatResponse:
| AxChatResponse
| ReadableStream<AxChatResponse>
| () => Promise<
| AxChatResponse
| ReadableStream<AxChatResponse>>
| (req: Readonly<AxChatRequest<unknown>>, options?: Readonly<AxAIPromptConfig & AxAIServiceActionOptions<unknown, unknown>>) => Promise<
| AxChatResponse
| ReadableStream<AxChatResponse>>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/mock/api.ts#L28
embedModelInfo?
optional embedModelInfo: AxModelInfoWithProvider;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/mock/api.ts#L24
embedResponse?
optional embedResponse:
| AxEmbedResponse
| (req: Readonly<AxEmbedRequest>) =>
| AxEmbedResponse
| Promise<AxEmbedResponse>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/mock/api.ts#L39
errorMessage?
optional errorMessage: string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/mock/api.ts#L45
features?
optional features: object;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/mock/api.ts#L25
functions?
optional functions: boolean;
streaming?
optional streaming: boolean;
id?
optional id: string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/mock/api.ts#L22
latencyMs?
optional latencyMs: number;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/mock/api.ts#L46
modelInfo?
optional modelInfo: Partial<AxModelInfoWithProvider>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/mock/api.ts#L23
models?
optional models: AxAIModelList;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/mock/api.ts#L26
name?
optional name: string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/mock/api.ts#L21
options?
optional options: AxAIServiceOptions;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/mock/api.ts#L27
shouldError?
optional shouldError: boolean;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/mock/api.ts#L44
AxModelConfig
type AxModelConfig = object;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L40
Properties
endSequences?
optional endSequences: string[];
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L48
frequencyPenalty?
optional frequencyPenalty: number;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L46
maxTokens?
optional maxTokens: number;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L41
n?
optional n: number;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L50
presencePenalty?
optional presencePenalty: number;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L45
stopSequences?
optional stopSequences: string[];
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L47
stream?
optional stream: boolean;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L49
temperature?
optional temperature: number;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L42
topK?
optional topK: number;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L44
topP?
optional topP: number;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L43
AxModelInfo
type AxModelInfo = object;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L21
Properties
aliases?
optional aliases: string[];
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L27
characterIsToken?
optional characterIsToken: boolean;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L24
completionTokenCostPer1M?
optional completionTokenCostPer1M: number;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L26
currency?
optional currency: string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L23
hasShowThoughts?
optional hasShowThoughts: boolean;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L29
hasThinkingBudget?
optional hasThinkingBudget: boolean;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L28
maxTokens?
optional maxTokens: number;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L30
name
name: string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L22
promptTokenCostPer1M?
optional promptTokenCostPer1M: number;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L25
AxModelInfoWithProvider
type AxModelInfoWithProvider = AxModelInfo & object;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L136
Type declaration
Name | Type |
---|---|
provider | string |
AxModelUsage
type AxModelUsage = object;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L116
Properties
ai
ai: string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L117
model
model: string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L118
tokens?
optional tokens: AxTokenUsage;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L119
AxOptimizerArgs
type AxOptimizerArgs = object;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/optimizer.ts#L98
Properties
checkpointInterval?
optional checkpointInterval: number;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/optimizer.ts#L118
checkpointLoad?
optional checkpointLoad: AxCheckpointLoadFn;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/optimizer.ts#L117
checkpointSave?
optional checkpointSave: AxCheckpointSaveFn;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/optimizer.ts#L116
costTracker?
optional costTracker: AxCostTracker;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/optimizer.ts#L113
examples
examples: readonly AxExample[];
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/optimizer.ts#L101
logger?
optional logger: AxLoggerFunction;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/optimizer.ts#L122
minSuccessRate?
optional minSuccessRate: number;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/optimizer.ts#L107
onEarlyStop()?
optional onEarlyStop: (reason: string, stats: Readonly<AxOptimizationStats>) => void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/optimizer.ts#L112
Parameters
Parameter | Type |
---|---|
reason | string |
stats | Readonly <AxOptimizationStats > |
Returns
void
onProgress()?
optional onProgress: (progress: Readonly<AxOptimizationProgress>) => void;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/optimizer.ts#L111
Parameters
Parameter | Type |
---|---|
progress | Readonly <AxOptimizationProgress > |
Returns
void
resumeFromCheckpoint?
optional resumeFromCheckpoint: string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/optimizer.ts#L119
seed?
optional seed: number;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/optimizer.ts#L126
studentAI
studentAI: AxAIService;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/optimizer.ts#L99
targetScore?
optional targetScore: number;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/optimizer.ts#L108
teacherAI?
optional teacherAI: AxAIService;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/optimizer.ts#L100
validationSet?
optional validationSet: readonly AxExample[];
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/optimizer.ts#L104
verbose?
optional verbose: boolean;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/optimizer.ts#L123
AxMultiMetricFn
type AxMultiMetricFn = <T>(arg0: Readonly<{
example: AxExample;
prediction: T;
}>) => Record<string, number>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/optimizer.ts#L19
Type Parameters
Type Parameter | Default type |
---|---|
T extends AxGenOut | AxGenOut |
Parameters
Parameter | Type |
---|---|
arg0 | Readonly <{ example : AxExample ; prediction : T ; }> |
Returns
Record
<string
, number
>
AxProgramDemos
type AxProgramDemos<IN, OUT> = object;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L25
Type Parameters
Type Parameter |
---|
IN extends AxGenIn |
OUT extends AxGenOut |
Properties
programId
programId: string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L27
traces
traces: OUT & IN[];
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L26
AxProgramExamples
type AxProgramExamples<IN, OUT> =
| AxProgramDemos<IN, OUT>
| AxProgramDemos<IN, OUT>["traces"];
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L30
Type Parameters
Type Parameter |
---|
IN extends AxGenIn |
OUT extends AxGenOut |
AxProgramForwardOptions
type AxProgramForwardOptions = object;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L57
Properties
abortSignal?
optional abortSignal: AbortSignal;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L101
ai?
optional ai: AxAIService;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L64
asserts?
optional asserts: AxAssertion[];
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L108
debug?
optional debug: boolean;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L86
debugHideSystemPrompt?
optional debugHideSystemPrompt: boolean;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L87
description?
optional description: string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L105
excludeContentFromTrace?
optional excludeContentFromTrace: boolean;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L110
fastFail?
optional fastFail: boolean;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L85
functionCall?
optional functionCall: AxChatRequest["functionCall"];
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L81
functions?
optional functions: AxInputFunctionType;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L80
logger?
optional logger: AxLoggerFunction;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L102
maxRetries?
optional maxRetries: number;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L59
maxSteps?
optional maxSteps: number;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L60
mem?
optional mem: AxAIMemory;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L61
model?
optional model: string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L66
modelConfig?
optional modelConfig: AxModelConfig;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L65
promptTemplate?
optional promptTemplate: typeof AxPromptTemplate;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L107
rateLimiter?
optional rateLimiter: AxRateLimiterFunction;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L72
resultPicker?
optional resultPicker: AxResultPickerFunction<AxGenOut>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L77
sampleCount?
optional sampleCount: number;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L76
sessionId?
optional sessionId: string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L69
showThoughts?
optional showThoughts: boolean;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L97
stopFunction?
optional stopFunction: string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L82
stream?
optional stream: boolean;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L75
streamingAsserts?
optional streamingAsserts: AxStreamingAssertion[];
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L109
strictMode?
optional strictMode: boolean;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L113
thinkingTokenBudget?
optional thinkingTokenBudget: "minimal" | "low" | "medium" | "high" | "highest" | "none";
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L90
thoughtFieldName?
optional thoughtFieldName: string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L106
traceId?
optional traceId: string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L70
traceLabel?
optional traceLabel: string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L100
tracer?
optional tracer: Tracer;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L71
AxProgramStreamingForwardOptions
type AxProgramStreamingForwardOptions = Omit<AxProgramForwardOptions, "stream">;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L116
AxProgramTrace
type AxProgramTrace<IN, OUT> = object;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L20
Type Parameters
Type Parameter |
---|
IN extends AxGenIn |
OUT extends AxGenOut |
Properties
programId
programId: string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L22
trace
trace: OUT & IN;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L21
AxRateLimiterFunction
type AxRateLimiterFunction = <T>(reqFunc: () => Promise<T | ReadableStream<T>>, info: Readonly<{
modelUsage?: AxModelUsage;
}>) => Promise<T | ReadableStream<T>>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L243
Type Parameters
Type Parameter | Default type |
---|---|
T | unknown |
Parameters
Parameter | Type |
---|---|
reqFunc | () => Promise <T | ReadableStream <T >> |
info | Readonly <{ modelUsage? : AxModelUsage ; }> |
Returns
Promise
<T
| ReadableStream
<T
>>
AxProgramUsage
type AxProgramUsage = AxChatResponse["modelUsage"] & object;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L168
Type declaration
Name | Type |
---|---|
ai | string |
model | string |
AxRerankerIn
type AxRerankerIn = object;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/docs/manager.ts#L8
Properties
items
items: string[];
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/docs/manager.ts#L8
query
query: string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/docs/manager.ts#L8
AxRerankerOut
type AxRerankerOut = object;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/docs/manager.ts#L9
Properties
rankedItems
rankedItems: string[];
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/docs/manager.ts#L9
AxResultPickerFunction
type AxResultPickerFunction<OUT> = (data:
| AxResultPickerFunctionFieldResults<OUT>
| AxResultPickerFunctionFunctionResults) => number | Promise<number>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L51
Type Parameters
Type Parameter |
---|
OUT extends AxGenOut |
Parameters
Parameter | Type |
---|---|
data | | AxResultPickerFunctionFieldResults <OUT > | AxResultPickerFunctionFunctionResults |
Returns
number
| Promise
<number
>
AxResultPickerFunctionFieldResults
type AxResultPickerFunctionFieldResults<OUT> = object;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L34
Type Parameters
Type Parameter |
---|
OUT extends AxGenOut |
Properties
results
results: readonly object[];
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L36
type
type: "fields";
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L35
AxRewriteIn
type AxRewriteIn = object;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/docs/manager.ts#L5
Properties
query
query: string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/docs/manager.ts#L5
AxResultPickerFunctionFunctionResults
type AxResultPickerFunctionFunctionResults = object;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L39
Properties
results
results: readonly object[];
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L41
type
type: "function";
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L40
AxSetExamplesOptions
type AxSetExamplesOptions = object;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/program.ts#L148
AxRewriteOut
type AxRewriteOut = object;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/docs/manager.ts#L6
Properties
rewrittenQuery
rewrittenQuery: string;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/docs/manager.ts#L6
AxSignatureTemplateValue
type AxSignatureTemplateValue =
| string
| AxFieldType
| AxFieldDescriptor
| AxSignature;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/template.ts#L10
AxStreamingFieldProcessorProcess
type AxStreamingFieldProcessorProcess = (value: string, context?: Readonly<{
done?: boolean;
sessionId?: string;
values?: AxGenOut;
}>) => unknown | Promise<unknown>;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/fieldProcessor.ts#L16
Parameters
Parameter | Type |
---|---|
value | string |
context? | Readonly <{ done? : boolean ; sessionId? : string ; values? : AxGenOut ; }> |
Returns
unknown
| Promise
<unknown
>
AxEvalUtil
const AxEvalUtil: object;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/eval.ts#L143
Type declaration
AxTokenUsage
type AxTokenUsage = object;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L33
Properties
completionTokens
completionTokens: number;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L35
promptTokens
promptTokens: number;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L34
thoughtsTokens?
optional thoughtsTokens: number;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L37
totalTokens
totalTokens: number;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/types.ts#L36
AxStringUtil
const AxStringUtil: object;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/strutil.ts#L66
Type declaration
axAIAzureOpenAIBestConfig
const axAIAzureOpenAIBestConfig: () => AxAIOpenAIConfig<AxAIOpenAIModel, AxAIOpenAIEmbedModel> = axAIOpenAIBestConfig;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/azure-openai/api.ts#L24
Returns
axAIAzureOpenAICreativeConfig
const axAIAzureOpenAICreativeConfig: () => AxAIOpenAIConfig<AxAIOpenAIModel, AxAIOpenAIEmbedModel> = axAIOpenAICreativeConfig;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/azure-openai/api.ts#L20
Returns
axAIAzureOpenAIDefaultConfig
const axAIAzureOpenAIDefaultConfig: () => AxAIOpenAIConfig<AxAIOpenAIModel, AxAIOpenAIEmbedModel> = axAIOpenAIDefaultConfig;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/azure-openai/api.ts#L18
Returns
axAIAzureOpenAIFastConfig
const axAIAzureOpenAIFastConfig: () => AxAIOpenAIConfig<AxAIOpenAIModel, AxAIOpenAIEmbedModel> = axAIOpenAIFastConfig;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/azure-openai/api.ts#L22
Returns
axDefaultOptimizerLogger
const axDefaultOptimizerLogger: AxLoggerFunction;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/loggers.ts#L226
Default optimizer logger instance
axGlobals
const axGlobals: object;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/globals.ts#L1
Type declaration
Name | Type | Default value |
---|---|---|
signatureStrict | boolean | true |
axModelInfoAnthropic
const axModelInfoAnthropic: AxModelInfo[];
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/anthropic/info.ts#L5
axModelInfoCohere
const axModelInfoCohere: AxModelInfo[];
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/cohere/info.ts#L5
axModelInfoGoogleGemini
const axModelInfoGoogleGemini: AxModelInfo[];
AxAIGoogleGemini: Model information
axModelInfoDeepSeek
const axModelInfoDeepSeek: AxModelInfo[];
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/deepseek/info.ts#L5
axModelInfoGrok
const axModelInfoGrok: AxModelInfo[];
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/x-grok/info.ts#L7
axModelInfoGroq
const axModelInfoGroq: AxModelInfo[];
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/groq/info.ts#L8
AxAIGroq: Model information
axModelInfoHuggingFace
const axModelInfoHuggingFace: AxModelInfo[] = [];
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/huggingface/info.ts#L6
HuggingFace: Model information
axModelInfoMistral
const axModelInfoMistral: AxModelInfo[];
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/mistral/info.ts#L7
axModelInfoOpenAI
const axModelInfoOpenAI: AxModelInfo[];
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/openai/info.ts#L9
OpenAI: Model information
axModelInfoReka
const axModelInfoReka: AxModelInfo[];
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/reka/info.ts#L7
OpenAI: Model information
axModelInfoTogether
const axModelInfoTogether: AxModelInfo[] = [];
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/ai/together/info.ts#L3
axSpanAttributes
const axSpanAttributes: object;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/trace/trace.ts#L1
Type declaration
axSpanEvents
const axSpanEvents: object;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/trace/trace.ts#L45
Type declaration
f
const f: object;
Defined in: https://github.com/ax-llm/ax/blob/106cb89c8759fca348b2bebaf677ebb35ee6daf1/src/ax/dsp/template.ts#L246
Type declaration
Name | Type |
---|---|
array() | <T >(baseType : T ) => T & object |
audio() | (desc? : string ) => AxFieldType |
boolean() | (desc? : string ) => AxFieldType |
class() | (options : readonly string [], desc? : string ) => AxFieldType |
code() | (language : string , desc? : string ) => AxFieldType |
date() | (desc? : string ) => AxFieldType |
datetime() | (desc? : string ) => AxFieldType |
image() | (desc? : string ) => AxFieldType |
internal() | <T >(baseType : T ) => T & object |
json() | (desc? : string ) => AxFieldType |
number() | (desc? : string ) => AxFieldType |
optional() | <T >(baseType : T ) => T & object |
string() | (desc? : string ) => AxFieldType |