AxAIService
Defined in: https://github.com/ax-llm/ax/blob/d2df625e2c2fd70a090d6321c042579c2819f0d1/src/ax/ai/types.ts#L466
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/d2df625e2c2fd70a090d6321c042579c2819f0d1/src/ax/ai/types.ts#L482
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/d2df625e2c2fd70a090d6321c042579c2819f0d1/src/ax/ai/types.ts#L486
Parameters
| Parameter | Type |
|---|---|
req | Readonly<AxEmbedRequest<TEmbedModel | TModelKey>> |
options? | Readonly<AxAIServiceOptions> |
Returns
Promise<AxEmbedResponse>
getFeatures()
getFeatures(model?: TModel): AxAIFeatures;
Defined in: https://github.com/ax-llm/ax/blob/d2df625e2c2fd70a090d6321c042579c2819f0d1/src/ax/ai/types.ts#L473
Parameters
| Parameter | Type |
|---|---|
model? | TModel |
Returns
getId()
getId(): string;
Defined in: https://github.com/ax-llm/ax/blob/d2df625e2c2fd70a090d6321c042579c2819f0d1/src/ax/ai/types.ts#L471
Returns
string
getLastUsedChatModel()
getLastUsedChatModel(): undefined | TModel;
Defined in: https://github.com/ax-llm/ax/blob/d2df625e2c2fd70a090d6321c042579c2819f0d1/src/ax/ai/types.ts#L478
Returns
undefined | TModel
getLastUsedEmbedModel()
getLastUsedEmbedModel(): undefined | TEmbedModel;
Defined in: https://github.com/ax-llm/ax/blob/d2df625e2c2fd70a090d6321c042579c2819f0d1/src/ax/ai/types.ts#L479
Returns
undefined | TEmbedModel
getLastUsedModelConfig()
getLastUsedModelConfig(): undefined | AxModelConfig;
Defined in: https://github.com/ax-llm/ax/blob/d2df625e2c2fd70a090d6321c042579c2819f0d1/src/ax/ai/types.ts#L480
Returns
undefined | AxModelConfig
getLogger()
getLogger(): AxLoggerFunction;
Defined in: https://github.com/ax-llm/ax/blob/d2df625e2c2fd70a090d6321c042579c2819f0d1/src/ax/ai/types.ts#L476
Returns
getMetrics()
getMetrics(): AxAIServiceMetrics;
Defined in: https://github.com/ax-llm/ax/blob/d2df625e2c2fd70a090d6321c042579c2819f0d1/src/ax/ai/types.ts#L475
Returns
getModelList()
getModelList():
| undefined
| AxAIModelList<TModelKey>;
Defined in: https://github.com/ax-llm/ax/blob/d2df625e2c2fd70a090d6321c042579c2819f0d1/src/ax/ai/types.ts#L474
Returns
| undefined
| AxAIModelList<TModelKey>
getName()
getName(): string;
Defined in: https://github.com/ax-llm/ax/blob/d2df625e2c2fd70a090d6321c042579c2819f0d1/src/ax/ai/types.ts#L472
Returns
string
getOptions()
getOptions(): Readonly<AxAIServiceOptions>;
Defined in: https://github.com/ax-llm/ax/blob/d2df625e2c2fd70a090d6321c042579c2819f0d1/src/ax/ai/types.ts#L492
Returns
Readonly<AxAIServiceOptions>
setOptions()
setOptions(options: Readonly<AxAIServiceOptions>): void;
Defined in: https://github.com/ax-llm/ax/blob/d2df625e2c2fd70a090d6321c042579c2819f0d1/src/ax/ai/types.ts#L491
Parameters
| Parameter | Type |
|---|---|
options | Readonly<AxAIServiceOptions> |
Returns
void