Skip to content

Commit ec9d5b9

Browse files
Update typing and overload
1 parent a30b72c commit ec9d5b9

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

guardrails/guard.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,9 +238,10 @@ def __call__(
238238
msg_history: Optional[List[Dict]] = None,
239239
metadata: Optional[Dict] = None,
240240
full_schema_reask: Optional[bool] = None,
241+
stream: Optional[bool] = False,
241242
*args,
242243
**kwargs,
243-
) -> ValidationOutcome[OT]:
244+
) -> Union[ValidationOutcome[OT], Iterable[str]]:
244245
...
245246

246247
@overload
@@ -272,7 +273,7 @@ def __call__(
272273
*args,
273274
**kwargs,
274275
) -> Union[
275-
Union[ValidationOutcome[OT], Iterable], Awaitable[ValidationOutcome[OT]]
276+
Union[ValidationOutcome[OT], Iterable[str]], Awaitable[ValidationOutcome[OT]]
276277
]:
277278
"""Call the LLM and validate the output. Pass an async LLM API to
278279
return a coroutine.

0 commit comments

Comments
 (0)