vercel-llm-api
vercel-llm-api copied to clipboard
Issues while making prompts with Cyrillic characters.
When I send openai:gpt-3.5-turbo
a chat request on russian (for example, "Расскажи больше про себя"), i get an error:
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/curl_cffi/curl.py", line 53, in write_callback
callback(ffi.buffer(ptr, nmemb)[:])
File "/home/vercel_ai.py", line 123, in callback
chunks_queue.put(data.decode())
^^^^^^^^^^^^^
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd0 in position 0: unexpected end of data
And when I make a chat on Ukrainian with the same model, it gives only part of the text. For example, "Розкажи більше про себе" returned
Звісно, я з радістю розповім більше про себе!
... //answers like usual
Щодо моїх функцій, я можу допомогти вам з по
And that's all; it didn't finished his answer.
Somehow, while trying to ask on russian, i got whole new error:
Traceback (most recent call last):
File "/home/vercel_ai.py", line 137, in stream_request
chunk = chunks_queue.get(block=True, timeout=0.01)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/queue.py", line 179, in get
raise Empty
_queue.Empty
Any progress?
We're stuck on an entirely different issue which renders the library unusable 😅
See issue #22