AxAIService
Defined in: https://github.com/ax-llm/ax/blob/e4219a44b7581a55a40d9dd62d2c281062ff078d/src/ax/ai/types.ts#L1115
Type Parameters
| Type Parameter | Default type |
|---|---|
TModel | unknown |
TEmbedModel | unknown |
TModelKey | string |
Methods
chat()
chat(req: Readonly<AxChatRequest<TModel | TModelKey>>, options?: Readonly<AxAIServiceOptions>): Promise<
| AxChatResponse
| ReadableStream<AxChatResponse>>;Defined in: https://github.com/ax-llm/ax/blob/e4219a44b7581a55a40d9dd62d2c281062ff078d/src/ax/ai/types.ts#L1131
Parameters
| Parameter | Type |
|---|---|
req | Readonly<AxChatRequest<TModel | TModelKey>> |
options? | Readonly<AxAIServiceOptions> |
Returns
Promise<
| AxChatResponse
| ReadableStream<AxChatResponse>>
embed()
embed(req: Readonly<AxEmbedRequest<TEmbedModel | TModelKey>>, options?: Readonly<AxAIServiceOptions>): Promise<AxEmbedResponse>;Defined in: https://github.com/ax-llm/ax/blob/e4219a44b7581a55a40d9dd62d2c281062ff078d/src/ax/ai/types.ts#L1135
Parameters
| Parameter | Type |
|---|---|
req | Readonly<AxEmbedRequest<TEmbedModel | TModelKey>> |
options? | Readonly<AxAIServiceOptions> |
Returns
Promise<AxEmbedResponse>
getEstimatedCost()
getEstimatedCost(modelUsage?: AxModelUsage): number;Defined in: https://github.com/ax-llm/ax/blob/e4219a44b7581a55a40d9dd62d2c281062ff078d/src/ax/ai/types.ts#L1148
Parameters
| Parameter | Type |
|---|---|
modelUsage? | AxModelUsage |
Returns
number
getFeatures()
getFeatures(model?: TModel): AxAIFeatures;Defined in: https://github.com/ax-llm/ax/blob/e4219a44b7581a55a40d9dd62d2c281062ff078d/src/ax/ai/types.ts#L1122
Parameters
| Parameter | Type |
|---|---|
model? | TModel |
Returns
getId()
getId(): string;Defined in: https://github.com/ax-llm/ax/blob/e4219a44b7581a55a40d9dd62d2c281062ff078d/src/ax/ai/types.ts#L1120
Returns
string
getLastUsedChatModel()
getLastUsedChatModel(): undefined | TModel;Defined in: https://github.com/ax-llm/ax/blob/e4219a44b7581a55a40d9dd62d2c281062ff078d/src/ax/ai/types.ts#L1127
Returns
undefined | TModel
getLastUsedEmbedModel()
getLastUsedEmbedModel(): undefined | TEmbedModel;Defined in: https://github.com/ax-llm/ax/blob/e4219a44b7581a55a40d9dd62d2c281062ff078d/src/ax/ai/types.ts#L1128
Returns
undefined | TEmbedModel
getLastUsedModelConfig()
getLastUsedModelConfig(): undefined | AxModelConfig;Defined in: https://github.com/ax-llm/ax/blob/e4219a44b7581a55a40d9dd62d2c281062ff078d/src/ax/ai/types.ts#L1129
Returns
undefined | AxModelConfig
getLogger()
getLogger(): AxLoggerFunction;Defined in: https://github.com/ax-llm/ax/blob/e4219a44b7581a55a40d9dd62d2c281062ff078d/src/ax/ai/types.ts#L1125
Returns
getMetrics()
getMetrics(): AxAIServiceMetrics;Defined in: https://github.com/ax-llm/ax/blob/e4219a44b7581a55a40d9dd62d2c281062ff078d/src/ax/ai/types.ts#L1124
Returns
getModelList()
getModelList():
| undefined
| AxAIModelList<TModelKey>;Defined in: https://github.com/ax-llm/ax/blob/e4219a44b7581a55a40d9dd62d2c281062ff078d/src/ax/ai/types.ts#L1123
Returns
| undefined
| AxAIModelList<TModelKey>
getName()
getName(): string;Defined in: https://github.com/ax-llm/ax/blob/e4219a44b7581a55a40d9dd62d2c281062ff078d/src/ax/ai/types.ts#L1121
Returns
string
getOptions()
getOptions(): Readonly<AxAIServiceOptions>;Defined in: https://github.com/ax-llm/ax/blob/e4219a44b7581a55a40d9dd62d2c281062ff078d/src/ax/ai/types.ts#L1151
Returns
Readonly<AxAIServiceOptions>
setOptions()
setOptions(options: Readonly<AxAIServiceOptions>): void;Defined in: https://github.com/ax-llm/ax/blob/e4219a44b7581a55a40d9dd62d2c281062ff078d/src/ax/ai/types.ts#L1150
Parameters
| Parameter | Type |
|---|---|
options | Readonly<AxAIServiceOptions> |
Returns
void
speak()
speak(req: Readonly<AxSpeechRequest<TModel | TModelKey>>, options?: Readonly<AxAIServiceOptions>): Promise<AxChatAudioOutput>;Defined in: https://github.com/ax-llm/ax/blob/e4219a44b7581a55a40d9dd62d2c281062ff078d/src/ax/ai/types.ts#L1143
Parameters
| Parameter | Type |
|---|---|
req | Readonly<AxSpeechRequest<TModel | TModelKey>> |
options? | Readonly<AxAIServiceOptions> |
Returns
Promise<AxChatAudioOutput>
transcribe()
transcribe(req: Readonly<AxTranscriptionRequest<TModel | TModelKey>>, options?: Readonly<AxAIServiceOptions>): Promise<AxTranscriptionResponse>;Defined in: https://github.com/ax-llm/ax/blob/e4219a44b7581a55a40d9dd62d2c281062ff078d/src/ax/ai/types.ts#L1139
Parameters
| Parameter | Type |
|---|---|
req | Readonly<AxTranscriptionRequest<TModel | TModelKey>> |
options? | Readonly<AxAIServiceOptions> |
Returns
Promise<AxTranscriptionResponse>