Browse Source

fix:#9222 create or update custum tools error (#9228)

tags/0.9.2
AkisAya 1 year ago
parent
commit
d7b8e071dd
No account linked to committer's email address

+ 1
- 1
api/core/tools/utils/parser.py View File



@staticmethod @staticmethod
def auto_parse_to_tool_bundle( def auto_parse_to_tool_bundle(
content: str, extra_info: Optional[dict], warning: Optional[dict]
content: str, extra_info: Optional[dict] = None, warning: Optional[dict] = None
) -> tuple[list[ApiToolBundle], str]: ) -> tuple[list[ApiToolBundle], str]:
""" """
auto parse to tool bundle auto parse to tool bundle

+ 3
- 1
api/services/tools/api_tools_manage_service.py View File

raise ValueError(f"invalid schema: {str(e)}") raise ValueError(f"invalid schema: {str(e)}")


@staticmethod @staticmethod
def convert_schema_to_tool_bundles(schema: str, extra_info: Optional[dict] = None) -> list[ApiToolBundle]:
def convert_schema_to_tool_bundles(
schema: str, extra_info: Optional[dict] = None
) -> tuple[list[ApiToolBundle], str]:
""" """
convert schema to tool bundles convert schema to tool bundles



Loading…
Cancel
Save