petals-infra / chat.petals.dev

💬 Chatbot web app + HTTP and Websocket endpoints for LLM inference with the Petals client
https://chat.petals.dev
308 stars 79 forks source link

Fix for decoding unicode characters #31

Closed Webifi closed 1 year ago

Webifi commented 1 year ago

Fix for #30

Before, Unicode characters would not decode properly. Now, if a replacement character of '\ufffd' is found in the decoded output, it will continue requesting more completion tokens until it is able to decode without a replacement character / decode error.

Webifi commented 1 year ago

I think I tied up most of the edge cases now. Should be ready for merge if you'd like to.