Skip to content

Commit ffd0488

Browse files
author
alcholiclg
committed
Merge remote-tracking branch 'upstream' into fix/refine_deepresearch
Merge remote-tracking branch 'upstream' into fix/refine_deepresearch
2 parents df35a8e + 9fec574 commit ffd0488

97 files changed

Lines changed: 3058 additions & 958 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.dev_scripts/dockerci.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export CODE_INTERPRETER_WORK_DIR=${GITHUB_WORKSPACE}
66
echo "${CODE_INTERPRETER_WORK_DIR}"
77

88
# cp file
9-
cp tests/* "${CODE_INTERPRETER_WORK_DIR}/"
9+
cp -r tests/* "${CODE_INTERPRETER_WORK_DIR}/"
1010
ls "${CODE_INTERPRETER_WORK_DIR}"
1111
# pip install playwright
1212
# playwright install --with-deps chromium

.github/ISSUE_TEMPLATE/doc-demo-bug.yaml

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,6 @@ body:
1111
attributes:
1212
label: Description
1313
description: |
14-
Tell us about the change you'd like to see. For example, "I'd like to
15-
see more examples of how to create a new tool."
14+
Tell us about the change you'd like to see, and the link of the code/doc block.
1615
validations:
1716
required: true
18-
19-
- type: textarea
20-
attributes:
21-
label: Link
22-
description: |
23-
If the problem is related to an existing section, please add a link to
24-
the section. For example, https://github.com/modelscope/ms-agent/blob/main/demo/demo_alpha_umi.ipynb.
25-
validations:
26-
required: false

.github/ISSUE_TEMPLATE/feature-requests.yaml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,4 @@ body:
1717
- type: textarea
1818
attributes:
1919
label: Description
20-
description: A short description of your feature
21-
22-
- type: textarea
23-
attributes:
24-
label: Use case
25-
description: >
26-
Describe what you're trying to achieve with this feature request. This helps us understand and prioritize it.
27-
placeholder: >
28-
Tell us what you're trying to do or solve.
20+
description: A description of your feature, meanwhile please attach any links/papers related to the feature.

.github/workflows/citest.yaml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,17 @@ on:
88
paths-ignore:
99
- "setup.*"
1010
- "requirements.txt"
11-
- "output/**"
11+
- "requirements/*"
1212
- "README.md"
13-
- "README_CN.md"
1413
- ".github/workflows/lint.yaml"
1514
- ".github/workflows/publish.yaml"
1615

1716
pull_request:
1817
paths-ignore:
1918
- "setup.*"
2019
- "requirements.txt"
20+
- "requirements/*"
2121
- "README.md"
22-
- "README_zh-CN.md"
2322
- ".github/workflows/lint.yaml"
2423
- ".github/workflows/publish.yaml"
2524

@@ -34,6 +33,7 @@ jobs:
3433
timeout-minutes: 60
3534
environment: testci
3635
steps:
36+
- uses: actions/checkout@v4
3737

3838
# Add a step to check if it's a fork and set an environment variable
3939
- name: Check if PR is from a fork
@@ -50,11 +50,10 @@ jobs:
5050
if: steps.cache.outputs.cache-hit != 'true'
5151
run: pip install -r requirements/research.txt
5252

53-
- name: Run tests
54-
env:
55-
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
56-
DASHSCOPE_API_KEY: ${{ secrets.DASHSCOPE_API_KEY }}
57-
MODELSCOPE_API_KEY: ${{ secrets.MODELSCOPE_API_KEY }}
53+
- name: Install Code Dependencies
54+
if: steps.cache.outputs.cache-hit != 'true'
55+
run: pip install -r requirements/code.txt
5856

57+
- name: Run tests
5958
shell: bash
6059
run: bash .dev_scripts/dockerci.sh

.pre-commit-config.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ repos:
2020
(?x)^(
2121
examples/|
2222
tests/run.py|
23-
swift/cli/sft.py
2423
)$
2524
- repo: https://github.com/pre-commit/mirrors-yapf.git
2625
rev: v0.30.0

.pre-commit-config_local.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ repos:
1717
(?x)^(
1818
examples/|
1919
tests/run.py|
20-
swift/cli/sft.py
2120
)$
2221
- repo: /home/admin/pre-commit/mirrors-yapf
2322
rev: v0.30.0

README.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<p>
88

99
<p align="center">
10-
<a href="https://modelscope.cn/mcp/playground">MCP Playground</a> | <a href="https://arxiv.org/abs/2309.00986">Paper</a>
10+
<a href="https://modelscope.cn/mcp/playground">MCP Playground</a> | <a href="https://arxiv.org/abs/2309.00986">Paper</a> | <a href="https://ms-agent-en.readthedocs.io/en/latest">Docs</a>
1111
<br>
1212
</p>
1313

@@ -152,10 +152,11 @@ export MODELSCOPE_API_KEY={your_modelscope_api_key}
152152
You can find or generate your API key at https://modelscope.cn/my/myaccesstoken.
153153
154154
```python
155-
from ms_agent import LLMAgent
156155
import asyncio
157156
158-
# Configure MCP server
157+
from ms_agent import LLMAgent
158+
159+
# Configure MCP servers
159160
mcp = {
160161
"mcpServers": {
161162
"fetch": {
@@ -166,13 +167,12 @@ mcp = {
166167
}
167168
168169
async def main():
169-
# Initialize the agent with MCP configuration
170-
llm_agent = LLMAgent(mcp_config=mcp)
171-
# Run a task
172-
await llm_agent.run('Briefly introduce modelscope.cn')
170+
# Use json to configure MCP
171+
llm_agent = LLMAgent(mcp_config=mcp) # Run task
172+
await llm_agent.run('Introduce modelscope.cn')
173173
174174
if __name__ == '__main__':
175-
# Launch the async main function
175+
# Start
176176
asyncio.run(main())
177177
```
178178
----
@@ -210,7 +210,8 @@ This example demonstrates how the agent remembers user preferences across sessio
210210
import uuid
211211
import asyncio
212212
from omegaconf import OmegaConf
213-
from ms_agent.agent import LLMAgent
213+
from ms_agent.agent.loader import AgentLoader
214+
214215
215216
async def main():
216217
random_id = str(uuid.uuid4())
@@ -220,18 +221,18 @@ async def main():
220221
'user_id': 'awesome_me'
221222
}]
222223
})
223-
agent1 = LLMAgent(config=default_memory)
224+
agent1 = AgentLoader.build(config_dir_or_id='ms-agent/simple_agent', config=default_memory)
224225
agent1.config.callbacks.remove('input_callback') # Disable interactive input for direct output
225226
226227
await agent1.run('I am a vegetarian and I drink coffee every morning.')
227228
del agent1
228229
print('========== Data preparation completed, starting test ===========')
229-
agent2 = LLMAgent(config=default_memory)
230+
agent2 = AgentLoader.build(config_dir_or_id='ms-agent/simple_agent', config=default_memory)
230231
agent2.config.callbacks.remove('input_callback') # Disable interactive input for direct output
231232
232233
res = await agent2.run('Please help me plan tomorrow’s three meals.')
233234
print(res)
234-
assert ('vegan' in res[-1].content.lower()) and 'coffee' in res[-1].content.lower()
235+
assert 'vegan' in res[-1].content.lower() and 'coffee' in res[-1].content.lower()
235236
236237
asyncio.run(main())
237238
```
@@ -303,11 +304,10 @@ This project provides a framework for **Doc Research**, enabling agents to auton
303304
304305
**2. Local Gradio Application**
305306
306-
* Research Report for [UniME: Breaking the Modality Barrier: Universal Embedding Learning
307-
with Multimodal LLMs](https://arxiv.org/pdf/2504.17432)
307+
* Research Report for [UniME: Breaking the Modality Barrier: Universal Embedding Learning with Multimodal LLMs](https://arxiv.org/pdf/2504.17432)
308308
<div align="center">
309309
<img src="https://github.com/user-attachments/assets/3f85ba08-6366-49b7-b551-cbe50edf6218" alt="LocalGradioApplication" width="750">
310-
<p><em>Demo: UniME Research Report</em></p>
310+
<p><em>DemoUniME Research Report</em></p>
311311
</div>
312312
313313

0 commit comments

Comments
 (0)