refactor(services/tasks): Swtich to dify_config witch Pydantic (#6203)
This commit is contained in:
parent
d7a6f25c63
commit
7b225a5ab0
15 changed files with 51 additions and 53 deletions
|
|
@ -2,8 +2,7 @@ import json
|
|||
import logging
|
||||
from typing import Optional, Union
|
||||
|
||||
from flask import current_app
|
||||
|
||||
from configs import dify_config
|
||||
from core.tools.entities.api_entities import UserTool, UserToolProvider
|
||||
from core.tools.entities.common_entities import I18nObject
|
||||
from core.tools.entities.tool_bundle import ApiToolBundle
|
||||
|
|
@ -29,7 +28,7 @@ class ToolTransformService:
|
|||
"""
|
||||
get tool provider icon url
|
||||
"""
|
||||
url_prefix = (current_app.config.get("CONSOLE_API_URL")
|
||||
url_prefix = (dify_config.CONSOLE_API_URL
|
||||
+ "/console/api/workspaces/current/tool-provider/")
|
||||
|
||||
if provider_type == ToolProviderType.BUILT_IN.value:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue