ading2210 / vercel-llm-api

A reverse engineered Python API wrapper for the Vercel AI Playground, which provides free access to many large language models without needing an account.
https://pypi.org/project/vercel-llm-api
GNU General Public License v3.0
151 stars 12 forks source link

Issues while making prompts with Cyrillic characters. #8

Open FanaticExplorer opened 1 year ago

FanaticExplorer commented 1 year ago

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.

FanaticExplorer commented 1 year ago

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
FanaticExplorer commented 7 months ago

Any progress?

0x6a69616e commented 7 months ago

We're stuck on an entirely different issue which renders the library unusable 😅

See issue #22