Skip to content

Add support for Gemini models #129

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Apr 13, 2025

Conversation

StreetLamb
Copy link
Collaborator

@StreetLamb StreetLamb commented Apr 12, 2025

Add support for Gemini models. Currently, JSON schema is not compatible with Gemini models, so a 'good effort' conversion is used to transform it into a subset of OpenAPI 3.0, which Gemini supports.

Resolves #93, resolves #121.

@StreetLamb StreetLamb changed the title WIP: Add support for Gemini models Add support for Gemini models Apr 13, 2025
Copy link
Collaborator

@saqadri saqadri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work!

@saqadri saqadri merged commit cc54cbe into lastmile-ai:main Apr 13, 2025
4 checks passed
@tihomir-kit
Copy link

@saqadri any idea when we might see a new version of the lib on pip which includes this?

Many thanks guys for your effort. Really appreciated.

saqadri pushed a commit that referenced this pull request Apr 17, 2025
* feat: add GoogleAugmentedLLM and GoogleSettings

* feat: add example for MCP Google Agent with configuration and usage instructions

* feat: update GoogleSettings to allow optional API key and enhance tool schema transformation for compatibility with Gemini

* feat: add google-genai dependency

* refactor: rename project_id to project in MCP agent config schema

* feat: enhance transform_mcp_tool_schema to track unsupported keywords in description and improve any_of handling

* feat: demonstrate generate_structured in mcp_basic_google_agent example

* fix: correct structured output generation in GoogleAugmentedLLM

* chore: update instructor dependency to version 1.7.9 and remove instructor[anthropic] from anthropic's optional dependencies

* fix: improve error handling and response processing in GoogleAugmentedLLM

* fix: remove redundant error handling for missing function call name or ID in GoogleAugmentedLLM
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Gemini (OpenAI) - Value is not a string: null Support for Gemini family of models?
3 participants