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

o1-preview bug for multibyte char #137

Open
adamist521 opened this issue Dec 3, 2024 · 0 comments
Open

o1-preview bug for multibyte char #137

adamist521 opened this issue Dec 3, 2024 · 0 comments

Comments

@adamist521
Copy link

adamist521 commented Dec 3, 2024

Multibyte character is not shown right.
Works fine for gpt-4o-mini.

Changing the line to following would make rendering right for o1-preview... ( Nothing shown for gpt-4o-mini execution since there's no need to encode as iso-8859-1)

(insert (decode-coding-string text 'utf-8))

(insert (decode-coding-string (encode-coding-string text 'iso-8859-1) 'utf-8))

I couldn't figure out where text was encoded as iso-8859-1...

( Could be my emacs setup problem? Checked that coding-sytem was utf-8 by describe-current-coding-system
Are there any fixes you can think of?

Little detail on where encoding is going wrong

Checked the data returned from server in org-ai-stream-request was utf-8 but it looks like the data is encoded before org-ai--insert-stream-response

  • org-ai-stream-request
  • org-ai--insert-stream-response
    • (cl-defun org-ai-stream-request (&optional &key prompt messages model max-tokens temperature top-p frequency-penalty presence-penalty service callback)

sample screenshot

Input: 日本語いけますか?

Before patching the line.

o1-preview
image
gpt-4o-mini
image

After patching the line

o1-preview
image
gpt-4o-mini
image

Could be related

#132

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant