mirror of
https://github.com/langgenius/dify.git
synced 2024-11-16 03:32:23 +08:00
Fix/api tool (#2317)
This commit is contained in:
parent
07279558a5
commit
83063532a0
|
@ -171,8 +171,8 @@ class ToolApiProviderUpdateApi(Resource):
|
|||
parser.add_argument('schema', type=str, required=True, nullable=False, location='json')
|
||||
parser.add_argument('provider', type=str, required=True, nullable=False, location='json')
|
||||
parser.add_argument('original_provider', type=str, required=True, nullable=False, location='json')
|
||||
parser.add_argument('icon', type=str, required=True, nullable=False, location='json')
|
||||
parser.add_argument('privacy_policy', type=str, required=True, nullable=False, location='json')
|
||||
parser.add_argument('icon', type=dict, required=True, nullable=False, location='json')
|
||||
parser.add_argument('privacy_policy', type=str, required=True, nullable=True, location='json')
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
|
|
|
@ -362,7 +362,7 @@ class ToolManageService:
|
|||
|
||||
@staticmethod
|
||||
def update_api_tool_provider(
|
||||
user_id: str, tenant_id: str, provider_name: str, original_provider: str, icon: str, credentials: dict,
|
||||
user_id: str, tenant_id: str, provider_name: str, original_provider: str, icon: dict, credentials: dict,
|
||||
schema_type: str, schema: str, privacy_policy: str
|
||||
):
|
||||
"""
|
||||
|
@ -387,7 +387,7 @@ class ToolManageService:
|
|||
|
||||
# update db provider
|
||||
provider.name = provider_name
|
||||
provider.icon = icon
|
||||
provider.icon = json.dumps(icon)
|
||||
provider.schema = schema
|
||||
provider.description = extra_info.get('description', '')
|
||||
provider.schema_type_str = ApiProviderSchemaType.OPENAPI.value
|
||||
|
|
Loading…
Reference in New Issue
Block a user