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

Can't parse to huggingface, no matter what model. #3

Open
rloucks opened this issue Nov 9, 2024 · 2 comments
Open

Can't parse to huggingface, no matter what model. #3

rloucks opened this issue Nov 9, 2024 · 2 comments

Comments

@rloucks
Copy link

rloucks commented Nov 9, 2024

Answer: Failed to parse the request body as JSON: inputs: control character (\u0000-\u001F) found while parsing a string at line 2 column 0

@rloucks
Copy link
Author

rloucks commented Nov 10, 2024

I was able to get it to work, but I have to sanatize the input before.

@bayeggex
Copy link
Owner

It seems that the message data you're sending as inputs may contain special control characters, which are invalid in JSON and can cause the parsing error.

To address this, you can sanitize the message before sending it to the API.

This is technically my oversight I was planning to release an update to handle such issues, but as I was working on TTS and STT features, I overlooked this case in the library. If you wish, you can add the solution to your source code or wait for the new hotfix that I’ll publish soon. 🙏

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

2 participants