Skip to content

Commit 5ad9dbd

Browse files
committed
get branch green
1 parent 46e1f44 commit 5ad9dbd

File tree

4 files changed

+7
-4
lines changed

4 files changed

+7
-4
lines changed

guardrails/api_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ def stream_validate(
104104
)
105105
if line:
106106
json_output = json.loads(line)
107-
if(json_output.get("error")):
107+
if json_output.get("error"):
108108
raise Exception(json_output.get("error").get("message"))
109109
yield IValidationOutcome.from_dict(json_output)
110110

guardrails/async_guard.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -574,7 +574,8 @@ async def _stream_server_call(
574574
validated_output=validated_output,
575575
validation_passed=(validation_output.validation_passed is True),
576576
)
577-
# TODO re-enable this once we have a way to get history from a multi-node server
577+
# TODO re-enable this once we have a way to get history
578+
# from a multi-node server
578579
# if validation_output:
579580
# guard_history = self._api_client.get_history(
580581
# self.name, validation_output.call_id

guardrails/classes/llm/llm_response.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ def to_interface(self) -> ILLMResponse:
4747
stream_output = [str(so) for so in copy_2]
4848

4949
async_stream_output = None
50-
# dont do this again if already aiter-able were updating ourselves here so in memory
50+
# dont do this again if already aiter-able were updating
51+
# ourselves here so in memory
5152
# this can cause issues
5253
if self.async_stream_output and not hasattr(
5354
self.async_stream_output, "__aiter__"

guardrails/guard.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1215,7 +1215,8 @@ def _single_server_call(self, *, payload: Dict[str, Any]) -> ValidationOutcome[O
12151215
error="The response from the server was empty!",
12161216
)
12171217

1218-
# TODO renable this when we have history support in multi-node server environments
1218+
# TODO renable this when we have history support in
1219+
# multi-node server environments
12191220
# guard_history = self._api_client.get_history(
12201221
# self.name, validation_output.call_id
12211222
# )

0 commit comments

Comments
 (0)