Skip to content

Commit 7cb50a9

Browse files
fix tree raw llm output on streaming
1 parent 4375703 commit 7cb50a9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

guardrails/classes/history/iteration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ def completion_tokens_consumed(self) -> Optional[int]:
9898
def raw_output(self) -> Optional[str]:
9999
"""The exact output from the LLM."""
100100
response = self.outputs.llm_response_info
101-
if response is not None:
101+
if response is not None and response.output:
102102
return response.output
103103
elif self.outputs.raw_output is not None:
104104
return self.outputs.raw_output

0 commit comments

Comments
 (0)