chore: remove TODO comments and update mcp_servers_config key to use app name

This commit is contained in:
CaptainB 2025-12-24 09:59:59 +08:00
parent e728647752
commit dfbf5aad96
2 changed files with 1 additions and 3 deletions

View File

@ -270,7 +270,6 @@ class BaseChatStep(IChatStep):
for application_id in application_ids:
app = QuerySet(Application).filter(id=application_id).first()
app_key = QuerySet(ApplicationApiKey).filter(application_id=application_id, is_active=True).first()
# TODO 处理api
if app_key is not None:
api_key = app_key.secret_key
else:

View File

@ -257,14 +257,13 @@ class BaseChatNode(IChatNode):
for application_id in application_ids:
app = QuerySet(Application).filter(id=application_id).first()
app_key = QuerySet(ApplicationApiKey).filter(application_id=application_id, is_active=True).first()
# TODO 处理api
if app_key is not None:
api_key = app_key.secret_key
else:
continue
executor = ToolExecutor()
app_config = executor.get_app_mcp_config(api_key)
mcp_servers_config[str(app.id)] = app_config
mcp_servers_config[app.name] = app_config
if len(mcp_servers_config) > 0:
r = mcp_response_generator(chat_model, message_list, json.dumps(mcp_servers_config), mcp_output_enable)