upadte and patches to client.py #66
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "main"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
i fixed the issue where the "text" key was expecting in every chunks of perplexity response but oerplexity doesn't show it in all chunks but in final chunks so i fixed it It wait for the text key to appear in content_json i also added support for new models gpt5 gpt5_thinking grok4 claude sonnet 4.0 thinking with alias perplexity uses "claude37somethinking"
i hope this will help these fixes only tested in own accounts option i am not aware if this issue occurs in emailnator option so try it if that option has the issue
Summary of Changes
This PR addresses a key issue in
client.pywhere the"text"key was expected in every chunk of the Perplexity response. However, based on observed behavior,"text"only appears in the final chunk. This caused premature parsing failures or incomplete responses. The updated logic now waits for"text"to appear incontent_json, ensuring more reliable and complete output.Enhancements
gpt5gpt5_thinkinggrok4claude sonnet 4.0 thinking"claude37somethinking"— this PR maps those to their readable counterparts for better clarity and control.Notes
Why This Matters
Let me know if you'd like me to break this into smaller commits or add test coverage. Happy to iterate!