AX AGENT FRAMEWORK
TYPESCRIPT-FIRST LLM INFRASTRUCTURE

Ax Framework

Build LLM-Powered Agents with TypeScript

> AxAI

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/wrap.ts#L77

Implements

Constructors

new AxAI()

new AxAI(options): AxAI

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/wrap.ts#L80

Parameters

ParameterType
optionsReadonly<AxAIArgs>

Returns

AxAI

Methods

chat()

chat(req, options?): Promise<AxChatResponse | ReadableStream<AxChatResponse>>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/wrap.ts#L146

Parameters

ParameterType
reqReadonly<AxChatRequest>
options?Readonly<AxAIPromptConfig & AxAIServiceActionOptions>

Returns

Promise<AxChatResponse | ReadableStream<AxChatResponse>>

Implementation of

AxAIService.chat


embed()

embed(req, options?): Promise<AxEmbedResponse>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/wrap.ts#L153

Parameters

ParameterType
reqReadonly<AxEmbedRequest>
options?Readonly<AxAIServiceActionOptions>

Returns

Promise<AxEmbedResponse>

Implementation of

AxAIService.embed


getDefaultModels()

getDefaultModels(): Readonly<{ embedModel: string; model: string; }>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/wrap.ts#L138

Returns

Readonly<{ embedModel: string; model: string; }>

Implementation of

AxAIService.getDefaultModels


getFeatures()

getFeatures(model?): object

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/wrap.ts#L131

Parameters

ParameterType
model?string

Returns

object

functions

functions: boolean

streaming

streaming: boolean

Implementation of

AxAIService.getFeatures


getId()

getId(): string

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/wrap.ts#L127

Returns

string

Implementation of

AxAIService.getId


getMetrics()

getMetrics(): AxAIServiceMetrics

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/wrap.ts#L142

Returns

AxAIServiceMetrics

Implementation of

AxAIService.getMetrics


getModelList()

getModelList(): undefined | AxAIModelList

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/wrap.ts#L134

Returns

undefined | AxAIModelList

Implementation of

AxAIService.getModelList


getName()

getName(): string

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/wrap.ts#L123

Returns

string

Implementation of

AxAIService.getName


getOptions()

getOptions(): Readonly<AxAIServiceOptions>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/wrap.ts#L164

Returns

Readonly<AxAIServiceOptions>

Implementation of

AxAIService.getOptions


setOptions()

setOptions(options): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/wrap.ts#L160

Parameters

ParameterType
optionsReadonly<AxAIServiceOptions>

Returns

void

Implementation of

AxAIService.setOptions

> AxAIAnthropic

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/anthropic/api.ts#L334

Extends

Constructors

new AxAIAnthropic()

new AxAIAnthropic(__namedParameters): AxAIAnthropic

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/anthropic/api.ts#L343

Parameters

ParameterType
__namedParametersReadonly<Omit<AxAIAnthropicArgs, "name">>

Returns

AxAIAnthropic

Overrides

AxBaseAI.constructor

Methods

chat()

chat(req, options?): Promise<AxChatResponse | ReadableStream<AxChatResponse>>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L290

Parameters

ParameterType
reqReadonly<AxChatRequest<AxAIAnthropicModel | AxAIAnthropicVertexModel>>
options?Readonly<AxAIPromptConfig & AxAIServiceActionOptions<AxAIAnthropicModel | AxAIAnthropicVertexModel, unknown>>

Returns

Promise<AxChatResponse | ReadableStream<AxChatResponse>>

Inherited from

AxBaseAI.chat


embed()

embed(req, options?): Promise<AxEmbedResponse>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L528

Parameters

ParameterType
reqReadonly<AxEmbedRequest<unknown>>
options?Readonly<AxAIServiceActionOptions<AxAIAnthropicModel | AxAIAnthropicVertexModel, unknown>>

Returns

Promise<AxEmbedResponse>

Inherited from

AxBaseAI.embed


getDefaultModels()

getDefaultModels(): Readonly<{ embedModel: string; model: string; }>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L230

Returns

Readonly<{ embedModel: string; model: string; }>

Inherited from

AxBaseAI.getDefaultModels


getFeatures()

getFeatures(model?): AxAIFeatures

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L241

Parameters

ParameterType
model?AxAIAnthropicModel | AxAIAnthropicVertexModel

Returns

AxAIFeatures

Inherited from

AxBaseAI.getFeatures


getId()

getId(): string

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L181

Returns

string

Inherited from

AxBaseAI.getId


getMetrics()

getMetrics(): AxAIServiceMetrics

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L286

Returns

AxAIServiceMetrics

Inherited from

AxBaseAI.getMetrics


getModelList()

getModelList(): undefined | AxAIModelList

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L220

Returns

undefined | AxAIModelList

Inherited from

AxBaseAI.getModelList


getName()

getName(): string

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L237

Returns

string

Inherited from

AxBaseAI.getName


getOptions()

getOptions(): Readonly<AxAIServiceOptions>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L211

Returns

Readonly<AxAIServiceOptions>

Inherited from

AxBaseAI.getOptions


setAPIURL()

setAPIURL(apiURL): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L185

Parameters

ParameterType
apiURLstring

Returns

void

Inherited from

AxBaseAI.setAPIURL


setHeaders()

setHeaders(headers): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L189

Parameters

ParameterType
headers() => Promise<Record<string, string>>

Returns

void

Inherited from

AxBaseAI.setHeaders


setName()

setName(name): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L177

Parameters

ParameterType
namestring

Returns

void

Inherited from

AxBaseAI.setName


setOptions()

setOptions(options): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L193

Parameters

ParameterType
optionsReadonly<AxAIServiceOptions>

Returns

void

Inherited from

AxBaseAI.setOptions

> AxAIAzureOpenAI

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/azure-openai/api.ts#L38

Extends

Constructors

new AxAIAzureOpenAI()

new AxAIAzureOpenAI(__namedParameters): AxAIAzureOpenAI

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/azure-openai/api.ts#L42

Parameters

ParameterType
__namedParametersReadonly<Omit<AxAIAzureOpenAIArgs, "name" | "modelInfo">>

Returns

AxAIAzureOpenAI

Overrides

AxAIOpenAIBase.constructor

Methods

chat()

chat(req, options?): Promise<AxChatResponse | ReadableStream<AxChatResponse>>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L290

Parameters

ParameterType
reqReadonly<AxChatRequest<AxAIOpenAIModel>>
options?Readonly<AxAIPromptConfig & AxAIServiceActionOptions<AxAIOpenAIModel, AxAIOpenAIEmbedModel>>

Returns

Promise<AxChatResponse | ReadableStream<AxChatResponse>>

Inherited from

AxAIOpenAIBase.chat


embed()

embed(req, options?): Promise<AxEmbedResponse>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L528

Parameters

ParameterType
reqReadonly<AxEmbedRequest<AxAIOpenAIEmbedModel>>
options?Readonly<AxAIServiceActionOptions<AxAIOpenAIModel, AxAIOpenAIEmbedModel>>

Returns

Promise<AxEmbedResponse>

Inherited from

AxAIOpenAIBase.embed


getDefaultModels()

getDefaultModels(): Readonly<{ embedModel: string; model: string; }>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L230

Returns

Readonly<{ embedModel: string; model: string; }>

Inherited from

AxAIOpenAIBase.getDefaultModels


getFeatures()

getFeatures(model?): AxAIFeatures

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L241

Parameters

ParameterType
model?AxAIOpenAIModel

Returns

AxAIFeatures

Inherited from

AxAIOpenAIBase.getFeatures


getId()

getId(): string

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L181

Returns

string

Inherited from

AxAIOpenAIBase.getId


getMetrics()

getMetrics(): AxAIServiceMetrics

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L286

Returns

AxAIServiceMetrics

Inherited from

AxAIOpenAIBase.getMetrics


getModelList()

getModelList(): undefined | AxAIModelList

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L220

Returns

undefined | AxAIModelList

Inherited from

AxAIOpenAIBase.getModelList


getName()

getName(): string

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L237

Returns

string

Inherited from

AxAIOpenAIBase.getName


getOptions()

getOptions(): Readonly<AxAIServiceOptions>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L211

Returns

Readonly<AxAIServiceOptions>

Inherited from

AxAIOpenAIBase.getOptions


setAPIURL()

setAPIURL(apiURL): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L185

Parameters

ParameterType
apiURLstring

Returns

void

Inherited from

AxAIOpenAIBase.setAPIURL


setHeaders()

setHeaders(headers): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L189

Parameters

ParameterType
headers() => Promise<Record<string, string>>

Returns

void

Inherited from

AxAIOpenAIBase.setHeaders


setName()

setName(name): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L177

Parameters

ParameterType
namestring

Returns

void

Inherited from

AxAIOpenAIBase.setName


setOptions()

setOptions(options): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L193

Parameters

ParameterType
optionsReadonly<AxAIServiceOptions>

Returns

void

Inherited from

AxAIOpenAIBase.setOptions

> AxAICohere

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/cohere/api.ts#L289

Extends

Constructors

new AxAICohere()

new AxAICohere(__namedParameters): AxAICohere

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/cohere/api.ts#L298

Parameters

ParameterType
__namedParametersReadonly<Omit<AxAICohereArgs, "name">>

Returns

AxAICohere

Overrides

AxBaseAI.constructor

Methods

chat()

chat(req, options?): Promise<AxChatResponse | ReadableStream<AxChatResponse>>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L290

Parameters

ParameterType
reqReadonly<AxChatRequest<AxAICohereModel>>
options?Readonly<AxAIPromptConfig & AxAIServiceActionOptions<AxAICohereModel, AxAICohereEmbedModel>>

Returns

Promise<AxChatResponse | ReadableStream<AxChatResponse>>

Inherited from

AxBaseAI.chat


embed()

embed(req, options?): Promise<AxEmbedResponse>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L528

Parameters

ParameterType
reqReadonly<AxEmbedRequest<AxAICohereEmbedModel>>
options?Readonly<AxAIServiceActionOptions<AxAICohereModel, AxAICohereEmbedModel>>

Returns

Promise<AxEmbedResponse>

Inherited from

AxBaseAI.embed


getDefaultModels()

getDefaultModels(): Readonly<{ embedModel: string; model: string; }>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L230

Returns

Readonly<{ embedModel: string; model: string; }>

Inherited from

AxBaseAI.getDefaultModels


getFeatures()

getFeatures(model?): AxAIFeatures

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L241

Parameters

ParameterType
model?AxAICohereModel

Returns

AxAIFeatures

Inherited from

AxBaseAI.getFeatures


getId()

getId(): string

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L181

Returns

string

Inherited from

AxBaseAI.getId


getMetrics()

getMetrics(): AxAIServiceMetrics

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L286

Returns

AxAIServiceMetrics

Inherited from

AxBaseAI.getMetrics


getModelList()

getModelList(): undefined | AxAIModelList

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L220

Returns

undefined | AxAIModelList

Inherited from

AxBaseAI.getModelList


getName()

getName(): string

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L237

Returns

string

Inherited from

AxBaseAI.getName


getOptions()

getOptions(): Readonly<AxAIServiceOptions>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L211

Returns

Readonly<AxAIServiceOptions>

Inherited from

AxBaseAI.getOptions


setAPIURL()

setAPIURL(apiURL): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L185

Parameters

ParameterType
apiURLstring

Returns

void

Inherited from

AxBaseAI.setAPIURL


setHeaders()

setHeaders(headers): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L189

Parameters

ParameterType
headers() => Promise<Record<string, string>>

Returns

void

Inherited from

AxBaseAI.setHeaders


setName()

setName(name): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L177

Parameters

ParameterType
namestring

Returns

void

Inherited from

AxBaseAI.setName


setOptions()

setOptions(options): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L193

Parameters

ParameterType
optionsReadonly<AxAIServiceOptions>

Returns

void

Inherited from

AxBaseAI.setOptions

> AxAIDeepSeek

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/deepseek/api.ts#L31

Extends

Constructors

new AxAIDeepSeek()

new AxAIDeepSeek(__namedParameters): AxAIDeepSeek

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/deepseek/api.ts#L32

Parameters

ParameterType
__namedParametersReadonly<Omit<AxAIDeepSeekArgs, "name">>

Returns

AxAIDeepSeek

Overrides

AxAIOpenAIBase.constructor

Methods

chat()

chat(req, options?): Promise<AxChatResponse | ReadableStream<AxChatResponse>>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L290

Parameters

ParameterType
reqReadonly<AxChatRequest<AxAIDeepSeekModel>>
options?Readonly<AxAIPromptConfig & AxAIServiceActionOptions<AxAIDeepSeekModel, undefined>>

Returns

Promise<AxChatResponse | ReadableStream<AxChatResponse>>

Inherited from

AxAIOpenAIBase.chat


embed()

embed(req, options?): Promise<AxEmbedResponse>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L528

Parameters

ParameterType
reqReadonly<AxEmbedRequest<undefined>>
options?Readonly<AxAIServiceActionOptions<AxAIDeepSeekModel, undefined>>

Returns

Promise<AxEmbedResponse>

Inherited from

AxAIOpenAIBase.embed


getDefaultModels()

getDefaultModels(): Readonly<{ embedModel: string; model: string; }>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L230

Returns

Readonly<{ embedModel: string; model: string; }>

Inherited from

AxAIOpenAIBase.getDefaultModels


getFeatures()

getFeatures(model?): AxAIFeatures

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L241

Parameters

ParameterType
model?AxAIDeepSeekModel

Returns

AxAIFeatures

Inherited from

AxAIOpenAIBase.getFeatures


getId()

getId(): string

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L181

Returns

string

Inherited from

AxAIOpenAIBase.getId


getMetrics()

getMetrics(): AxAIServiceMetrics

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L286

Returns

AxAIServiceMetrics

Inherited from

AxAIOpenAIBase.getMetrics


getModelList()

getModelList(): undefined | AxAIModelList

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L220

Returns

undefined | AxAIModelList

Inherited from

AxAIOpenAIBase.getModelList


getName()

getName(): string

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L237

Returns

string

Inherited from

AxAIOpenAIBase.getName


getOptions()

getOptions(): Readonly<AxAIServiceOptions>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L211

Returns

Readonly<AxAIServiceOptions>

Inherited from

AxAIOpenAIBase.getOptions


setAPIURL()

setAPIURL(apiURL): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L185

Parameters

ParameterType
apiURLstring

Returns

void

Inherited from

AxAIOpenAIBase.setAPIURL


setHeaders()

setHeaders(headers): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L189

Parameters

ParameterType
headers() => Promise<Record<string, string>>

Returns

void

Inherited from

AxAIOpenAIBase.setHeaders


setName()

setName(name): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L177

Parameters

ParameterType
namestring

Returns

void

Inherited from

AxAIOpenAIBase.setName


setOptions()

setOptions(options): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L193

Parameters

ParameterType
optionsReadonly<AxAIServiceOptions>

Returns

void

Inherited from

AxAIOpenAIBase.setOptions

> AxAIGoogleGemini

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/google-gemini/api.ts#L494

AxAIGoogleGemini: AI Service

Extends

Constructors

new AxAIGoogleGemini()

new AxAIGoogleGemini(__namedParameters): AxAIGoogleGemini

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/google-gemini/api.ts#L503

Parameters

ParameterType
__namedParametersReadonly<Omit<AxAIGoogleGeminiArgs, "name">>

Returns

AxAIGoogleGemini

Overrides

AxBaseAI.constructor

Methods

chat()

chat(req, options?): Promise<AxChatResponse | ReadableStream<AxChatResponse>>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L290

Parameters

ParameterType
reqReadonly<AxChatRequest<AxAIGoogleGeminiModel>>
options?Readonly<AxAIPromptConfig & AxAIServiceActionOptions<AxAIGoogleGeminiModel, AxAIGoogleGeminiEmbedModel>>

Returns

Promise<AxChatResponse | ReadableStream<AxChatResponse>>

Inherited from

AxBaseAI.chat


embed()

embed(req, options?): Promise<AxEmbedResponse>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L528

Parameters

ParameterType
reqReadonly<AxEmbedRequest<AxAIGoogleGeminiEmbedModel>>
options?Readonly<AxAIServiceActionOptions<AxAIGoogleGeminiModel, AxAIGoogleGeminiEmbedModel>>

Returns

Promise<AxEmbedResponse>

Inherited from

AxBaseAI.embed


getDefaultModels()

getDefaultModels(): Readonly<{ embedModel: string; model: string; }>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L230

Returns

Readonly<{ embedModel: string; model: string; }>

Inherited from

AxBaseAI.getDefaultModels


getFeatures()

getFeatures(model?): AxAIFeatures

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L241

Parameters

ParameterType
model?AxAIGoogleGeminiModel

Returns

AxAIFeatures

Inherited from

AxBaseAI.getFeatures


getId()

getId(): string

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L181

Returns

string

Inherited from

AxBaseAI.getId


getMetrics()

getMetrics(): AxAIServiceMetrics

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L286

Returns

AxAIServiceMetrics

Inherited from

AxBaseAI.getMetrics


getModelList()

getModelList(): undefined | AxAIModelList

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L220

Returns

undefined | AxAIModelList

Inherited from

AxBaseAI.getModelList


getName()

getName(): string

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L237

Returns

string

Inherited from

AxBaseAI.getName


getOptions()

getOptions(): Readonly<AxAIServiceOptions>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L211

Returns

Readonly<AxAIServiceOptions>

Inherited from

AxBaseAI.getOptions


setAPIURL()

setAPIURL(apiURL): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L185

Parameters

ParameterType
apiURLstring

Returns

void

Inherited from

AxBaseAI.setAPIURL


setHeaders()

setHeaders(headers): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L189

Parameters

ParameterType
headers() => Promise<Record<string, string>>

Returns

void

Inherited from

AxBaseAI.setHeaders


setName()

setName(name): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L177

Parameters

ParameterType
namestring

Returns

void

Inherited from

AxBaseAI.setName


setOptions()

setOptions(options): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L193

Parameters

ParameterType
optionsReadonly<AxAIServiceOptions>

Returns

void

Inherited from

AxBaseAI.setOptions

> AxAIGroq

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/groq/api.ts#L22

Extends

Constructors

new AxAIGroq()

new AxAIGroq(__namedParameters): AxAIGroq

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/groq/api.ts#L23

Parameters

ParameterType
__namedParametersReadonly<Omit<AxAIGroqArgs, "name">>

Returns

AxAIGroq

Overrides

AxAIOpenAIBase.constructor

Methods

chat()

chat(req, options?): Promise<AxChatResponse | ReadableStream<AxChatResponse>>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L290

Parameters

ParameterType
reqReadonly<AxChatRequest<AxAIGroqModel>>
options?Readonly<AxAIPromptConfig & AxAIServiceActionOptions<AxAIGroqModel, undefined>>

Returns

Promise<AxChatResponse | ReadableStream<AxChatResponse>>

Inherited from

AxAIOpenAIBase.chat


embed()

embed(req, options?): Promise<AxEmbedResponse>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L528

Parameters

ParameterType
reqReadonly<AxEmbedRequest<undefined>>
options?Readonly<AxAIServiceActionOptions<AxAIGroqModel, undefined>>

Returns

Promise<AxEmbedResponse>

Inherited from

AxAIOpenAIBase.embed


getDefaultModels()

getDefaultModels(): Readonly<{ embedModel: string; model: string; }>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L230

Returns

Readonly<{ embedModel: string; model: string; }>

Inherited from

AxAIOpenAIBase.getDefaultModels


getFeatures()

getFeatures(model?): AxAIFeatures

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L241

Parameters

ParameterType
model?AxAIGroqModel

Returns

AxAIFeatures

Inherited from

AxAIOpenAIBase.getFeatures


getId()

getId(): string

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L181

Returns

string

Inherited from

AxAIOpenAIBase.getId


getMetrics()

getMetrics(): AxAIServiceMetrics

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L286

Returns

AxAIServiceMetrics

Inherited from

AxAIOpenAIBase.getMetrics


getModelList()

getModelList(): undefined | AxAIModelList

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L220

Returns

undefined | AxAIModelList

Inherited from

AxAIOpenAIBase.getModelList


getName()

getName(): string

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L237

Returns

string

Inherited from

AxAIOpenAIBase.getName


getOptions()

getOptions(): Readonly<AxAIServiceOptions>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L211

Returns

Readonly<AxAIServiceOptions>

Inherited from

AxAIOpenAIBase.getOptions


setAPIURL()

setAPIURL(apiURL): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L185

Parameters

ParameterType
apiURLstring

Returns

void

Inherited from

AxAIOpenAIBase.setAPIURL


setHeaders()

setHeaders(headers): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L189

Parameters

ParameterType
headers() => Promise<Record<string, string>>

Returns

void

Inherited from

AxAIOpenAIBase.setHeaders


setName()

setName(name): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L177

Parameters

ParameterType
namestring

Returns

void

Inherited from

AxAIOpenAIBase.setName


setOptions()

setOptions(options): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/groq/api.ts#L55

Parameters

ParameterType
optionsReadonly<AxAIServiceOptions>

Returns

void

Overrides

AxAIOpenAIBase.setOptions

> AxAIHuggingFace

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/huggingface/api.ts#L158

Extends

Constructors

new AxAIHuggingFace()

new AxAIHuggingFace(__namedParameters): AxAIHuggingFace

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/huggingface/api.ts#L167

Parameters

ParameterType
__namedParametersReadonly<Omit<AxAIHuggingFaceArgs, "name">>

Returns

AxAIHuggingFace

Overrides

AxBaseAI.constructor

Methods

chat()

chat(req, options?): Promise<AxChatResponse | ReadableStream<AxChatResponse>>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L290

Parameters

ParameterType
reqReadonly<AxChatRequest<MetaLlama270BChatHF>>
options?Readonly<AxAIPromptConfig & AxAIServiceActionOptions<MetaLlama270BChatHF, unknown>>

Returns

Promise<AxChatResponse | ReadableStream<AxChatResponse>>

Inherited from

AxBaseAI.chat


embed()

embed(req, options?): Promise<AxEmbedResponse>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L528

Parameters

ParameterType
reqReadonly<AxEmbedRequest<unknown>>
options?Readonly<AxAIServiceActionOptions<MetaLlama270BChatHF, unknown>>

Returns

Promise<AxEmbedResponse>

Inherited from

AxBaseAI.embed


getDefaultModels()

getDefaultModels(): Readonly<{ embedModel: string; model: string; }>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L230

Returns

Readonly<{ embedModel: string; model: string; }>

Inherited from

AxBaseAI.getDefaultModels


getFeatures()

getFeatures(model?): AxAIFeatures

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L241

Parameters

ParameterType
model?MetaLlama270BChatHF

Returns

AxAIFeatures

Inherited from

AxBaseAI.getFeatures


getId()

getId(): string

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L181

Returns

string

Inherited from

AxBaseAI.getId


getMetrics()

getMetrics(): AxAIServiceMetrics

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L286

Returns

AxAIServiceMetrics

Inherited from

AxBaseAI.getMetrics


getModelList()

getModelList(): undefined | AxAIModelList

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L220

Returns

undefined | AxAIModelList

Inherited from

AxBaseAI.getModelList


getName()

getName(): string

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L237

Returns

string

Inherited from

AxBaseAI.getName


getOptions()

getOptions(): Readonly<AxAIServiceOptions>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L211

Returns

Readonly<AxAIServiceOptions>

Inherited from

AxBaseAI.getOptions


setAPIURL()

setAPIURL(apiURL): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L185

Parameters

ParameterType
apiURLstring

Returns

void

Inherited from

AxBaseAI.setAPIURL


setHeaders()

setHeaders(headers): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L189

Parameters

ParameterType
headers() => Promise<Record<string, string>>

Returns

void

Inherited from

AxBaseAI.setHeaders


setName()

setName(name): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L177

Parameters

ParameterType
namestring

Returns

void

Inherited from

AxBaseAI.setName


setOptions()

setOptions(options): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L193

Parameters

ParameterType
optionsReadonly<AxAIServiceOptions>

Returns

void

Inherited from

AxBaseAI.setOptions

> AxAIMistral

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/mistral/api.ts#L34

Extends

Constructors

new AxAIMistral()

new AxAIMistral(__namedParameters): AxAIMistral

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/mistral/api.ts#L38

Parameters

ParameterType
__namedParametersReadonly<Omit<AxAIMistralArgs, "name">>

Returns

AxAIMistral

Overrides

AxAIOpenAIBase.constructor

Methods

chat()

chat(req, options?): Promise<AxChatResponse | ReadableStream<AxChatResponse>>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L290

Parameters

ParameterType
reqReadonly<AxChatRequest<AxAIMistralModel>>
options?Readonly<AxAIPromptConfig & AxAIServiceActionOptions<AxAIMistralModel, MistralEmbed>>

Returns

Promise<AxChatResponse | ReadableStream<AxChatResponse>>

Inherited from

AxAIOpenAIBase.chat


embed()

embed(req, options?): Promise<AxEmbedResponse>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L528

Parameters

ParameterType
reqReadonly<AxEmbedRequest<MistralEmbed>>
options?Readonly<AxAIServiceActionOptions<AxAIMistralModel, MistralEmbed>>

