Skip to content

Commit

Permalink
Add googleai fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Amnah199 committed Aug 27, 2024
1 parent 7483bc6 commit a6a648b
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ def _get_response(self, response_body: GenerateContentResponse) -> List[ChatMess
for candidate in response_body.candidates:
for part in candidate.content.parts:
if part.text != "":
replies.append(ChatMessage.from_system(part.text))
replies.append(ChatMessage.from_assistant(part.text))
elif part.function_call is not None:
replies.append(
ChatMessage(
Expand Down Expand Up @@ -354,4 +354,4 @@ def _get_stream_response(
responses.append(content)

combined_response = "".join(responses).lstrip()
return [ChatMessage.from_system(content=combined_response)]
return [ChatMessage.from_assistant(content=combined_response)]

0 comments on commit a6a648b

Please sign in to comment.