Returns a custom user agent header.
Convert tools to google-genai Tool objects.
Each special tool type (google_search, google_maps, url_context, etc.) must
be in its own Tool object due to protobuf oneof constraints.
Encodes image bytes into a b64 encoded string.
Custom exception class for errors associated with the Google GenAI API.
Loads media bytes from multiple sources given a string.
(Despite the class name, this loader supports multiple media types including images, PDFs, audio, and video files.)
Currently supported:
data:image/jpeg;base64,... or
data:application/pdf;base64,...)Wrapper exception class for errors associated with the Google GenAI API.
Raised when there are specific issues related to the Google GenAI API usage in the
ChatGoogleGenerativeAI class, such as unsupported message types or roles.
Google GenAI chat model integration.