Returns

Promise<AxEmbedResponse>

Inherited from

AxAIOpenAIBase.embed


getDefaultModels()

getDefaultModels(): Readonly<{ embedModel: string; model: string; }>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L230

Returns

Readonly<{ embedModel: string; model: string; }>

Inherited from

AxAIOpenAIBase.getDefaultModels


getFeatures()

getFeatures(model?): AxAIFeatures

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L241

Parameters

ParameterType
model?AxAIMistralModel

Returns

AxAIFeatures

Inherited from

AxAIOpenAIBase.getFeatures


getId()

getId(): string

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L181

Returns

string

Inherited from

AxAIOpenAIBase.getId


getMetrics()

getMetrics(): AxAIServiceMetrics

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L286

Returns

AxAIServiceMetrics

Inherited from

AxAIOpenAIBase.getMetrics


getModelList()

getModelList(): undefined | AxAIModelList

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L220

Returns

undefined | AxAIModelList

Inherited from

AxAIOpenAIBase.getModelList


getName()

getName(): string

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L237

Returns

string

Inherited from

AxAIOpenAIBase.getName


getOptions()

getOptions(): Readonly<AxAIServiceOptions>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L211

Returns

Readonly<AxAIServiceOptions>

Inherited from

AxAIOpenAIBase.getOptions


setAPIURL()

setAPIURL(apiURL): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L185

Parameters

ParameterType
apiURLstring

Returns

void

Inherited from

AxAIOpenAIBase.setAPIURL


setHeaders()

setHeaders(headers): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L189

Parameters

ParameterType
headers() => Promise<Record<string, string>>

Returns

void

Inherited from

AxAIOpenAIBase.setHeaders


setName()

setName(name): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L177

Parameters

ParameterType
namestring

Returns

void

Inherited from

AxAIOpenAIBase.setName


setOptions()

setOptions(options): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L193

Parameters

ParameterType
optionsReadonly<AxAIServiceOptions>

Returns

void

Inherited from

AxAIOpenAIBase.setOptions

> AxAIOllama

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/ollama/api.ts#L33

OllamaAI: AI Service

Extends

Constructors

new AxAIOllama()

new AxAIOllama(__namedParameters): AxAIOllama

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/ollama/api.ts#L34

Parameters

ParameterType
__namedParametersReadonly<Omit<AxAIOllamaArgs, "name">>

Returns

AxAIOllama

Overrides

AxAIOpenAIBase.constructor

Methods

chat()

chat(req, options?): Promise<AxChatResponse | ReadableStream<AxChatResponse>>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L290

Parameters

ParameterType
reqReadonly<AxChatRequest<string>>
options?Readonly<AxAIPromptConfig & AxAIServiceActionOptions<string, string>>

Returns

Promise<AxChatResponse | ReadableStream<AxChatResponse>>

Inherited from

AxAIOpenAIBase.chat


embed()

embed(req, options?): Promise<AxEmbedResponse>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L528

Parameters

ParameterType
reqReadonly<AxEmbedRequest<string>>
options?Readonly<AxAIServiceActionOptions<string, string>>

Returns

Promise<AxEmbedResponse>

Inherited from

AxAIOpenAIBase.embed


getDefaultModels()

getDefaultModels(): Readonly<{ embedModel: string; model: string; }>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L230

Returns

Readonly<{ embedModel: string; model: string; }>

Inherited from

AxAIOpenAIBase.getDefaultModels


getFeatures()

getFeatures(model?): AxAIFeatures

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L241

Parameters

ParameterType
model?string

Returns

AxAIFeatures

Inherited from

AxAIOpenAIBase.getFeatures


getId()

getId(): string

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L181

Returns

string

Inherited from

AxAIOpenAIBase.getId


getMetrics()

getMetrics(): AxAIServiceMetrics

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L286

Returns

AxAIServiceMetrics

Inherited from

AxAIOpenAIBase.getMetrics


getModelList()

getModelList(): undefined | AxAIModelList

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L220

Returns

undefined | AxAIModelList

Inherited from

AxAIOpenAIBase.getModelList


getName()

getName(): string

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L237

Returns

string

Inherited from

AxAIOpenAIBase.getName


getOptions()

getOptions(): Readonly<AxAIServiceOptions>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L211

Returns

Readonly<AxAIServiceOptions>

Inherited from

AxAIOpenAIBase.getOptions


setAPIURL()

setAPIURL(apiURL): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L185

Parameters

ParameterType
apiURLstring

Returns

void

Inherited from

AxAIOpenAIBase.setAPIURL


setHeaders()

setHeaders(headers): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L189

Parameters

ParameterType
headers() => Promise<Record<string, string>>

Returns

void

Inherited from

AxAIOpenAIBase.setHeaders


setName()

setName(name): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L177

Parameters

ParameterType
namestring

Returns

void

Inherited from

AxAIOpenAIBase.setName


setOptions()

setOptions(options): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L193

Parameters

ParameterType
optionsReadonly<AxAIServiceOptions>

Returns

void

Inherited from

AxAIOpenAIBase.setOptions

> AxAIOpenAI

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/openai/api.ts#L479

Extends

Constructors

new AxAIOpenAI()

new AxAIOpenAI(__namedParameters): AxAIOpenAI

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/openai/api.ts#L483

Parameters

ParameterType
__namedParametersReadonly<Omit<AxAIOpenAIArgs<"openai", AxAIOpenAIModel, AxAIOpenAIEmbedModel>, "name" | "modelInfo">>

Returns

AxAIOpenAI

Overrides

AxAIOpenAIBase.constructor

Methods

chat()

chat(req, options?): Promise<AxChatResponse | ReadableStream<AxChatResponse>>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L290

Parameters

ParameterType
reqReadonly<AxChatRequest<AxAIOpenAIModel>>
options?Readonly<AxAIPromptConfig & AxAIServiceActionOptions<AxAIOpenAIModel, AxAIOpenAIEmbedModel>>

Returns

Promise<AxChatResponse | ReadableStream<AxChatResponse>>

Inherited from

AxAIOpenAIBase.chat


embed()

embed(req, options?): Promise<AxEmbedResponse>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L528

Parameters

ParameterType
reqReadonly<AxEmbedRequest<AxAIOpenAIEmbedModel>>
options?Readonly<AxAIServiceActionOptions<AxAIOpenAIModel, AxAIOpenAIEmbedModel>>

Returns

Promise<AxEmbedResponse>

Inherited from

AxAIOpenAIBase.embed


getDefaultModels()

getDefaultModels(): Readonly<{ embedModel: string; model: string; }>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L230

Returns

Readonly<{ embedModel: string; model: string; }>

Inherited from

AxAIOpenAIBase.getDefaultModels


getFeatures()

getFeatures(model?): AxAIFeatures

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L241

Parameters

ParameterType
model?AxAIOpenAIModel

Returns

AxAIFeatures

Inherited from

AxAIOpenAIBase.getFeatures


getId()

getId(): string

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L181

Returns

string

Inherited from

AxAIOpenAIBase.getId


getMetrics()

getMetrics(): AxAIServiceMetrics

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L286

Returns

AxAIServiceMetrics

Inherited from

AxAIOpenAIBase.getMetrics


getModelList()

getModelList(): undefined | AxAIModelList

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L220

Returns

undefined | AxAIModelList

Inherited from

AxAIOpenAIBase.getModelList


getName()

getName(): string

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L237

Returns

string

Inherited from

AxAIOpenAIBase.getName


getOptions()

getOptions(): Readonly<AxAIServiceOptions>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L211

Returns

Readonly<AxAIServiceOptions>

Inherited from

AxAIOpenAIBase.getOptions


setAPIURL()

setAPIURL(apiURL): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L185

Parameters

ParameterType
apiURLstring

Returns

void

Inherited from

AxAIOpenAIBase.setAPIURL


setHeaders()

setHeaders(headers): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L189

Parameters

ParameterType
headers() => Promise<Record<string, string>>

Returns

void

Inherited from

AxAIOpenAIBase.setHeaders


setName()

setName(name): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L177

Parameters

ParameterType
namestring

Returns

void

Inherited from

AxAIOpenAIBase.setName


setOptions()

setOptions(options): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L193

Parameters

ParameterType
optionsReadonly<AxAIServiceOptions>

Returns

void

Inherited from

AxAIOpenAIBase.setOptions

> AxAIOpenAIBase

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/openai/api.ts#L429

Extends

Extended by

Type Parameters

Type Parameter
TModel
TEmbedModel

Constructors

new AxAIOpenAIBase()

new AxAIOpenAIBase<TModel, TEmbedModel>(__namedParameters): AxAIOpenAIBase<TModel, TEmbedModel>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/openai/api.ts#L438

Parameters

ParameterType
__namedParametersReadonly<Omit<AxAIOpenAIBaseArgs<TModel, TEmbedModel>, "name">>

Returns

AxAIOpenAIBase<TModel, TEmbedModel>

Overrides

AxBaseAI.constructor

Methods

chat()

chat(req, options?): Promise<AxChatResponse | ReadableStream<AxChatResponse>>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L290

Parameters

ParameterType
reqReadonly<AxChatRequest<TModel>>
options?Readonly<AxAIPromptConfig & AxAIServiceActionOptions<TModel, TEmbedModel>>

Returns

Promise<AxChatResponse | ReadableStream<AxChatResponse>>

Inherited from

AxBaseAI.chat


embed()

embed(req, options?): Promise<AxEmbedResponse>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L528

Parameters

ParameterType
reqReadonly<AxEmbedRequest<TEmbedModel>>
options?Readonly<AxAIServiceActionOptions<TModel, TEmbedModel>>

Returns

Promise<AxEmbedResponse>

Inherited from

AxBaseAI.embed


getDefaultModels()

getDefaultModels(): Readonly<{ embedModel: string; model: string; }>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L230

Returns

Readonly<{ embedModel: string; model: string; }>

Inherited from

AxBaseAI.getDefaultModels


getFeatures()

getFeatures(model?): AxAIFeatures

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L241

Parameters

ParameterType
model?TModel

Returns

AxAIFeatures

Inherited from

AxBaseAI.getFeatures


getId()

getId(): string

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L181

Returns

string

Inherited from

AxBaseAI.getId


getMetrics()

getMetrics(): AxAIServiceMetrics

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L286

Returns

AxAIServiceMetrics

Inherited from

AxBaseAI.getMetrics


getModelList()

getModelList(): undefined | AxAIModelList

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L220

Returns

undefined | AxAIModelList

Inherited from

AxBaseAI.getModelList


getName()

getName(): string

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L237

Returns

string

Inherited from

AxBaseAI.getName


getOptions()

getOptions(): Readonly<AxAIServiceOptions>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L211

Returns

Readonly<AxAIServiceOptions>

Inherited from

AxBaseAI.getOptions


setAPIURL()

setAPIURL(apiURL): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L185

Parameters

ParameterType
apiURLstring

Returns

void

Inherited from

AxBaseAI.setAPIURL


setHeaders()

setHeaders(headers): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L189

Parameters

ParameterType
headers() => Promise<Record<string, string>>

Returns

void

Inherited from

AxBaseAI.setHeaders


setName()

setName(name): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L177

Parameters

ParameterType
namestring

Returns

void

Inherited from

AxBaseAI.setName


setOptions()

setOptions(options): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L193

Parameters

ParameterType
optionsReadonly<AxAIServiceOptions>

Returns

void

Inherited from

AxBaseAI.setOptions

> AxAIReka

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/reka/api.ts#L266

Extends

Constructors

new AxAIReka()

new AxAIReka(__namedParameters): AxAIReka

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/reka/api.ts#L275

Parameters

ParameterType
__namedParametersReadonly<Omit<AxAIRekaArgs, "name">>

Returns

AxAIReka

Overrides

AxBaseAI.constructor

Methods

chat()

chat(req, options?): Promise<AxChatResponse | ReadableStream<AxChatResponse>>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L290

Parameters

ParameterType
reqReadonly<AxChatRequest<AxAIRekaModel>>
options?Readonly<AxAIPromptConfig & AxAIServiceActionOptions<AxAIRekaModel, undefined>>

Returns

Promise<AxChatResponse | ReadableStream<AxChatResponse>>

Inherited from

AxBaseAI.chat


embed()

embed(req, options?): Promise<AxEmbedResponse>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L528

Parameters

ParameterType
reqReadonly<AxEmbedRequest<undefined>>
options?Readonly<AxAIServiceActionOptions<AxAIRekaModel, undefined>>

Returns

Promise<AxEmbedResponse>

Inherited from

AxBaseAI.embed


getDefaultModels()

getDefaultModels(): Readonly<{ embedModel: string; model: string; }>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L230

Returns

Readonly<{ embedModel: string; model: string; }>

Inherited from

AxBaseAI.getDefaultModels


getFeatures()

getFeatures(model?): AxAIFeatures

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L241

Parameters

ParameterType
model?AxAIRekaModel

Returns

AxAIFeatures

Inherited from

AxBaseAI.getFeatures


getId()

getId(): string

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L181

Returns

string

Inherited from

AxBaseAI.getId


getMetrics()

getMetrics(): AxAIServiceMetrics

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L286

Returns

AxAIServiceMetrics

Inherited from

AxBaseAI.getMetrics


getModelList()

getModelList(): undefined | AxAIModelList

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L220

Returns

undefined | AxAIModelList

Inherited from

AxBaseAI.getModelList


getName()

getName(): string

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L237

Returns

string

Inherited from

AxBaseAI.getName


getOptions()

getOptions(): Readonly<AxAIServiceOptions>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L211

Returns

Readonly<AxAIServiceOptions>

Inherited from

AxBaseAI.getOptions


setAPIURL()

setAPIURL(apiURL): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L185

Parameters

ParameterType
apiURLstring

Returns

void

Inherited from

AxBaseAI.setAPIURL


setHeaders()

setHeaders(headers): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L189

Parameters

ParameterType
headers() => Promise<Record<string, string>>

Returns

void

Inherited from

AxBaseAI.setHeaders


setName()

setName(name): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L177

Parameters

ParameterType
namestring

Returns

void

Inherited from

AxBaseAI.setName


setOptions()

setOptions(options): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L193

Parameters

ParameterType
optionsReadonly<AxAIServiceOptions>

Returns

void

Inherited from

AxBaseAI.setOptions

> AxAIServiceAuthenticationError

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/util/apicall.ts#L192

Extends

Constructors

new AxAIServiceAuthenticationError()

new AxAIServiceAuthenticationError(url, requestBody?, context?): AxAIServiceAuthenticationError

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/util/apicall.ts#L193

Parameters

ParameterType
urlstring
requestBody?unknown
context?Record<string, unknown>

Returns

AxAIServiceAuthenticationError

Overrides

AxAIServiceError.constructor

Properties

cause?

optional cause: unknown

Defined in: node_modules/typescript/lib/lib.es2022.error.d.ts:26

Inherited from

AxAIServiceError.cause


context

readonly context: Record<string, unknown>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/util/apicall.ts#L77

Inherited from

AxAIServiceError.context


errorId

readonly errorId: string

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/util/apicall.ts#L76

Inherited from

AxAIServiceError.errorId


message

message: string

Defined in: node_modules/typescript/lib/lib.es5.d.ts:1077

Inherited from

AxAIServiceError.message


name

name: string

Defined in: node_modules/typescript/lib/lib.es5.d.ts:1076

Inherited from

AxAIServiceError.name


requestBody?

readonly optional requestBody: unknown

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/util/apicall.ts#L82

Inherited from

AxAIServiceError.requestBody


stack?

optional stack: string

Defined in: node_modules/typescript/lib/lib.es5.d.ts:1078

Inherited from

AxAIServiceError.stack


timestamp

readonly timestamp: string

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/util/apicall.ts#L75

Inherited from

AxAIServiceError.timestamp


url

readonly url: string

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/util/apicall.ts#L81

Inherited from

AxAIServiceError.url


prepareStackTrace()?

static optional prepareStackTrace: (err, stackTraces) => any

Defined in: node_modules/@types/node/globals.d.ts:143

Optional override for formatting stack traces

Parameters

ParameterType
errError
stackTracesCallSite[]

Returns

any

See

https://v8.dev/docs/stack-trace-api#customizing-stack-traces

Inherited from

AxAIServiceError.prepareStackTrace


stackTraceLimit

static stackTraceLimit: number

Defined in: node_modules/@types/node/globals.d.ts:145

Inherited from

AxAIServiceError.stackTraceLimit

Methods

toString()

toString(): string

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/util/apicall.ts#L94

Returns a string representation of an object.

Returns

string

Inherited from

AxAIServiceError.toString


captureStackTrace()

static captureStackTrace(targetObject, constructorOpt?): void

Defined in: node_modules/@types/node/globals.d.ts:136

Create .stack property on a target object

Parameters

ParameterType
targetObjectobject
constructorOpt?Function

Returns

void

Inherited from

AxAIServiceError.captureStackTrace

> AxAIServiceError

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/util/apicall.ts#L74

Extends

  • Error

Extended by

Constructors

new AxAIServiceError()

new AxAIServiceError(message, url, requestBody?, context?): AxAIServiceError

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/util/apicall.ts#L79

Parameters

ParameterType
messagestring
urlstring
requestBody?unknown
context?Record<string, unknown>

Returns

AxAIServiceError

Overrides

Error.constructor

Properties

cause?

optional cause: unknown

Defined in: node_modules/typescript/lib/lib.es2022.error.d.ts:26

Inherited from

Error.cause


context

readonly context: Record<string, unknown>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/util/apicall.ts#L77


errorId

readonly errorId: string

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/util/apicall.ts#L76


message

message: string

Defined in: node_modules/typescript/lib/lib.es5.d.ts:1077

Inherited from

Error.message


name

name: string

Defined in: node_modules/typescript/lib/lib.es5.d.ts:1076

Inherited from

Error.name


requestBody?

readonly optional requestBody: unknown

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/util/apicall.ts#L82


stack?

optional stack: string

Defined in: node_modules/typescript/lib/lib.es5.d.ts:1078

Inherited from

Error.stack


timestamp

readonly timestamp: string

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/util/apicall.ts#L75


url

readonly url: string

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/util/apicall.ts#L81


prepareStackTrace()?

static optional prepareStackTrace: (err, stackTraces) => any

Defined in: node_modules/@types/node/globals.d.ts:143

Optional override for formatting stack traces

Parameters

ParameterType
errError
stackTracesCallSite[]

Returns

any

See

https://v8.dev/docs/stack-trace-api#customizing-stack-traces

Inherited from

Error.prepareStackTrace


stackTraceLimit

static stackTraceLimit: number

Defined in: node_modules/@types/node/globals.d.ts:145

Inherited from

Error.stackTraceLimit

Methods

toString()

toString(): string

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/util/apicall.ts#L94

Returns a string representation of an object.

Returns

string


captureStackTrace()

static captureStackTrace(targetObject, constructorOpt?): void

Defined in: node_modules/@types/node/globals.d.ts:136

Create .stack property on a target object

Parameters

ParameterType
targetObjectobject
constructorOpt?Function

Returns

void

Inherited from

Error.captureStackTrace

> AxAIServiceNetworkError

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/util/apicall.ts#L133

Extends

Constructors

new AxAIServiceNetworkError()

new AxAIServiceNetworkError(originalError, url, requestBody?, context?): AxAIServiceNetworkError

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/util/apicall.ts#L134

Parameters

ParameterType
originalErrorError
urlstring
requestBody?unknown
context?Record<string, unknown>

Returns

AxAIServiceNetworkError

Overrides

AxAIServiceError.constructor

Properties

cause?

optional cause: unknown

Defined in: node_modules/typescript/lib/lib.es2022.error.d.ts:26

Inherited from

AxAIServiceError.cause


context

readonly context: Record<string, unknown>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/util/apicall.ts#L77

Inherited from

AxAIServiceError.context


errorId

readonly errorId: string

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/util/apicall.ts#L76

Inherited from

AxAIServiceError.errorId


message

message: string

Defined in: node_modules/typescript/lib/lib.es5.d.ts:1077

Inherited from

AxAIServiceError.message


name

name: string

Defined in: node_modules/typescript/lib/lib.es5.d.ts:1076

Inherited from

AxAIServiceError.name


originalError

readonly originalError: Error

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/util/apicall.ts#L135


requestBody?

readonly optional requestBody: unknown

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/util/apicall.ts#L82

Inherited from

AxAIServiceError.requestBody


stack?

optional stack: string

Defined in: node_modules/typescript/lib/lib.es5.d.ts:1078

Inherited from

AxAIServiceError.stack


timestamp

readonly timestamp: string

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/util/apicall.ts#L75

Inherited from

AxAIServiceError.timestamp


url

readonly url: string

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/util/apicall.ts#L81

Inherited from

AxAIServiceError.url


prepareStackTrace()?

static optional prepareStackTrace: (err, stackTraces) => any

Defined in: node_modules/@types/node/globals.d.ts:143

Optional override for formatting stack traces

Parameters

ParameterType
errError
stackTracesCallSite[]

Returns

any

See

https://v8.dev/docs/stack-trace-api#customizing-stack-traces

Inherited from

AxAIServiceError.prepareStackTrace


stackTraceLimit

static stackTraceLimit: number

Defined in: node_modules/@types/node/globals.d.ts:145

Inherited from

AxAIServiceError.stackTraceLimit

Methods

toString()

toString(): string

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/util/apicall.ts#L94

Returns a string representation of an object.

Returns

string

Inherited from

AxAIServiceError.toString


captureStackTrace()

static captureStackTrace(targetObject, constructorOpt?): void

Defined in: node_modules/@types/node/globals.d.ts:136

Create .stack property on a target object

Parameters

ParameterType
targetObjectobject
constructorOpt?Function

Returns

void

Inherited from

AxAIServiceError.captureStackTrace

> AxAIServiceResponseError

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/util/apicall.ts#L150

Extends

Constructors

new AxAIServiceResponseError()

new AxAIServiceResponseError(message, url, requestBody?, context?): AxAIServiceResponseError

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/util/apicall.ts#L151

Parameters

ParameterType
messagestring
urlstring
requestBody?unknown
context?Record<string, unknown>

Returns

AxAIServiceResponseError

Overrides

AxAIServiceError.constructor

Properties

cause?

optional cause: unknown

Defined in: node_modules/typescript/lib/lib.es2022.error.d.ts:26

Inherited from

AxAIServiceError.cause


context

readonly context: Record<string, unknown>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/util/apicall.ts#L77

Inherited from

AxAIServiceError.context


errorId

readonly errorId: string

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/util/apicall.ts#L76

Inherited from

AxAIServiceError.errorId


message

message: string

Defined in: node_modules/typescript/lib/lib.es5.d.ts:1077

Inherited from

AxAIServiceError.message


name

name: string

Defined in: node_modules/typescript/lib/lib.es5.d.ts:1076

Inherited from

AxAIServiceError.name


requestBody?

readonly optional requestBody: unknown

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/util/apicall.ts#L82

Inherited from

AxAIServiceError.requestBody


stack?

optional stack: string

Defined in: node_modules/typescript/lib/lib.es5.d.ts:1078

Inherited from

AxAIServiceError.stack


timestamp

readonly timestamp: string

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/util/apicall.ts#L75

Inherited from

AxAIServiceError.timestamp


url

readonly url: string

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/util/apicall.ts#L81

Inherited from

AxAIServiceError.url


prepareStackTrace()?

static optional prepareStackTrace: (err, stackTraces) => any

Defined in: node_modules/@types/node/globals.d.ts:143

Optional override for formatting stack traces

Parameters

ParameterType
errError
stackTracesCallSite[]

Returns

any

See

https://v8.dev/docs/stack-trace-api#customizing-stack-traces

Inherited from

AxAIServiceError.prepareStackTrace


stackTraceLimit

static stackTraceLimit: number

Defined in: node_modules/@types/node/globals.d.ts:145

Inherited from

AxAIServiceError.stackTraceLimit

Methods

toString()

toString(): string

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/util/apicall.ts#L94

Returns a string representation of an object.

Returns

string

Inherited from

AxAIServiceError.toString


captureStackTrace()

static captureStackTrace(targetObject, constructorOpt?): void

Defined in: node_modules/@types/node/globals.d.ts:136

Create .stack property on a target object

Parameters

ParameterType
targetObjectobject
constructorOpt?Function

Returns

void

Inherited from

AxAIServiceError.captureStackTrace

> AxAIServiceStatusError

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/util/apicall.ts#L116

Extends

Constructors

new AxAIServiceStatusError()

new AxAIServiceStatusError(status, statusText, url, requestBody?, context?): AxAIServiceStatusError

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/util/apicall.ts#L117

Parameters

ParameterType
statusnumber
statusTextstring
urlstring
requestBody?unknown
context?Record<string, unknown>

Returns

AxAIServiceStatusError

Overrides

AxAIServiceError.constructor

Properties

cause?

optional cause: unknown

Defined in: node_modules/typescript/lib/lib.es2022.error.d.ts:26

Inherited from

AxAIServiceError.cause


context

readonly context: Record<string, unknown>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/util/apicall.ts#L77

