google_generative_language_api library

Adds a rest client for the Google Generative Language API.

Classes

ContentFilter
Content filtering metadata associated with processing a single request.
CountMessageTokensRequest
Represents a request to count the number of tokens in a message.
EmbeddedText
The response to a EmbedTextRequest.
Embedding
A list of floats representing the embedding.
EmbedTextRequest
The request body to generate an embedding from text.
Example
An input/output example used to instruct the Model.
GeneratedMessage
Represents the output of a generateMessage response from the model.
GeneratedResponseBase<T>
Represents an abstract generated response from the model.
GeneratedText
Represents the output of a generateText response from the model.
GenerateMessageRequest
Represents a request to generate a message.
GenerateRequestBase<T extends Prompt>
Represents an abstract request to generate text or a message.
GenerateTextRequest
Represents a request to generate text.
GenerativeLanguageAPI
The GenerativeLanguageAPI class provides methods for interacting with the Generative Language API.
ListModelResponse
Represents the response from the listModels API call, containing a paginated list of models.
Message
The base unit of structured text.
MessagePrompt
All of the structured input text passed to the model as a prompt.
Model
Information about a Generative Language Model.
Prompt
Represents an abstract prompt for generating text.
SafetyFeedback
Safety feedback for an entire request.
SafetyRating
Safety rating for a piece of content.
SafetySetting
Safety setting, affecting the safety-blocking behavior.
TextCompletion
Output text returned from a model.
TextPrompt
Text given to the model as a prompt.

Enums

BlockedReason
A list of reasons why content may have been blocked.
HarmBlockThreshold
Block at and beyond a specified harm probability.
HarmCategory
The category of a rating.
HarmProbability
The probability that a piece of content is harmful.