-
Notifications
You must be signed in to change notification settings - Fork 173
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(Anthropic LLMs) First two characters of a response are lost #233
Comments
|
But this time it seems that 3 characters ("Yes") are missing? This is fairly consistent:
|
I was wrong, it's not two characters in front, but some characters in multiple places in the response. I am looking at a gptel chat buffer where there are several places where 1-5 characters are missing (streaming chunk boundaries?), not just at the beginning, but in the middle of the response as well. I see this with Anthropic only, not with OpenAI or ollama. (I am back to current head, or 0d6264f) |
Thank you for the thorough testing, this is very helpful. It's probably a bug in the parser for the Anthropic-API responses. Could you do one more thing to help me track it down?
|
Unfortunately, I currently can't, as Anthropic locked me out when my $5 credit ran out, and even though I recharged the account and it shows a significant balance in the panel, their API responds with 400 codes. And their support mentions that they respond after 5 days 🤣 If somebody else doesn't help in the meantime, this will have to wait until they tie their shoelaces and get their act together, then I'll be able to get back on it! |
I have the same problem, here's my data. ChatGPT buffer: ### is this on?
, I'm here and ready to assist you. How can I help?
### gptel-log
The log does show that the very first event is dropped in the chat. |
@solodov Thank you. It's strange, I've tried all the prompts suggested in this thread so far and I'm not able to reproduce the missing chunk problem. It works fine on the test case. I'm trying to guess the cause from staring at the parser code now. |
gptel-anthropic.el (gptel-curl--parse-stream): Reset point explicitly when parsing streaming responses returned by the Anthropic API. Try to address #233.
Since I'm not sure what's causing the parsing problem, I've attempted a fix based on my best guess. Please let me know if it makes a difference. |
Looks like my case now works correctly, thanks!
…On Fri, Mar 8, 2024 at 2:06 AM karthink ***@***.***> wrote:
Since I'm not sure what's causing the parsing problem, I've attempted a
fix based on my best guess. Please let me know if it makes a difference.
—
Reply to this email directly, view it on GitHub
<#233 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABN2WRJ2GMQQTMAP35A2LLYXEFKRAVCNFSM6AAAAABEJW6N52VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOBUHA3DQNRXGA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Okay. I'll wait until @jwr can access Claude again and check if the bug still persists before closing this issue. |
Sorry, it took a while for Anthropic to figure out that I do have a positive balance in my account after all. I can now confirm that the bug is gone, and I get full responses from Anthropic models (tested with fbb0ee2). Thank you! |
I'm trying out gptel with Anthropic Claude and it seems that with many (but curiously not all, I think?) responses the first two characters are lost somewhere.
For example, with an empty prompt in a conversation:
Or when working in another buffer:
Note how in the first example the word "It" is missing, and in the second one "In" is missing.
I'm using gptel 0d6264f in "GNU Emacs 29.1 (build 1, aarch64-apple-darwin21.6.0, Carbon Version 165 AppKit 2113.6) of 2023-08-10" (emacs-mac).
The text was updated successfully, but these errors were encountered: