Skip to content

Update deps 044 #775

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions guardrails/async_guard.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,8 @@ async def _call_async(
Returns:
The raw text output from the LLM and the validated output.
"""
instructions_obj = instructions or self.instructions
prompt_obj = prompt or self.prompt
instructions_obj = instructions or self.rail.instructions
prompt_obj = prompt or self.rail.prompt
msg_history_obj = msg_history or []
if prompt_obj is None:
if msg_history_obj is not None and not len(msg_history_obj):
Expand All @@ -244,10 +244,10 @@ async def _call_async(
prompt=prompt_obj,
msg_history=msg_history_obj,
api=get_async_llm_ask(llm_api, *args, **kwargs),
prompt_schema=self.prompt_schema,
instructions_schema=self.instructions_schema,
msg_history_schema=self.msg_history_schema,
output_schema=self.output_schema,
prompt_schema=self.rail.prompt_schema,
instructions_schema=self.rail.instructions_schema,
msg_history_schema=self.rail.msg_history_schema,
output_schema=self.rail.output_schema,
num_reasks=num_reasks,
metadata=metadata,
base_model=self.base_model,
Expand Down Expand Up @@ -433,10 +433,10 @@ async def _async_parse(
prompt=kwargs.pop("prompt", None),
msg_history=kwargs.pop("msg_history", None),
api=get_async_llm_ask(llm_api, *args, **kwargs) if llm_api else None,
prompt_schema=self.prompt_schema,
instructions_schema=self.instructions_schema,
msg_history_schema=self.msg_history_schema,
output_schema=self.output_schema,
prompt_schema=self.rail.prompt_schema,
instructions_schema=self.rail.instructions_schema,
msg_history_schema=self.rail.msg_history_schema,
output_schema=self.rail.output_schema,
num_reasks=num_reasks,
metadata=metadata,
output=llm_output,
Expand Down
Loading
Loading