diff --git a/backend/service/workflow_rewrite_tools.py b/backend/service/workflow_rewrite_tools.py index 574f7ea..434b093 100644 --- a/backend/service/workflow_rewrite_tools.py +++ b/backend/service/workflow_rewrite_tools.py @@ -2,7 +2,7 @@ import json import time -from typing import Dict, Any, Optional, List +from typing import Dict, Any, Optional, List, Union from agents.agent import Agent from agents.tool import function_tool @@ -99,7 +99,7 @@ def save_checkpoint_before_modification(session_id: str, action_description: str return None @function_tool(strict_mode=False) -def update_workflow(session_id: str, workflow_data: Dict[str, Any]) -> str: +def update_workflow(session_id: str, workflow_data: Union[Dict[str, Any], str]) -> str: """更新当前session的工作流数据""" try: # 在修改前保存checkpoint diff --git a/backend/utils/globals.py b/backend/utils/globals.py index ad9e417..ba9749c 100644 --- a/backend/utils/globals.py +++ b/backend/utils/globals.py @@ -98,6 +98,6 @@ def set_session_id(session_id: str) -> None: """Set the session id.""" _global_state.set('session_id', session_id) -LLM_DEFAULT_BASE_URL = "https://comfyui-copilot-server-pre.onrender.com/v1" -# LLM_DEFAULT_BASE_URL = "http://127.0.0.1:8000/v1" +# LLM_DEFAULT_BASE_URL = "https://comfyui-copilot-server-pre.onrender.com/v1" +LLM_DEFAULT_BASE_URL = "http://127.0.0.1:8000/v1" CLAUDE_4_MODEL_NAME = "us.anthropic.claude-sonnet-4-20250514-v1:0"