Inherited from

AxAIServiceError.context


errorId

readonly errorId: string

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/util/apicall.ts#L76

Inherited from

AxAIServiceError.errorId


message

message: string

Defined in: node_modules/typescript/lib/lib.es5.d.ts:1077

Inherited from

AxAIServiceError.message


name

name: string

Defined in: node_modules/typescript/lib/lib.es5.d.ts:1076

Inherited from

AxAIServiceError.name


requestBody?

readonly optional requestBody: unknown

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/util/apicall.ts#L82

Inherited from

AxAIServiceError.requestBody


stack?

optional stack: string

Defined in: node_modules/typescript/lib/lib.es5.d.ts:1078

Inherited from

AxAIServiceError.stack


status

readonly status: number

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/util/apicall.ts#L118


statusText

readonly statusText: string

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/util/apicall.ts#L119


timestamp

readonly timestamp: string

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/util/apicall.ts#L75

Inherited from

AxAIServiceError.timestamp


url

readonly url: string

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/util/apicall.ts#L81

Inherited from

AxAIServiceError.url


prepareStackTrace()?

static optional prepareStackTrace: (err, stackTraces) => any

Defined in: node_modules/@types/node/globals.d.ts:143

Optional override for formatting stack traces

Parameters

ParameterType
errError
stackTracesCallSite[]

Returns

any

See

https://v8.dev/docs/stack-trace-api#customizing-stack-traces

Inherited from

AxAIServiceError.prepareStackTrace


stackTraceLimit

static stackTraceLimit: number

Defined in: node_modules/@types/node/globals.d.ts:145

Inherited from

AxAIServiceError.stackTraceLimit

Methods

toString()

toString(): string

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/util/apicall.ts#L94

Returns a string representation of an object.

Returns

string

Inherited from

AxAIServiceError.toString


captureStackTrace()

static captureStackTrace(targetObject, constructorOpt?): void

Defined in: node_modules/@types/node/globals.d.ts:136

Create .stack property on a target object

Parameters

ParameterType
targetObjectobject
constructorOpt?Function

Returns

void

Inherited from

AxAIServiceError.captureStackTrace

> AxAIServiceStreamTerminatedError

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/util/apicall.ts#L162

Extends

Constructors

new AxAIServiceStreamTerminatedError()

new AxAIServiceStreamTerminatedError(url, requestBody?, lastChunk?, context?): AxAIServiceStreamTerminatedError

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/util/apicall.ts#L163

Parameters

ParameterType
urlstring
requestBody?unknown
lastChunk?unknown
context?Record<string, unknown>

Returns

AxAIServiceStreamTerminatedError

Overrides

AxAIServiceError.constructor

Properties

cause?

optional cause: unknown

Defined in: node_modules/typescript/lib/lib.es2022.error.d.ts:26

Inherited from

AxAIServiceError.cause


context

readonly context: Record<string, unknown>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/util/apicall.ts#L77

Inherited from

AxAIServiceError.context


errorId

readonly errorId: string

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/util/apicall.ts#L76

Inherited from

AxAIServiceError.errorId


lastChunk?

readonly optional lastChunk: unknown

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/util/apicall.ts#L166


message

message: string

Defined in: node_modules/typescript/lib/lib.es5.d.ts:1077

Inherited from

AxAIServiceError.message


name

name: string

Defined in: node_modules/typescript/lib/lib.es5.d.ts:1076

Inherited from

AxAIServiceError.name


requestBody?

readonly optional requestBody: unknown

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/util/apicall.ts#L82

Inherited from

AxAIServiceError.requestBody


stack?

optional stack: string

Defined in: node_modules/typescript/lib/lib.es5.d.ts:1078

Inherited from

AxAIServiceError.stack


timestamp

readonly timestamp: string

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/util/apicall.ts#L75

Inherited from

AxAIServiceError.timestamp


url

readonly url: string

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/util/apicall.ts#L81

Inherited from

AxAIServiceError.url


prepareStackTrace()?

static optional prepareStackTrace: (err, stackTraces) => any

Defined in: node_modules/@types/node/globals.d.ts:143

Optional override for formatting stack traces

Parameters

ParameterType
errError
stackTracesCallSite[]

Returns

any

See

https://v8.dev/docs/stack-trace-api#customizing-stack-traces

Inherited from

AxAIServiceError.prepareStackTrace


stackTraceLimit

static stackTraceLimit: number

Defined in: node_modules/@types/node/globals.d.ts:145

Inherited from

AxAIServiceError.stackTraceLimit

Methods

toString()

toString(): string

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/util/apicall.ts#L94

Returns a string representation of an object.

Returns

string

Inherited from

AxAIServiceError.toString


captureStackTrace()

static captureStackTrace(targetObject, constructorOpt?): void

Defined in: node_modules/@types/node/globals.d.ts:136

Create .stack property on a target object

Parameters

ParameterType
targetObjectobject
constructorOpt?Function

Returns

void

Inherited from

AxAIServiceError.captureStackTrace

> AxAITogether

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/together/api.ts#L18

Extends

Constructors

new AxAITogether()

new AxAITogether(__namedParameters): AxAITogether

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/together/api.ts#L19

Parameters

ParameterType
__namedParametersReadonly<Omit<AxAITogetherArgs, "name">>

Returns

AxAITogether

Overrides

AxAIOpenAIBase.constructor

Methods

chat()

chat(req, options?): Promise<AxChatResponse | ReadableStream<AxChatResponse>>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L290

Parameters

ParameterType
reqReadonly<AxChatRequest<string>>
options?Readonly<AxAIPromptConfig & AxAIServiceActionOptions<string, unknown>>

Returns

Promise<AxChatResponse | ReadableStream<AxChatResponse>>

Inherited from

AxAIOpenAIBase.chat


embed()

embed(req, options?): Promise<AxEmbedResponse>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L528

Parameters

ParameterType
reqReadonly<AxEmbedRequest<unknown>>
options?Readonly<AxAIServiceActionOptions<string, unknown>>

Returns

Promise<AxEmbedResponse>

Inherited from

AxAIOpenAIBase.embed


getDefaultModels()

getDefaultModels(): Readonly<{ embedModel: string; model: string; }>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L230

Returns

Readonly<{ embedModel: string; model: string; }>

Inherited from

AxAIOpenAIBase.getDefaultModels


getFeatures()

getFeatures(model?): AxAIFeatures

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L241

Parameters

ParameterType
model?string

Returns

AxAIFeatures

Inherited from

AxAIOpenAIBase.getFeatures


getId()

getId(): string

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L181

Returns

string

Inherited from

AxAIOpenAIBase.getId


getMetrics()

getMetrics(): AxAIServiceMetrics

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L286

Returns

AxAIServiceMetrics

Inherited from

AxAIOpenAIBase.getMetrics


getModelList()

getModelList(): undefined | AxAIModelList

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L220

Returns

undefined | AxAIModelList

Inherited from

AxAIOpenAIBase.getModelList


getName()

getName(): string

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L237

Returns

string

Inherited from

AxAIOpenAIBase.getName


getOptions()

getOptions(): Readonly<AxAIServiceOptions>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L211

Returns

Readonly<AxAIServiceOptions>

Inherited from

AxAIOpenAIBase.getOptions


setAPIURL()

setAPIURL(apiURL): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L185

Parameters

ParameterType
apiURLstring

Returns

void

Inherited from

AxAIOpenAIBase.setAPIURL


setHeaders()

setHeaders(headers): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L189

Parameters

ParameterType
headers() => Promise<Record<string, string>>

Returns

void

Inherited from

AxAIOpenAIBase.setHeaders


setName()

setName(name): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L177

Parameters

ParameterType
namestring

Returns

void

Inherited from

AxAIOpenAIBase.setName


setOptions()

setOptions(options): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L193

Parameters

ParameterType
optionsReadonly<AxAIServiceOptions>

Returns

void

Inherited from

AxAIOpenAIBase.setOptions

> AxAIServiceTimeoutError

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/util/apicall.ts#L177

Extends

Constructors

new AxAIServiceTimeoutError()

new AxAIServiceTimeoutError(url, timeoutMs, requestBody?, context?): AxAIServiceTimeoutError

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/util/apicall.ts#L178

Parameters

ParameterType
urlstring
timeoutMsnumber
requestBody?unknown
context?Record<string, unknown>

Returns

AxAIServiceTimeoutError

Overrides

AxAIServiceError.constructor

Properties

cause?

optional cause: unknown

Defined in: node_modules/typescript/lib/lib.es2022.error.d.ts:26

Inherited from

AxAIServiceError.cause


context

readonly context: Record<string, unknown>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/util/apicall.ts#L77

Inherited from

AxAIServiceError.context


errorId

readonly errorId: string

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/util/apicall.ts#L76

Inherited from

AxAIServiceError.errorId


message

message: string

Defined in: node_modules/typescript/lib/lib.es5.d.ts:1077

Inherited from

AxAIServiceError.message


name

name: string

Defined in: node_modules/typescript/lib/lib.es5.d.ts:1076

Inherited from

AxAIServiceError.name


requestBody?

readonly optional requestBody: unknown

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/util/apicall.ts#L82

Inherited from

AxAIServiceError.requestBody


stack?

optional stack: string

Defined in: node_modules/typescript/lib/lib.es5.d.ts:1078

Inherited from

AxAIServiceError.stack


timestamp

readonly timestamp: string

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/util/apicall.ts#L75

Inherited from

AxAIServiceError.timestamp


url

readonly url: string

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/util/apicall.ts#L81

Inherited from

AxAIServiceError.url


prepareStackTrace()?

static optional prepareStackTrace: (err, stackTraces) => any

Defined in: node_modules/@types/node/globals.d.ts:143

Optional override for formatting stack traces

Parameters

ParameterType
errError
stackTracesCallSite[]

Returns

any

See

https://v8.dev/docs/stack-trace-api#customizing-stack-traces

Inherited from

AxAIServiceError.prepareStackTrace


stackTraceLimit

static stackTraceLimit: number

Defined in: node_modules/@types/node/globals.d.ts:145

Inherited from

AxAIServiceError.stackTraceLimit

Methods

toString()

toString(): string

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/util/apicall.ts#L94

Returns a string representation of an object.

Returns

string

Inherited from

AxAIServiceError.toString


captureStackTrace()

static captureStackTrace(targetObject, constructorOpt?): void

Defined in: node_modules/@types/node/globals.d.ts:136

Create .stack property on a target object

Parameters

ParameterType
targetObjectobject
constructorOpt?Function

Returns

void

Inherited from

AxAIServiceError.captureStackTrace

> AxAgent

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/prompts/agent.ts#L135

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 ParameterDefault type
IN extends AxGenIn-
OUT extends AxGenOutAxGenOut

Implements

Constructors

new AxAgent()

new AxAgent<IN, OUT>(__namedParameters, options?): AxAgent<IN, OUT>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/prompts/agent.ts#L150

Parameters

ParameterType
__namedParametersReadonly<{ agents: AxAgentic[]; ai: Readonly<AxAIService<unknown, unknown>>; definition: string; description: string; functions: AxInputFunctionType; name: string; signature: string | AxSignature; }>
options?Readonly<AxAgentOptions>

Returns

AxAgent<IN, OUT>

Methods

forward()

forward(parentAi, values, options?): Promise<OUT>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/prompts/agent.ts#L350

Parameters

ParameterType
parentAiReadonly<AxAIService<unknown, unknown>>
valuesIN
options?Readonly<AxProgramForwardOptions>

Returns

Promise<OUT>


getFeatures()

getFeatures(): AxAgentFeatures

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/prompts/agent.ts#L298

Returns

AxAgentFeatures

Implementation of

AxAgentic.getFeatures


getFunction()

getFunction(): AxFunction

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/prompts/agent.ts#L248

Returns

AxFunction

Implementation of

AxAgentic.getFunction


getTraces()

getTraces(): AxProgramTrace[]

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/prompts/agent.ts#L232

Returns

AxProgramTrace[]

Implementation of

AxAgentic.getTraces


getUsage()

getUsage(): AxTokenUsage & object[]

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/prompts/agent.ts#L240

Returns

AxTokenUsage & object[]

Implementation of

AxAgentic.getUsage


resetUsage()

resetUsage(): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/prompts/agent.ts#L244

Returns

void

Implementation of

AxAgentic.resetUsage


setDefinition()

setDefinition(definition): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/prompts/agent.ts#L392

Parameters

ParameterType
definitionstring

Returns

void


setDemos()

setDemos(demos): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/prompts/agent.ts#L236

Parameters

ParameterType
demosreadonly AxProgramDemos[]

Returns

void

Implementation of

AxAgentic.setDemos


setDescription()

setDescription(description): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/prompts/agent.ts#L383

Updates the agent’s description. This updates both the stored description and the function’s description.

Parameters

ParameterTypeDescription
descriptionstringNew description for the agent (must be at least 20 characters)

Returns

void

Throws

Error if description is too short


setExamples()

setExamples(examples): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/prompts/agent.ts#L220

Parameters

ParameterType
examplesReadonly<AxProgramExamples>

Returns

void

Implementation of

AxAgentic.setExamples


setId()

setId(id): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/prompts/agent.ts#L224

Parameters

ParameterType
idstring

Returns

void

Implementation of

AxAgentic.setId


setParentId()

setParentId(parentId): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/prompts/agent.ts#L228

Parameters

ParameterType
parentIdstring

Returns

void

Implementation of

AxAgentic.setParentId


streamingForward()

streamingForward(parentAi, values, options?): AxGenStreamingOut<OUT>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/prompts/agent.ts#L363

Parameters

ParameterType
parentAiReadonly<AxAIService<unknown, unknown>>
valuesIN
options?Readonly<AxProgramStreamingForwardOptions>

Returns

AxGenStreamingOut<OUT>

> AxApacheTika

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/docs/tika.ts#L12

Constructors

new AxApacheTika()

new AxApacheTika(args?): AxApacheTika

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/docs/tika.ts#L16

Parameters

ParameterType
args?Readonly<AxApacheTikaArgs>

Returns

AxApacheTika

Methods

convert()

convert(files, options?): Promise<string[]>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/docs/tika.ts#L54

Parameters

ParameterType
filesReadonly<string[] | Blob[]>
options?Readonly<{ batchSize: number; format: "text" | "html"; }>

Returns

Promise<string[]>

> AxAssertionError

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/asserts.ts#L16

Extends

  • Error

Constructors

new AxAssertionError()

new AxAssertionError(__namedParameters): AxAssertionError

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/asserts.ts#L17

Parameters

ParameterType
__namedParametersReadonly<{ message: string; }>

Returns

AxAssertionError

Overrides

Error.constructor

Properties

cause?

optional cause: unknown

Defined in: node_modules/typescript/lib/lib.es2022.error.d.ts:26

Inherited from

Error.cause


message

message: string

Defined in: node_modules/typescript/lib/lib.es5.d.ts:1077

Inherited from

Error.message


name

name: string

Defined in: node_modules/typescript/lib/lib.es5.d.ts:1076

Inherited from

Error.name


stack?

optional stack: string

Defined in: node_modules/typescript/lib/lib.es5.d.ts:1078

Inherited from

Error.stack


prepareStackTrace()?

static optional prepareStackTrace: (err, stackTraces) => any

Defined in: node_modules/@types/node/globals.d.ts:143

Optional override for formatting stack traces

Parameters

ParameterType
errError
stackTracesCallSite[]

Returns

any

See

https://v8.dev/docs/stack-trace-api#customizing-stack-traces

Inherited from

Error.prepareStackTrace


stackTraceLimit

static stackTraceLimit: number

Defined in: node_modules/@types/node/globals.d.ts:145

Inherited from

Error.stackTraceLimit

Methods

getFixingInstructions()

getFixingInstructions(): object[]

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/asserts.ts#L26

Returns

object[]


captureStackTrace()

static captureStackTrace(targetObject, constructorOpt?): void

Defined in: node_modules/@types/node/globals.d.ts:136

Create .stack property on a target object

Parameters

ParameterType
targetObjectobject
constructorOpt?Function

Returns

void

Inherited from

Error.captureStackTrace

> AxBalancer

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/balance.ts#L40

Balancer that rotates through services.

Implements

Constructors

new AxBalancer()

new AxBalancer(services, options?): AxBalancer

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/balance.ts#L53

Parameters

ParameterType
servicesreadonly AxAIService<unknown, unknown>[]
options?AxBalancerOptions

Returns

AxBalancer

Methods

chat()

chat(req, options?): Promise<AxChatResponse | ReadableStream<AxChatResponse>>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/balance.ts#L194

Parameters

ParameterType
reqReadonly<AxChatRequest>
options?Readonly<AxAIPromptConfig & AxAIServiceActionOptions>

Returns

Promise<AxChatResponse | ReadableStream<AxChatResponse>>

Implementation of

AxAIService.chat


embed()

embed(req, options?): Promise<AxEmbedResponse>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/balance.ts#L254

Parameters

ParameterType
reqReadonly<AxEmbedRequest>
options?Readonly<AxAIServiceActionOptions>

Returns

Promise<AxEmbedResponse>

Implementation of

AxAIService.embed


getDefaultModels()

getDefaultModels(): Readonly<{ embedModel: string; model: string; }>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/balance.ts#L110

Returns

Readonly<{ embedModel: string; model: string; }>

Implementation of

AxAIService.getDefaultModels


getFeatures()

getFeatures(model?): AxAIFeatures

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/balance.ts#L140

Parameters

ParameterType
model?string

Returns

AxAIFeatures

Implementation of

AxAIService.getFeatures


getId()

getId(): string

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/balance.ts#L136

Returns

string

Implementation of

AxAIService.getId


getMetrics()

getMetrics(): AxAIServiceMetrics

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/balance.ts#L144

Returns

AxAIServiceMetrics

Implementation of

AxAIService.getMetrics


getModelList()

getModelList(): undefined | AxAIModelList

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/balance.ts#L106

Returns

undefined | AxAIModelList

Implementation of

AxAIService.getModelList


getName()

getName(): string

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/balance.ts#L132

Returns

string

Implementation of

AxAIService.getName


getOptions()

getOptions(): Readonly<AxAIServiceOptions>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/balance.ts#L284

Returns

Readonly<AxAIServiceOptions>

Implementation of

AxAIService.getOptions


setOptions()

setOptions(options): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/balance.ts#L280

Parameters

ParameterType
optionsReadonly<AxAIServiceOptions>

Returns

void

Implementation of

AxAIService.setOptions


inputOrderComparator()

static inputOrderComparator(): number

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/balance.ts#L78

Service comparator that respects the input order of services.

Returns

number


metricComparator()

static metricComparator(a, b): number

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/balance.ts#L99

Service comparator that sorts services by cost.

Parameters

ParameterType
aAxAIService
bAxAIService

Returns

number

> AxBaseAI

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L61

Extended by

Type Parameters

Type Parameter
TModel
TEmbedModel
TChatRequest
TEmbedRequest
TChatResponse
TChatResponseDelta
TEmbedResponse

Implements

Constructors

new AxBaseAI()

new AxBaseAI<TModel, TEmbedModel, TChatRequest, TEmbedRequest, TChatResponse, TChatResponseDelta, TEmbedResponse>(aiImpl, __namedParameters): AxBaseAI<TModel, TEmbedModel, TChatRequest, TEmbedRequest, TChatResponse, TChatResponseDelta, TEmbedResponse>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L122

Parameters

ParameterType
aiImplReadonly<AxAIServiceImpl<TModel, TEmbedModel, TChatRequest, TEmbedRequest, TChatResponse, TChatResponseDelta, TEmbedResponse>>
__namedParametersReadonly<AxBaseAIArgs<TModel, TEmbedModel>>

Returns

AxBaseAI<TModel, TEmbedModel, TChatRequest, TEmbedRequest, TChatResponse, TChatResponseDelta, TEmbedResponse>

Methods

chat()

chat(req, options?): Promise<AxChatResponse | ReadableStream<AxChatResponse>>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L290

Parameters

ParameterType
reqReadonly<AxChatRequest<TModel>>
options?Readonly<AxAIPromptConfig & AxAIServiceActionOptions<TModel, TEmbedModel>>

Returns

Promise<AxChatResponse | ReadableStream<AxChatResponse>>

Implementation of

AxAIService.chat


embed()

embed(req, options?): Promise<AxEmbedResponse>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L528

Parameters

ParameterType
reqReadonly<AxEmbedRequest<TEmbedModel>>
options?Readonly<AxAIServiceActionOptions<TModel, TEmbedModel>>

Returns

Promise<AxEmbedResponse>

Implementation of

AxAIService.embed


getDefaultModels()

getDefaultModels(): Readonly<{ embedModel: string; model: string; }>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L230

Returns

Readonly<{ embedModel: string; model: string; }>

Implementation of

AxAIService.getDefaultModels


getFeatures()

getFeatures(model?): AxAIFeatures

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L241

Parameters

ParameterType
model?TModel

Returns

AxAIFeatures

Implementation of

AxAIService.getFeatures


getId()

getId(): string

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L181

Returns

string

Implementation of

AxAIService.getId


getMetrics()

getMetrics(): AxAIServiceMetrics

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L286

Returns

AxAIServiceMetrics

Implementation of

AxAIService.getMetrics


getModelList()

getModelList(): undefined | AxAIModelList

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L220

Returns

undefined | AxAIModelList

Implementation of

AxAIService.getModelList


getName()

getName(): string

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L237

Returns

string

Implementation of

AxAIService.getName


getOptions()

getOptions(): Readonly<AxAIServiceOptions>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L211

Returns

Readonly<AxAIServiceOptions>

Implementation of

AxAIService.getOptions


setAPIURL()

setAPIURL(apiURL): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L185

Parameters

ParameterType
apiURLstring

Returns

void


setHeaders()

setHeaders(headers): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L189

Parameters

ParameterType
headers() => Promise<Record<string, string>>

Returns

void


setName()

setName(name): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L177

Parameters

ParameterType
namestring

Returns

void


setOptions()

setOptions(options): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/base.ts#L193

Parameters

ParameterType
optionsReadonly<AxAIServiceOptions>

Returns

void

Implementation of

AxAIService.setOptions

> AxBootstrapFewShot

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/optimize.ts#L57

Type Parameters

Type ParameterDefault type
IN extends AxGenInAxGenIn
OUT extends AxGenOutAxGenOut

Constructors

new AxBootstrapFewShot()

new AxBootstrapFewShot<IN, OUT>(__namedParameters): AxBootstrapFewShot<IN, OUT>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/optimize.ts#L82

Parameters

ParameterType
__namedParametersReadonly<AxOptimizerArgs<IN, OUT>>

Returns

AxBootstrapFewShot<IN, OUT>

Methods

compile()

compile(metricFn, options?): Promise<{ demos: AxProgramDemos[]; stats: AxOptimizationStats; }>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/optimize.ts#L249

Parameters

ParameterType
metricFnAxMetricFn
options?Readonly<undefined | { batchSize: number; costMonitoring: boolean; debugMode: boolean; earlyStoppingPatience: number; maxDemos: number; maxExamples: number; maxRounds: number; maxTokensPerGeneration: number; teacherAI: AxAIService<unknown, unknown>; verboseMode: boolean; }>

Returns

Promise<{ demos: AxProgramDemos[]; stats: AxOptimizationStats; }>


getStats()

getStats(): AxOptimizationStats

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/optimize.ts#L286

Returns

AxOptimizationStats

> AxChainOfThought

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/prompts/cot.ts#L5

Extends

  • AxGen<IN, OUT & object>

Extended by

Type Parameters

Type ParameterDefault type
IN extends AxGenInAxGenIn
OUT extends AxGenOutAxGenOut

Constructors

new AxChainOfThought()

new AxChainOfThought<IN, OUT>(signature, options?): AxChainOfThought<IN, OUT>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/prompts/cot.ts#L9

Parameters

ParameterType
signatureReadonly<string | AxSignature>
options?Readonly<AxGenOptions>

Returns

AxChainOfThought<IN, OUT>

Overrides

AxGen.constructor

Methods

_forward1()

_forward1(ai, values, options): AsyncGenerator<{ delta: Partial<OUT & object>; version: number; }, void, unknown>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/generate.ts#L628

Parameters

ParameterType
aiReadonly<AxAIService<unknown, unknown>>
valuesIN
optionsReadonly<AxProgramForwardOptions>

Returns

AsyncGenerator<{ delta: Partial<OUT & object>; version: number; }, void, unknown>

Inherited from

AxGen._forward1


addAssert()

addAssert(fn, message?): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/generate.ts#L133

Parameters

ParameterType
fn(values) => undefined | boolean | Promise<undefined | boolean>
message?string

Returns

void

Inherited from

AxGen.addAssert


addFieldProcessor()

addFieldProcessor(fieldName, fn): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/generate.ts#L180

Parameters

ParameterType
fieldNamestring
fnAxFieldProcessorProcess | AxStreamingFieldProcessorProcess

Returns

void

Inherited from

AxGen.addFieldProcessor


addStreamingAssert()

addStreamingAssert(fieldName, fn, message?): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/generate.ts#L137

Parameters

