Clean up treating MessageDelta in ChatModels.ChatGoogleAI#353
Conversation
|
Hi @nallwhy! These look like some significant changes. Is this a case of the Google model API changing? Or did it not work correctly before? And can you confirm that these changes are working correctly for you against a live server? |
|
This wasn’t a Google API change. It looks like some incorrect code had lingered, and this PR cleans that up. What changed and why:
I’ve already applied these changes in production code using both streaming and non-streaming flows, and they work correctly in both cases. In the previous code, even when finishReason was present, the status of MessageDelta was set to incomplete. I’m curious what the intention behind that was. In ChatOpenAI, it seems that the status is set to complete based on the finishReason. |
54b658c to
e0989eb
Compare
|
Sample stream |
|
Thanks for the clarification @nallwhy. This PR has a slight conflict with another PR of yours I just merged. After you resolve it (because you can test it and verify it works as expected), I'll merge this. |
# Conflicts: # lib/chat_models/chat_google_ai.ex
e0989eb to
0540c5b
Compare
|
@brainlid I've rebased the commits. |
|
Thanks @nallwhy! |
No description provided.