Fix run for deep-research and update readme#693
Conversation
There was a problem hiding this comment.
Summary of Changes
Hello @wangxingjun778, 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 aims to fix the execution of the deep-research project by refining its configuration management and updating its example usage. It introduces a dedicated configuration file for the project, makes the search engine configuration more flexible, and updates the default LLM API settings to use ModelScope, ensuring the project runs as intended with current recommended settings.
Highlights
- Configuration Relocation: The general
conf.yamlfile has been removed from the root directory and a new, project-specificconf.yamlhas been added toprojects/deep_research/. This centralizes the configuration for the deep research project within its own directory. - Flexible Search Engine Configuration: The
get_search_configandget_web_search_toolfunctions inms_agent/tools/search_engine.pyhave been updated to accept aconfig_fileargument. This allows the caller to dynamically specify the path to the configuration file, improving modularity. - Deep Research Project Updates: The
README.mdandrun.pyfiles within theprojects/deep_research/directory have been updated to reflect the new configuration file path. Additionally, the default research query has been slightly modified, and theOpenAIChatclient initialization now uses updated ModelScope API details and a specific Qwen model.
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 in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.
| 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 issue 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 👍 and 👎 on @gemini-code-assist comments or fill out our survey to provide feedback.
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
-
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. ↩
There was a problem hiding this comment.
Code Review
This pull request refactors the configuration loading to be more flexible by allowing a config file path to be specified. It also moves the conf.yaml to be project-specific under projects/deep_research/. The example code in run.py and the README.md has been updated to be more informative and use the new configuration loading mechanism.
I've added suggestions to improve code style consistency by using standard hash-based comments instead of multi-line strings for block comments in the Python examples.
| """ | ||
| * `api_key` (str), your API key, replace `xxx-xxx` with your actual key. Alternatively, you can use ModelScope API key, refer to https://modelscope.cn/my/myaccesstoken # noqa | ||
| * `base_url`: (str), the base URL for API requests, `https://api-inference.modelscope.cn/v1/` for ModelScope API-Inference | ||
| * `model`: (str), the model ID for inference, `Qwen/Qwen3-235B-A22B-Instruct-2507` can be recommended for document research tasks. | ||
| """ |
There was a problem hiding this comment.
Instead of a multi-line string, use a # at the beginning of each line for block comments. This is the standard convention (per PEP 8) and improves readability.
| """ | |
| * `api_key` (str), your API key, replace `xxx-xxx` with your actual key. Alternatively, you can use ModelScope API key, refer to https://modelscope.cn/my/myaccesstoken # noqa | |
| * `base_url`: (str), the base URL for API requests, `https://api-inference.modelscope.cn/v1/` for ModelScope API-Inference | |
| * `model`: (str), the model ID for inference, `Qwen/Qwen3-235B-A22B-Instruct-2507` can be recommended for document research tasks. | |
| """ | |
| # * `api_key` (str), your API key, replace `xxx-xxx` with your actual key. Alternatively, you can use ModelScope API key, refer to https://modelscope.cn/my/myaccesstoken # noqa | |
| # * `base_url`: (str), the base URL for API requests, `https://api-inference.modelscope.cn/v1/` for ModelScope API-Inference | |
| # * `model`: (str), the model ID for inference, `Qwen/Qwen3-235B-A22B-Instruct-2507` can be recommended for document research tasks. |
| """ | ||
| * `api_key` (str), your API key, replace `xxx-xxx` with your actual key. Alternatively, you can use ModelScope API key, refer to https://modelscope.cn/my/myaccesstoken # noqa | ||
| * `base_url`: (str), the base URL for API requests, `https://api-inference.modelscope.cn/v1/` for ModelScope API-Inference | ||
| * `model`: (str), the model ID for inference, `Qwen/Qwen3-235B-A22B-Instruct-2507` can be recommended for document research tasks. | ||
| """ |
There was a problem hiding this comment.
Use a # at the start of each line for multi-line comments instead of a multi-line string literal ("""..."""). This is standard Python practice (PEP 8).
# * `api_key` (str), your API key, replace `xxx-xxx` with your actual key. Alternatively, you can use ModelScope API key, refer to https://modelscope.cn/my/myaccesstoken # noqa
# * `base_url`: (str), the base URL for API requests, `https://api-inference.modelscope.cn/v1/` for ModelScope API-Inference
# * `model`: (str), the model ID for inference, `Qwen/Qwen3-235B-A22B-Instruct-2507` can be recommended for document research tasks.
No description provided.