GeezerVison is showing adk.dev — Gemini | ADK for TypeScript: API Reference - v2.5.0
Integration for Gemini models.
Constructors
constructor
-
Parameters
- params: GeminiParams
The parameters for creating a Gemini instance.
Returns Gemini
Properties
Readonly[BASE_MODEL_SYMBOL]
"[BASE_MODEL_SYMBOL]": true
A unique symbol to identify BaseLlm classes.
Readonly[GEMINI_MODEL_SYMBOL]
"[GEMINI_MODEL_SYMBOL]": true
Readonlymodel
model: string
ReadonlyuseInteractionsApi
useInteractionsApi: boolean
Protected Readonlyvertexai
vertexai: boolean
Static ReadonlysupportedModels
supportedModels: (string | RegExp)[] = ...
A list of model name patterns that are supported by this LLM.
Returns
A list of supported models.
Accessors
Methods
connect
-
Connects to the Gemini model and returns an llm connection.
Parameters
- llmRequest: LlmRequest
LlmRequest, the request to send to the Gemini model.
BaseLlmConnection, the connection to the Gemini model.
generateContentAsync
-
generateContentAsync( llmRequest: LlmRequest, stream?: boolean, abortSignal?: AbortSignal,): AsyncGenerator<LlmResponse, void>
Sends a request to the Gemini model.
Parameters
- llmRequest: LlmRequest
The request to send to the Gemini model.
- stream: boolean = false
Whether to make a streaming call. Defaults to false.
OptionalabortSignal: AbortSignal
Returns AsyncGenerator<LlmResponse, void>
Yields
Each LlmResponse produced by the model. A non-streaming
call yields exactly one; a streaming call yields the partial responses
as they arrive, then a final aggregated response whenever the stream
carried either content or usage/grounding/citation metadata. A
metadata-only stream therefore still ends with one, holding the
metadata and no content; only a stream with neither ends silently.
ProtectedgetHttpOptions
-
getHttpOptions(): HttpOptions
ProtectedgetLiveHttpOptions
-
getLiveHttpOptions(): HttpOptions
maybeAppendUserContent
-
maybeAppendUserContent(llmRequest: LlmRequest): void
Appends a user content, so that model can continue to output.
Parameters
- llmRequest: LlmRequest
LlmRequest, the request to send to the LLM.
Returns void
Constructors
Properties
Accessors
Methods