Module generate_content

Source

Re-exports§

pub use request::*;
pub use response::*;

Modules§

request
response

Structs§

Content
FileData
FunctionCall
A predicted FunctionCall returned from the model that contains a string representing the FunctionDeclaration.name with the arguments and their values.
FunctionResponse
Required. The name of the function to call. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 63.
InlineData
VideoMetadata
Optional. For video input, the start and end offset of the video in Duration format. For example, to specify a 10 second clip starting at 1:00, set “start_offset”: { “seconds”: 60 } and “end_offset”: { “seconds”: 70 }.
VideoOffset

Enums§

HarmCategory
The category of a rating. These categories cover various kinds of harms that developers may wish to adjust.
Part
Ordered parts that make up the input. Parts may have different MIME types. For gemini-1.0-pro, only the text field is valid. The token limit is 32k. For gemini-1.0-pro-vision, you may specify either text only, text and up to 16 images, or text and 1 video. The token limit is 16k.
Role
The role in a conversation associated with the content. Specifying a role is required even in singleturn use cases. Acceptable values include the following: USER: Specifies content that’s sent by you. MODEL: Specifies the model’s response.