OptionalrequestOptions: RequestOptionsCounts the tokens in the provided request.
Makes a single non-streaming call to the model and returns an object containing a single GenerateContentResponse.
Makes a single streaming call to the model and returns an object containing an iterable stream that iterates over all chunks in the streaming response as well as a promise that returns the final aggregated response.
Gets a new ChatSession instance which can be used for multi-turn chats.
OptionalstartChatParams: StartChatParamsStaticnormalizeInternalNormalizes the given model name to a fully qualified model resource name.
The model name to normalize.
The fully qualified model resource name.
Protected Internal_ReadonlymodelThe fully qualified model resource name to use for generating images
(for example, publishers/google/models/imagen-3.0-generate-002).
OptionalrequestOptionalsystemOptionaltoolOptionaltools
Class for generative model APIs.