[PR #352] [CLOSED] Add Gemini support, deferred imports, and improved error handling #3923

Closed
opened 2026-05-07 09:45:43 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Shubhamsaboo/awesome-llm-apps/pull/352
Author: @reblox01
Created: 9/27/2025
Status: Closed

Base: mainHead: main


📝 Commits (4)

  • db52aab init
  • d84edf0 Enhance AI Investment Agent with Gemini model support and improved error handling. Added UI for selecting model provider and streamlined API key input. Implemented helper functions for safe toolkit and agent creation, ensuring robust fallback mechanisms. Updated stock input fields for better user experience.
  • 6fe2168 Refactor AI Investment Agent to defer imports of optional dependencies until runtime, improving error handling for missing packages. Enhanced model discovery logic for the Gemini wrapper, ensuring a default model is set and providing user feedback on the selected model. Updated comments for clarity and maintainability.
  • aff4b2d Merge branch 'master'

📊 Changes

2 files changed (+291 additions, -1 deletions)

View changed files

📝 .gitignore (+2 -1)
📝 advanced_ai_agents/single_agent_apps/ai_investment_agent/investment_agent.py (+289 -0)

📄 Description

Enhance AI Investment Agent: Gemini support, deferred imports, and improved error handling

  • Add provider selection and unified API key input in investment_agent.py.
  • Implement make_gemini_model with model discovery and sensible default model ids; ensure model kwarg is set on generate calls to avoid 404s.
  • Defer agno imports until runtime and add clear st.error messages with install instructions + st.stop() when critical dependencies are missing.
  • Add safe helper functions (safe_make_yfinance_toolkit, safe_make_agent) and fallback to OpenAIChat when Gemini instantiation fails.
  • Display resolved Gemini model id in the UI for easier debugging and show success/fallback messages.
  • Improve UX: updated captions, stock input fields, spinner while analyzing, and formatted markdown output.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Shubhamsaboo/awesome-llm-apps/pull/352 **Author:** [@reblox01](https://github.com/reblox01) **Created:** 9/27/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (4) - [`db52aab`](https://github.com/Shubhamsaboo/awesome-llm-apps/commit/db52aab21c093e89fd9b111b9cbac80292203cde) init - [`d84edf0`](https://github.com/Shubhamsaboo/awesome-llm-apps/commit/d84edf06e349e711e45e519be4915f7dacea251b) Enhance AI Investment Agent with Gemini model support and improved error handling. Added UI for selecting model provider and streamlined API key input. Implemented helper functions for safe toolkit and agent creation, ensuring robust fallback mechanisms. Updated stock input fields for better user experience. - [`6fe2168`](https://github.com/Shubhamsaboo/awesome-llm-apps/commit/6fe21689397a53363b84a777187a6d9feecf166c) Refactor AI Investment Agent to defer imports of optional dependencies until runtime, improving error handling for missing packages. Enhanced model discovery logic for the Gemini wrapper, ensuring a default model is set and providing user feedback on the selected model. Updated comments for clarity and maintainability. - [`aff4b2d`](https://github.com/Shubhamsaboo/awesome-llm-apps/commit/aff4b2d25c8b90508f9042900680ab820a03b0d6) Merge branch 'master' ### 📊 Changes **2 files changed** (+291 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `.gitignore` (+2 -1) 📝 `advanced_ai_agents/single_agent_apps/ai_investment_agent/investment_agent.py` (+289 -0) </details> ### 📄 Description Enhance AI Investment Agent: Gemini support, deferred imports, and improved error handling - Add provider selection and unified API key input in `investment_agent.py`. - Implement `make_gemini_model` with model discovery and sensible default model ids; ensure `model` kwarg is set on generate calls to avoid 404s. - Defer `agno` imports until runtime and add clear `st.error` messages with install instructions + `st.stop()` when critical dependencies are missing. - Add safe helper functions (`safe_make_yfinance_toolkit`, `safe_make_agent`) and fallback to OpenAIChat when Gemini instantiation fails. - Display resolved Gemini model id in the UI for easier debugging and show success/fallback messages. - Improve UX: updated captions, stock input fields, spinner while analyzing, and formatted markdown output. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-05-07 09:45:43 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/awesome-llm-apps#3923