ParameterType
fieldNamestring
fn(content, done?) => undefined | boolean
message?string

Returns

void

Inherited from

AxGen.addStreamingAssert


addStreamingFieldProcessor()

addStreamingFieldProcessor(fieldName, fn): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/generate.ts#L173

Parameters

ParameterType
fieldNamestring
fnAxFieldProcessorProcess | AxStreamingFieldProcessorProcess

Returns

void

Inherited from

AxGen.addStreamingFieldProcessor


forward()

forward(ai, values, options?): Promise<OUT & object>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/generate.ts#L676

Parameters

ParameterType
aiReadonly<AxAIService<unknown, unknown>>
valuesIN
options?Readonly<AxProgramForwardOptions>

Returns

Promise<OUT & object>

Inherited from

AxGen.forward


getSignature()

getSignature(): AxSignature

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/program.ts#L135

Returns

AxSignature

Inherited from

AxGen.getSignature


getTraces()

getTraces(): AxProgramTrace[]

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/program.ts#L223

Returns

AxProgramTrace[]

Inherited from

AxGen.getTraces


getUsage()

getUsage(): AxTokenUsage & object[]

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/program.ts#L237

Returns

AxTokenUsage & object[]

Inherited from

AxGen.getUsage


register()

register(prog): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/program.ts#L139

Parameters

ParameterType
progReadonly<AxTunable & AxUsable>

Returns

void

Inherited from

AxGen.register


resetUsage()

resetUsage(): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/program.ts#L247

Returns

void

Inherited from

AxGen.resetUsage


setDemos()

setDemos(demos): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/program.ts#L254

Parameters

ParameterType
demosreadonly AxProgramDemos[]

Returns

void

Inherited from

AxGen.setDemos


setExamples()

setExamples(examples): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/program.ts#L182

Parameters

ParameterType
examplesReadonly<AxProgramExamples>

Returns

void

Inherited from

AxGen.setExamples


setId()

setId(id): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/program.ts#L169

Parameters

ParameterType
idstring

Returns

void

Inherited from

AxGen.setId


setParentId()

setParentId(parentId): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/program.ts#L176

Parameters

ParameterType
parentIdstring

Returns

void

Inherited from

AxGen.setParentId


streamingForward()

streamingForward(ai, values, options?): AsyncGenerator<{ delta: Partial<OUT & object>; version: number; }, void, unknown>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/generate.ts#L700

Parameters

ParameterType
aiReadonly<AxAIService<unknown, unknown>>
valuesIN
options?Readonly<AxProgramStreamingForwardOptions>

Returns

AsyncGenerator<{ delta: Partial<OUT & object>; version: number; }, void, unknown>

Inherited from

AxGen.streamingForward

> AxDB

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/db/wrap.ts#L19

Implements

Constructors

new AxDB()

new AxDB(args): AxDB

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/db/wrap.ts#L21

Parameters

ParameterType
argsReadonly<AxDBArgs>

Returns

AxDB

Methods

batchUpsert()

batchUpsert(batchReq, update?): Promise<AxDBUpsertResponse>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/db/wrap.ts#L46

Parameters

ParameterType
batchReqreadonly AxDBUpsertRequest[]
update?boolean

Returns

Promise<AxDBUpsertResponse>

Implementation of

AxDBService.batchUpsert


query()

query(req): Promise<AxDBQueryResponse>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/db/wrap.ts#L53

Parameters

ParameterType
reqReadonly<AxDBQueryRequest>

Returns

Promise<AxDBQueryResponse>

Implementation of

AxDBService.query


upsert()

upsert(req, update?): Promise<AxDBUpsertResponse>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/db/wrap.ts#L39

Parameters

ParameterType
reqReadonly<AxDBUpsertRequest>
update?boolean

Returns

Promise<AxDBUpsertResponse>

Implementation of

AxDBService.upsert

> AxDBBase

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/db/base.ts#L22

Extended by

Implements

Constructors

new AxDBBase()

new AxDBBase(__namedParameters): AxDBBase

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/db/base.ts#L44

Parameters

ParameterType
__namedParametersReadonly<AxDBBaseArgs & object>

Returns

AxDBBase

Properties

_batchUpsert()?

optional _batchUpsert: (batchReq, update?, options?) => Promise<AxDBUpsertResponse>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/db/base.ts#L33

Parameters

ParameterType
batchReqreadonly AxDBUpsertRequest[]
update?boolean
options?Readonly<AxDBBaseOpOptions>

Returns

Promise<AxDBUpsertResponse>


_query()?

optional _query: (req, options?) => Promise<AxDBQueryResponse>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/db/base.ts#L39

Parameters

ParameterType
reqReadonly<AxDBQueryRequest>
options?Readonly<AxDBBaseOpOptions>

Returns

Promise<AxDBQueryResponse>


_upsert()?

optional _upsert: (req, update?, options?) => Promise<AxDBUpsertResponse>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/db/base.ts#L27

Parameters

ParameterType
reqReadonly<AxDBUpsertRequest>
update?boolean
options?Readonly<AxDBBaseOpOptions>

Returns

Promise<AxDBUpsertResponse>

Methods

batchUpsert()

batchUpsert(req, update?): Promise<AxDBUpsertResponse>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/db/base.ts#L88

Parameters

ParameterType
reqreadonly AxDBUpsertRequest[]
update?boolean

Returns

Promise<AxDBUpsertResponse>

Implementation of

AxDBService.batchUpsert


query()

query(req): Promise<AxDBQueryResponse>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/db/base.ts#L128

Parameters

ParameterType
reqReadonly<AxDBQueryRequest>

Returns

Promise<AxDBQueryResponse>

Implementation of

AxDBService.query


upsert()

upsert(req, update?): Promise<AxDBUpsertResponse>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/db/base.ts#L54

Parameters

ParameterType
reqReadonly<AxDBUpsertRequest>
update?boolean

Returns

Promise<AxDBUpsertResponse>

Implementation of

AxDBService.upsert

> AxDBCloudflare

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/db/cloudflare.ts#L44

Cloudflare: DB Service

Extends

Constructors

new AxDBCloudflare()

new AxDBCloudflare(__namedParameters): AxDBCloudflare

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/db/cloudflare.ts#L48

Parameters

ParameterType
__namedParametersReadonly<Omit<AxDBCloudflareArgs, "name">>

Returns

AxDBCloudflare

Overrides

AxDBBase.constructor

Properties

_batchUpsert()?

optional _batchUpsert: (batchReq, update?, options?) => Promise<AxDBUpsertResponse>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/db/base.ts#L33

Parameters

ParameterType
batchReqreadonly AxDBUpsertRequest[]
update?boolean
options?Readonly<AxDBBaseOpOptions>

Returns

Promise<AxDBUpsertResponse>

Inherited from

AxDBBase._batchUpsert


_query()?

optional _query: (req, options?) => Promise<AxDBQueryResponse>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/db/base.ts#L39

Parameters

ParameterType
reqReadonly<AxDBQueryRequest>
options?Readonly<AxDBBaseOpOptions>

Returns

Promise<AxDBQueryResponse>

Inherited from

AxDBBase._query

Methods

_upsert()

_upsert(req, _update?, options?): Promise<AxDBUpsertResponse>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/db/cloudflare.ts#L62

Parameters

ParameterType
reqReadonly<AxDBUpsertRequest>
_update?boolean
options?Readonly<AxDBBaseOpOptions>

Returns

Promise<AxDBUpsertResponse>

Overrides

AxDBBase._upsert


batchUpsert()

batchUpsert(batchReq, update?, options?): Promise<AxDBUpsertResponse>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/db/cloudflare.ts#L98

Parameters

ParameterType
batchReqreadonly AxDBUpsertRequest[]
update?boolean
options?Readonly<AxDBBaseOpOptions>

Returns

Promise<AxDBUpsertResponse>

Overrides

AxDBBase.batchUpsert


query()

query(req, options?): Promise<AxDBQueryResponse>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/db/cloudflare.ts#L147

Parameters

ParameterType
reqReadonly<AxDBQueryRequest>
options?Readonly<AxDBBaseOpOptions>

Returns

Promise<AxDBQueryResponse>

Overrides

AxDBBase.query


upsert()

upsert(req, update?): Promise<AxDBUpsertResponse>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/db/base.ts#L54

Parameters

ParameterType
reqReadonly<AxDBUpsertRequest>
update?boolean

Returns

Promise<AxDBUpsertResponse>

Inherited from

AxDBBase.upsert

> AxDBManager

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/docs/manager.ts#L33

Constructors

new AxDBManager()

new AxDBManager(__namedParameters): AxDBManager

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/docs/manager.ts#L40

Parameters

ParameterType
__namedParametersReadonly<AxDBManagerArgs>

Returns

AxDBManager

Methods

insert()

insert(text, options?): Promise<void>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/docs/manager.ts#L53

Parameters

ParameterType
textReadonly<string | string[]>
options?Readonly<{ batchSize: number; maxWordsPerChunk: number; minWordsPerChunk: number; }>

Returns

Promise<void>


query()

query(query, __namedParameters): Promise<AxDBMatch[][]>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/docs/manager.ts#L109

Parameters

ParameterType
queryReadonly<string | number | string[] | number[]>
__namedParametersundefined | Readonly<{ topPercent: number; }>

Returns

Promise<AxDBMatch[][]>

> AxDBMemory

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/db/memory.ts#L20

MemoryDB: DB Service

Extends

Constructors

new AxDBMemory()

new AxDBMemory(__namedParameters): AxDBMemory

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/db/memory.ts#L23

Parameters

ParameterType
__namedParametersReadonly<Omit<AxDBMemoryArgs, "name">>

Returns

AxDBMemory

Overrides

AxDBBase.constructor

Methods

_batchUpsert()

_batchUpsert(batchReq, update?, _options?): Promise<AxDBUpsertResponse>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/db/memory.ts#L50

Parameters

ParameterType
batchReqreadonly AxDBUpsertRequest[]
update?boolean
_options?Readonly<AxDBBaseOpOptions>

Returns

Promise<AxDBUpsertResponse>

Overrides

AxDBBase._batchUpsert


_query()

_query(req, _options?): Promise<AxDBQueryResponse>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/db/memory.ts#L65

Parameters

ParameterType
reqReadonly<AxDBQueryRequest>
_options?Readonly<AxDBBaseOpOptions>

Returns

Promise<AxDBQueryResponse>

Overrides

AxDBBase._query


_upsert()

_upsert(req, _update?, _options?): Promise<AxDBUpsertResponse>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/db/memory.ts#L28

Parameters

ParameterType
reqReadonly<AxDBUpsertRequest>
_update?boolean
_options?Readonly<AxDBBaseOpOptions>

Returns

Promise<AxDBUpsertResponse>

Overrides

AxDBBase._upsert


batchUpsert()

batchUpsert(req, update?): Promise<AxDBUpsertResponse>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/db/base.ts#L88

Parameters

ParameterType
reqreadonly AxDBUpsertRequest[]
update?boolean

Returns

Promise<AxDBUpsertResponse>

Inherited from

AxDBBase.batchUpsert


clearDB()

clearDB(): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/db/memory.ts#L100

Returns

void


getDB()

getDB(): AxDBState

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/db/memory.ts#L92

Returns

AxDBState


query()

query(req): Promise<AxDBQueryResponse>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/db/base.ts#L128

Parameters

ParameterType
reqReadonly<AxDBQueryRequest>

Returns

Promise<AxDBQueryResponse>

Inherited from

AxDBBase.query


setDB()

setDB(state): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/db/memory.ts#L96

Parameters

ParameterType
stateAxDBState

Returns

void


upsert()

upsert(req, update?): Promise<AxDBUpsertResponse>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/db/base.ts#L54

Parameters

ParameterType
reqReadonly<AxDBUpsertRequest>
update?boolean

Returns

Promise<AxDBUpsertResponse>

Inherited from

AxDBBase.upsert

> AxDBPinecone

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/db/pinecone.ts#L58

Pinecone: DB Service

Extends

Constructors

new AxDBPinecone()

new AxDBPinecone(__namedParameters): AxDBPinecone

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/db/pinecone.ts#L62

Parameters

ParameterType
__namedParametersReadonly<Omit<AxDBPineconeArgs, "name">>

Returns

AxDBPinecone

Overrides

AxDBBase.constructor

Properties

_query()?

optional _query: (req, options?) => Promise<AxDBQueryResponse>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/db/base.ts#L39

Parameters

ParameterType
reqReadonly<AxDBQueryRequest>
options?Readonly<AxDBBaseOpOptions>

Returns

Promise<AxDBQueryResponse>

Inherited from

AxDBBase._query

Methods

_batchUpsert()

_batchUpsert(batchReq, _update?, options?): Promise<AxDBUpsertResponse>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/db/pinecone.ts#L85

Parameters

ParameterType
batchReqreadonly AxDBUpsertRequest[]
_update?boolean
options?Readonly<AxDBBaseOpOptions>

Returns

Promise<AxDBUpsertResponse>

Overrides

AxDBBase._batchUpsert


_upsert()

_upsert(req, update?, options?): Promise<AxDBUpsertResponse>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/db/pinecone.ts#L76

Parameters

ParameterType
reqReadonly<AxDBUpsertRequest>
update?boolean
options?Readonly<AxDBBaseOpOptions>

Returns

Promise<AxDBUpsertResponse>

Overrides

AxDBBase._upsert


batchUpsert()

batchUpsert(req, update?): Promise<AxDBUpsertResponse>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/db/base.ts#L88

Parameters

ParameterType
reqreadonly AxDBUpsertRequest[]
update?boolean

Returns

Promise<AxDBUpsertResponse>

Inherited from

AxDBBase.batchUpsert


query()

query(req, options?): Promise<AxDBQueryResponse>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/db/pinecone.ts#L111

Parameters

ParameterType
reqReadonly<AxDBQueryRequest>
options?Readonly<AxDBBaseOpOptions>

Returns

Promise<AxDBQueryResponse>

Overrides

AxDBBase.query


upsert()

upsert(req, update?): Promise<AxDBUpsertResponse>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/db/base.ts#L54

Parameters

ParameterType
reqReadonly<AxDBUpsertRequest>
update?boolean

Returns

Promise<AxDBUpsertResponse>

Inherited from

AxDBBase.upsert

> AxDBWeaviate

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/db/weaviate.ts#L39

Weaviate: DB Service

Extends

Constructors

new AxDBWeaviate()

new AxDBWeaviate(__namedParameters): AxDBWeaviate

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/db/weaviate.ts#L43

Parameters

ParameterType
__namedParametersReadonly<Omit<AxDBWeaviateArgs, "name">>

Returns

AxDBWeaviate

Overrides

AxDBBase.constructor

Methods

_batchUpsert()

_batchUpsert(batchReq, update?, options?): Promise<AxDBUpsertResponse>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/db/weaviate.ts#L93

Parameters

ParameterType
batchReqreadonly AxDBUpsertRequest[]
update?boolean
options?Readonly<AxDBBaseOpOptions>

Returns

Promise<AxDBUpsertResponse>

Overrides

AxDBBase._batchUpsert


_query()

_query(req, options?): Promise<AxDBQueryResponse>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/db/weaviate.ts#L138

Parameters

ParameterType
reqReadonly<AxDBQueryRequest>
options?Readonly<AxDBBaseOpOptions>

Returns

Promise<AxDBQueryResponse>

Overrides

AxDBBase._query


_upsert()

_upsert(req, update?, options?): Promise<AxDBUpsertResponse>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/db/weaviate.ts#L57

Parameters

ParameterType
reqReadonly<AxDBUpsertRequest>
update?boolean
options?Readonly<AxDBBaseOpOptions>

Returns

Promise<AxDBUpsertResponse>

Overrides

AxDBBase._upsert


batchUpsert()

batchUpsert(req, update?): Promise<AxDBUpsertResponse>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/db/base.ts#L88

Parameters

ParameterType
reqreadonly AxDBUpsertRequest[]
update?boolean

Returns

Promise<AxDBUpsertResponse>

Inherited from

AxDBBase.batchUpsert


query()

query(req): Promise<AxDBQueryResponse>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/db/base.ts#L128

Parameters

ParameterType
reqReadonly<AxDBQueryRequest>

Returns

Promise<AxDBQueryResponse>

Inherited from

AxDBBase.query


upsert()

upsert(req, update?): Promise<AxDBUpsertResponse>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/db/base.ts#L54

Parameters

ParameterType
reqReadonly<AxDBUpsertRequest>
update?boolean

Returns

Promise<AxDBUpsertResponse>

Inherited from

AxDBBase.upsert

> AxDefaultQueryRewriter

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/docs/rewriter.ts#L8

Extends

Constructors

new AxDefaultQueryRewriter()

new AxDefaultQueryRewriter(options?): AxDefaultQueryRewriter

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/docs/rewriter.ts#L9

Parameters

ParameterType
options?Readonly<AxGenOptions>

Returns

AxDefaultQueryRewriter

Overrides

AxGen.constructor

Methods

_forward1()

_forward1(ai, values, options): AsyncGenerator<{ delta: Partial<AxRewriteOut>; version: number; }, void, unknown>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/generate.ts#L628

Parameters

ParameterType
aiReadonly<AxAIService<unknown, unknown>>
valuesAxRewriteIn
optionsReadonly<AxProgramForwardOptions>

Returns

AsyncGenerator<{ delta: Partial<AxRewriteOut>; version: number; }, void, unknown>

Inherited from

AxGen._forward1


addAssert()

addAssert(fn, message?): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/generate.ts#L133

Parameters

ParameterType
fn(values) => undefined | boolean | Promise<undefined | boolean>
message?string

Returns

void

Inherited from

AxGen.addAssert


addFieldProcessor()

addFieldProcessor(fieldName, fn): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/generate.ts#L180

Parameters

ParameterType
fieldNamestring
fnAxFieldProcessorProcess | AxStreamingFieldProcessorProcess

Returns

void

Inherited from

AxGen.addFieldProcessor


addStreamingAssert()

addStreamingAssert(fieldName, fn, message?): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/generate.ts#L137

Parameters

ParameterType
fieldNamestring
fn(content, done?) => undefined | boolean
message?string

Returns

void

Inherited from

AxGen.addStreamingAssert


addStreamingFieldProcessor()

addStreamingFieldProcessor(fieldName, fn): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/generate.ts#L173

Parameters

ParameterType
fieldNamestring
fnAxFieldProcessorProcess | AxStreamingFieldProcessorProcess

Returns

void

Inherited from

AxGen.addStreamingFieldProcessor


forward()

forward(ai, values, options?): Promise<AxRewriteOut>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/generate.ts#L676

Parameters

ParameterType
aiReadonly<AxAIService<unknown, unknown>>
valuesAxRewriteIn
options?Readonly<AxProgramForwardOptions>

Returns

Promise<AxRewriteOut>

Inherited from

AxGen.forward


getSignature()

getSignature(): AxSignature

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/program.ts#L135

Returns

AxSignature

Inherited from

AxGen.getSignature


getTraces()

getTraces(): AxProgramTrace[]

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/program.ts#L223

Returns

AxProgramTrace[]

Inherited from

AxGen.getTraces


getUsage()

getUsage(): AxTokenUsage & object[]

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/program.ts#L237

Returns

AxTokenUsage & object[]

Inherited from

AxGen.getUsage


register()

register(prog): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/program.ts#L139

Parameters

ParameterType
progReadonly<AxTunable & AxUsable>

Returns

void

Inherited from

AxGen.register


resetUsage()

resetUsage(): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/program.ts#L247

Returns

void

Inherited from

AxGen.resetUsage


setDemos()

setDemos(demos): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/program.ts#L254

Parameters

ParameterType
demosreadonly AxProgramDemos[]

Returns

void

Inherited from

AxGen.setDemos


setExamples()

setExamples(examples): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/program.ts#L182

Parameters

ParameterType
examplesReadonly<AxProgramExamples>

Returns

void

Inherited from

AxGen.setExamples


setId()

setId(id): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/program.ts#L169

Parameters

ParameterType
idstring

Returns

void

Inherited from

AxGen.setId


setParentId()

setParentId(parentId): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/program.ts#L176

Parameters

ParameterType
parentIdstring

Returns

void

Inherited from

AxGen.setParentId


streamingForward()

streamingForward(ai, values, options?): AsyncGenerator<{ delta: Partial<AxRewriteOut>; version: number; }, void, unknown>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/generate.ts#L700

Parameters

ParameterType
aiReadonly<AxAIService<unknown, unknown>>
valuesAxRewriteIn
options?Readonly<AxProgramStreamingForwardOptions>

Returns

AsyncGenerator<{ delta: Partial<AxRewriteOut>; version: number; }, void, unknown>

Inherited from

AxGen.streamingForward

> AxDefaultResultReranker

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/docs/reranker.ts#L8

Extends

Constructors

new AxDefaultResultReranker()

new AxDefaultResultReranker(options?): AxDefaultResultReranker

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/docs/reranker.ts#L12

Parameters

ParameterType
options?Readonly<AxGenOptions>

Returns

AxDefaultResultReranker

Overrides

AxGen.constructor

Methods

_forward1()

_forward1(ai, values, options): AsyncGenerator<{ delta: Partial<AxRerankerOut>; version: number; }, void, unknown>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/generate.ts#L628

Parameters

ParameterType
aiReadonly<AxAIService<unknown, unknown>>
valuesAxRerankerIn
optionsReadonly<AxProgramForwardOptions>

Returns

AsyncGenerator<{ delta: Partial<AxRerankerOut>; version: number; }, void, unknown>

Inherited from

AxGen._forward1


addAssert()

addAssert(fn, message?): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/generate.ts#L133

Parameters

ParameterType
fn(values) => undefined | boolean | Promise<undefined | boolean>
message?string

Returns

void

Inherited from

AxGen.addAssert


addFieldProcessor()

addFieldProcessor(fieldName, fn): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/generate.ts#L180

Parameters

ParameterType
fieldNamestring
fnAxFieldProcessorProcess | AxStreamingFieldProcessorProcess

Returns

void

Inherited from

AxGen.addFieldProcessor


addStreamingAssert()

addStreamingAssert(fieldName, fn, message?): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/generate.ts#L137

Parameters

ParameterType
fieldNamestring
fn(content, done?) => undefined | boolean
message?string

Returns

void

Inherited from

AxGen.addStreamingAssert


addStreamingFieldProcessor()

addStreamingFieldProcessor(fieldName, fn): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/generate.ts#L173

Parameters

ParameterType
fieldNamestring
fnAxFieldProcessorProcess | AxStreamingFieldProcessorProcess

Returns

void

Inherited from

AxGen.addStreamingFieldProcessor


forward()

forward(ai, input, options?): Promise<AxRerankerOut>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/docs/reranker.ts#L19

Parameters

ParameterType
aiReadonly<AxAIService<unknown, unknown>>
inputReadonly<AxRerankerIn>
options?Readonly<AxProgramForwardOptions>

Returns

Promise<AxRerankerOut>

Overrides

AxGen.forward


getSignature()

getSignature(): AxSignature

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/program.ts#L135

Returns

AxSignature

Inherited from

AxGen.getSignature


getTraces()

getTraces(): AxProgramTrace[]

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/program.ts#L223

Returns

AxProgramTrace[]

Inherited from

AxGen.getTraces


getUsage()

getUsage(): AxTokenUsage & object[]

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/program.ts#L237

Returns

AxTokenUsage & object[]

Inherited from

AxGen.getUsage


register()

register(prog): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/program.ts#L139

Parameters

ParameterType
progReadonly<AxTunable & AxUsable>

Returns

void

Inherited from

AxGen.register


resetUsage()

resetUsage(): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/program.ts#L247

Returns

void

Inherited from

AxGen.resetUsage


setDemos()

setDemos(demos): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/program.ts#L254

Parameters

ParameterType
demosreadonly AxProgramDemos[]

Returns

void

Inherited from

AxGen.setDemos


setExamples()

setExamples(examples): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/program.ts#L182

Parameters

ParameterType
examplesReadonly<AxProgramExamples>

Returns

void

Inherited from

AxGen.setExamples


setId()

setId(id): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/program.ts#L169

Parameters

ParameterType
idstring

Returns

void

Inherited from

AxGen.setId


setParentId()

setParentId(parentId): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/program.ts#L176

Parameters

ParameterType
parentIdstring

Returns

void

Inherited from

AxGen.setParentId


streamingForward()

streamingForward(ai, values, options?): AsyncGenerator<{ delta: Partial<AxRerankerOut>; version: number; }, void, unknown>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/generate.ts#L700

Parameters

ParameterType
aiReadonly<AxAIService<unknown, unknown>>
valuesAxRerankerIn
options?Readonly<AxProgramStreamingForwardOptions>

Returns

AsyncGenerator<{ delta: Partial<AxRerankerOut>; version: number; }, void, unknown>

Inherited from

AxGen.streamingForward

> AxDockerSession

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/funcs/docker.ts#L56

Constructors

new AxDockerSession()

new AxDockerSession(apiUrl): AxDockerSession

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/funcs/docker.ts#L60

Parameters

ParameterTypeDefault value
apiUrlstring'http://localhost:2375'

