Skip to content

Commit

Permalink
Update typing and overload
Browse files Browse the repository at this point in the history
  • Loading branch information
thekaranacharya committed Dec 12, 2023
1 parent a30b72c commit ec9d5b9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions guardrails/guard.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,9 +238,10 @@ def __call__(
msg_history: Optional[List[Dict]] = None,
metadata: Optional[Dict] = None,
full_schema_reask: Optional[bool] = None,
stream: Optional[bool] = False,
*args,
**kwargs,
) -> ValidationOutcome[OT]:
) -> Union[ValidationOutcome[OT], Iterable[str]]:
...

@overload
Expand Down Expand Up @@ -272,7 +273,7 @@ def __call__(
*args,
**kwargs,
) -> Union[
Union[ValidationOutcome[OT], Iterable], Awaitable[ValidationOutcome[OT]]
Union[ValidationOutcome[OT], Iterable[str]], Awaitable[ValidationOutcome[OT]]
]:
"""Call the LLM and validate the output. Pass an async LLM API to
return a coroutine.
Expand Down

0 comments on commit ec9d5b9

Please sign in to comment.