AxAIServiceImpl
Defined in: https://github.com/ax-llm/ax/blob/d2df625e2c2fd70a090d6321c042579c2819f0d1/src/ax/ai/types.ts#L495
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/d2df625e2c2fd70a090d6321c042579c2819f0d1/src/ax/ai/types.ts#L504
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/d2df625e2c2fd70a090d6321c042579c2819f0d1/src/ax/ai/types.ts#L509
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/d2df625e2c2fd70a090d6321c042579c2819f0d1/src/ax/ai/types.ts#L511
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/d2df625e2c2fd70a090d6321c042579c2819f0d1/src/ax/ai/types.ts#L516
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/d2df625e2c2fd70a090d6321c042579c2819f0d1/src/ax/ai/types.ts#L520
Parameters
| Parameter | Type |
|---|---|
resp | Readonly<TEmbedResponse> |
Returns
getModelConfig()
getModelConfig(): AxModelConfig;
Defined in: https://github.com/ax-llm/ax/blob/d2df625e2c2fd70a090d6321c042579c2819f0d1/src/ax/ai/types.ts#L522
Returns
getTokenUsage()
getTokenUsage(): undefined | AxTokenUsage;
Defined in: https://github.com/ax-llm/ax/blob/d2df625e2c2fd70a090d6321c042579c2819f0d1/src/ax/ai/types.ts#L524
Returns
undefined | AxTokenUsage