Skip to content

Commit 26469c7

Browse files
authored
Merge pull request #17 from qiandl2000/vlm_example_1
Chinese version with some extra changes
2 parents ef05005 + 8e27e58 commit 26469c7

File tree

17 files changed

+374
-36
lines changed

17 files changed

+374
-36
lines changed

examples/mcp_example/test_mcp.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
class LLMTest(BaseLLMBackend):
2626
llm: OpenaiGPTLLM ={
2727
"name": "OpenaiGPTLLM",
28-
"model_id": "gpt-4o",
28+
"model_id": "gpt-4o-mini",
2929
"api_key": os.getenv("custom_openai_key"),
3030
"endpoint": os.getenv("custom_openai_endpoint"),
3131
"vision": False,
@@ -40,6 +40,6 @@ class LLMTest(BaseLLMBackend):
4040
llm_test = LLMTest(workflow_instance_id="temp")
4141

4242
tool_manager = llm_test.tool_manager
43-
x = tool_manager.execute_task("describe /data0/qdl/test/old_women.png",)
43+
x = tool_manager.execute_task("hi",)
4444
print(x)
4545

examples/shared_redis.db.settings

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"pidfile": "/tmp/tmpgp4h6j0v/redis.pid", "unixsocket": "/tmp/tmpgp4h6j0v/redis.socket", "dbdir": "/data0/qdl/omagent-github/OmAgent/examples", "dbfilename": "shared_redis.db"}

examples/simple_vlm/fastmcp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Subproject commit 5f6393cd3f1d1388f93e7daf0c6393bd9c7c3063

omagent-core/src/omagent_core/services/handlers/mcp_client.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
from dotenv import load_dotenv
88
from fastmcp import Client
9-
from fastmcp.client.progress import ProgressHandler
109

1110
load_dotenv()
1211

omagent-core/src/omagent_core/tool_system/mcp.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
},
2121
"milvus-sse": {
2222
"transport": "sse",
23-
"url": "http://localhost:8001/sse",
23+
"url": "http://localhost:8000/sse",
2424
"disabled": false,
2525
"autoApprove": []
2626
}

robot_agent/mcp_tools/mcp-server-milvus/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ RUN pip install --no-cache-dir -r requirements.txt
99

1010
# Copy the server code
1111
COPY src/ ./src/
12-
12+
COPY standalone_embed.sh ./
1313
# Expose port
1414
EXPOSE 8000
1515

robot_agent/mcp_tools/mcp-server-milvus/src/mcp_server_milvus/server.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -941,6 +941,6 @@ def parse_arguments():
941941
os.environ.setdefault("MILVUS_DB", args.milvus_db)
942942

943943
if args.sse:
944-
mcp.run(transport="sse", host="127.0.0.1", port=args.port)
944+
mcp.run(transport="sse", host="0.0.0.0", port=args.port)
945945
else:
946946
mcp.run()

robot_agent/mcp_tools/mcp-server-milvus/standalone_embed.sh

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ EOF
4040
exit 1
4141
fi
4242

