Gemini
Represents a client for interacting with the Gemini API, providing methods to extract content, embed content, and retrieve model information.
Functions
Link copied to clipboard
fun batchEmbedContents(inputJson: BatchEmbedRequest, model: String = "embedding-001"): BatchEmbedResponse
Embeds contents in batch using the embedding-001 model.
Link copied to clipboard
Link copied to clipboard
Embeds content using the embedding-001 model.
Link copied to clipboard
fun generateContent(inputJson: GenerateContentRequest, model: String = "gemini-pro"): GenerateContentResponse
Generates content based on the provided input JSON using a specified model.
Link copied to clipboard
Performs a POST request to the specified URL string with the given input JSON payload.
Link copied to clipboard
Retrieves a collection of models available in the Gemini API.