feat: Add Google as an option for genai#8358
Conversation
WalkthroughSupport for the "Google" language model provider has been added to the language model component. This includes updating provider selection, model instantiation, configuration handling, and error checking to accommodate Google alongside existing providers. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant LanguageModelComponent
participant ChatGoogleGenerativeAI
User->>LanguageModelComponent: Selects "Google" as provider and configures model
LanguageModelComponent->>LanguageModelComponent: Validates API key and settings
LanguageModelComponent->>ChatGoogleGenerativeAI: Instantiates with config
ChatGoogleGenerativeAI-->>LanguageModelComponent: Returns model instance
LanguageModelComponent-->>User: Provides configured model
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🧰 Additional context used🪛 Pylint (3.3.7)src/backend/base/langflow/components/models/language_model.py[error] 4-4: Unable to import 'langchain_google_genai' (E0401) [error] 5-5: Unable to import 'langchain_openai' (E0401) 🔇 Additional comments (4)
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
This pull request adds Google as an option to the Language Model component.
Summary by CodeRabbit