generative-ai-python
generative-ai-python copied to clipboard
The Gemini API Python SDK enables developers to use Google's state-of-the-art generative AI models to build AI-powered features and applications.
## Description of the change added consistency for model names in `embed_content` function Now, `genai.embed_content` function doesn't require a prefix of `models/` Can be directly used as `genai.embed_content( model="embedding-001", content="What...
### Description of the bug: ## Bug Report: Frequent 503 Errors with Tuned Models ### Description I have been using tuned models for a couple of months, and until the...
### Description of the feature request: Currently, the Gemini Python SDK only allows setting metadata (headers) at the client configuration level through `default_metadata`. This makes it difficult to set different...
### Description of the feature request: It is not immediately obvious that both camel casing and underscore pythonic style casing are interchangeable for the input data keys to Gemini. It...
## Description The current implementation of the `GenerativeModel` class doesn't properly handle async functions when passed as tools, resulting in coroutine objects never being awaited and causing runtime errors. ##...
### Description of the feature request: I need to use the `google-generativeai` Python library with routing its api requests through a proxy. However, the library doesn't natively support passing proxy...
### Description of the bug: Hello. I created a fine-tuned model 'tunedModels/example' by fine-tuning the "models/gemini-1.5-flash-001-tuning" model. And I try to make another fine tune model with parameter source_model to...
### Description of the bug: Here's MRE: ```py # /// script # requires-python = ">=3.10" # dependencies = [ # "google-generativeai==0.8.3", # "openai==1.55.3", # "pydantic==2.10.2", # ] # /// import...
### Description of the bug: It appears that all fields in the structured-output are effectively marked as optional by this line: https://github.com/google-gemini/generative-ai-python/blob/b8772ed1424a080911151b354764d76a0e7af2af/google/generativeai/types/content_types.py#L490 It was added in https://github.com/google-gemini/generative-ai-python/commit/e09e7f242abcabe1bda28168be58a751ccdc5c03, possible cause: >...