Skip to content

Commit 4436263

Browse files
committed
fix: mcp images path error
1 parent 864971f commit 4436263

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

backend/apps/chat/task/llm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1274,7 +1274,7 @@ def request_picture(chat_id: int, record_id: int, chart: dict, data: dict):
12741274

12751275
requests.post(url=settings.MCP_IMAGE_HOST, json=request_obj)
12761276

1277-
request_path = urllib.parse.urljoin(settings.MCP_IMAGE_HOST, f"{file_name}.png")
1277+
request_path = urllib.parse.urljoin(settings.SERVER_IMAGE_HOST, f"{file_name}.png")
12781278

12791279
return request_path
12801280

backend/common/core/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def SQLALCHEMY_DATABASE_URI(self) -> PostgresDsn | str:
8484
MCP_IMAGE_PATH: str = '/opt/sqlbot/images'
8585
EXCEL_PATH: str = '/opt/sqlbot/data/excel'
8686
MCP_IMAGE_HOST: str = 'http://localhost:3000'
87-
SERVER_IMAGE_HOST: str = 'https://YOUR_SERVE_IP:MCP_PORT/images/'
87+
SERVER_IMAGE_HOST: str = 'http://YOUR_SERVE_IP:MCP_PORT/images/'
8888

8989
LOCAL_MODEL_PATH: str = '/opt/sqlbot/models'
9090
DEFAULT_EMBEDDING_MODEL: str = 'shibing624/text2vec-base-chinese'

0 commit comments

Comments
 (0)