Returns

AxDockerSession

Methods

connectToContainer()

connectToContainer(containerId): Promise<void>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/funcs/docker.ts#L186

Parameters

ParameterType
containerIdstring

Returns

Promise<void>


createContainer()

createContainer(__namedParameters): Promise<{ Id: string; }>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/funcs/docker.ts#L80

Parameters

ParameterType
__namedParametersReadonly<{ doNotPullImage: boolean; imageName: string; tag: string; volumes: object[]; }>

Returns

Promise<{ Id: string; }>


executeCommand()

executeCommand(command): Promise<string>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/funcs/docker.ts#L274

Parameters

ParameterType
commandstring

Returns

Promise<string>


findOrCreateContainer()

findOrCreateContainer(__namedParameters): Promise<{ Id: string; isNew: boolean; }>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/funcs/docker.ts#L128

Parameters

ParameterType
__namedParametersReadonly<{ 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/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/funcs/docker.ts#L263

Returns

Promise<string>


listContainers()

listContainers(all): Promise<AxDockerContainer[]>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/funcs/docker.ts#L256

Parameters

ParameterTypeDefault value
allbooleanfalse

Returns

Promise<AxDockerContainer[]>


pullImage()

pullImage(imageName): Promise<void>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/funcs/docker.ts#L64

Parameters

ParameterType
imageNamestring

Returns

Promise<void>


startContainer()

startContainer(): Promise<void>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/funcs/docker.ts#L169

Returns

Promise<void>


stopContainers()

stopContainers(__namedParameters): Promise<object[]>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/funcs/docker.ts#L198

Parameters

ParameterType
__namedParametersReadonly<{ remove: boolean; tag: string; timeout: number; }>

Returns

Promise<object[]>


toFunction()

toFunction(): AxFunction

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/funcs/docker.ts#L373

Returns

AxFunction

> AxEmbeddingAdapter

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/funcs/embed.ts#L7

Constructors

new AxEmbeddingAdapter()

new AxEmbeddingAdapter(__namedParameters): AxEmbeddingAdapter

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/funcs/embed.ts#L19

Parameters

ParameterType
__namedParametersReadonly<{ ai: AxAIService; func: (args, extra?) => 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/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/funcs/embed.ts#L57

Returns

AxFunction

> AxFunctionError

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/functions.ts#L15

Extends

  • Error

Constructors

new AxFunctionError()

new AxFunctionError(fields): AxFunctionError

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/functions.ts#L16

Parameters

ParameterType
fieldsobject[]

Returns

AxFunctionError

Overrides

Error.constructor

Properties

cause?

optional cause: unknown

Defined in: node_modules/typescript/lib/lib.es2022.error.d.ts:26

Inherited from

Error.cause


message

message: string

Defined in: node_modules/typescript/lib/lib.es5.d.ts:1077

Inherited from

Error.message


name

name: string

Defined in: node_modules/typescript/lib/lib.es5.d.ts:1076

Inherited from

Error.name


stack?

optional stack: string

Defined in: node_modules/typescript/lib/lib.es5.d.ts:1078

Inherited from

Error.stack


prepareStackTrace()?

static optional prepareStackTrace: (err, stackTraces) => any

Defined in: node_modules/@types/node/globals.d.ts:143

Optional override for formatting stack traces

Parameters

ParameterType
errError
stackTracesCallSite[]

Returns

any

See

https://v8.dev/docs/stack-trace-api#customizing-stack-traces

Inherited from

Error.prepareStackTrace


stackTraceLimit

static stackTraceLimit: number

Defined in: node_modules/@types/node/globals.d.ts:145

Inherited from

Error.stackTraceLimit

Methods

getFields()

getFields(): object[]

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/functions.ts#L26

Returns

object[]


captureStackTrace()

static captureStackTrace(targetObject, constructorOpt?): void

Defined in: node_modules/@types/node/globals.d.ts:136

Create .stack property on a target object

Parameters

ParameterType
targetObjectobject
constructorOpt?Function

Returns

void

Inherited from

Error.captureStackTrace

> AxFunctionProcessor

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/functions.ts#L73

Constructors

new AxFunctionProcessor()

new AxFunctionProcessor(funcList): AxFunctionProcessor

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/functions.ts#L76

Parameters

ParameterType
funcListreadonly AxFunction[]

Returns

AxFunctionProcessor

Methods

execute()

execute(func, options?): Promise<string>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/functions.ts#L116

Parameters

ParameterType
funcReadonly<AxChatResponseFunctionCall>
options?Readonly<AxAIServiceActionOptions>

Returns

Promise<string>

> AxGen

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/generate.ts#L100

Extends

Extended by

Type Parameters

Type ParameterDefault type
IN extends AxGenInAxGenIn
OUT extends AxGenerateResult<AxGenOut>AxGenerateResult<AxGenOut>

Constructors

new AxGen()

new AxGen<IN, OUT>(signature, options?): AxGen<IN, OUT>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/generate.ts#L113

Parameters

ParameterType
signatureReadonly<string | AxSignature>
options?Readonly<AxGenOptions>

Returns

AxGen<IN, OUT>

Overrides

AxProgramWithSignature.constructor

Methods

_forward1()

_forward1(ai, values, options): AsyncGenerator<{ delta: Partial<OUT>; version: number; }, void, unknown>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/generate.ts#L628

Parameters

ParameterType
aiReadonly<AxAIService<unknown, unknown>>
valuesIN
optionsReadonly<AxProgramForwardOptions>

Returns

AsyncGenerator<{ delta: Partial<OUT>; version: number; }, void, unknown>


addAssert()

addAssert(fn, message?): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/generate.ts#L133

Parameters

ParameterType
fn(values) => undefined | boolean | Promise<undefined | boolean>
message?string

Returns

void


addFieldProcessor()

addFieldProcessor(fieldName, fn): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/generate.ts#L180

Parameters

ParameterType
fieldNamestring
fnAxFieldProcessorProcess | AxStreamingFieldProcessorProcess

Returns

void


addStreamingAssert()

addStreamingAssert(fieldName, fn, message?): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/generate.ts#L137

Parameters

ParameterType
fieldNamestring
fn(content, done?) => undefined | boolean
message?string

Returns

void


addStreamingFieldProcessor()

addStreamingFieldProcessor(fieldName, fn): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/generate.ts#L173

Parameters

ParameterType
fieldNamestring
fnAxFieldProcessorProcess | AxStreamingFieldProcessorProcess

Returns

void


forward()

forward(ai, values, options?): Promise<OUT>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/generate.ts#L676

Parameters

ParameterType
aiReadonly<AxAIService<unknown, unknown>>
valuesIN
options?Readonly<AxProgramForwardOptions>

Returns

Promise<OUT>

Overrides

AxProgramWithSignature.forward


getSignature()

getSignature(): AxSignature

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/program.ts#L135

Returns

AxSignature

Inherited from

AxProgramWithSignature.getSignature


getTraces()

getTraces(): AxProgramTrace[]

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/program.ts#L223

Returns

AxProgramTrace[]

Inherited from

AxProgramWithSignature.getTraces


getUsage()

getUsage(): AxTokenUsage & object[]

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/program.ts#L237

Returns

AxTokenUsage & object[]

Inherited from

AxProgramWithSignature.getUsage


register()

register(prog): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/program.ts#L139

Parameters

ParameterType
progReadonly<AxTunable & AxUsable>

Returns

void

Inherited from

AxProgramWithSignature.register


resetUsage()

resetUsage(): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/program.ts#L247

Returns

void

Inherited from

AxProgramWithSignature.resetUsage


setDemos()

setDemos(demos): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/program.ts#L254

Parameters

ParameterType
demosreadonly AxProgramDemos[]

Returns

void

Inherited from

AxProgramWithSignature.setDemos


setExamples()

setExamples(examples): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/program.ts#L182

Parameters

ParameterType
examplesReadonly<AxProgramExamples>

Returns

void

Inherited from

AxProgramWithSignature.setExamples


setId()

setId(id): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/program.ts#L169

Parameters

ParameterType
idstring

Returns

void

Inherited from

AxProgramWithSignature.setId


setParentId()

setParentId(parentId): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/program.ts#L176

Parameters

ParameterType
parentIdstring

Returns

void

Inherited from

AxProgramWithSignature.setParentId


streamingForward()

streamingForward(ai, values, options?): AsyncGenerator<{ delta: Partial<OUT>; version: number; }, void, unknown>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/generate.ts#L700

Parameters

ParameterType
aiReadonly<AxAIService<unknown, unknown>>
valuesIN
options?Readonly<AxProgramStreamingForwardOptions>

Returns

AsyncGenerator<{ delta: Partial<OUT>; version: number; }, void, unknown>

Overrides

AxProgramWithSignature.streamingForward

> AxHFDataLoader

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/loader.ts#L5

Constructors

new AxHFDataLoader()

new AxHFDataLoader(__namedParameters): AxHFDataLoader

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/loader.ts#L14

Parameters

ParameterType
__namedParametersReadonly<{ 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/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/loader.ts#L67

Returns

AxDataRow[]


getRows()

getRows<T>(__namedParameters): Promise<T[]>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/loader.ts#L71

Type Parameters

Type Parameter
T

Parameters

ParameterType
__namedParametersReadonly<{ 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/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/loader.ts#L51

Returns

Promise<AxDataRow[]>


setData()

setData(rows): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/loader.ts#L63

Parameters

ParameterType
rowsAxDataRow[]

Returns

void

> AxJSInterpreter

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/funcs/code.ts#L29

Constructors

new AxJSInterpreter()

new AxJSInterpreter(__namedParameters): AxJSInterpreter

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/funcs/code.ts#L32

Parameters

ParameterType
__namedParametersundefined | Readonly<{ permissions: readonly AxJSInterpreterPermission[]; }>

Returns

AxJSInterpreter

Methods

toFunction()

toFunction(): AxFunction

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/funcs/code.ts#L67

Returns

AxFunction

> AxInstanceRegistry

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/registry.ts#L1

Type Parameters

Type Parameter
T

Constructors

new AxInstanceRegistry()

new AxInstanceRegistry<T>(): AxInstanceRegistry<T>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/registry.ts#L4

Returns

AxInstanceRegistry<T>

Methods

[iterator]()

[iterator](): Generator<T, void, unknown>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/registry.ts#L12

Returns

Generator<T, void, unknown>


register()

register(instance): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/registry.ts#L8

Parameters

ParameterType
instanceT

Returns

void

> AxMCPClient

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/mcp/client.ts#L59

Constructors

new AxMCPClient()

new AxMCPClient(transport, options): AxMCPClient

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/mcp/client.ts#L69

Parameters

ParameterType
transportAxMCPTransport
optionsReadonly<AxMCPClientOptions>

Returns

AxMCPClient

Methods

cancelRequest()

cancelRequest(id): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/mcp/client.ts#L193

Parameters

ParameterType
idstring

Returns

void


init()

init(): Promise<void>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/mcp/client.ts#L74

Returns

Promise<void>


ping()

ping(timeout): Promise<void>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/mcp/client.ts#L168

Parameters

ParameterTypeDefault value
timeoutnumber3000

Returns

Promise<void>


toFunction()

toFunction(): AxFunction[]

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/mcp/client.ts#L189

Returns

AxFunction[]

> AxMCPHTTPTransport

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/mcp/httpTransport.ts#L8

Implements

Constructors

new AxMCPHTTPTransport()

new AxMCPHTTPTransport(sseUrl): AxMCPHTTPTransport

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/mcp/httpTransport.ts#L13

Parameters

ParameterType
sseUrlstring

Returns

AxMCPHTTPTransport

Methods

connect()

connect(): Promise<void>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/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

AxMCPTransport.connect


send()

send(message): Promise<JSONRPCResponse<unknown>>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/mcp/httpTransport.ts#L41

Sends a JSON-RPC request or notification and returns the response

Parameters

ParameterTypeDescription
messageJSONRPCNotification | 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

AxMCPTransport.send


sendNotification()

sendNotification(message): Promise<void>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/mcp/httpTransport.ts#L63

Sends a JSON-RPC notification

Parameters

ParameterTypeDescription
messageReadonly<JSONRPCNotification>The JSON-RPC notification to send

Returns

Promise<void>

Implementation of

AxMCPTransport.sendNotification

> AxMemory

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/mem/memory.ts#L180

Implements

Constructors

new AxMemory()

new AxMemory(limit, options?): AxMemory

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/mem/memory.ts#L184

Parameters

ParameterTypeDefault value
limitnumberdefaultLimit
options?{ debug: boolean; debugHideSystemPrompt: boolean; }undefined
options.debug?booleanundefined
options.debugHideSystemPrompt?booleanundefined

Returns

AxMemory

Methods

add()

add(value, sessionId?): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/mem/memory.ts#L206

Parameters

ParameterType
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"; } | ({ 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

AxAIMemory.add


addResult()

addResult(result, sessionId?): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/mem/memory.ts#L213

Parameters

ParameterType
resultReadonly<AxChatResponseResult>
sessionId?string

Returns

void

Implementation of

AxAIMemory.addResult


addTag()

addTag(name, sessionId?): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/mem/memory.ts#L224

Parameters

ParameterType
namestring
sessionId?string

Returns

void

Implementation of

AxAIMemory.addTag


getLast()

getLast(sessionId?): undefined | { chat: { 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"; }; tags: string[]; }

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/mem/memory.ts#L236

Parameters

ParameterType
sessionId?string

Returns

undefined | { chat: { 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"; }; tags: string[]; }

Implementation of

AxAIMemory.getLast


history()

history(sessionId?): ({ 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/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/mem/memory.ts#L232

Parameters

ParameterType
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

AxAIMemory.history


reset()

reset(sessionId?): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/mem/memory.ts#L240

Parameters

ParameterType
sessionId?string

Returns

void

Implementation of

AxAIMemory.reset


rewindToTag()

rewindToTag(name, sessionId?): ({ 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/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/mem/memory.ts#L228

Parameters

ParameterType
namestring
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

AxAIMemory.rewindToTag


updateResult()

updateResult(result, sessionId?): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/mem/memory.ts#L217

Parameters

ParameterType
resultReadonly<AxChatResponseResult>
sessionId?string

Returns

void

Implementation of

AxAIMemory.updateResult

> AxMCPStdioTransport

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/mcp/stdioTransport.ts#L17

Implements

Constructors

new AxMCPStdioTransport()

new AxMCPStdioTransport(config): AxMCPStdioTransport

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/mcp/stdioTransport.ts#L25

Parameters

ParameterType
configReadonly<StdioTransportConfig>

Returns

AxMCPStdioTransport

Methods

connect()

connect(): Promise<void>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/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

AxMCPTransport.connect


send()

send(message): Promise<JSONRPCResponse<unknown>>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/mcp/stdioTransport.ts#L40

Sends a JSON-RPC request or notification and returns the response

Parameters

ParameterTypeDescription
messageReadonly<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

AxMCPTransport.send


sendNotification()

sendNotification(message): Promise<void>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/mcp/stdioTransport.ts#L51

Sends a JSON-RPC notification

Parameters

ParameterTypeDescription
messageReadonly<JSONRPCNotification>The JSON-RPC notification to send

Returns

Promise<void>

Implementation of

AxMCPTransport.sendNotification

> AxMiPRO

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/mipro.ts#L43

Type Parameters

Type ParameterDefault type
IN extends AxGenInAxGenIn
OUT extends AxGenOutAxGenOut

Constructors

new AxMiPRO()

new AxMiPRO<IN, OUT>(__namedParameters): AxMiPRO<IN, OUT>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/mipro.ts#L69

Parameters

ParameterType
__namedParametersReadonly<AxOptimizerArgs<IN, OUT>> & object

Returns

AxMiPRO<IN, OUT>

Methods

compile()

compile(metricFn, options?): Promise<Readonly<AxProgram<IN, OUT>>>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/mipro.ts#L794

The main compile method to run MIPROv2 optimization

Parameters

ParameterTypeDescription
metricFnAxMetricFnEvaluation metric function
options?Readonly<{ auto: "medium" | "light" | "heavy"; teacher: Readonly<AxProgram<IN, OUT>>; valset: readonly AxExample[]; }>Optional configuration options

Returns

Promise<Readonly<AxProgram<IN, OUT>>>

The optimized program


configureAuto()

configureAuto(level): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/mipro.ts#L120

Configures the optimizer for light, medium, or heavy optimization

Parameters

ParameterTypeDescription
level"medium" | "light" | "heavy"The optimization level: “light”, “medium”, or “heavy”

Returns

void

> AxMultiServiceRouter

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/multiservice.ts#L23

Implements

Constructors

new AxMultiServiceRouter()

new AxMultiServiceRouter(services): AxMultiServiceRouter

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/multiservice.ts#L39

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

ParameterType
services(AxAIService<unknown, unknown> | AxAIServiceListItem)[]

Returns

AxMultiServiceRouter

Methods

chat()

chat(req, options?): Promise<AxChatResponse | ReadableStream<AxChatResponse>>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/multiservice.ts#L93

Delegates the chat call to the service matching the provided model key.

Parameters

ParameterType
reqReadonly<AxChatRequest<string>>
options?Readonly<AxAIPromptConfig & AxAIServiceActionOptions<string, string>>

Returns

Promise<AxChatResponse | ReadableStream<AxChatResponse>>

Implementation of

AxAIService.chat


embed()

embed(req, options?): Promise<AxEmbedResponse>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/multiservice.ts#L117

Delegates the embed call to the service matching the provided embed model key.

Parameters

ParameterType
reqReadonly<AxEmbedRequest<string>>
options?Readonly<AxAIServiceActionOptions<string, string>>

Returns

Promise<AxEmbedResponse>

Implementation of

AxAIService.embed


getDefaultModels()

getDefaultModels(): Readonly<{ embedModel: string; model: string; }>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/multiservice.ts#L169

Returns

Readonly<{ embedModel: string; model: string; }>

Implementation of

AxAIService.getDefaultModels


getFeatures()

getFeatures(model?): object

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/multiservice.ts#L179

If a model key is provided, delegate to the corresponding service’s features. Otherwise, returns a default feature set.

Parameters

ParameterType
model?string

Returns

object

functionCot?

optional functionCot: boolean

functions

functions: boolean

streaming

streaming: boolean

Implementation of

AxAIService.getFeatures


getId()

getId(): string

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/multiservice.ts#L140

Returns a composite ID built from the IDs of the underlying services.

Returns

string

Implementation of

AxAIService.getId


getMetrics()

getMetrics(): AxAIServiceMetrics

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/multiservice.ts#L198

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

AxAIServiceMetrics

Implementation of

AxAIService.getMetrics


getModelList()

getModelList(): AxAIModelList

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/multiservice.ts#L159

Aggregates all available models across the underlying services.

Returns

AxAIModelList

Implementation of

AxAIService.getModelList


getName()

getName(): string

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/multiservice.ts#L152

Returns the name of this router.

Returns

string

Implementation of

AxAIService.getName


getOptions()

getOptions(): Readonly<AxAIServiceOptions>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/multiservice.ts#L219

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

AxAIService.getOptions


setOptions()

setOptions(options): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/multiservice.ts#L209

Sets options on all underlying services.

Parameters

ParameterType
optionsReadonly<AxAIServiceOptions>

Returns

void

Implementation of

AxAIService.setOptions

> AxMockAIService

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/mock/api.ts#L46

Implements

Constructors

new AxMockAIService()

new AxMockAIService(config): AxMockAIService

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/mock/api.ts#L58

Parameters

ParameterType
configAxMockAIServiceConfig

Returns

AxMockAIService

Methods

chat()

chat(req, options?): Promise<AxChatResponse | ReadableStream<AxChatResponse>>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/mock/api.ts#L93

Parameters

ParameterType
reqReadonly<AxChatRequest<unknown>>
options?Readonly<AxAIPromptConfig & AxAIServiceActionOptions<unknown, unknown>>

Returns

Promise<AxChatResponse | ReadableStream<AxChatResponse>>

Implementation of

AxAIService.chat


embed()

embed(req, _options?): Promise<AxEmbedResponse>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/mock/api.ts#L131

Parameters

ParameterType
reqReadonly<AxEmbedRequest>
_options?Readonly<AxAIServiceActionOptions>

Returns

Promise<AxEmbedResponse>

Implementation of

AxAIService.embed


getDefaultModels()

getDefaultModels(): Readonly<{ embedModel: string; model: string; }>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/mock/api.ts#L82

Returns

Readonly<{ embedModel: string; model: string; }>

Implementation of

AxAIService.getDefaultModels


getFeatures()

getFeatures(_model?): object

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/mock/api.ts#L71

Parameters

ParameterType
_model?string

Returns

object

functions

functions: boolean

streaming

streaming: boolean

Implementation of

AxAIService.getFeatures


getId()

getId(): string

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/mock/api.ts#L66

Returns

string

Implementation of

AxAIService.getId


getMetrics()

getMetrics(): AxAIServiceMetrics

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/mock/api.ts#L89

Returns

AxAIServiceMetrics

Implementation of

AxAIService.getMetrics


getModelList()

getModelList(): undefined | AxAIModelList

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/mock/api.ts#L78

Returns

undefined | AxAIModelList

Implementation of

AxAIService.getModelList


getName()

getName(): string

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/mock/api.ts#L62

Returns

string

Implementation of

AxAIService.getName


getOptions()

getOptions(): Readonly<AxAIServiceOptions>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/mock/api.ts#L166

Returns

Readonly<AxAIServiceOptions>

Implementation of

AxAIService.getOptions


setOptions()

setOptions(options): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/mock/api.ts#L162

Parameters

ParameterType
optionsReadonly<AxAIServiceOptions>

Returns

void

Implementation of

AxAIService.setOptions

> AxProgramWithSignature

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/program.ts#L107

Extended by

Type Parameters

Type Parameter
IN extends AxGenIn
OUT extends AxGenOut

Implements

Constructors

new AxProgramWithSignature()

new AxProgramWithSignature<IN, OUT>(signature, options?): AxProgramWithSignature<IN, OUT>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/program.ts#L121

Parameters

ParameterType
signatureReadonly<string | AxSignature>
options?Readonly<AxProgramWithSignatureOptions>

Returns

AxProgramWithSignature<IN, OUT>

Methods

forward()

forward(_ai, _values, _options?): Promise<OUT>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/program.ts#L146

Parameters

ParameterType
_aiReadonly<AxAIService<unknown, unknown>>
_valuesIN
_options?Readonly<AxProgramForwardOptions>

Returns

Promise<OUT>


getSignature()

getSignature(): AxSignature

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/program.ts#L135

Returns

AxSignature


getTraces()

getTraces(): AxProgramTrace[]

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/program.ts#L223

Returns

AxProgramTrace[]

Implementation of

AxTunable.getTraces


getUsage()

getUsage(): AxTokenUsage & object[]

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/program.ts#L237

Returns

AxTokenUsage & object[]

Implementation of

AxUsable.getUsage


register()

register(prog): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/program.ts#L139

Parameters

ParameterType
progReadonly<AxTunable & AxUsable>

Returns

void


resetUsage()

resetUsage(): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/program.ts#L247

Returns

void

Implementation of

AxUsable.resetUsage


setDemos()

setDemos(demos): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/program.ts#L254

Parameters

ParameterType
demosreadonly AxProgramDemos[]

Returns

void

Implementation of

AxTunable.setDemos


setExamples()

setExamples(examples): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/program.ts#L182

Parameters

ParameterType
examplesReadonly<AxProgramExamples>

Returns

void

Implementation of

AxTunable.setExamples


setId()

setId(id): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/program.ts#L169

Parameters

ParameterType
idstring

Returns

void

Implementation of

AxTunable.setId


setParentId()

setParentId(parentId): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/program.ts#L176

Parameters

ParameterType
parentIdstring

Returns

void

Implementation of

AxTunable.setParentId


streamingForward()

streamingForward(_ai, _values, _options?): AxGenStreamingOut<OUT>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/program.ts#L158

Parameters

ParameterType
_aiReadonly<AxAIService<unknown, unknown>>
_valuesIN
_options?Readonly<AxProgramStreamingForwardOptions>

Returns

AxGenStreamingOut<OUT>

> AxPromptTemplate

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/prompt.ts#L35

Constructors

new AxPromptTemplate()

new AxPromptTemplate(sig, functions?, fieldTemplates?): AxPromptTemplate

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/prompt.ts#L40

Parameters

ParameterType
sigReadonly<AxSignature>
functions?readonly (AxFunction | { toFunction: () => AxFunction | AxFunction[]; })[]
fieldTemplates?Record<string, AxFieldTemplateFn>

Returns

AxPromptTemplate

Methods

render()

render<T>(values, __namedParameters): ({ 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/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/prompt.ts#L93

Type Parameters

Type Parameter
T extends Record<string, AxFieldValue>

Parameters

ParameterType
valuesT
__namedParametersReadonly<{ 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"; } | { cache: boolean; functionId: string; isError: boolean; result: string; role: "function"; })[]


renderExtraFields()

renderExtraFields(extraFields): ({ 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/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/prompt.ts#L158

Parameters

ParameterType
extraFieldsreadonly 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"; })[]

> AxRAG

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/prompts/rag.ts#L12

Extends

  • AxChainOfThought<{ context: string[]; question: string; }, { answer: string; }>

Constructors

new AxRAG()

new AxRAG(queryFn, options): AxRAG

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/prompts/rag.ts#L23

Parameters

ParameterType
queryFn(query) => Promise<string>
optionsReadonly<AxGenOptions & object>

Returns

AxRAG

Overrides

AxChainOfThought.constructor

Methods

_forward1()

_forward1(ai, values, options): AsyncGenerator<{ delta: Partial<object & object>; version: number; }, void, unknown>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/generate.ts#L628

Parameters

ParameterType
aiReadonly<AxAIService<unknown, unknown>>
values{ context: string[]; question: string; }
values.contextstring[]
values.questionstring
optionsReadonly<AxProgramForwardOptions>

Returns

AsyncGenerator<{ delta: Partial<object & object>; version: number; }, void, unknown>

Inherited from

AxChainOfThought._forward1


addAssert()

addAssert(fn, message?): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/generate.ts#L133

Parameters

ParameterType
fn(values) => undefined | boolean | Promise<undefined | boolean>
message?string

Returns

void

Inherited from

AxChainOfThought.addAssert


addFieldProcessor()

addFieldProcessor(fieldName, fn): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/generate.ts#L180

Parameters

ParameterType
fieldNamestring
fnAxFieldProcessorProcess | AxStreamingFieldProcessorProcess

Returns

void

Inherited from

AxChainOfThought.addFieldProcessor


addStreamingAssert()

addStreamingAssert(fieldName, fn, message?): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/generate.ts#L137

Parameters

ParameterType
fieldNamestring
fn(content, done?) => undefined | boolean
message?string

Returns

void

Inherited from

AxChainOfThought.addStreamingAssert


addStreamingFieldProcessor()

addStreamingFieldProcessor(fieldName, fn): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/generate.ts#L173

Parameters

ParameterType
fieldNamestring
fnAxFieldProcessorProcess | AxStreamingFieldProcessorProcess

Returns

void

Inherited from

AxChainOfThought.addStreamingFieldProcessor


forward()

forward(ai, __namedParameters, options?): Promise<{ answer: string; reason: string; }>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/prompts/rag.ts#L44

Parameters

ParameterType
aiReadonly<AxAIService<unknown, unknown>>
__namedParametersReadonly<{ question: string; }>
options?Readonly<AxProgramForwardOptions>

Returns

Promise<{ answer: string; reason: string; }>

Overrides

AxChainOfThought.forward


getSignature()

getSignature(): AxSignature

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/program.ts#L135

Returns

AxSignature

Inherited from

AxChainOfThought.getSignature


getTraces()

getTraces(): AxProgramTrace[]

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/program.ts#L223

Returns

AxProgramTrace[]

Inherited from

AxChainOfThought.getTraces


getUsage()

getUsage(): AxTokenUsage & object[]

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/program.ts#L237

Returns

AxTokenUsage & object[]

Inherited from

AxChainOfThought.getUsage


register()

register(prog): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/program.ts#L139

Parameters

ParameterType
progReadonly<AxTunable & AxUsable>

Returns

void

Inherited from

AxChainOfThought.register


resetUsage()

resetUsage(): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/program.ts#L247

Returns

void

Inherited from

AxChainOfThought.resetUsage


setDemos()

setDemos(demos): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/program.ts#L254

Parameters

ParameterType
demosreadonly AxProgramDemos[]

Returns

void

Inherited from

AxChainOfThought.setDemos


setExamples()

setExamples(examples): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/program.ts#L182

Parameters

ParameterType
examplesReadonly<AxProgramExamples>

Returns

void

Inherited from

AxChainOfThought.setExamples


setId()

setId(id): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/program.ts#L169

Parameters

ParameterType
idstring

Returns

void

Inherited from

AxChainOfThought.setId


setParentId()

setParentId(parentId): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/program.ts#L176

Parameters

ParameterType
parentIdstring

Returns

void

Inherited from

AxChainOfThought.setParentId


streamingForward()

streamingForward(ai, values, options?): AsyncGenerator<{ delta: Partial<object & object>; version: number; }, void, unknown>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/generate.ts#L700

Parameters

ParameterType
aiReadonly<AxAIService<unknown, unknown>>
values{ context: string[]; question: string; }
values.contextstring[]
values.question?string
options?Readonly<AxProgramStreamingForwardOptions>

Returns

AsyncGenerator<{ delta: Partial<object & object>; version: number; }, void, unknown>

Inherited from

AxChainOfThought.streamingForward

> AxProgram

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/program.ts#L267

Type Parameters

Type Parameter
IN extends AxGenIn
OUT extends AxGenOut

Implements

Constructors

new AxProgram()

new AxProgram<IN, OUT>(): AxProgram<IN, OUT>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/program.ts#L276

Returns

AxProgram<IN, OUT>

Methods

forward()

forward(_ai, _values, _options?): Promise<OUT>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/program.ts#L288

Parameters

ParameterType
_aiReadonly<AxAIService<unknown, unknown>>
_valuesIN
_options?Readonly<AxProgramForwardOptions>

Returns

Promise<OUT>


getTraces()

getTraces(): AxProgramTrace[]

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/program.ts#L334

Returns

AxProgramTrace[]

Implementation of

AxTunable.getTraces


getUsage()

getUsage(): AxTokenUsage & object[]

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/program.ts#L348

Returns

AxTokenUsage & object[]

Implementation of

AxUsable.getUsage


register()

register(prog): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/program.ts#L281

Parameters

ParameterType
progReadonly<AxTunable & AxUsable>

Returns

void


resetUsage()

resetUsage(): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/program.ts#L358

Returns

void

Implementation of

AxUsable.resetUsage


setDemos()

setDemos(demos): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/program.ts#L365

Parameters

ParameterType
demosreadonly AxProgramDemos[]

Returns

void

Implementation of

AxTunable.setDemos


setExamples()

setExamples(examples): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/program.ts#L324

Parameters

ParameterType
examplesReadonly<AxProgramExamples>

Returns

void

Implementation of

AxTunable.setExamples


setId()

setId(id): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/program.ts#L311

Parameters

ParameterType
idstring

Returns

void

Implementation of

AxTunable.setId


setParentId()

setParentId(parentId): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/program.ts#L318

Parameters

ParameterType
parentIdstring

Returns

void

Implementation of

AxTunable.setParentId


streamingForward()

streamingForward(_ai, _values, _options?): AxGenStreamingOut<OUT>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/program.ts#L300

Parameters

ParameterType
_aiReadonly<AxAIService<unknown, unknown>>
_valuesIN
_options?Readonly<AxProgramStreamingForwardOptions>

Returns

AxGenStreamingOut<OUT>

> AxRateLimiterTokenUsage

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/util/rate-limit.ts#L9

Constructors

new AxRateLimiterTokenUsage()

new AxRateLimiterTokenUsage(maxTokens, refillRate, options?): AxRateLimiterTokenUsage

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/util/rate-limit.ts#L16

Parameters

ParameterType
maxTokensnumber
refillRatenumber
options?Readonly<AxRateLimiterTokenUsageOptions>

Returns

AxRateLimiterTokenUsage

Methods

acquire()

acquire(tokens): Promise<void>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/util/rate-limit.ts#L56

Parameters

ParameterType
tokensnumber

Returns

Promise<void>

> AxSimpleClassifier

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/router.ts#L29

Constructors

new AxSimpleClassifier()

new AxSimpleClassifier(ai): AxSimpleClassifier

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/router.ts#L35

Parameters

ParameterType
aiAxAIService

Returns

AxSimpleClassifier

Methods

forward()

forward(text, options?): Promise<string>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/router.ts#L61

Parameters

ParameterType
textstring
options?Readonly<AxSimpleClassifierForwardOptions>

Returns

Promise<string>


getState()

getState(): undefined | AxDBState

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/router.ts#L40

Returns

undefined | AxDBState


setClasses()

setClasses(classes): Promise<void>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/router.ts#L48

Parameters

ParameterType
classesreadonly AxSimpleClassifierClass[]

Returns

Promise<void>


setOptions()

setOptions(options): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/router.ts#L96

Parameters

ParameterType
optionsReadonly<{ debug: boolean; }>

Returns

void


setState()

setState(state): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/router.ts#L44

Parameters

ParameterType
stateAxDBState

Returns

void

> AxSignature

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/sig.ts#L37

Constructors

new AxSignature()

new AxSignature(signature?): AxSignature

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/sig.ts#L45

Parameters

ParameterType
signature?Readonly<string | AxSignature>

Returns

AxSignature

Methods

addInputField()

addInputField(field): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/sig.ts#L118

Parameters

ParameterType
fieldReadonly<AxField>

Returns

void


addOutputField()

addOutputField(field): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/sig.ts#L123

Parameters

ParameterType
fieldReadonly<AxField>

Returns

void


getDescription()

getDescription(): undefined | string

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/sig.ts#L140

Returns

undefined | string


getInputFields()

getInputFields(): readonly AxIField[]

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/sig.ts#L138

Returns

readonly AxIField[]


getOutputFields()

getOutputFields(): readonly AxIField[]

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/sig.ts#L139

Returns

readonly AxIField[]


hash()

hash(): string

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/sig.ts#L210

Returns

string


setDescription()

setDescription(desc): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/sig.ts#L113

Parameters

ParameterType
descstring

Returns

void


setInputFields()

setInputFields(fields): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/sig.ts#L128

Parameters

ParameterType
fieldsreadonly AxField[]

Returns

void


setOutputFields()

setOutputFields(fields): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/sig.ts#L133

Parameters

ParameterType
fieldsreadonly AxField[]

Returns

void


toJSONSchema()

toJSONSchema(): AxFunctionJSONSchema

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/sig.ts#L148

Returns

AxFunctionJSONSchema


toString()

toString(): string

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/sig.ts#L212

Returns

string

> AxSimpleClassifierClass

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/router.ts#L11

Constructors

new AxSimpleClassifierClass()

new AxSimpleClassifierClass(name, context): AxSimpleClassifierClass

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/router.ts#L15

Parameters

ParameterType
namestring
contextreadonly string[]

Returns

AxSimpleClassifierClass

Methods

getContext()

getContext(): readonly string[]

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/router.ts#L24

Returns

readonly string[]


getName()

getName(): string

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/router.ts#L20

Returns

string

> AxTestPrompt

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/evaluate.ts#L13

Type Parameters

Type ParameterDefault type
IN extends AxGenInAxGenIn
OUT extends AxGenOutAxGenOut

Constructors

new AxTestPrompt()

new AxTestPrompt<IN, OUT>(__namedParameters): AxTestPrompt<IN, OUT>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/evaluate.ts#L21

Parameters

ParameterType
__namedParametersReadonly<AxEvaluateArgs<IN, OUT>>

Returns

AxTestPrompt<IN, OUT>

Methods

run()

run(metricFn): Promise<void>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/evaluate.ts#L34

Parameters

ParameterType
metricFnAxMetricFn

Returns

Promise<void>

> AxAIAnthropicModel

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/anthropic/types.ts#L3

Enumeration Members

Claude21

Claude21: "claude-2.1"

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/anthropic/types.ts#L13


Claude35Haiku

Claude35Haiku: "claude-3-5-haiku-latest"

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/anthropic/types.ts#L7


Claude35Sonnet

Claude35Sonnet: "claude-3-5-sonnet-latest"

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/anthropic/types.ts#L6


Claude37Sonnet

Claude37Sonnet: "claude-3-7-sonnet-latest"

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/anthropic/types.ts#L4


Claude3Haiku

Claude3Haiku: "claude-3-haiku-20240307"

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/anthropic/types.ts#L11


Claude3Opus

Claude3Opus: "claude-3-opus-latest"

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/anthropic/types.ts#L9


Claude3Sonnet

Claude3Sonnet: "claude-3-sonnet-20240229"

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/anthropic/types.ts#L10


ClaudeInstant12

ClaudeInstant12: "claude-instant-1.2"

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/anthropic/types.ts#L14

> AxAIAnthropicVertexModel

> AxAICohereEmbedModel

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/cohere/types.ts#L16

Cohere: Models for use in embeddings

Enumeration Members

EmbedEnglishLightV30

EmbedEnglishLightV30: "embed-english-light-v3.0"

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/cohere/types.ts#L18


EmbedEnglishV30

EmbedEnglishV30: "embed-english-v3.0"

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/cohere/types.ts#L17


EmbedMultiLingualLightV30

EmbedMultiLingualLightV30: "embed-multilingual-light-v3.0"

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/cohere/types.ts#L20


EmbedMultiLingualV30

EmbedMultiLingualV30: "embed-multilingual-v3.0"

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/cohere/types.ts#L19

> AxAICohereModel

> AxAIDeepSeekModel

> AxAIGoogleGeminiEmbedModel

> AxAIGoogleGeminiModel

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/google-gemini/types.ts#L3

Enumeration Members

AQA

AQA: "aqa"

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/google-gemini/types.ts#L14


Gemini15Flash

Gemini15Flash: "gemini-1.5-flash"

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/google-gemini/types.ts#L9


Gemini15Flash002

Gemini15Flash002: "gemini-1.5-flash-002"

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/google-gemini/types.ts#L10


Gemini15Flash8B

Gemini15Flash8B: "gemini-1.5-flash-8b"

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/google-gemini/types.ts#L11


Gemini15Pro

Gemini15Pro: "gemini-1.5-pro"

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/google-gemini/types.ts#L12


Gemini1Pro

Gemini1Pro: "gemini-1.0-pro"

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/google-gemini/types.ts#L8


Gemini20Flash

Gemini20Flash: "gemini-2.0-flash"

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/google-gemini/types.ts#L5


Gemini20FlashLite

Gemini20FlashLite: "gemini-2.0-flash-lite-preview-02-05"

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/google-gemini/types.ts#L6


Gemini20FlashThinking

Gemini20FlashThinking: "gemini-2.0-flash-thinking-exp-01-21"

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/google-gemini/types.ts#L7


Gemini20Pro

Gemini20Pro: "gemini-2.0-pro-exp-02-05"

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/google-gemini/types.ts#L4


Gemma2

Gemma2: "gemma-2-27b-it"

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/google-gemini/types.ts#L13

> AxAIGoogleGeminiSafetyCategory

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/google-gemini/types.ts#L22

Enumeration Members

HarmCategoryDangerousContent

HarmCategoryDangerousContent: "HARM_CATEGORY_DANGEROUS_CONTENT"

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/google-gemini/types.ts#L26


HarmCategoryHarassment

HarmCategoryHarassment: "HARM_CATEGORY_HARASSMENT"

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/google-gemini/types.ts#L23


HarmCategoryHateSpeech

HarmCategoryHateSpeech: "HARM_CATEGORY_HATE_SPEECH"

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/google-gemini/types.ts#L24


HarmCategorySexuallyExplicit

HarmCategorySexuallyExplicit: "HARM_CATEGORY_SEXUALLY_EXPLICIT"

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/google-gemini/types.ts#L25

> AxAIGoogleGeminiSafetyThreshold

> AxAIGroqModel

> AxAIHuggingFaceModel

> AxAIMistralEmbedModels

> AxAIMistralModel

> AxAIOpenAIModel

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/openai/types.ts#L3

Enumeration Members

GPT35TextDavinci002

GPT35TextDavinci002: "text-davinci-002"

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/openai/types.ts#L15


GPT35Turbo

GPT35Turbo: "gpt-3.5-turbo"

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/openai/types.ts#L13


GPT35TurboInstruct

GPT35TurboInstruct: "gpt-3.5-turbo-instruct"

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/openai/types.ts#L14


GPT3TextAda001

GPT3TextAda001: "text-ada-001"

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/openai/types.ts#L17


GPT3TextBabbage002

GPT3TextBabbage002: "text-babbage-002"

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/openai/types.ts#L16


GPT4

GPT4: "gpt-4"

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/openai/types.ts#L7


GPT45

GPT45: "gpt-4.5-preview"

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/openai/types.ts#L8


GPT4ChatGPT4O

GPT4ChatGPT4O: "chatgpt-4o-latest"

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/openai/types.ts#L11


GPT4O

GPT4O: "gpt-4o"

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/openai/types.ts#L9


GPT4OMini

GPT4OMini: "gpt-4o-mini"

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/openai/types.ts#L10


GPT4Turbo

GPT4Turbo: "gpt-4-turbo"

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/openai/types.ts#L12


O1

O1: "o1"

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/openai/types.ts#L4


O1Mini

O1Mini: "o1-mini"

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/openai/types.ts#L5


O3Mini

O3Mini: "o3-mini"

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/openai/types.ts#L6

> AxAIOpenAIEmbedModel

> AxAIRekaModel

> AxJSInterpreterPermission

> AxSpanKindValues

> AxLLMRequestTypeValues

> axAIAnthropicDefaultConfig

> axAIAzureOpenAIBestConfig

> axAIAzureOpenAICreativeConfig

> axAIAzureOpenAIDefaultConfig

> axAIAzureOpenAIFastConfig

> axAICohereCreativeConfig

> axAICohereDefaultConfig

> axAIDeepSeekCodeConfig

axAIDeepSeekCodeConfig(): DeepSeekConfig

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/deepseek/api.ts#L19

Returns

DeepSeekConfig

> axAIDeepSeekDefaultConfig

axAIDeepSeekDefaultConfig(): DeepSeekConfig

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/deepseek/api.ts#L13

Returns

DeepSeekConfig

> axAIGoogleGeminiDefaultConfig

axAIGoogleGeminiDefaultConfig(): AxAIGoogleGeminiConfig

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/google-gemini/api.ts#L60

AxAIGoogleGemini: Default Model options for text generation

Returns

AxAIGoogleGeminiConfig

> axAIGoogleGeminiDefaultCreativeConfig

> axAIHuggingFaceCreativeConfig

> axAIHuggingFaceDefaultConfig

> axAIMistralBestConfig

axAIMistralBestConfig(): AxAIMistralConfig

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/mistral/api.ts#L20

Returns

AxAIMistralConfig

> axAIMistralDefaultConfig

axAIMistralDefaultConfig(): AxAIMistralConfig

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/mistral/api.ts#L14

Returns

AxAIMistralConfig

> axAIOllamaDefaultConfig

> axAIOpenAIBestConfig

> axAIOllamaDefaultCreativeConfig

> axAIOpenAICreativeConfig

> axAIOpenAIDefaultConfig

> axAIOpenAIFastConfig

> axAIRekaBestConfig

> axAIRekaCreativeConfig

> axAIRekaDefaultConfig

> axAIRekaFastConfig

> axAITogetherDefaultConfig

axAITogetherDefaultConfig(): TogetherAIConfig

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/together/api.ts#L9

Returns

TogetherAIConfig

> axBaseAIDefaultConfig

> axBaseAIDefaultCreativeConfig

> AxAIAnthropicArgs

> AxAIAnthropicContentBlockDeltaEvent

> AxAIAnthropicContentBlockStartEvent

> AxAIAnthropicContentBlockStopEvent

> AxAIAnthropicErrorEvent

> AxAIAnthropicMessageDeltaEvent

> AxAIAnthropicMessageStartEvent

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/anthropic/types.ts#L143

Properties

message

message: object

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/anthropic/types.ts#L145

content

content: []

id

id: string

model

model: string

role

role: "assistant"

stop_reason

stop_reason: null | string

stop_sequence

stop_sequence: null | string

type

type: "message"

usage

{ input_tokens: number; output_tokens: number; }


type

type: "message_start"

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/anthropic/types.ts#L144

> AxAIAnthropicMessageStopEvent

> AxAIAnthropicPingEvent

> AxAICohereArgs

> AxAIFeatures

> AxAIGoogleGeminiArgs

> AxAIGoogleGeminiOptionsTools

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/google-gemini/api.ts#L77

Properties

codeExecution?

optional codeExecution: boolean

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/google-gemini/api.ts#L78


googleSearch?

optional googleSearch: boolean

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/google-gemini/api.ts#L83


googleSearchRetrieval?

optional googleSearchRetrieval: object

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/google-gemini/api.ts#L79

dynamicThreshold?

optional dynamicThreshold: number

mode?

optional mode: "MODE_DYNAMIC"

> AxAIHuggingFaceArgs

> AxAIMemory

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/mem/types.ts#L3

Methods

add()

add(result, sessionId?): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/mem/types.ts#L4

Parameters

ParameterType
resultreadonly ({ 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"; })[] | Readonly<{ 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


addResult()

addResult(result, sessionId?): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/mem/types.ts#L10

Parameters

ParameterType
resultReadonly<AxChatResponseResult>
sessionId?string

Returns

void


addTag()

addTag(name, sessionId?): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/mem/types.ts#L25

Parameters

ParameterType
namestring
sessionId?string

Returns

void


getLast()

getLast(sessionId?): undefined | { chat: { 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"; }; tags: string[]; }

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/mem/types.ts#L21

Parameters

ParameterType
sessionId?string

Returns

undefined | { chat: { 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"; }; tags: string[]; }


history()

history(sessionId?): ({ 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/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/mem/types.ts#L18

Parameters

ParameterType
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?): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/mem/types.ts#L19

Parameters

ParameterType
sessionId?string

Returns

void


rewindToTag()

rewindToTag(name, sessionId?): ({ 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/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/mem/types.ts#L26

Parameters

ParameterType
namestring
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"; })[]


updateResult()

updateResult(result, sessionId?): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/mem/types.ts#L11

Parameters

ParameterType
resultReadonly<AxChatResponseResult> & object
sessionId?string

Returns

void

> AxAIOpenAIArgs

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/openai/api.ts#L70

Extends

Type Parameters

Type ParameterDefault type
TName"openai"
TModelAxAIOpenAIModel
TEmbedModelAxAIOpenAIEmbedModel

Properties

apiKey

apiKey: string

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/openai/api.ts#L83

Inherited from

Omit.apiKey


apiURL?

optional apiURL: string

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/openai/api.ts#L84

Inherited from

Omit.apiURL


config?

optional config: Partial<Readonly<AxAIOpenAIConfig<TModel, TEmbedModel>>>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/openai/api.ts#L79


models?

optional models: AxAIInputModelList<TModel>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/openai/api.ts#L88

Inherited from

Omit.models


name

name: TName

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/openai/api.ts#L78


options?

optional options: Readonly<AxAIServiceOptions & object>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/openai/api.ts#L86

Inherited from

Omit.options

> AxAIOpenAIBaseArgs

> AxAIOpenAIResponseDelta

> AxAIRekaArgs

> AxAIService

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/types.ts#L246

Type Parameters

Type ParameterDefault type
TModelunknown
TEmbedModelunknown

Methods

chat()

chat(req, options?): Promise<AxChatResponse | ReadableStream<AxChatResponse>>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/types.ts#L254

Parameters

ParameterType
reqReadonly<AxChatRequest<TModel>>
options?Readonly<AxAIPromptConfig & AxAIServiceActionOptions<TModel, TEmbedModel>>

Returns

Promise<AxChatResponse | ReadableStream<AxChatResponse>>


embed()

embed(req, options?): Promise<AxEmbedResponse>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/types.ts#L260

Parameters

ParameterType
reqReadonly<AxEmbedRequest<TEmbedModel>>
options?Readonly<AxAIServiceActionOptions<TModel, TEmbedModel>>

Returns

Promise<AxEmbedResponse>


getDefaultModels()

getDefaultModels(): Readonly<{ embedModel: string; model: string; }>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/types.ts#L251

Returns

Readonly<{ embedModel: string; model: string; }>


getFeatures()

getFeatures(model?): AxAIFeatures

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/types.ts#L249

Parameters

ParameterType
model?TModel

Returns

AxAIFeatures


getId()

getId(): string

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/types.ts#L247

Returns

string


getMetrics()

getMetrics(): AxAIServiceMetrics

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/types.ts#L252

Returns

AxAIServiceMetrics


getModelList()

getModelList(): undefined | AxAIModelList

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/types.ts#L250

Returns

undefined | AxAIModelList


getName()

getName(): string

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/types.ts#L248

Returns

string


getOptions()

getOptions(): Readonly<AxAIServiceOptions>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/types.ts#L266

Returns

Readonly<AxAIServiceOptions>


setOptions()

setOptions(options): void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/types.ts#L265

Parameters

ParameterType
optionsReadonly<AxAIServiceOptions>

Returns

void

> AxAIServiceImpl

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/types.ts#L269

Type Parameters

Type Parameter
TModel
TEmbedModel
TChatRequest
TEmbedRequest
TChatResponse
TChatResponseDelta
TEmbedResponse

Methods

createChatReq()

createChatReq(req, config): [AxAPI, TChatRequest]

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/types.ts#L278

Parameters

ParameterType
reqReadonly<AxInternalChatRequest<TModel>>
configReadonly<AxAIPromptConfig>

Returns

[AxAPI, TChatRequest]


createChatResp()

createChatResp(resp): AxChatResponse

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/types.ts#L283

Parameters

ParameterType
respReadonly<TChatResponse>

Returns

AxChatResponse


createChatStreamResp()?

optional createChatStreamResp(resp, state): AxChatResponse

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/types.ts#L285

Parameters

ParameterType
respReadonly<TChatResponseDelta>
stateobject

Returns

AxChatResponse


createEmbedReq()?

optional createEmbedReq(req): [AxAPI, TEmbedRequest]

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/types.ts#L290

Parameters

ParameterType
reqReadonly<AxInternalEmbedRequest<TEmbedModel>>

Returns

[AxAPI, TEmbedRequest]


createEmbedResp()?

optional createEmbedResp(resp): AxEmbedResponse

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/types.ts#L294

Parameters

ParameterType
respReadonly<TEmbedResponse>

Returns

AxEmbedResponse


getModelConfig()

getModelConfig(): AxModelConfig

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/types.ts#L296

Returns

AxModelConfig

> AxAIServiceMetrics

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/types.ts#L175

Properties

errors

errors: object

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/types.ts#L190

chat

{ count: number; rate: number; total: number; }

embed

{ count: number; rate: number; total: number; }


latency

latency: object

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/types.ts#L176

chat

{ mean: number; p95: number; p99: number; samples: number[]; }

embed

{ mean: number; p95: number; p99: number; samples: number[]; }

> AxAPI

> AxAgentFeatures

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/prompts/agent.ts#L40

Properties

canConfigureSmartModelRouting

canConfigureSmartModelRouting: boolean

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/prompts/agent.ts#L42

Whether this agent can use smart model routing (requires an AI service)


excludeFieldsFromPassthrough

excludeFieldsFromPassthrough: string[]

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/prompts/agent.ts#L44

List of fields that this agent excludes from parent->child value passing

> AxAgentic

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/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

Properties

getTraces()

getTraces: () => AxProgramTrace[]

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/program.ts#L89

Returns

AxProgramTrace[]

Inherited from

AxTunable.getTraces


getUsage()

getUsage: () => AxTokenUsage & object[]

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/program.ts#L94

Returns

AxTokenUsage & object[]

Inherited from

AxUsable.getUsage


resetUsage()

resetUsage: () => void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/program.ts#L95

Returns

void

Inherited from

AxUsable.resetUsage


setDemos()

setDemos: (demos) => void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/program.ts#L90

Parameters

ParameterType
demosreadonly AxProgramDemos[]

Returns

void

Inherited from

AxTunable.setDemos


setExamples()

setExamples: (examples) => void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/program.ts#L86

Parameters

ParameterType
examplesReadonly<AxProgramExamples>

Returns

void

Inherited from

AxTunable.setExamples


setId()

setId: (id) => void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/program.ts#L87

Parameters

ParameterType
idstring

Returns

void

Inherited from

AxTunable.setId


setParentId()

setParentId: (parentId) => void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/program.ts#L88

Parameters

ParameterType
parentIdstring

Returns

void

Inherited from

AxTunable.setParentId

Methods

getFeatures()

getFeatures(): AxAgentFeatures

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/prompts/agent.ts#L30

Returns

AxAgentFeatures


getFunction()

getFunction(): AxFunction

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/prompts/agent.ts#L29

Returns

AxFunction

> AxAPIConfig

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/util/apicall.ts#L48

Extends

  • AxAPI.RequestValidation.ResponseValidation

Properties

debug?

optional debug: boolean

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/util/apicall.ts#L54


fetch()?

optional fetch: (input, init?) => Promise<Response>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/util/apicall.ts#L55

Parameters

ParameterType
inputstring | URL | Request
init?RequestInit

Returns

Promise<Response>


headers?

optional headers: Record<string, string>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/util/apicall.ts#L43

Inherited from

AxAPI.headers


name?

optional name: string

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/util/apicall.ts#L42

Inherited from

AxAPI.name


put?

optional put: boolean

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/util/apicall.ts#L44

Inherited from

AxAPI.put


retry?

optional retry: Partial<RetryConfig>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/util/apicall.ts#L58


span?

optional span: Span

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/util/apicall.ts#L56


stream?

optional stream: boolean

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/util/apicall.ts#L53


timeout?

optional timeout: number

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/util/apicall.ts#L57


url

url: string | URL

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/util/apicall.ts#L52


validateRequest()?

optional validateRequest: (request) => boolean | Promise<boolean>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/util/apicall.ts#L33

Parameters

ParameterType
requestunknown

Returns

boolean | Promise<boolean>

Inherited from

RequestValidation.validateRequest


validateResponse()?

optional validateResponse: (response) => boolean | Promise<boolean>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/util/apicall.ts#L37

Parameters

ParameterType
responseunknown

Returns

boolean | Promise<boolean>

Inherited from

ResponseValidation.validateResponse

> AxApacheTikaConvertOptions

> AxApacheTikaArgs

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/docs/tika.ts#L3

Properties

fetch()?

optional fetch: (input, init?) => Promise<Response>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/docs/tika.ts#L5

Parameters

ParameterType
inputstring | URL | Request
init?RequestInit

Returns

Promise<Response>


url?

optional url: string | URL

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/docs/tika.ts#L4

> AxBaseAIArgs

> AxAssertion

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/asserts.ts#L3

Properties

message?

optional message: string

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/asserts.ts#L7

Methods

fn()

fn(values): undefined | boolean | Promise<undefined | boolean>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/asserts.ts#L4

Parameters

ParameterType
valuesRecord<string, unknown>

Returns

undefined | boolean | Promise<undefined | boolean>

> AxDBBaseArgs

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/db/base.ts#L13

Extended by

Properties

fetch()?

optional fetch: (input, init?) => Promise<Response>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/db/base.ts#L14

Parameters

ParameterType
inputstring | URL | Request
init?RequestInit

Returns

Promise<Response>


tracer?

optional tracer: Tracer

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/db/base.ts#L15

> AxDBBaseOpOptions

> AxDBCloudflareArgs

> AxDBLoaderOptions

> AxDBManagerArgs

> AxDBMatch

> AxDBMemoryArgs

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/db/memory.ts#L11

Extends

Properties

fetch()?

optional fetch: (input, init?) => Promise<Response>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/db/base.ts#L14

Parameters

ParameterType
inputstring | URL | Request
init?RequestInit

Returns

Promise<Response>

Inherited from

AxDBBaseArgs.fetch


name

name: "memory"

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/db/memory.ts#L12


tracer?

optional tracer: Tracer

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/db/base.ts#L15

Inherited from

AxDBBaseArgs.tracer

> AxDBPineconeArgs

> AxDBQueryService

> AxDBWeaviateArgs

> AxDBService

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/db/types.ts#L36

Extends

Methods

batchUpsert()

batchUpsert(batchReq, update?): Promise<AxDBUpsertResponse>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/db/types.ts#L42

Parameters

ParameterType
batchReqreadonly AxDBUpsertRequest[]
update?boolean

Returns

Promise<AxDBUpsertResponse>


query()

query(req): Promise<AxDBQueryResponse>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/db/types.ts#L49

Parameters

ParameterType
reqReadonly<AxDBQueryRequest>

Returns

Promise<AxDBQueryResponse>

Inherited from

AxDBQueryService.query


upsert()

upsert(req, update?): Promise<AxDBUpsertResponse>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/db/types.ts#L37

Parameters

ParameterType
reqReadonly<AxDBUpsertRequest>
update?boolean

Returns

Promise<AxDBUpsertResponse>

> AxDockerContainer

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/funcs/docker.ts#L3

Properties

Command

Command: string

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/funcs/docker.ts#L8


Created

Created: number

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/funcs/docker.ts#L9


HostConfig

HostConfig: object

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/funcs/docker.ts#L33

NetworkMode

NetworkMode: string


Id

Id: string

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/funcs/docker.ts#L4


Image

Image: string

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/funcs/docker.ts#L6


ImageID

ImageID: string

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/funcs/docker.ts#L7


Labels

Labels: object

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/funcs/docker.ts#L30

Index Signature

[key: string]: string


Mounts

Mounts: object[]

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/funcs/docker.ts#L46

Destination

Destination: string

Mode

Mode: string

Propagation

Propagation: string

RW

RW: boolean

Source

Source: string

Type

Type: string


Names

Names: string[]

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/funcs/docker.ts#L5


NetworkSettings

NetworkSettings: object

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/funcs/docker.ts#L36

Networks

{}


Ports

Ports: object[]

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/funcs/docker.ts#L24

IP

IP: string

PrivatePort

PrivatePort: number

PublicPort

PublicPort: number

Type

Type: string


SizeRootFs

SizeRootFs: number

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/funcs/docker.ts#L32


SizeRw

SizeRw: number

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/funcs/docker.ts#L31


State

State: object

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/funcs/docker.ts#L10

Dead

Dead: boolean

Error

Error: string

ExitCode

ExitCode: number

FinishedAt

FinishedAt: Date

OOMKilled

OOMKilled: boolean

Paused

Paused: boolean

Pid

Pid: number

Restarting

Restarting: boolean

Running

Running: boolean

StartedAt

StartedAt: Date

Status

Status: string


Status

Status: string

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/funcs/docker.ts#L23

> AxField

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/sig.ts#L12

Properties

description?

optional description: string

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/sig.ts#L15


isInternal?

optional isInternal: boolean

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/sig.ts#L32


isOptional?

optional isOptional: boolean

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/sig.ts#L31


name

name: string

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/sig.ts#L13


title?

optional title: string

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/sig.ts#L14


type?

optional type: object

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/sig.ts#L16

classes?

optional classes: string[]

isArray

isArray: boolean

name

name: "string" | "number" | "boolean" | "image" | "audio" | "json" | "datetime" | "date" | "code" | "class"

> AxFieldProcessor

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/fieldProcessor.ts#L24

Properties

field

field: Readonly<AxField>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/fieldProcessor.ts#L25


process

process: AxFieldProcessorProcess | AxStreamingFieldProcessorProcess

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/fieldProcessor.ts#L33

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).

> AxGenOptions

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/generate.ts#L56

Properties

asserts?

optional asserts: AxAssertion[]

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/generate.ts#L69


description?

optional description: string

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/generate.ts#L63


fastFail?

optional fastFail: boolean

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/generate.ts#L71


functionCall?

optional functionCall: "auto" | { function: { name: string; }; type: "function"; } | "none" | "required"

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/generate.ts#L66


functions?

optional functions: AxInputFunctionType

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/generate.ts#L65


maxRetries?

optional maxRetries: number

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/generate.ts#L57


maxSteps?

optional maxSteps: number

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/generate.ts#L58


mem?

optional mem: AxAIMemory

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/generate.ts#L59


promptTemplate?

optional promptTemplate: typeof AxPromptTemplate

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/generate.ts#L68


rateLimiter?

optional rateLimiter: AxRateLimiterFunction

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/generate.ts#L61


stopFunction?

optional stopFunction: string

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/generate.ts#L67


stream?

optional stream: boolean

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/generate.ts#L62


streamingAsserts?

optional streamingAsserts: AxStreamingAssertion[]

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/generate.ts#L70


tracer?

optional tracer: Tracer

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/generate.ts#L60

> AxMCPTransport

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/mcp/transport.ts#L7

Methods

connect()?

optional connect(): Promise<void>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/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): Promise<JSONRPCResponse<unknown>>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/mcp/transport.ts#L13

Sends a JSON-RPC request or notification and returns the response

Parameters

ParameterTypeDescription
messageReadonly<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): Promise<void>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/mcp/transport.ts#L21

Sends a JSON-RPC notification

Parameters

ParameterTypeDescription
messageReadonly<JSONRPCNotification>The JSON-RPC notification to send

Returns

Promise<void>

> AxMiPROOptions

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/mipro.ts#L12

Properties

dataAwareProposer?

optional dataAwareProposer: boolean

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/mipro.ts#L22


earlyStoppingTrials?

optional earlyStoppingTrials: number

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/mipro.ts#L28


fewshotAwareProposer?

optional fewshotAwareProposer: boolean

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/mipro.ts#L25


initTemperature?

optional initTemperature: number

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/mipro.ts#L14


maxBootstrappedDemos?

optional maxBootstrappedDemos: number

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/mipro.ts#L15


maxLabeledDemos?

optional maxLabeledDemos: number

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/mipro.ts#L16


minibatch?

optional minibatch: boolean

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/mipro.ts#L18


minibatchFullEvalSteps?

optional minibatchFullEvalSteps: number

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/mipro.ts#L20


minibatchSize?

optional minibatchSize: number

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/mipro.ts#L19


minImprovementThreshold?

optional minImprovementThreshold: number

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/mipro.ts#L29


numCandidates?

optional numCandidates: number

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/mipro.ts#L13


numTrials?

optional numTrials: number

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/mipro.ts#L17


programAwareProposer?

optional programAwareProposer: boolean

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/mipro.ts#L21


seed?

optional seed: number

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/mipro.ts#L26


tipAwareProposer?

optional tipAwareProposer: boolean

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/mipro.ts#L24


verbose?

optional verbose: boolean

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/mipro.ts#L27


viewDataBatchSize?

optional viewDataBatchSize: number

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/mipro.ts#L23

> AxOptimizationStats

> AxProgramWithSignatureOptions

> AxRateLimiterTokenUsageOptions

> AxResponseHandlerArgs

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/generate.ts#L78

Type Parameters

Type Parameter
T

Properties

ai

ai: Readonly<AxAIService<unknown, unknown>>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/generate.ts#L79


fastFail?

optional fastFail: boolean

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/generate.ts#L87


functions?

optional functions: readonly AxFunction[]

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/generate.ts#L86


mem

mem: AxAIMemory

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/generate.ts#L83


model?

optional model: string

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/generate.ts#L80


res

res: T

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/generate.ts#L81


sessionId?

optional sessionId: string

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/generate.ts#L84


traceId?

optional traceId: string

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/generate.ts#L85


usageInfo

usageInfo: object

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/generate.ts#L82

ai

ai: string

model

model: string

> AxSimpleClassifierForwardOptions

> AxStreamingAssertion

> AxStreamingEvent

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/generate.ts#L90

Type Parameters

Type Parameter
T

Properties

data

data: object

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/generate.ts#L92

contentDelta?

optional contentDelta: string

error?

optional error: string

functions?

optional functions: AxChatResponseFunctionCall[]

partialValues?

optional partialValues: Partial<T>


event

event: "error" | "done" | "delta"

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/generate.ts#L91

> AxTunable

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/program.ts#L85

Extended by

Properties

getTraces()

getTraces: () => AxProgramTrace[]

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/program.ts#L89

Returns

AxProgramTrace[]


setDemos()

setDemos: (demos) => void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/program.ts#L90

Parameters

ParameterType
demosreadonly AxProgramDemos[]

Returns

void


setExamples()

setExamples: (examples) => void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/program.ts#L86

Parameters

ParameterType
examplesReadonly<AxProgramExamples>

Returns

void


setId()

setId: (id) => void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/program.ts#L87

Parameters

ParameterType
idstring

Returns

void


setParentId()

setParentId: (parentId) => void

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/program.ts#L88

Parameters

ParameterType
parentIdstring

Returns

void

> AxUsable

> @ax-llm/ax

Enumerations

Classes

Interfaces

Type Aliases

Variables

Functions

> AxAIAnthropicChatError

AxAIAnthropicChatError: object

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/anthropic/types.ts#L134

Type declaration

error

{ message: string; type: "authentication_error"; }

type

type: "error"

> AxAIAnthropicChatRequest

AxAIAnthropicChatRequest: object

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/anthropic/types.ts#L35

Type declaration

anthropic_version?

optional anthropic_version: string

max_tokens?

optional max_tokens: number

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"; })[]; role: "assistant"; })[]

metadata?

{ user_id: string; }

model?

optional model: string

stop_sequences?

optional stop_sequences: string[]

stream?

optional stream: boolean

system?

optional system: string | object & AxAIAnthropicChatRequestCacheParam[]

temperature?

optional temperature: number

tool_choice?

optional tool_choice: { type: "auto" | "any"; } | { name: string; type: "tool"; }

tools?

optional tools: object & AxAIAnthropicChatRequestCacheParam[]

top_k?

optional top_k: number

top_p?

optional top_p: number

> AxAIAnthropicChatRequestCacheParam

AxAIAnthropicChatRequestCacheParam: object

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/anthropic/types.ts#L30

Type declaration

cache_control?

{ type: "ephemeral"; }

> AxAIAnthropicChatResponse

AxAIAnthropicChatResponse: object

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/anthropic/types.ts#L109

Type declaration

content

content: ({ text: string; type: "text"; } | { id: string; input: string; name: string; type: "tool_use"; })[]

id

id: string

model

model: string

role

role: "assistant"

stop_reason

stop_reason: "end_turn" | "max_tokens" | "stop_sequence" | "tool_use"

stop_sequence?

optional stop_sequence: string

type

type: "message"

usage

{ input_tokens: number; output_tokens: number; }

> AxAIAnthropicChatResponseDelta

> AxAIAnthropicConfig

> AxAIArgs

> AxAIAzureOpenAIArgs

AxAIAzureOpenAIArgs: AxAIOpenAIArgs<"azure-openai", AxAIOpenAIModel, AxAIOpenAIEmbedModel> & object

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/azure-openai/api.ts#L28

Type declaration

deploymentName

deploymentName: string

resourceName

resourceName: string

version?

optional version: string

> AxAIAzureOpenAIConfig

> AxAICohereChatRequest

AxAICohereChatRequest: object

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/cohere/types.ts#L41

Type declaration

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; })[]

end_sequences?

optional end_sequences: readonly string[]

frequency_penalty?

optional frequency_penalty: number

k?

optional k: number

max_tokens?

optional max_tokens: number

message?

optional message: string

model

model: AxAICohereModel

p?

optional p: number

preamble?

optional preamble: string

presence_penalty?

optional presence_penalty: number

stop_sequences?

optional stop_sequences: string[]

temperature?

optional temperature: number

tool_results?

optional tool_results: AxAICohereChatRequestToolResults

tools?

optional tools: object[]

> AxAICohereChatRequestToolResults

AxAICohereChatRequestToolResults: object[]

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/cohere/types.ts#L36

Type declaration

call

call: AxAICohereChatResponseToolCalls[0]

outputs

outputs: object[]

> AxAICohereChatResponse

AxAICohereChatResponse: object

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/cohere/types.ts#L89

Type declaration

finish_reason

finish_reason: "COMPLETE" | "ERROR" | "ERROR_TOXIC" | "ERROR_LIMIT" | "USER_CANCEL" | "MAX_TOKENS"

generation_id

generation_id: string

meta

{ billed_units: { input_tokens: number; output_tokens: number; }; }

response_id

response_id: string

text

text: string

tool_calls

tool_calls: AxAICohereChatResponseToolCalls

> AxAICohereChatResponseDelta

AxAICohereChatResponseDelta: AxAICohereChatResponse & object

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/cohere/types.ts#L109

Type declaration

event_type

event_type: "stream-start" | "text-generation" | "tool-calls-generation" | "stream-end"

> AxAICohereChatResponseToolCalls

AxAICohereChatResponseToolCalls: object[]

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/cohere/types.ts#L31

Type declaration

name

name: string

parameters?

optional parameters: object

> AxAICohereConfig

AxAICohereConfig: AxModelConfig & object

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/cohere/types.ts#L26

Cohere: Model options for text generation

Type declaration

embedModel?

optional embedModel: AxAICohereEmbedModel

model

model: AxAICohereModel

> AxAICohereEmbedRequest

AxAICohereEmbedRequest: object

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/cohere/types.ts#L117

Type declaration

model

model: AxAICohereEmbedModel

texts

texts: readonly string[]

truncate

truncate: string

> AxAICohereEmbedResponse

AxAICohereEmbedResponse: object

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/cohere/types.ts#L123

Type declaration

embeddings

embeddings: number[][]

id

id: string

model

model: AxAICohereEmbedModel

texts

texts: string[]

> AxAIDeepSeekArgs

> AxAIGoogleGeminiBatchEmbedResponse

AxAIGoogleGeminiBatchEmbedResponse: object

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/google-gemini/types.ts#L189

AxAIGoogleGeminiEmbedResponse: Structure for handling responses from the Google Gemini API embedding requests.

Type declaration

embeddings

embeddings: object[]

> AxAIEmbedModels

> AxAIGoogleGeminiBatchEmbedRequest

AxAIGoogleGeminiBatchEmbedRequest: object

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/google-gemini/types.ts#L177

AxAIGoogleGeminiEmbedRequest: Structure for making an embedding request to the Google Gemini API.

Type declaration

requests

requests: object[]

> AxAIGoogleGeminiChatRequest

AxAIGoogleGeminiChatRequest: object

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/google-gemini/types.ts#L121

Type declaration

contents

contents: AxAIGoogleGeminiContent[]

generationConfig

generationConfig: AxAIGoogleGeminiGenerationConfig

safetySettings?

optional safetySettings: AxAIGoogleGeminiSafetySettings

systemInstruction?

optional systemInstruction: AxAIGoogleGeminiContent

toolConfig?

optional toolConfig: AxAIGoogleGeminiToolConfig

tools?

optional tools: AxAIGoogleGeminiTool[]

> AxAIGoogleGeminiChatResponse

AxAIGoogleGeminiChatResponse: object

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/google-gemini/types.ts#L130

Type declaration

candidates

candidates: object[]

usageMetadata

{ candidatesTokenCount: number; promptTokenCount: number; totalTokenCount: number; }

> AxAIGoogleGeminiChatResponseDelta

> AxAIGoogleGeminiConfig

AxAIGoogleGeminiConfig: AxModelConfig & object

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/google-gemini/types.ts#L168

AxAIGoogleGeminiConfig: Configuration options for Google Gemini API

Type declaration

embedModel?

optional embedModel: AxAIGoogleGeminiEmbedModel

model

model: AxAIGoogleGeminiModel

safetySettings?

optional safetySettings: AxAIGoogleGeminiSafetySettings

> AxAIGoogleGeminiContent

AxAIGoogleGeminiContent: { parts: ({ text: string; } | { inlineData: { data: string; mimeType: string; }; } | { fileData: { fileUri: string; mimeType: string; }; })[]; role: "user"; } | { parts: object[] | object[]; role: "model"; } | { parts: object[]; role: "function"; }

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/google-gemini/types.ts#L37

> AxAIGoogleGeminiGenerationConfig

AxAIGoogleGeminiGenerationConfig: object

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/google-gemini/types.ts#L107

Type declaration

candidateCount?

optional candidateCount: number

maxOutputTokens?

optional maxOutputTokens: number

stopSequences?

optional stopSequences: readonly string[]

temperature?

optional temperature: number

topK?

optional topK: number

topP?

optional topP: number

> AxAIGoogleGeminiSafetySettings

> AxAIGoogleGeminiTool

AxAIGoogleGeminiTool: object

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/google-gemini/types.ts#L94

Type declaration

code_execution?

optional code_execution: object

function_declarations?

optional function_declarations: AxAIGoogleGeminiToolFunctionDeclaration[]

google_search_retrieval?

optional google_search_retrieval: AxAIGoogleGeminiToolGoogleSearchRetrieval

> AxAIGoogleGeminiToolConfig

AxAIGoogleGeminiToolConfig: object

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/google-gemini/types.ts#L100

Type declaration

function_calling_config

{ allowed_function_names: string[]; mode: "ANY" | "NONE" | "AUTO"; }

> AxAIGoogleGeminiToolFunctionDeclaration

AxAIGoogleGeminiToolFunctionDeclaration: object

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/google-gemini/types.ts#L81

Type declaration

description?

optional description: string

name

name: string

parameters?

optional parameters: object

> AxAIGoogleGeminiToolGoogleSearchRetrieval

AxAIGoogleGeminiToolGoogleSearchRetrieval: object

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/google-gemini/types.ts#L87

Type declaration

dynamic_retrieval_config

{ dynamic_threshold: number; mode: "MODE_DYNAMIC"; }

> AxAIGoogleVertexBatchEmbedRequest

AxAIGoogleVertexBatchEmbedRequest: object

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/google-gemini/types.ts#L198

AxAIGoogleVertexBatchEmbedRequest: Structure for making an embedding request to the Google Vertex API.

Type declaration

instances

instances: object[]

> AxAIGoogleVertexBatchEmbedResponse

AxAIGoogleVertexBatchEmbedResponse: object

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/google-gemini/types.ts#L207

AxAIGoogleVertexBatchEmbedResponse: Structure for handling responses from the Google Vertex API embedding requests.

Type declaration

predictions

predictions: object[]

> AxAIGroqArgs

AxAIGroqArgs: AxAIOpenAIArgs<"groq", AxAIGroqModel, undefined> & object

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/groq/api.ts#L18

Type declaration

options?

optional options: Readonly<AxAIServiceOptions> & object

Type declaration

tokensPerMinute?

optional tokensPerMinute: number

> AxAIHuggingFaceConfig

AxAIHuggingFaceConfig: AxModelConfig & object

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/huggingface/types.ts#L7

Type declaration

doSample?

optional doSample: boolean

maxTime?

optional maxTime: number

model

model: AxAIHuggingFaceModel

returnFullText?

optional returnFullText: boolean

useCache?

optional useCache: boolean

waitForModel?

optional waitForModel: boolean

> AxAIHuggingFaceRequest

AxAIHuggingFaceRequest: object

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/huggingface/types.ts#L16

Type declaration

inputs

inputs: string

model

model: AxAIHuggingFaceModel

options?

{ use_cache: boolean; wait_for_model: boolean; }

parameters

{ do_sample: boolean; max_new_tokens: number; max_time: number; num_return_sequences: number; repetition_penalty: number; return_full_text: boolean; temperature: number; top_k: number; top_p: number; }

> AxAIInputModelList

AxAIInputModelList<TModel>: AxAIModelList[number] & object[]

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/types.ts#L9

Type Parameters

Type Parameter
TModel

> AxAIHuggingFaceResponse

AxAIHuggingFaceResponse: object

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/huggingface/types.ts#L36

Type declaration

generated_text

generated_text: string

> AxAIMistralArgs

AxAIMistralArgs: AxAIOpenAIArgs<"mistral", AxAIMistralModel, AxAIMistralEmbedModels> & object

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/mistral/api.ts#L26

Type declaration

options?

optional options: Readonly<AxAIServiceOptions> & object

Type declaration

tokensPerMinute?

optional tokensPerMinute: number

> AxAIModelList

AxAIModelList: object[]

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/types.ts#L14

Type declaration

description

description: string

key

key: string

model

model: string

> AxAIModels

> AxAIOllamaAIConfig

> AxAIOllamaArgs

AxAIOllamaArgs: AxAIOpenAIArgs<"ollama", string, string> & object

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/ollama/api.ts#L24

Type declaration

embedModel?

optional embedModel: string

model?

optional model: string

url?

optional url: string

> AxAIOpenAIChatRequest

AxAIOpenAIChatRequest<TModel>: object

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/openai/types.ts#L72

Type Parameters

Type Parameter
TModel

Type declaration

frequency_penalty?

optional frequency_penalty: number

logit_bias?

optional logit_bias: Map<string, number>

max_completion_tokens

max_completion_tokens: number

messages

messages: ({ content: string; role: "system"; } | { content: string | ({ text: string; type: "text"; } | { image_url: { details: …; url: …; }; type: "image_url"; } | { input_audio: { data: …; format: …; }; type: "input_audio"; })[]; name: string; role: "user"; } | { content: 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?

{ 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[]

top_p?

optional top_p: number

user?

optional user: string

> AxAIOpenAIChatResponse

AxAIOpenAIChatResponse: object

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/openai/types.ts#L140

Type declaration

choices

choices: object[]

created

created: number

error?

{ code: number; message: string; param: string; type: string; }

id

id: string

model

model: string

object

object: "chat.completion"

system_fingerprint

system_fingerprint: string

usage?

optional usage: AxAIOpenAIUsage

> AxAIOpenAIChatResponseDelta

AxAIOpenAIChatResponseDelta: AxAIOpenAIResponseDelta<{ content: string; role: string; tool_calls: NonNullable<…[…][0]["message"]["tool_calls"]>[0] & object[]; }>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/openai/types.ts#L169

> AxAIOpenAIConfig

AxAIOpenAIConfig<TModel, TEmbedModel>: Omit<AxModelConfig, "topK"> & object

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/openai/types.ts#L26

Type declaration

bestOf?

optional bestOf: number

dimensions?

optional dimensions: number

echo?

optional echo: boolean

embedModel?

optional embedModel: TEmbedModel

logitBias?

optional logitBias: Map<string, number>

logprobs?

optional logprobs: number

model

model: TModel

reasoningEffort?

optional reasoningEffort: "low" | "medium" | "high"

responseFormat?

optional responseFormat: "json_object"

stop?

optional stop: string[]

store?

optional store: boolean

suffix?

optional suffix: string | null

user?

optional user: string

Type Parameters

Type Parameter
TModel
TEmbedModel

> AxAIOpenAIEmbedRequest

AxAIOpenAIEmbedRequest<TEmbedModel>: object

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/openai/types.ts#L179

Type Parameters

Type Parameter
TEmbedModel

Type declaration

dimensions?

optional dimensions: number

input

input: readonly string[]

model

model: TEmbedModel

user?

optional user: string

> AxAIOpenAIEmbedResponse

AxAIOpenAIEmbedResponse: object

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/openai/types.ts#L186

Type declaration

data

data: object[]

model

model: string

usage

usage: AxAIOpenAIUsage

> AxAIOpenAILogprob

AxAIOpenAILogprob: object

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/openai/types.ts#L45

Type declaration

text_offset

text_offset: number[]

token_logprobs

token_logprobs: number[]

tokens

tokens: string[]

top_logprobs

top_logprobs: Map<string, number>

> AxAIOpenAIUsage

AxAIOpenAIUsage: object

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/openai/types.ts#L52

Type declaration

completion_tokens

completion_tokens: number

prompt_tokens

prompt_tokens: number

total_tokens

total_tokens: number

> AxAIPromptConfig

AxAIPromptConfig: object

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/types.ts#L223

Type declaration

stream?

optional stream: boolean

> AxAIRekaChatRequest

AxAIRekaChatRequest: object

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/reka/types.ts#L20

Type declaration

frequency_penalty?

optional frequency_penalty: number

max_tokens

max_tokens: number

messages

messages: ({ content: string | object[]; role: "user"; } | { content: string | object[]; role: "assistant"; })[]

model

model: string

presence_penalty?

optional presence_penalty: number

response_format?

{ type: string; }

stop?

optional stop: readonly string[]

stream?

optional stream: boolean

temperature?

optional temperature: number

top_k?

optional top_k: number

top_p?

optional top_p: number

usage?

optional usage: AxAIRekaUsage

use_search_engine?

optional use_search_engine: boolean

> AxAIRekaChatResponseDelta

AxAIRekaChatResponseDelta: object

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/reka/types.ts#L72

Type declaration

id

id: string

model

model: string

responses

responses: object[]

usage?

optional usage: AxAIRekaUsage

> AxAIRekaChatResponse

AxAIRekaChatResponse: object

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/reka/types.ts#L55

Type declaration

id

id: string

model

model: string

responses

responses: object[]

usage?

optional usage: AxAIRekaUsage

> AxAIRekaUsage

AxAIRekaUsage: object

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/reka/types.ts#L15

Type declaration

input_tokens

input_tokens: number

output_tokens

output_tokens: number

> AxAIRekaConfig

AxAIRekaConfig: Omit<AxModelConfig, "topK"> & object

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/reka/types.ts#L9

Type declaration

model

model: AxAIRekaModel

stop?

optional stop: readonly string[]

useSearchEngine?

optional useSearchEngine: boolean

> AxAIServiceActionOptions

AxAIServiceActionOptions<TModel, TEmbedModel>: object

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/types.ts#L234

Type Parameters

Type ParameterDefault type
TModelunknown
TEmbedModelunknown

Type declaration

ai?

optional ai: Readonly<AxAIService<TModel, TEmbedModel>>

debug?

optional debug: boolean

debugHideSystemPrompt?

optional debugHideSystemPrompt: boolean

rateLimiter?

optional rateLimiter: AxRateLimiterFunction

sessionId?

optional sessionId: string

traceId?

optional traceId: string

> AxAIServiceOptions

AxAIServiceOptions: object

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/types.ts#L227

Type declaration

debug?

optional debug: boolean

fetch?

optional fetch: typeof __type

rateLimiter?

optional rateLimiter: AxRateLimiterFunction

tracer?

optional tracer: Tracer

> AxAITogetherArgs

> AxAgentOptions

AxAgentOptions: Omit<AxGenOptions, "functions"> & object

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/prompts/agent.ts#L33

Type declaration

debug?

optional debug: boolean

disableSmartModelRouting?

optional disableSmartModelRouting: boolean

excludeFieldsFromPassthrough?

optional excludeFieldsFromPassthrough: string[]

List of field names that should not be automatically passed from parent to child agents

> AxBalancerOptions

AxBalancerOptions: object

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/balance.ts#L29

Options for the balancer.

Type declaration

comparator()?

(a, b) => number

debug?

optional debug: boolean

initialBackoffMs?

optional initialBackoffMs: number

maxBackoffMs?

optional maxBackoffMs: number

maxRetries?

optional maxRetries: number

> AxChatRequest

AxChatRequest<TModel>: object

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/types.ts#L113

Type Parameters

Type ParameterDefault type
TModelstring

Type declaration

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"; })[]

functionCall?

optional functionCall: "none" | "auto" | "required" | { function: { name: string; }; type: "function"; }

functions?

optional functions: Readonly<{ description: string; name: string; parameters: AxFunctionJSONSchema; }>[]

model?

optional model: TModel

modelConfig?

optional modelConfig: AxModelConfig

> AxChatResponse

AxChatResponse: object

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/types.ts#L96

Type declaration

embedModelUsage?

optional embedModelUsage: AxTokenUsage

modelUsage?

optional modelUsage: AxTokenUsage

remoteId?

optional remoteId: string

results

results: readonly AxChatResponseResult[]

sessionId?

optional sessionId: string

> AxChatResponseFunctionCall

AxChatResponseFunctionCall: object

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/functions.ts#L67

Type declaration

args

args: string

id

id: string

name

name: string

> AxChatResponseResult

AxChatResponseResult: object

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/types.ts#L79

Type declaration

content?

optional content: string

finishReason?

optional finishReason: "stop" | "length" | "function_call" | "content_filter" | "error"

functionCalls?

optional functionCalls: object[]

id?

optional id: string

name?

optional name: string

> AxDBArgs

> AxDBCloudflareOpOptions

> AxDBMemoryOpOptions

> AxDBPineconeOpOptions

> AxDBQueryRequest

AxDBQueryRequest: object

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/db/types.ts#L17

Type declaration

columns?

optional columns: string[]

id?

optional id: string

limit?

optional limit: number

namespace?

optional namespace: string

table

table: string

text?

optional text: string

values?

optional values: readonly number[]

> AxDBQueryResponse

AxDBQueryResponse: object

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/db/types.ts#L27

Type declaration

matches

matches: object[]

> AxDBState

> AxDBUpsertRequest

AxDBUpsertRequest: object

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/db/types.ts#L3

Type declaration

id

id: string

metadata?

optional metadata: Record<string, string>

namespace?

optional namespace: string

table

table: string

text?

optional text: string

values?

optional values: readonly number[]

> AxDBUpsertResponse

AxDBUpsertResponse: object

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/db/types.ts#L12

Type declaration

ids

ids: string[]

> AxDBWeaviateOpOptions

> AxDataRow

AxDataRow: object

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/loader.ts#L3

Type declaration

row

row: Record<string, AxFieldValue>

> AxEmbedRequest

AxEmbedRequest<TEmbedModel>: object

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/types.ts#L207

Type Parameters

Type ParameterDefault type
TEmbedModelstring

Type declaration

embedModel?

optional embedModel: TEmbedModel

texts?

optional texts: readonly string[]

> AxEvaluateArgs

AxEvaluateArgs<IN, OUT>: object

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/evaluate.ts#L7

Type Parameters

Type Parameter
IN extends AxGenIn
OUT extends AxGenOut

Type declaration

ai

ai: AxAIService

examples

examples: Readonly<AxExample[]>

program

program: Readonly<AxProgram<IN, OUT>>

> AxEmbedResponse

AxEmbedResponse: object

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/types.ts#L104

Type declaration

embeddings

embeddings: readonly readonly number[][]

modelUsage?

optional modelUsage: AxTokenUsage

remoteId?

optional remoteId: string

sessionId?

optional sessionId: string

> AxExample

> AxFieldProcessorProcess

AxFieldProcessorProcess: (value, context?) => unknown | Promise<unknown>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/fieldProcessor.ts#L7

Parameters

ParameterType
valueAxFieldValue
context?Readonly<{ done: boolean; sessionId: string; values: AxGenOut; }>

Returns

unknown | Promise<unknown>

> AxFieldTemplateFn

AxFieldTemplateFn: (field, value) => any[]

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/prompt.ts#L30

Parameters

ParameterType
fieldReadonly<AxField>
valueReadonly<AxFieldValue>

Returns

any[]

> AxFieldValue

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/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/program.ts#L17

> AxFunction

AxFunction: object

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/types.ts#L72

Type declaration

description

description: string

func

func: AxFunctionHandler

name

name: string

parameters?

optional parameters: AxFunctionJSONSchema

> AxFunctionHandler

AxFunctionHandler: (args?, extra?) => unknown

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/types.ts#L48

Parameters

ParameterType
args?any
extra?Readonly<{ ai: AxAIService; debug: boolean; sessionId: string; traceId: string; }>

Returns

unknown

> AxFunctionJSONSchema

AxFunctionJSONSchema: object

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/types.ts#L59

Type declaration

items?

optional items: AxFunctionJSONSchema

properties?

optional properties: Record<string, AxFunctionJSONSchema & object>

required?

optional required: string[]

type

type: string

> AxGenDeltaOut

AxGenDeltaOut<OUT>: object

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/program.ts#L73

Type Parameters

Type Parameter
OUT

Type declaration

delta

delta: Partial<OUT>

version

version: number

> AxGenIn

> AxGenOut

> AxGenStreamingOut

AxGenStreamingOut<OUT>: AsyncGenerator<AxGenDeltaOut<OUT>, void | OUT, unknown>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/program.ts#L78

Type Parameters

Type Parameter
OUT

> AxGenerateResult

AxGenerateResult<OUT>: OUT & object

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/generate.ts#L74

Type declaration

functions?

optional functions: AxChatResponseFunctionCall[]

Type Parameters

Type Parameter
OUT extends AxGenOut

> AxIField

AxIField: Omit<AxField, "title"> & object

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/sig.ts#L35

Type declaration

title

title: string

> AxInputFunctionType

> AxInternalChatRequest

AxInternalChatRequest<TModel>: Omit<AxChatRequest, "model"> & Required<Pick<AxChatRequest<TModel>, "model">>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/types.ts#L204

Type Parameters

Type Parameter
TModel

> AxInternalEmbedRequest

AxInternalEmbedRequest<TEmbedModel>: Omit<AxEmbedRequest, "embedModel"> & Required<Pick<AxEmbedRequest<TEmbedModel>, "embedModel">>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/types.ts#L212

Type Parameters

Type Parameter
TEmbedModel

> AxMetricFn

AxMetricFn: <T>(arg0) => boolean

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/optimize.ts#L22

Type Parameters

Type ParameterDefault type
T extends AxGenOutAxGenOut

Parameters

ParameterType
arg0Readonly<{ example: AxExample; prediction: T; }>

Returns

boolean

> AxMetricFnArgs

> AxMockAIServiceConfig

AxMockAIServiceConfig: object

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/mock/api.ts#L17

Type declaration

chatResponse?

optional chatResponse: AxChatResponse | ReadableStream<AxChatResponse> | () => Promise<AxChatResponse | ReadableStream<AxChatResponse>> | (req, options?) => Promise<AxChatResponse | ReadableStream<AxChatResponse>>

embedModelInfo?

optional embedModelInfo: AxModelInfoWithProvider

embedResponse?

optional embedResponse: AxEmbedResponse | (req) => AxEmbedResponse | Promise<AxEmbedResponse>

errorMessage?

optional errorMessage: string

features?

{ functions: boolean; streaming: boolean; }

id?

optional id: string

latencyMs?

optional latencyMs: number

modelInfo?

optional modelInfo: Partial<AxModelInfoWithProvider>

models?

optional models: AxAIModelList

name?

optional name: string

options?

optional options: AxAIServiceOptions

shouldError?

optional shouldError: boolean

> AxModelConfig

AxModelConfig: object

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/types.ts#L35

Type declaration

endSequences?

optional endSequences: string[]

frequencyPenalty?

optional frequencyPenalty: number

maxTokens?

optional maxTokens: number

n?

optional n: number

presencePenalty?

optional presencePenalty: number

stopSequences?

optional stopSequences: string[]

stream?

optional stream: boolean

temperature?

optional temperature: number

topK?

optional topK: number

topP?

optional topP: number

> AxModelInfo

AxModelInfo: object

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/types.ts#L20

Type declaration

aliases?

optional aliases: string[]

characterIsToken?

optional characterIsToken: boolean

completionTokenCostPer1M?

optional completionTokenCostPer1M: number

currency?

optional currency: string

name

name: string

promptTokenCostPer1M?

optional promptTokenCostPer1M: number

> AxModelInfoWithProvider

AxModelInfoWithProvider: AxModelInfo & object

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/types.ts#L111

Type declaration

provider

provider: string

> AxOptimizerArgs

AxOptimizerArgs<IN, OUT>: object

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/optimize.ts#L28

Type Parameters

Type Parameter
IN extends AxGenIn
OUT extends AxGenOut

Type declaration

ai

ai: AxAIService

examples

examples: Readonly<AxExample[]>

options?

{ batchSize: number; costMonitoring: boolean; debugMode: boolean; earlyStoppingPatience: number; maxDemos: number; maxExamples: number; maxRounds: number; maxTokensPerGeneration: number; teacherAI: AxAIService; verboseMode: boolean; }

program

program: Readonly<AxProgram<IN, OUT>>

> AxProgramDemos

AxProgramDemos: object

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/program.ts#L40

Type declaration

programId

programId: string

traces

traces: Record<string, AxFieldValue>[]

> AxProgramExamples

> AxProgramForwardOptions

AxProgramForwardOptions: object

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/program.ts#L48

Type declaration

ai?

optional ai: AxAIService

debug?

optional debug: boolean

debugHideSystemPrompt?

optional debugHideSystemPrompt: boolean

fastFail?

optional fastFail: boolean

functionCall?

optional functionCall: AxChatRequest["functionCall"]

functions?

optional functions: AxInputFunctionType

maxRetries?

optional maxRetries: number

maxSteps?

optional maxSteps: number

mem?

optional mem: AxAIMemory

model?

optional model: string

modelConfig?

optional modelConfig: AxModelConfig

rateLimiter?

optional rateLimiter: AxRateLimiterFunction

sessionId?

optional sessionId: string

stopFunction?

optional stopFunction: string

stream?

optional stream: boolean

traceId?

optional traceId: string

tracer?

optional tracer: Tracer

> AxProgramTrace

AxProgramTrace: object

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/program.ts#L34

Type declaration

programId

programId: string

trace

trace: Record<string, AxFieldValue>

> AxProgramStreamingForwardOptions

> AxProgramUsage

AxProgramUsage: AxChatResponse["modelUsage"] & object

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/program.ts#L98

Type declaration

ai

ai: string

model

model: string

> AxRateLimiterFunction

AxRateLimiterFunction: <T>(reqFunc, info) => Promise<T | ReadableStream<T>>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/types.ts#L218

Type Parameters

Type ParameterDefault type
Tunknown

Parameters

ParameterType
reqFunc() => Promise<T | ReadableStream<T>>
infoReadonly<{ embedModelUsage: AxTokenUsage; modelUsage: AxTokenUsage; }>

Returns

Promise<T | ReadableStream<T>>

> AxRerankerIn

AxRerankerIn: object

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/docs/manager.ts#L11

Type declaration

items

items: string[]

query

query: string

> AxRerankerOut

AxRerankerOut: object

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/docs/manager.ts#L12

Type declaration

rankedItems

rankedItems: string[]

> AxRewriteIn

AxRewriteIn: object

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/docs/manager.ts#L8

Type declaration

query

query: string

> AxRewriteOut

AxRewriteOut: object

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/docs/manager.ts#L9

Type declaration

rewrittenQuery

rewrittenQuery: string

> AxStreamingFieldProcessorProcess

AxStreamingFieldProcessorProcess: (value, context?) => unknown | Promise<unknown>

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/fieldProcessor.ts#L16

Parameters

ParameterType
valuestring
context?Readonly<{ done: boolean; sessionId: string; values: AxGenOut; }>

Returns

unknown | Promise<unknown>

> AxTokenUsage

AxTokenUsage: object

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/types.ts#L29

Type declaration

completionTokens

completionTokens: number

promptTokens

promptTokens: number

totalTokens

totalTokens: number

> AxEvalUtil

const AxEvalUtil: object

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/eval.ts#L143

Type declaration

emScore()

(prediction, groundTruth) => boolean

f1Score()

(prediction, groundTruth) => number

novelF1ScoreOptimized()

(history, prediction, groundTruth, returnRecall) => number

> AxStringUtil

const AxStringUtil: object

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/dsp/strutil.ts#L66

Type declaration

batchArray()

<T>(arr, size) => T[][]

dedup()

(seq) => string[]

extractIdAndText()

(input) => object

extractIndexPrefixedText()

(input) => string

splitIntoTwo()

(str, separator) => string[]

trimNonAlphaNum()

(str) => string

> axModelInfoAnthropic

> axModelInfoCohere

> axModelInfoDeepSeek

> axModelInfoGoogleGemini

const axModelInfoGoogleGemini: AxModelInfo[]

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/google-gemini/info.ts#L8

AxAIGoogleGemini: Model information

> axModelInfoGroq

> axModelInfoHuggingFace

const axModelInfoHuggingFace: AxModelInfo[] = []

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/ai/huggingface/info.ts#L6

HuggingFace: Model information

> axModelInfoMistral

> axModelInfoOpenAI

> axModelInfoReka

> axModelInfoTogether

> axSpanAttributes

const axSpanAttributes: object

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/trace/trace.ts#L1

Type declaration

DB_ID

DB_ID: string = 'db.id'

DB_NAMESPACE

DB_NAMESPACE: string = 'db.namespace'

DB_OPERATION_NAME

DB_OPERATION_NAME: string = 'db.operation.name'

DB_QUERY_EMBEDDINGS

DB_QUERY_EMBEDDINGS: string = 'db.query.embeddings'

DB_QUERY_EMBEDDINGS_VECTOR

DB_QUERY_EMBEDDINGS_VECTOR: string = 'db.query.embeddings.vector'

DB_QUERY_RESULT

DB_QUERY_RESULT: string = 'db.query.result'

DB_QUERY_RESULT_DISTANCE

DB_QUERY_RESULT_DISTANCE: string = 'db.query.result.distance'

DB_QUERY_RESULT_DOCUMENT

DB_QUERY_RESULT_DOCUMENT: string = 'db.query.result.document'

DB_QUERY_RESULT_ID

DB_QUERY_RESULT_ID: string = 'db.query.result.id'

DB_QUERY_RESULT_METADATA

DB_QUERY_RESULT_METADATA: string = 'db.query.result.metadata'

DB_QUERY_RESULT_SCORE

DB_QUERY_RESULT_SCORE: string = 'db.query.result.score'

DB_QUERY_RESULT_VECTOR

DB_QUERY_RESULT_VECTOR: string = 'db.query.result.vector'

DB_QUERY_TEXT

DB_QUERY_TEXT: string = 'db.query.text'

DB_SYSTEM

DB_SYSTEM: string = 'db.system'

DB_TABLE

DB_TABLE: string = 'db.table'

DB_VECTOR

DB_VECTOR: string = 'db.vector'

DB_VECTOR_QUERY_TOP_K

DB_VECTOR_QUERY_TOP_K: string = 'db.vector.query.top_k'

LLM_REQUEST_FREQUENCY_PENALTY

LLM_REQUEST_FREQUENCY_PENALTY: string = 'gen_ai.request.frequency_penalty'

LLM_REQUEST_LLM_IS_STREAMING

LLM_REQUEST_LLM_IS_STREAMING: string = 'gen_ai.request.llm_is_streaming'

LLM_REQUEST_MAX_TOKENS

LLM_REQUEST_MAX_TOKENS: string = 'gen_ai.request.max_tokens'

LLM_REQUEST_MODEL

LLM_REQUEST_MODEL: string = 'gen_ai.request.model'

LLM_REQUEST_PRESENCE_PENALTY

LLM_REQUEST_PRESENCE_PENALTY: string = 'gen_ai.request.presence_penalty'

LLM_REQUEST_STOP_SEQUENCES

LLM_REQUEST_STOP_SEQUENCES: string = 'gen_ai.request.stop_sequences'

LLM_REQUEST_TEMPERATURE

LLM_REQUEST_TEMPERATURE: string = 'gen_ai.request.temperature'

LLM_REQUEST_TOP_K

LLM_REQUEST_TOP_K: string = 'gen_ai.request.top_k'

LLM_REQUEST_TOP_P

LLM_REQUEST_TOP_P: string = 'gen_ai.request.top_p'

LLM_SYSTEM

LLM_SYSTEM: string = 'gen_ai.system'

LLM_USAGE_COMPLETION_TOKENS

LLM_USAGE_COMPLETION_TOKENS: string = 'gen_ai.usage.completion_tokens'

LLM_USAGE_PROMPT_TOKENS

LLM_USAGE_PROMPT_TOKENS: string = 'gen_ai.usage.prompt_tokens'

> axSpanEvents

const axSpanEvents: object

Defined in: https://github.com/ax-llm/ax/blob/8a4bb80b94b2763398ce036c74b5662d9a03c9d8/src/ax/trace/trace.ts#L42

Type declaration

LLM_PROMPT

LLM_PROMPT: string = 'gen_ai.prompt'