AxAI
Defined in: https://github.com/ax-llm/ax/blob/3306475085414d36aee4411ad2466e08e53bef8a/src/ax/ai/wrap.ts#L191
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/3306475085414d36aee4411ad2466e08e53bef8a/src/ax/ai/wrap.ts#L281
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/3306475085414d36aee4411ad2466e08e53bef8a/src/ax/ai/wrap.ts#L288
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/3306475085414d36aee4411ad2466e08e53bef8a/src/ax/ai/wrap.ts#L277
Parameters
| Parameter | Type |
|---|---|
modelUsage? | AxModelUsage |
Returns
number
Implementation of
getFeatures()
getFeatures(model?: string): AxAIFeatures;Defined in: https://github.com/ax-llm/ax/blob/3306475085414d36aee4411ad2466e08e53bef8a/src/ax/ai/wrap.ts#L253
Parameters
| Parameter | Type |
|---|---|
model? | string |
Returns
Implementation of
getId()
getId(): string;Defined in: https://github.com/ax-llm/ax/blob/3306475085414d36aee4411ad2466e08e53bef8a/src/ax/ai/wrap.ts#L249
Returns
string
Implementation of
getLastUsedChatModel()
getLastUsedChatModel(): any;Defined in: https://github.com/ax-llm/ax/blob/3306475085414d36aee4411ad2466e08e53bef8a/src/ax/ai/wrap.ts#L261
Returns
any
Implementation of
AxAIService.getLastUsedChatModel
getLastUsedEmbedModel()
getLastUsedEmbedModel(): any;Defined in: https://github.com/ax-llm/ax/blob/3306475085414d36aee4411ad2466e08e53bef8a/src/ax/ai/wrap.ts#L265
Returns
any
Implementation of
AxAIService.getLastUsedEmbedModel
getLastUsedModelConfig()
getLastUsedModelConfig(): undefined | AxModelConfig;Defined in: https://github.com/ax-llm/ax/blob/3306475085414d36aee4411ad2466e08e53bef8a/src/ax/ai/wrap.ts#L269
Returns
undefined | AxModelConfig
Implementation of
AxAIService.getLastUsedModelConfig
getLogger()
getLogger(): AxLoggerFunction;Defined in: https://github.com/ax-llm/ax/blob/3306475085414d36aee4411ad2466e08e53bef8a/src/ax/ai/wrap.ts#L317
Returns
Implementation of
getMetrics()
getMetrics(): AxAIServiceMetrics;Defined in: https://github.com/ax-llm/ax/blob/3306475085414d36aee4411ad2466e08e53bef8a/src/ax/ai/wrap.ts#L273
Returns
Implementation of
getModelList()
getModelList():
| undefined
| AxAIModelList<TModelKey>;Defined in: https://github.com/ax-llm/ax/blob/3306475085414d36aee4411ad2466e08e53bef8a/src/ax/ai/wrap.ts#L257
Returns
| undefined
| AxAIModelList<TModelKey>
Implementation of
getName()
getName(): string;Defined in: https://github.com/ax-llm/ax/blob/3306475085414d36aee4411ad2466e08e53bef8a/src/ax/ai/wrap.ts#L245
Returns
string
Implementation of
getOptions()
getOptions(): Readonly<AxAIServiceOptions>;Defined in: https://github.com/ax-llm/ax/blob/3306475085414d36aee4411ad2466e08e53bef8a/src/ax/ai/wrap.ts#L313
Returns
Readonly<AxAIServiceOptions>
Implementation of
setOptions()
setOptions(options: Readonly<AxAIServiceOptions>): void;Defined in: https://github.com/ax-llm/ax/blob/3306475085414d36aee4411ad2466e08e53bef8a/src/ax/ai/wrap.ts#L309
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/3306475085414d36aee4411ad2466e08e53bef8a/src/ax/ai/wrap.ts#L302
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/3306475085414d36aee4411ad2466e08e53bef8a/src/ax/ai/wrap.ts#L295
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/3306475085414d36aee4411ad2466e08e53bef8a/src/ax/ai/wrap.ts#L197
Type Parameters
| Type Parameter |
|---|
T extends AxAIArgs<any> |
Parameters
| Parameter | Type |
|---|---|
options | T |
Returns
AxAI<InferTModelKey<T>>