Skip to content

Commit

Permalink
Hotfix about tool type error
Browse files Browse the repository at this point in the history
  • Loading branch information
0mza987 committed Sep 27, 2023
1 parent 04ea674 commit cc8903c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/promptflow/promptflow/contracts/tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,11 @@ def is_custom_strong_type(val):

from promptflow._sdk.entities import CustomStrongTypeConnection

return issubclass(val, CustomStrongTypeConnection)
# TODO: replace the hotfix "try-except" with a more graceful solution."
try:
return issubclass(val, CustomStrongTypeConnection)
except Exception:
return False

@staticmethod
def serialize_conn(connection: Any) -> dict:
Expand Down

0 comments on commit cc8903c

Please sign in to comment.