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

Non-ASCII characters break the output #13

Closed
remixer-dec opened this issue Nov 3, 2023 · 3 comments
Closed

Non-ASCII characters break the output #13

remixer-dec opened this issue Nov 3, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@remixer-dec
Copy link

Hi, I tried the llama.cpp example and noticed that this library cannot handle non-ascii characters correctly by default and it stops right after running into such character.
image
image
Is it possible to allow these characters?

@noamgat
Copy link
Owner

noamgat commented Nov 3, 2023

Hi! This is indeed a current limitation of the library, I hope to address it soon.

@noamgat noamgat added the bug Something isn't working label Nov 4, 2023
@noamgat noamgat closed this as completed in 356288d Nov 6, 2023
@noamgat
Copy link
Owner

noamgat commented Nov 6, 2023

class AnswerFormat(BaseModel):
    emoji_strings: List[str]

question = 'What are the 10 most common emojis? You MUST answer using the following json schema: '

now leads to

  {
"emoji_strings": [
"😊",
"👍",
"🤣",
"🚀",
"🎉",
"❤️",
"🤔",
"🙏",
"💭",
"😢",
"😠"] }

@remixer-dec
Copy link
Author

Amazing!

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

2 participants