43-
sudo docker run -d \
43+
docker run -d \
4444
--name milvus-standalone \
4545
--security-opt seccomp:unconfined \
4646
-e ETCD_USE_EMBED=true \
@@ -66,7 +66,7 @@ wait_for_milvus_running() {
6666
echo "Wait for Milvus Starting..."
6767
while true
6868
do
69-
res=`sudo docker ps|grep milvus-standalone|grep healthy|wc -l`
69+
res=`docker ps|grep milvus-standalone|grep healthy|wc -l`
7070
if [ $res -eq 1 ]
7171
then
7272
echo "Start successfully."
@@ -78,17 +78,17 @@ wait_for_milvus_running() {
7878
}
7979

8080
start() {
81-
res=`sudo docker ps|grep milvus-standalone|grep healthy|wc -l`
81+
res=`docker ps|grep milvus-standalone|grep healthy|wc -l`
8282
if [ $res -eq 1 ]
8383
then
8484
echo "Milvus is running."
8585
exit 0
8686
fi
8787

88-
res=`sudo docker ps -a|grep milvus-standalone|wc -l`
88+
res=`docker ps -a|grep milvus-standalone|wc -l`
8989
if [ $res -eq 1 ]
9090
then
91-
sudo docker start milvus-standalone 1> /dev/null
91+
docker start milvus-standalone 1> /dev/null
9292
else
9393
run_embed
9494
fi
@@ -103,7 +103,7 @@ start() {
103103
}
104104

105105
stop() {
106-
sudo docker stop milvus-standalone 1> /dev/null
106+
docker stop milvus-standalone 1> /dev/null
107107

108108
if [ $? -ne 0 ]
109109
then
@@ -115,13 +115,13 @@ stop() {
115115
}
116116

117117
delete_container() {
118-
res=`sudo docker ps|grep milvus-standalone|wc -l`
118+
res=`docker ps|grep milvus-standalone|wc -l`
119119
if [ $res -eq 1 ]
120120
then
121121
echo "Please stop Milvus service before delete."
122122
exit 1
123123
fi
124-
sudo docker rm milvus-standalone 1> /dev/null
124+
docker rm milvus-standalone 1> /dev/null
125125
if [ $? -ne 0 ]
126126
then
127127
echo "Delete milvus container failed."
@@ -132,16 +132,16 @@ delete_container() {
132132

133133
delete() {
134134
delete_container
135-
sudo rm -rf $(pwd)/volumes
136-
sudo rm -rf $(pwd)/embedEtcd.yaml
137-
sudo rm -rf $(pwd)/user.yaml
135+
rm -rf $(pwd)/volumes
136+
rm -rf $(pwd)/embedEtcd.yaml
137+
rm -rf $(pwd)/user.yaml
138138
echo "Delete successfully."
139139
}
140140

141141
upgrade() {
142142
read -p "Please confirm if you'd like to proceed with the upgrade. The default will be to the latest version. Confirm with 'y' for yes or 'n' for no. > " check
143143
if [ "$check" == "y" ] ||[ "$check" == "Y" ];then
144-
res=`sudo docker ps -a|grep milvus-standalone|wc -l`
144+
res=`docker ps -a|grep milvus-standalone|wc -l`
145145
if [ $res -eq 1 ]
146146
then
147147
stop

robot_agent/mcp_tools/memory/mem0/server.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from __future__ import annotations
1+
# from __future__ import annotations
22
from mcp.server.fastmcp import FastMCP
33
from starlette.applications import Starlette
44
from mcp.server.sse import SseServerTransport
@@ -17,7 +17,7 @@
1717
mcp = FastMCP("mem0-mcp")
1818

1919
# Initialize mem0 client and set default user
20-
mem0_client = MemoryClient()
20+
mem0_client = MemoryClient(api_key="m0-shsvgsRDZj6d3DDjV9PpV17ByvUkbhmKkXe1Nu5Z")
2121
ROBOT_USER_ID = "navigation_robot"
2222

2323
# Custom instructions focused on robot navigation

robot_agent/mcp_tools/simulator/Dockerfile

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
FROM python:3.11-slim
22

33
# Install system dependencies including X11 libraries for AI2Thor
4-
RUN apt-get update && apt-get install -y \
4+
5+
RUN echo "deb http://mirrors.aliyun.com/debian bookworm main contrib non-free" > /etc/apt/sources.list && \
6+
echo "deb http://mirrors.aliyun.com/debian bookworm-updates main contrib non-free" >> /etc/apt/sources.list && \
7+
echo "deb http://mirrors.aliyun.com/debian-security bookworm-security main contrib non-free" >> /etc/apt/sources.list && \
8+
rm -rf /etc/apt/sources.list.d/* && \
9+
apt-get update && apt-get install -y \
510
xvfb \
611
x11-utils \
712
libx11-6 \
@@ -22,7 +27,9 @@ WORKDIR /app
2227

2328
# Copy requirements and install Python dependencies
2429
COPY requirements.txt .
25-
RUN pip install --no-cache-dir -r requirements.txt
30+
RUN pip install uv -i https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple
31+
RUN uv venv
32+
RUN uv pip install -r requirements.txt -i https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple
2633

2734
# Copy the server code
2835
COPY ai2thor/ ./ai2thor/

0 commit comments

Comments
 (0)