AxAIChromeAIImpl Generated TypeScript API reference. typescript api api/reference build/apidocs/Class.AxAIChromeAIImpl.md class AxAIChromeAIImpl

AxAIChromeAIImpl

Defined in: https://github.com/ax-llm/ax/blob/3d5aa8dac28a2637e4150f022dcd02e6fc3309f0/src/ax/ai/chrome-ai/api.ts#L93

Implements

Constructors

Constructor

TypeScript
new AxAIChromeAIImpl(config: AxAIChromeAIConfig, languageModel?: ChromeAILanguageModel): AxAIChromeAIImpl;

Defined in: https://github.com/ax-llm/ax/blob/3d5aa8dac28a2637e4150f022dcd02e6fc3309f0/src/ax/ai/chrome-ai/api.ts#L108

Parameters

ParameterType
configAxAIChromeAIConfig
languageModel?ChromeAILanguageModel

Returns

AxAIChromeAIImpl

Methods

createChatReq()

TypeScript
createChatReq(req: Readonly<AxInternalChatRequest<AxAIChromeAIModelId>>, options?: Readonly<AxAIServiceOptions>): [AxAPI, AxAIChromeAIChatRequest];

Defined in: https://github.com/ax-llm/ax/blob/3d5aa8dac28a2637e4150f022dcd02e6fc3309f0/src/ax/ai/chrome-ai/api.ts#L129

Parameters

ParameterType
reqReadonly<AxInternalChatRequest<AxAIChromeAIModelId>>
options?Readonly<AxAIServiceOptions>

Returns

[AxAPI, AxAIChromeAIChatRequest]

Implementation of

AxAIServiceImpl.createChatReq


createChatResp()

TypeScript
createChatResp(resp: Readonly<AxAIChromeAIChatResponse>): AxChatResponse;

Defined in: https://github.com/ax-llm/ax/blob/3d5aa8dac28a2637e4150f022dcd02e6fc3309f0/src/ax/ai/chrome-ai/api.ts#L462

Parameters

ParameterType
respReadonly<AxAIChromeAIChatResponse>

Returns

AxChatResponse

Implementation of

AxAIServiceImpl.createChatResp


createChatStreamResp()

TypeScript
createChatStreamResp(resp: Readonly<AxAIChromeAIChatResponseDelta>, _state: object): AxChatResponse;

Defined in: https://github.com/ax-llm/ax/blob/3d5aa8dac28a2637e4150f022dcd02e6fc3309f0/src/ax/ai/chrome-ai/api.ts#L477

Parameters

ParameterType
respReadonly<AxAIChromeAIChatResponseDelta>
_stateobject

Returns

AxChatResponse

Implementation of

AxAIServiceImpl.createChatStreamResp


createEmbedReq()

TypeScript
createEmbedReq(_req: Readonly<AxInternalEmbedRequest<AxAIChromeAIEmbedModel>>): [AxAPI, never];

Defined in: https://github.com/ax-llm/ax/blob/3d5aa8dac28a2637e4150f022dcd02e6fc3309f0/src/ax/ai/chrome-ai/api.ts#L456

Parameters

ParameterType
_reqReadonly<AxInternalEmbedRequest<AxAIChromeAIEmbedModel>>

Returns

[AxAPI, never]

Implementation of

AxAIServiceImpl.createEmbedReq


createEmbedResp()

TypeScript
createEmbedResp(_resp: never): AxEmbedResponse;

Defined in: https://github.com/ax-llm/ax/blob/3d5aa8dac28a2637e4150f022dcd02e6fc3309f0/src/ax/ai/chrome-ai/api.ts#L495

Parameters

ParameterType
_respnever

Returns

AxEmbedResponse

Implementation of

AxAIServiceImpl.createEmbedResp


getModelConfig()

TypeScript
getModelConfig(): AxModelConfig;

Defined in: https://github.com/ax-llm/ax/blob/3d5aa8dac28a2637e4150f022dcd02e6fc3309f0/src/ax/ai/chrome-ai/api.ts#L119

Returns

AxModelConfig

Implementation of

AxAIServiceImpl.getModelConfig


getTokenUsage()

TypeScript
getTokenUsage(): AxTokenUsage | undefined;

Defined in: https://github.com/ax-llm/ax/blob/3d5aa8dac28a2637e4150f022dcd02e6fc3309f0/src/ax/ai/chrome-ai/api.ts#L115

Returns

AxTokenUsage | undefined

Implementation of

AxAIServiceImpl.getTokenUsage

Docs