Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
ysolanky committed Nov 13, 2024
1 parent 2a753fe commit 986aee5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions phi/model/google/gemini.py
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ def response(self, messages: List[Message]) -> ModelResponse:
model_response.content = assistant_message.get_content_string()

# -*- Remove parts from messages
[setattr(m, 'parts', None) for m in messages if hasattr(m, 'parts')]
[setattr(m, "parts", None) for m in messages if hasattr(m, "parts")] # type: ignore

logger.debug("---------- Gemini Response End ----------")
return model_response
Expand Down Expand Up @@ -619,5 +619,6 @@ def response_stream(self, messages: List[Message]) -> Iterator[ModelResponse]:
yield from self.response_stream(messages=messages)

# -*- Remove parts from messages
[setattr(m, 'parts', None) for m in messages if hasattr(m, 'parts')]
[setattr(m, "parts", None) for m in messages if hasattr(m, "parts")] # type: ignore

logger.debug("---------- Gemini Response End ----------")

0 comments on commit 986aee5

Please sign in to comment.