AxAIServiceImpl
Defined in: https://github.com/ax-llm/ax/blob/8dfd0ce02b8cb386fb2c93fa280a2ec0da2d6011/src/ax/ai/types.ts#L493
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/8dfd0ce02b8cb386fb2c93fa280a2ec0da2d6011/src/ax/ai/types.ts#L502
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/8dfd0ce02b8cb386fb2c93fa280a2ec0da2d6011/src/ax/ai/types.ts#L507
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/8dfd0ce02b8cb386fb2c93fa280a2ec0da2d6011/src/ax/ai/types.ts#L509
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/8dfd0ce02b8cb386fb2c93fa280a2ec0da2d6011/src/ax/ai/types.ts#L514
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/8dfd0ce02b8cb386fb2c93fa280a2ec0da2d6011/src/ax/ai/types.ts#L518
Parameters
Parameter | Type |
---|---|
resp | Readonly <TEmbedResponse > |
Returns
getModelConfig()
getModelConfig(): AxModelConfig;
Defined in: https://github.com/ax-llm/ax/blob/8dfd0ce02b8cb386fb2c93fa280a2ec0da2d6011/src/ax/ai/types.ts#L520
Returns
getTokenUsage()
getTokenUsage(): undefined | AxTokenUsage;
Defined in: https://github.com/ax-llm/ax/blob/8dfd0ce02b8cb386fb2c93fa280a2ec0da2d6011/src/ax/ai/types.ts#L522
Returns
undefined
| AxTokenUsage