Skip to content

Commit

Permalink
Fix/api tool (#2317)
Browse files Browse the repository at this point in the history
  • Loading branch information
Yeuoly authored Feb 1, 2024
1 parent 0727955 commit 8306353
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions api/controllers/console/workspace/tool_providers.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,8 @@ def post(self):
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()

Expand Down
4 changes: 2 additions & 2 deletions api/services/tools_manage_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ def update_builtin_tool_provider(

@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
):
"""
Expand All @@ -387,7 +387,7 @@ def update_api_tool_provider(

# 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
Expand Down

0 comments on commit 8306353

Please sign in to comment.