-
Notifications
You must be signed in to change notification settings - Fork 163
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
Some characters are sometimes incorrectly converted from Markdown to Org #451
Comments
Thanks. Besides the conversion of backquote
is there anything else wrong? To find the parser bug, it will help to have the response log to compare the Org output with. EDIT: Never mind the log, I was able to reproduce the bug with a simple prompt. |
Second edit: I need that log after all -- the bug I produced is different from the one you're experiencing. |
I am experiencing the same bug, oddly only in claude, and gpt4 seems to be fine: Steps to reproduce:
|
I am experiencing the same bug, oddly only in claude, and gpt4 seems to be fine:
Steps to reproduce:
1. Start conversation with Claude
2. Tell Claude to use text mode output
- Ask Claude to type backtick (`)
- EXPECTED: Shows backtick (`)
- ACTUAL: Shows backtick (`) correctly
3. Tell Claude to switch to org-mode output
- Ask Claude to type backtick (`)
- EXPECTED: Should show backtick (`)
- ACTUAL: Shows equals sign (=)
In Org mode buffers, gptel assumes the LLM output is in markdown and converts it to Org mode internally. If the LLM output is already in Org markup, things will expectedly go wrong.
Possible solutions are
1. Ask the LLM to output in Markdown always. This is what I do.
2. Expose a switch in the transient menu (and via elisp configuration) so the user can turn off automatic conversion to Org as required.
3. Automatically detect if the output is already in Org and turn off the conversion.
Doing 3 for streaming responses is very hard (without holding up the stream) and out of scope for gptel. It can be implemented for non-streaming responses. Let's call this solution 2.5.
What do you think?
|
thanks. I tried to ask claude to output markdown, but it doesn't seems to fix the problem. if there's a way to turn off the automatic conversion it'd be nice. I tried changing the function gptel--convert-org and reevaluate it to skip conversion but still no effect. I wonder where the actually conversion is happening. |
Please update gptel first -- errors are often fixed by the time they're reported.
Bug Description
This is just another instance of the behavior reported here: #81. @karthink asked to create a new issue to report new cases, hence this issue.
In this case, the issue arises when converting Claude responses in JavaScript code blocks:
Backend
Anthropic
Steps to Reproduce
See quoted org excerpt above.
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
The text was updated successfully, but these errors were encountered: