Skip to content

Commit

Permalink
default to empty dict if no generation_info
Browse files Browse the repository at this point in the history
  • Loading branch information
dlqqq committed Sep 25, 2024
1 parent 9c3f169 commit 037ba3d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ def on_llm_end(self, response: LLMResult, **kwargs) -> None:
if not (len(response.generations) and len(response.generations[0])):
return

self.jai_metadata = response.generations[0][0].generation_info
self.jai_metadata = response.generations[0][0].generation_info or {}

0 comments on commit 037ba3d

Please sign in to comment.