helicone icon indicating copy to clipboard operation
helicone copied to clipboard

[Bug]: Error parsing response unexpected token

Open tscodeler opened this issue 1 year ago • 0 comments

What happened?

Setup: Docker compose self hosting

Facing "Error parsing response" in helicone worker openai proxy container and helicone-jawn container while sending a request to OpenAI/Helicone.

Even if this error, the request is displayed in Helicone dashboard but some fields are not there (e.g. model).

Please, also check this issue to see some adjustments I had to implement to run the docker compose: https://github.com/Helicone/helicone/issues/2965

Request example:

curl --location 'http://127.0.0.1:8787/v1/chat/completions' \
--header 'Authorization: Bearer XXXXXXXXXX' \
--header 'Helicone-Auth: Bearer XXXXXXXXXX' \
--header 'Content-Type: application/json' \
--data '{
    "model": "gpt-4o",
    "messages": [
        {
            "role": "system",
            "content": "What is football, give one word as answer"
        }
    ]
}'
Screenshot 2024-11-18 at 10 27 56

Relevant log output

[wrangler:inf] POST /v1/chat/completions 200 OK (448ms)
Error parsing default response: SyntaxError: Unexpected token '!', "!�
Error processing response body Error parsing body: SyntaxError: Unexpected token '!', "!�
                                                                                          V�WS�"... is not valid JSON, !�
                                                                                                                          V�WS�lm�~ u	��
                                                                                                                                          $���y����>�`
M��.]8���0ކ�|���e��ED�����4�A/ڌ�C"B�j�&�a(�Ѵ#�^��	7�Yz�Y�qSCS;�5Q��1V���n?`�'H̭�\�5                                                              d�h�&���F����%b-����*"�����uxx�9��S�f;,J�3����xW|N3�@��K�I�8�k!���;��4�,f��z��_4�J
                                                                                        MF��t��[d���'�k�����v�����
RI�y�>>��5m�I";Ws6��eSYܛ��XUa
                             ��B�\�Y��)f��D�������&*��?V8IҢͤ�}��שOf���.�3f�e
Inserting rate limits for batch
Upserting logs for batch
Finished processing batch


### Twitter / LinkedIn details

_No response_

tscodeler avatar Nov 18 '24 13:11 tscodeler