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 23, 2024
1 parent 3977976 commit 86b77be
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 86b77be

Please sign in to comment.