AxAI
Defined in: https://github.com/ax-llm/ax/blob/5b28f9093bb70863b59459bb6df5062d005bce41/src/ax/ai/wrap.ts#L178
Type Parameters
| Type Parameter | Default type |
|---|---|
TModelKey | string |
Implements
AxAIService<any,any,TModelKey>
Methods
chat()
chat(req: Readonly<AxChatRequest<TModelKey>>, options?: Readonly<AxAIServiceOptions>): Promise<
| AxChatResponse
| ReadableStream<AxChatResponse>>;Defined in: https://github.com/ax-llm/ax/blob/5b28f9093bb70863b59459bb6df5062d005bce41/src/ax/ai/wrap.ts#L263
Parameters
| Parameter | Type |
|---|---|
req | Readonly<AxChatRequest<TModelKey>> |
options? | Readonly<AxAIServiceOptions> |
Returns
Promise<
| AxChatResponse
| ReadableStream<AxChatResponse>>
Implementation of
embed()
embed(req: Readonly<AxEmbedRequest<TModelKey>>, options?: Readonly<AxAIServiceOptions>): Promise<AxEmbedResponse>;Defined in: https://github.com/ax-llm/ax/blob/5b28f9093bb70863b59459bb6df5062d005bce41/src/ax/ai/wrap.ts#L270
Parameters
| Parameter | Type |
|---|---|
req | Readonly<AxEmbedRequest<TModelKey>> |
options? | Readonly<AxAIServiceOptions> |
Returns
Promise<AxEmbedResponse>
Implementation of
getEstimatedCost()
getEstimatedCost(modelUsage?: AxModelUsage): number;Defined in: https://github.com/ax-llm/ax/blob/5b28f9093bb70863b59459bb6df5062d005bce41/src/ax/ai/wrap.ts#L259
Parameters
| Parameter | Type |
|---|---|
modelUsage? | AxModelUsage |
Returns
number
Implementation of
getFeatures()
getFeatures(model?: string): AxAIFeatures;Defined in: https://github.com/ax-llm/ax/blob/5b28f9093bb70863b59459bb6df5062d005bce41/src/ax/ai/wrap.ts#L235
Parameters
| Parameter | Type |
|---|---|
model? | string |
Returns
Implementation of
getId()
getId(): string;Defined in: https://github.com/ax-llm/ax/blob/5b28f9093bb70863b59459bb6df5062d005bce41/src/ax/ai/wrap.ts#L231
Returns
string
Implementation of
getLastUsedChatModel()
getLastUsedChatModel(): any;Defined in: https://github.com/ax-llm/ax/blob/5b28f9093bb70863b59459bb6df5062d005bce41/src/ax/ai/wrap.ts#L243
Returns
any
Implementation of
AxAIService.getLastUsedChatModel
getLastUsedEmbedModel()
getLastUsedEmbedModel(): any;Defined in: https://github.com/ax-llm/ax/blob/5b28f9093bb70863b59459bb6df5062d005bce41/src/ax/ai/wrap.ts#L247
Returns
any
Implementation of
AxAIService.getLastUsedEmbedModel
getLastUsedModelConfig()
getLastUsedModelConfig(): undefined | AxModelConfig;Defined in: https://github.com/ax-llm/ax/blob/5b28f9093bb70863b59459bb6df5062d005bce41/src/ax/ai/wrap.ts#L251
Returns
undefined | AxModelConfig
Implementation of
AxAIService.getLastUsedModelConfig
getLogger()
getLogger(): AxLoggerFunction;Defined in: https://github.com/ax-llm/ax/blob/5b28f9093bb70863b59459bb6df5062d005bce41/src/ax/ai/wrap.ts#L299
Returns
Implementation of
getMetrics()
getMetrics(): AxAIServiceMetrics;Defined in: https://github.com/ax-llm/ax/blob/5b28f9093bb70863b59459bb6df5062d005bce41/src/ax/ai/wrap.ts#L255
Returns
Implementation of
getModelList()
getModelList():
| undefined
| AxAIModelList<TModelKey>;Defined in: https://github.com/ax-llm/ax/blob/5b28f9093bb70863b59459bb6df5062d005bce41/src/ax/ai/wrap.ts#L239
Returns
| undefined
| AxAIModelList<TModelKey>
Implementation of
getName()
getName(): string;Defined in: https://github.com/ax-llm/ax/blob/5b28f9093bb70863b59459bb6df5062d005bce41/src/ax/ai/wrap.ts#L227
Returns
string
Implementation of
getOptions()
getOptions(): Readonly<AxAIServiceOptions>;Defined in: https://github.com/ax-llm/ax/blob/5b28f9093bb70863b59459bb6df5062d005bce41/src/ax/ai/wrap.ts#L295
Returns
Readonly<AxAIServiceOptions>
Implementation of
setOptions()
setOptions(options: Readonly<AxAIServiceOptions>): void;Defined in: https://github.com/ax-llm/ax/blob/5b28f9093bb70863b59459bb6df5062d005bce41/src/ax/ai/wrap.ts#L291
Parameters
| Parameter | Type |
|---|---|
options | Readonly<AxAIServiceOptions> |
Returns
void
Implementation of
speak()
speak(req: Readonly<AxSpeechRequest<TModelKey>>, options?: Readonly<AxAIServiceOptions>): Promise<AxChatAudioOutput>;Defined in: https://github.com/ax-llm/ax/blob/5b28f9093bb70863b59459bb6df5062d005bce41/src/ax/ai/wrap.ts#L284
Parameters
| Parameter | Type |
|---|---|
req | Readonly<AxSpeechRequest<TModelKey>> |
options? | Readonly<AxAIServiceOptions> |
Returns
Promise<AxChatAudioOutput>
Implementation of
transcribe()
transcribe(req: Readonly<AxTranscriptionRequest<TModelKey>>, options?: Readonly<AxAIServiceOptions>): Promise<AxTranscriptionResponse>;Defined in: https://github.com/ax-llm/ax/blob/5b28f9093bb70863b59459bb6df5062d005bce41/src/ax/ai/wrap.ts#L277
Parameters
| Parameter | Type |
|---|---|
req | Readonly<AxTranscriptionRequest<TModelKey>> |
options? | Readonly<AxAIServiceOptions> |
Returns
Promise<AxTranscriptionResponse>
Implementation of
create()
static create<T>(options: T): AxAI<InferTModelKey<T>>;Defined in: https://github.com/ax-llm/ax/blob/5b28f9093bb70863b59459bb6df5062d005bce41/src/ax/ai/wrap.ts#L184
Type Parameters
| Type Parameter |
|---|
T extends AxAIArgs<any> |
Parameters
| Parameter | Type |
|---|---|
options | T |
Returns
AxAI<InferTModelKey<T>>