Skip to content

Commit

Permalink
fix type hints
Browse files Browse the repository at this point in the history
  • Loading branch information
ShreyaR committed Mar 5, 2024
1 parent 201ea56 commit e05040a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion guardrails/schema/json_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ async def async_validate(

return validated_response

def introspect(self, data: Any) -> Tuple[List[ReAsk], Optional[Dict]]:
def introspect(self, data: Any) -> Tuple[List[ReAsk], Union[Dict, List, None]]:
if isinstance(data, SkeletonReAsk):
return [data], None
elif isinstance(data, NonParseableReAsk):
Expand Down
4 changes: 2 additions & 2 deletions guardrails/utils/reask_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ class NonParseableReAsk(ReAsk):


def gather_reasks(
validated_output: Optional[Union[str, Dict, ReAsk]]
) -> Tuple[List[ReAsk], Optional[Dict]]:
validated_output: Optional[Union[str, Dict, List, ReAsk]]
) -> Tuple[List[ReAsk], Union[Dict, List, None]]:
"""Traverse output and gather all ReAsk objects.
Args:
Expand Down

0 comments on commit e05040a

Please sign in to comment.