Skip to content
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

Claude error: (HTTP/2 400) messages: text content blocks must contain non-whitespace text #452

Open
1 task done
benthamite opened this issue Nov 1, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@benthamite
Copy link
Contributor

benthamite commented Nov 1, 2024

Please update gptel first -- errors are often fixed by the time they're reported.

  • I have updated gptel to the latest commit and tested that the issue still exists

Bug Description

Continuing the discussion here: #442.

This is an instance of the phenomenon I described there as follows:

FWIW, I have also been experiencing this issue (with an up-to-date version of gptel). Strangely, in my case it is fixed by closing the org buffer and reopening the file it was visiting (NB: calling revert-buffer is not enough: the buffer has to be killed.)

Backend

Anthropic

Steps to Reproduce

  1. Open the attached Markdown file.
  2. Search for <.
  3. Delete the text enclosed in < and >.
  4. Invoke gptel-send.

It may be hard to reproduce the issue since, as noted, reopening the file fixes it. Hopefully, the other attached files will provide additional hints as to what may be going on. These fils capture the output of a dry run either before or after the fix.

Additional Context

GNU Emacs 30.0.91 (build 1, aarch64-apple-darwin24.0.0, NS appkit-2566.00 Version 15.0.1 (Build 24A348)) of 2024-10
macOS Sequoia

Backtrace

No response

Log Information

No response

Archive.zip
syntax-errors.md

@benthamite benthamite added the bug Something isn't working label Nov 1, 2024
@karthink
Copy link
Owner

karthink commented Nov 1, 2024

Thanks. The recorded response bounds in syntax-errors.md are wrong though, so I can't use it for testing. Do you have another file I could use?

@gregoryg
Copy link

gregoryg commented Nov 5, 2024

I get this all the time with Claude, never with OpenAI. It's always mystifying, but I'll try to get a reproducible test for you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants