ai.GeminiV1BetaGenerateContentRequest interface

Request sent to generateContent endpoint.

Signature:

export declare interface GenerateContentRequest extends BaseParams 

Extends: BaseParams

Properties

Property Type Description
cachedContent string This is the name of a CachedContent and not the cache object itself.
contents Content[] Array of conversation turns (Content) that make up the prompt.
generationConfig GenerationConfig Optional generation configuration.
safetySettings SafetySetting[] Optional safety settings.
systemInstruction string | Part | Content Optional system instructions for the model.
toolConfig ToolConfig Optional tool configuration.
tools Tool[] Optional tools (such as function declarations) the model can interact with to assist in generating a response.

ai.GeminiV1BetaGenerateContentRequest.cachedContent

This is the name of a CachedContent and not the cache object itself.

Signature:

cachedContent?: string;

ai.GeminiV1BetaGenerateContentRequest.contents

Array of conversation turns (Content) that make up the prompt.

Signature:

contents: Content[];

ai.GeminiV1BetaGenerateContentRequest.generationConfig

Optional generation configuration.

Signature:

generationConfig?: GenerationConfig;

ai.GeminiV1BetaGenerateContentRequest.safetySettings

Optional safety settings.

Signature:

safetySettings?: SafetySetting[];

ai.GeminiV1BetaGenerateContentRequest.systemInstruction

Optional system instructions for the model.

Signature:

systemInstruction?: string | Part | Content;

ai.GeminiV1BetaGenerateContentRequest.toolConfig

Optional tool configuration.

Signature:

toolConfig?: ToolConfig;

ai.GeminiV1BetaGenerateContentRequest.tools

Optional tools (such as function declarations) the model can interact with to assist in generating a response.

Signature:

tools?: Tool[];