AxAIServiceImpl
Defined in: https://github.com/ax-llm/ax/blob/b50783a160295ce34ac10dcaf3bd8fff4a01d535/src/ax/ai/types.ts#L506
Type Parameters
| Type Parameter |
|---|
TModel |
TEmbedModel |
TChatRequest |
TEmbedRequest |
TChatResponse |
TChatResponseDelta |
TEmbedResponse |
Methods
createChatReq()
createChatReq(req: Readonly<AxInternalChatRequest<TModel>>, config?: Readonly<AxAIServiceOptions>):
| [AxAPI, TChatRequest]
| Promise<[AxAPI, TChatRequest]>;
Defined in: https://github.com/ax-llm/ax/blob/b50783a160295ce34ac10dcaf3bd8fff4a01d535/src/ax/ai/types.ts#L515
Parameters
| Parameter | Type |
|---|---|
req | Readonly<AxInternalChatRequest<TModel>> |
config? | Readonly<AxAIServiceOptions> |
Returns
| [AxAPI, TChatRequest]
| Promise<[AxAPI, TChatRequest]>
createChatResp()
createChatResp(resp: Readonly<TChatResponse>): AxChatResponse;
Defined in: https://github.com/ax-llm/ax/blob/b50783a160295ce34ac10dcaf3bd8fff4a01d535/src/ax/ai/types.ts#L520
Parameters
| Parameter | Type |
|---|---|
resp | Readonly<TChatResponse> |
Returns
createChatStreamResp()?
optional createChatStreamResp(resp: Readonly<TChatResponseDelta>, state: object): AxChatResponse;
Defined in: https://github.com/ax-llm/ax/blob/b50783a160295ce34ac10dcaf3bd8fff4a01d535/src/ax/ai/types.ts#L522
Parameters
| Parameter | Type |
|---|---|
resp | Readonly<TChatResponseDelta> |
state | object |
Returns
createEmbedReq()?
optional createEmbedReq(req: Readonly<AxInternalEmbedRequest<TEmbedModel>>):
| [AxAPI, TEmbedRequest]
| Promise<[AxAPI, TEmbedRequest]>;
Defined in: https://github.com/ax-llm/ax/blob/b50783a160295ce34ac10dcaf3bd8fff4a01d535/src/ax/ai/types.ts#L527
Parameters
| Parameter | Type |
|---|---|
req | Readonly<AxInternalEmbedRequest<TEmbedModel>> |
Returns
| [AxAPI, TEmbedRequest]
| Promise<[AxAPI, TEmbedRequest]>
createEmbedResp()?
optional createEmbedResp(resp: Readonly<TEmbedResponse>): AxEmbedResponse;
Defined in: https://github.com/ax-llm/ax/blob/b50783a160295ce34ac10dcaf3bd8fff4a01d535/src/ax/ai/types.ts#L531
Parameters
| Parameter | Type |
|---|---|
resp | Readonly<TEmbedResponse> |
Returns
getModelConfig()
getModelConfig(): AxModelConfig;
Defined in: https://github.com/ax-llm/ax/blob/b50783a160295ce34ac10dcaf3bd8fff4a01d535/src/ax/ai/types.ts#L533
Returns
getTokenUsage()
getTokenUsage(): undefined | AxTokenUsage;
Defined in: https://github.com/ax-llm/ax/blob/b50783a160295ce34ac10dcaf3bd8fff4a01d535/src/ax/ai/types.ts#L535
Returns
undefined | AxTokenUsage