modelscope-agent
modelscope-agent copied to clipboard
Feat/fin app
Change Summary
- adds full support for the fin_research app, enabling local deployment through Gradio.
- adds LocalCodeExecutionTool support for notebook_executor (Jupyter kernel), python_executor, shell_executor, reset_executor, get_executor_info, and file operations, and introduces environment-variable isolation for Jupyter kernel sessions.
- fixes the ArXiv schema format issue caused by recent API changes.
- updates the search engine to support reading thread-isolated environment variables and global configuration.
- adds a configurable option in deep research to enable or disable follow-up questions.
- updates the README documentation.
- improves working-directory awareness for the Analyst and Collector agents.
Related issue number
Checklist
- [ ] The pull request title is a good summary of the changes - it will be used in the changelog
- [ ] Unit tests for the changes exist
- [ ] Run
pre-commit installandpre-commit run --all-filesbefore git commit, and passed lint check. - [ ] Documentation reflects the changes where applicable
Summary of Changes
Hello @alcholiclg, I'm Gemini Code Assist[^1]! 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 significantly expands the platform's capabilities by introducing a dedicated financial research application, fin_research, which can be deployed locally via Gradio. It enhances the underlying code execution infrastructure with a new local code executor, providing more flexible and isolated environments for Python and shell commands. Additionally, it refines existing search functionalities, improves agent prompt handling for better working directory awareness, and adds a configurable option for user feedback in research workflows, making the system more robust and user-friendly for specialized research tasks.
Highlights
- New Financial Research Application: Introduced a new
fin_researchapplication with full support for local deployment through Gradio, enabling multi-agent financial research workflows. - Enhanced Local Code Execution: Added a
LocalCodeExecutionToolthat supports stateful execution in a Jupyter kernel environment (notebook_executor), stateless Python execution (python_executor), shell commands (shell_executor), and file operations, with environment-variable isolation for Jupyter sessions. - Dynamic Code Executor Selection: The
tool_managernow dynamically selects between the existing sandbox-basedCodeExecutionTooland the newLocalCodeExecutionToolbased on theimplementationconfiguration. - Search Engine Improvements: Updated the search engine to support thread-isolated environment variables for API keys and engine types, and fixed an ArXiv schema format issue caused by recent API changes.
- Configurable Follow-up Questions: Added a configurable option (
use_feedback) in the deep research workflow to enable or disable the generation of follow-up questions. - Agent Working Directory Awareness: Improved working-directory awareness for the Analyst and Collector agents by introducing a
<DATA_ROOT>placeholder in their system prompts, which is dynamically replaced with the actual output directory. - Tool Renaming for Clarity: Renamed
reset_sandboxtoreset_executorandget_sandbox_infotoget_executor_infoin theCodeExecutionToolfor better clarity and consistency. - Documentation Updates: Updated README documentation for both
doc_researchandfin_researchprojects, including new CLI command examples and instructions for launching the financial research app.
Using Gemini Code Assist
The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.
| Feature | Command | Description |
|---|---|---|
| Code Review | /gemini review |
Performs a code review for the current pull request in its current state. |
| Pull Request Summary | /gemini summary |
Provides a summary of the current pull request in its current state. |
| Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in pull request comments and review comments. |
| Help | /gemini help |
Displays a list of available commands. |
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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.
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 :thumbsup: and :thumbsdown: 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.
[^1]: Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.