-
-
Notifications
You must be signed in to change notification settings - Fork 20
feat: Added AI powered stock Analyser ChatBot #69
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
Conversation
|
@Chaitu7032 is attempting to deploy a commit to the mihir2006's projects Team on Vercel. A member of the Team first needs to authorize it. |
Thanks for creating this PRWe'll review it as soon as possible. If there are any unresolved review comments, feel free to resolve them. |
Summary of ChangesHello @Chaitu7032, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces a new AI-powered stock analyzer chatbot feature, enhancing the application's capabilities for investment recommendations and real-time stock data processing. The changes involve setting up the necessary backend infrastructure, including flexible database options and new external API integrations, and integrating an interactive chatbot user interface into the frontend. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request introduces an AI-powered stock analyzer chatbot, a significant new feature. The changes include backend API setup, frontend component integration, and configuration updates. While the feature implementation is largely on track, there are a few important issues to address. In the backend, there's a critical issue in main.py where API routers are registered twice, which will lead to duplicate endpoints. On the frontend, HomeClient.tsx contains leftover debugging code that should be removed, including an unused import. Additionally, the new Chatbot component in layout.tsx is imported using an inconsistent path. Addressing these points will improve the code's correctness and maintainability.
| app.include_router(auth.router, prefix="/api", tags=["Authentication"]) | ||
| app.include_router(stocks.router, prefix="/api", tags=["Stocks"]) | ||
| app.include_router(market.router, prefix="/api", tags=["Market"]) | ||
| app.include_router(portfolios.router, prefix="/api", tags=["Portfolios"]) | ||
| app.include_router(chatbot.router, prefix="/api", tags=["Chatbot"]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| "use client"; | ||
| import { useEffect, useState } from "react"; | ||
| import Landing from "@/components/Landing"; | ||
| import SimpleLanding from "@/components/SimpleLanding"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| // Temporarily disable preloader for debugging | ||
| const [isLoading, setIsLoading] = useState(false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This appears to be temporary debugging code that disables the preloader. Please revert this to the original logic before merging.
| // Temporarily disable preloader for debugging | |
| const [isLoading, setIsLoading] = useState(false); | |
| const [isLoading, setIsLoading] = useState(!hasShownPreloader); |
| setIsLoading(false); | ||
| hasShownPreloader = true; | ||
| }, 2500); | ||
| }, 500); // Reduced to 0.5 seconds for testing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| import { Toaster as Sonner } from "@/components/ui/sonner"; | ||
| import { Toaster } from "@/components/ui/toaster"; | ||
| import { TooltipProvider } from "@/components/ui/tooltip"; | ||
| import Chatbot from "./components/chatbot"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This import uses a relative path (./components/chatbot), which is inconsistent with other component imports in this file that use the @/ path alias (e.g., @/components/ui/tooltip on line 5). For consistency and better project structure, it's recommended to place shared components in the top-level components directory and import them using the alias.
| import Chatbot from "./components/chatbot"; | |
| import Chatbot from "@/components/chatbot"; |
Features: