Skip to content

Commit

Permalink
Fix InvokeWithList & InvokeWithDict (#84)
Browse files Browse the repository at this point in the history
Co-authored-by: root <[email protected]>
  • Loading branch information
lucklove and root authored Oct 9, 2024
1 parent a065835 commit d006990
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions blocks/invoke.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ def invoke(
if not version:
raise VersionnNotFound(version_id)
graph = self.initialize_graph(version.configuration)
if type(input) != graph.input_type():
if not isinstance(input, graph.input_type()):
raise ApplicationInputTypeMismatch(graph.input_type(), type(input))

_id = str(uuid.uuid4())
Expand Down Expand Up @@ -322,7 +322,7 @@ def __call__(self, input: list) -> str:
return invoke(
user=self.context["user"] + "@" + self.context["interaction_id"][:8],
app_id=self.app_id,
input=input,
input=HashableList(input),
timeout=self.timeout,
session_id=self.context.get("session_id"),
)
Expand All @@ -342,7 +342,7 @@ def __call__(self, input: dict) -> str:
return invoke(
user=self.context["user"] + "@" + self.context["interaction_id"][:8],
app_id=self.app_id,
input=input,
input=HashableDict(input),
timeout=self.timeout,
session_id=self.context.get("session_id"),
)

0 comments on commit d006990

Please sign in to comment.