From 44362635f6897f9fdedbcc095622dfaa6f3b85d1 Mon Sep 17 00:00:00 2001 From: junjun Date: Tue, 16 Sep 2025 11:32:25 +0800 Subject: [PATCH] fix: mcp images path error --- backend/apps/chat/task/llm.py | 2 +- backend/common/core/config.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/apps/chat/task/llm.py b/backend/apps/chat/task/llm.py index aa4eff58..16736aa9 100644 --- a/backend/apps/chat/task/llm.py +++ b/backend/apps/chat/task/llm.py @@ -1274,7 +1274,7 @@ def request_picture(chat_id: int, record_id: int, chart: dict, data: dict): requests.post(url=settings.MCP_IMAGE_HOST, json=request_obj) - request_path = urllib.parse.urljoin(settings.MCP_IMAGE_HOST, f"{file_name}.png") + request_path = urllib.parse.urljoin(settings.SERVER_IMAGE_HOST, f"{file_name}.png") return request_path diff --git a/backend/common/core/config.py b/backend/common/core/config.py index 043de6cc..6a922ae9 100644 --- a/backend/common/core/config.py +++ b/backend/common/core/config.py @@ -84,7 +84,7 @@ class Settings(BaseSettings): MCP_IMAGE_PATH: str = '/opt/sqlbot/images' EXCEL_PATH: str = '/opt/sqlbot/data/excel' MCP_IMAGE_HOST: str = 'http://localhost:3000' - SERVER_IMAGE_HOST: str = 'https://YOUR_SERVE_IP:MCP_PORT/images/' + SERVER_IMAGE_HOST: str = 'http://YOUR_SERVE_IP:MCP_PORT/images/' LOCAL_MODEL_PATH: str = '/opt/sqlbot/models' DEFAULT_EMBEDDING_MODEL: str = 'shibing624/text2vec-base-chinese'