Skip to content

AxAIGoogleGemini

Class: AxAIGoogleGemini

AxAIGoogleGemini: AI Service

Export

Extends

Constructors

new AxAIGoogleGemini()

new AxAIGoogleGemini(__namedParameters): AxAIGoogleGemini

Parameters

__namedParameters: Readonly<Omit<AxAIGoogleGeminiArgs, "name">>

Returns

AxAIGoogleGemini

Overrides

AxBaseAI.constructor

Defined in

src/ax/ai/google-gemini/api.ts:109

Properties

apiURL

protected apiURL: string

Inherited from

AxBaseAI.apiURL

Defined in

src/ax/ai/base.ts:95


headers

protected headers: Record<string, string>

Inherited from

AxBaseAI.headers

Defined in

src/ax/ai/base.ts:97


name

protected name: string

Inherited from

AxBaseAI.name

Defined in

src/ax/ai/base.ts:96


supportFor

protected supportFor: AxBaseAIFeatures | (model) => AxBaseAIFeatures

Inherited from

AxBaseAI.supportFor

Defined in

src/ax/ai/base.ts:98

Methods

_chat()

_chat(model, chatReq, options?, span?): Promise<AxChatResponse | ReadableStream<AxChatResponse>>

Parameters

model: string

chatReq: Readonly<AxChatRequest>

options?: Readonly<AxAIPromptConfig & AxAIServiceActionOptions>

span?: AxSpan

Returns

Promise<AxChatResponse | ReadableStream<AxChatResponse>>

Inherited from

AxBaseAI._chat

Defined in

src/ax/ai/base.ts:254


_embed()

_embed(embedModel, embedReq, options?, span?): Promise<AxEmbedResponse>

Parameters

embedModel: string

embedReq: Readonly<AxEmbedRequest>

options?: Readonly<AxAIServiceActionOptions>

span?: AxSpan

Returns

Promise<AxEmbedResponse>

Inherited from

AxBaseAI._embed

Defined in

src/ax/ai/base.ts:400


chat()

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

Parameters

req: Readonly<AxChatRequest>

options?: Readonly<AxAIPromptConfig & AxAIServiceActionOptions>

Returns

Promise<AxChatResponse | ReadableStream<AxChatResponse>>

Inherited from

AxBaseAI.chat

Defined in

src/ax/ai/base.ts:212


embed()

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

Parameters

req: Readonly<AxEmbedRequest>

options?: Readonly<AxAIServiceActionOptions>

Returns

Promise<AxEmbedResponse>

Inherited from

AxBaseAI.embed

Defined in

src/ax/ai/base.ts:367


generateChatReq()

generateChatReq(req): [API, AxAIGoogleGeminiChatRequest]

Parameters

req: Readonly<AxInternalChatRequest>

Returns

[API, AxAIGoogleGeminiChatRequest]

Overrides

AxBaseAI.generateChatReq

Defined in

src/ax/ai/google-gemini/api.ts:160


generateChatResp()

generateChatResp(resp): AxChatResponse

Parameters

resp: Readonly<AxAIGoogleGeminiChatResponse>

Returns

AxChatResponse

Overrides

AxBaseAI.generateChatResp

Defined in

src/ax/ai/google-gemini/api.ts:377


generateChatStreamResp()

generateChatStreamResp(resp): AxChatResponse

Parameters

resp: Readonly<AxAIGoogleGeminiChatResponse>

Returns

AxChatResponse

Overrides

AxBaseAI.generateChatStreamResp

Defined in

src/ax/ai/google-gemini/api.ts:437


generateEmbedReq()

generateEmbedReq(req): [API, AxAIGoogleGeminiBatchEmbedRequest]

Parameters

req: Readonly<AxInternalEmbedRequest>

Returns

[API, AxAIGoogleGeminiBatchEmbedRequest]

Overrides

AxBaseAI.generateEmbedReq

Defined in

src/ax/ai/google-gemini/api.ts:350


generateEmbedResp()

generateEmbedResp(resp): AxEmbedResponse

Parameters

resp: Readonly<AxAIGoogleGeminiBatchEmbedResponse>

Returns

AxEmbedResponse

Overrides

AxBaseAI.generateEmbedResp

Defined in

src/ax/ai/google-gemini/api.ts:443


getEmbedModelInfo()

getEmbedModelInfo(): undefined | AxModelInfoWithProvider

Returns

undefined | AxModelInfoWithProvider

Inherited from

AxBaseAI.getEmbedModelInfo

Defined in

src/ax/ai/base.ts:185


getFeatures()

getFeatures(model?): AxBaseAIFeatures

Parameters

model?: string

Returns

AxBaseAIFeatures

Inherited from

AxBaseAI.getFeatures

Defined in

src/ax/ai/base.ts:202


getModelConfig()

getModelConfig(): AxModelConfig

Returns

AxModelConfig

Overrides

AxBaseAI.getModelConfig

Defined in

src/ax/ai/google-gemini/api.ts:150


getModelInfo()

getModelInfo(): Readonly<AxModelInfoWithProvider>

Returns

Readonly<AxModelInfoWithProvider>

Inherited from

AxBaseAI.getModelInfo

Defined in

src/ax/ai/base.ts:178


getModelMap()

getModelMap(): undefined | AxAIModelMap

Returns

undefined | AxAIModelMap

Inherited from

AxBaseAI.getModelMap

Defined in

src/ax/ai/base.ts:194


getName()

getName(): string

Returns

string

Inherited from

AxBaseAI.getName

Defined in

src/ax/ai/base.ts:198


setAPIURL()

setAPIURL(apiURL): void

Parameters

apiURL: string

Returns

void

Inherited from

AxBaseAI.setAPIURL

Defined in

src/ax/ai/base.ts:139


setHeaders()

setHeaders(headers): void

Parameters

headers: Record<string, string>

Returns

void

Inherited from

AxBaseAI.setHeaders

Defined in

src/ax/ai/base.ts:143


setName()

setName(name): void

Parameters

name: string

Returns

void

Inherited from

AxBaseAI.setName

Defined in

src/ax/ai/base.ts:135


setOptions()

setOptions(options): void

Parameters

options: Readonly<AxAIServiceOptions>

Returns

void

Inherited from

AxBaseAI.setOptions

Defined in

src/ax/ai/base.ts:147