Skip to content
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

Add support for options and dynamic fetching of Gemini models #12

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

irthomasthomas
Copy link

This commit adds the following changes:

  1. Introduced a GeminiOptions class that extends llm.Options and provides configuration options for the Gemini models, such as max_tokens, temperature, top_p, and top_k.

  2. Implemented a fetch_available_models function that uses the Gemini API to dynamically fetch the list of available models and their supported generation methods.

  3. Updated the register_models function to use the fetch_available_models function to register all available Gemini models, rather than hardcoding a limited set.

  4. Similarly, the register_embedding_models function was updated to dynamically register all Gemini embedding models.

These changes make the Gemini integration more robust and flexible, allowing it to adapt to changes in the available Gemini models without requiring manual updates to the code.

This commit adds the following changes:

1. Introduced a `GeminiOptions` class that extends `llm.Options` and provides configuration options for the Gemini models, such as `max_tokens`, `temperature`, `top_p`, and `top_k`.

2. Implemented a `fetch_available_models` function that uses the Gemini API to dynamically fetch the list of available models and their supported generation methods.

3. Updated the `register_models` function to use the `fetch_available_models` function to register all available Gemini models, rather than hardcoding a limited set.

4. Similarly, the `register_embedding_models` function was updated to dynamically register all Gemini embedding models.

These changes make the Gemini integration more robust and flexible, allowing it to adapt to changes in the available Gemini models without requiring manual updates to the code.
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.

1 participant