Skip to content

Commit

Permalink
Fix for metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
Amnah199 committed Sep 23, 2024
1 parent 4ee566d commit b755b31
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -231,9 +231,9 @@ def _get_response(self, response_body: GenerationResponse) -> List[ChatMessage]:
"""
replies: List[ChatMessage] = []
for candidate in response_body.candidates:
metadata = candidate.to_dict()
for part in candidate.content.parts:
# Remove content from metadata
metadata = part.to_dict()
metadata.pop("content", None)
if part._raw_part.text != "":
replies.append(
Expand Down

0 comments on commit b755b31

Please sign in to comment.