AxBaseAI
Defined in: https://github.com/ax-llm/ax/blob/b50783a160295ce34ac10dcaf3bd8fff4a01d535/src/ax/ai/base.ts#L139
Extended by
AxAIAnthropicAxAICohereAxAIGoogleGeminiAxAIHuggingFaceAxAIOpenAIBaseAxAIOpenAIResponsesBaseAxAIRekaAxAIWebLLM
Type Parameters
| Type Parameter |
|---|
TModel |
TEmbedModel |
TChatRequest |
TEmbedRequest |
TChatResponse |
TChatResponseDelta |
TEmbedResponse |
TModelKey |
Implements
AxAIService<TModel,TEmbedModel,TModelKey>
Constructors
Constructor
new AxBaseAI<TModel, TEmbedModel, TChatRequest, TEmbedRequest, TChatResponse, TChatResponseDelta, TEmbedResponse, TModelKey>(aiImpl: Readonly<AxAIServiceImpl<TModel, TEmbedModel, TChatRequest, TEmbedRequest, TChatResponse, TChatResponseDelta, TEmbedResponse>>, __namedParameters: Readonly<AxBaseAIArgs<TModel, TEmbedModel, TModelKey>>): AxBaseAI<TModel, TEmbedModel, TChatRequest, TEmbedRequest, TChatResponse, TChatResponseDelta, TEmbedResponse, TModelKey>;
Defined in: https://github.com/ax-llm/ax/blob/b50783a160295ce34ac10dcaf3bd8fff4a01d535/src/ax/ai/base.ts#L207
Parameters
| Parameter | Type |
|---|---|
aiImpl | Readonly<AxAIServiceImpl<TModel, TEmbedModel, TChatRequest, TEmbedRequest, TChatResponse, TChatResponseDelta, TEmbedResponse>> |
__namedParameters | Readonly<AxBaseAIArgs<TModel, TEmbedModel, TModelKey>> |
Returns
AxBaseAI<TModel, TEmbedModel, TChatRequest, TEmbedRequest, TChatResponse, TChatResponseDelta, TEmbedResponse, TModelKey>
Accessors
debug
Get Signature
get debug(): boolean;
Defined in: https://github.com/ax-llm/ax/blob/b50783a160295ce34ac10dcaf3bd8fff4a01d535/src/ax/ai/base.ts#L281
Returns
boolean
Methods
chat()
chat(req: Readonly<AxChatRequest<TModel | TModelKey>>, options?: Readonly<AxAIServiceOptions>): Promise<
| AxChatResponse
| ReadableStream<AxChatResponse>>;
Defined in: https://github.com/ax-llm/ax/blob/b50783a160295ce34ac10dcaf3bd8fff4a01d535/src/ax/ai/base.ts#L873
Parameters
| Parameter | Type |
|---|---|
req | Readonly<AxChatRequest<TModel | TModelKey>> |
options? | Readonly<AxAIServiceOptions> |
Returns
Promise<
| AxChatResponse
| ReadableStream<AxChatResponse>>
Implementation of
embed()
embed(req: Readonly<AxEmbedRequest<TEmbedModel>>, options?: Readonly<AxAIServiceOptions>): Promise<AxEmbedResponse>;
Defined in: https://github.com/ax-llm/ax/blob/b50783a160295ce34ac10dcaf3bd8fff4a01d535/src/ax/ai/base.ts#L1379
Parameters
| Parameter | Type |
|---|---|
req | Readonly<AxEmbedRequest<TEmbedModel>> |
options? | Readonly<AxAIServiceOptions> |
Returns
Promise<AxEmbedResponse>
Implementation of
getFeatures()
getFeatures(model?: TModel): AxAIFeatures;
Defined in: https://github.com/ax-llm/ax/blob/b50783a160295ce34ac10dcaf3bd8fff4a01d535/src/ax/ai/base.ts#L348
Parameters
| Parameter | Type |
|---|---|
model? | TModel |
Returns
Implementation of
getId()
getId(): string;
Defined in: https://github.com/ax-llm/ax/blob/b50783a160295ce34ac10dcaf3bd8fff4a01d535/src/ax/ai/base.ts#L269
Returns
string
Implementation of
getLastUsedChatModel()
getLastUsedChatModel(): undefined | TModel;
Defined in: https://github.com/ax-llm/ax/blob/b50783a160295ce34ac10dcaf3bd8fff4a01d535/src/ax/ai/base.ts#L354
Returns
undefined | TModel
Implementation of
AxAIService.getLastUsedChatModel
getLastUsedEmbedModel()
getLastUsedEmbedModel(): undefined | TEmbedModel;
Defined in: https://github.com/ax-llm/ax/blob/b50783a160295ce34ac10dcaf3bd8fff4a01d535/src/ax/ai/base.ts#L358
Returns
undefined | TEmbedModel
Implementation of
AxAIService.getLastUsedEmbedModel
getLastUsedModelConfig()
getLastUsedModelConfig(): undefined | AxModelConfig;
Defined in: https://github.com/ax-llm/ax/blob/b50783a160295ce34ac10dcaf3bd8fff4a01d535/src/ax/ai/base.ts#L362
Returns
undefined | AxModelConfig
Implementation of
AxAIService.getLastUsedModelConfig
getLogger()
getLogger(): AxLoggerFunction;
Defined in: https://github.com/ax-llm/ax/blob/b50783a160295ce34ac10dcaf3bd8fff4a01d535/src/ax/ai/base.ts#L313
Returns
Implementation of
getMetrics()
getMetrics(): AxAIServiceMetrics;
Defined in: https://github.com/ax-llm/ax/blob/b50783a160295ce34ac10dcaf3bd8fff4a01d535/src/ax/ai/base.ts#L869
Returns
Implementation of
getModelList()
getModelList(): (
| {
description: string;
embedModel?: undefined;
key: TModelKey;
model: string;
}
| {
description: string;
embedModel: string;
key: TModelKey;
model?: undefined;
})[];
Defined in: https://github.com/ax-llm/ax/blob/b50783a160295ce34ac10dcaf3bd8fff4a01d535/src/ax/ai/base.ts#L317
Returns
(
| {
description: string;
embedModel?: undefined;
key: TModelKey;
model: string;
}
| {
description: string;
embedModel: string;
key: TModelKey;
model?: undefined;
})[]
Implementation of
getName()
getName(): string;
Defined in: https://github.com/ax-llm/ax/blob/b50783a160295ce34ac10dcaf3bd8fff4a01d535/src/ax/ai/base.ts#L344
Returns
string
Implementation of
getOptions()
getOptions(): Readonly<AxAIServiceOptions>;
Defined in: https://github.com/ax-llm/ax/blob/b50783a160295ce34ac10dcaf3bd8fff4a01d535/src/ax/ai/base.ts#L298
Returns
Readonly<AxAIServiceOptions>
Implementation of
setAPIURL()
setAPIURL(apiURL: string): void;
Defined in: https://github.com/ax-llm/ax/blob/b50783a160295ce34ac10dcaf3bd8fff4a01d535/src/ax/ai/base.ts#L273
Parameters
| Parameter | Type |
|---|---|
apiURL | string |
Returns
void
setHeaders()
setHeaders(headers: () => Promise<Record<string, string>>): void;
Defined in: https://github.com/ax-llm/ax/blob/b50783a160295ce34ac10dcaf3bd8fff4a01d535/src/ax/ai/base.ts#L277
Parameters
| Parameter | Type |
|---|---|
headers | () => Promise<Record<string, string>> |
Returns
void
setName()
setName(name: string): void;
Defined in: https://github.com/ax-llm/ax/blob/b50783a160295ce34ac10dcaf3bd8fff4a01d535/src/ax/ai/base.ts#L265
Parameters
| Parameter | Type |
|---|---|
name | string |
Returns
void
setOptions()
setOptions(options: Readonly<AxAIServiceOptions>): void;
Defined in: https://github.com/ax-llm/ax/blob/b50783a160295ce34ac10dcaf3bd8fff4a01d535/src/ax/ai/base.ts#L285
Parameters
| Parameter | Type |
|---|---|
options | Readonly<AxAIServiceOptions> |
Returns
void