Skip to content

AxBalancer

Class: AxBalancer

Implements

Constructors

new AxBalancer()

new AxBalancer(services): AxBalancer

Parameters

services: readonly AxAIService[]

Returns

AxBalancer

Defined in

src/ax/ai/balance.ts:22

Methods

chat()

chat(req, options?): Promise<AxChatResponse | ReadableStream<AxChatResponse>>

Parameters

req: Readonly<AxChatRequest>

options?: Readonly<AxAIPromptConfig & AxAIServiceActionOptions>

Returns

Promise<AxChatResponse | ReadableStream<AxChatResponse>>

Implementation of

AxAIService.chat

Defined in

src/ax/ai/balance.ts:88


embed()

embed(req, options?): Promise<AxEmbedResponse>

Parameters

req: Readonly<AxEmbedRequest>

options?: Readonly<AxAIServiceActionOptions>

Returns

Promise<AxEmbedResponse>

Implementation of

AxAIService.embed

Defined in

src/ax/ai/balance.ts:105


getEmbedModelInfo()

getEmbedModelInfo(): undefined | Readonly<AxModelInfoWithProvider>

Returns

undefined | Readonly<AxModelInfoWithProvider>

Implementation of

AxAIService.getEmbedModelInfo

Defined in

src/ax/ai/balance.ts:76


getFeatures()

getFeatures(): object

Returns

object

functions

functions: boolean

streaming

streaming: boolean

Implementation of

AxAIService.getFeatures

Defined in

src/ax/ai/balance.ts:84


getModelConfig()

getModelConfig(): Readonly<AxModelConfig>

Returns

Readonly<AxModelConfig>

Implementation of

AxAIService.getModelConfig

Defined in

src/ax/ai/balance.ts:80


getModelInfo()

getModelInfo(): Readonly<AxModelInfoWithProvider>

Returns

Readonly<AxModelInfoWithProvider>

Implementation of

AxAIService.getModelInfo

Defined in

src/ax/ai/balance.ts:72


getModelMap()

getModelMap(): undefined | AxAIModelMap

Returns

undefined | AxAIModelMap

Implementation of

AxAIService.getModelMap

Defined in

src/ax/ai/balance.ts:46


getName()

getName(): string

Returns

string

Implementation of

AxAIService.getName

Defined in

src/ax/ai/balance.ts:68


setOptions()

setOptions(options): void

Parameters

options: Readonly<AxAIServiceOptions>

Returns

void

Implementation of

AxAIService.setOptions

Defined in

src/ax/ai/balance.ts:122