Welcome to Portkey Forum

Home
Members
Vedant Agarwala
V
Vedant Agarwala
Offline, last seen 4 weeks ago
Joined November 4, 2024
Hi team!
I have been getting these intermittent llm response chunk json parsing issues. Latest case:

Plain Text
DEFAULT 2024-08-13T10:30:26.180544Z Could not parse message into JSON: {"id":"chatcmpl-9vj5477rfPJ0jx7RqI9jL7jWp25NT","object":"chat.completion.chunk","created":1723545014,"model":"gpt-4o-2024-05-13","system_fingerprint":"fp_c9aa9c0491","choices":[{"index":0,"delta":{"content":"
DEFAULT 2024-08-13T10:30:26.181660Z From chunk: [
DEFAULT 2024-08-13T10:30:26.181668Z 'data: {"id":"chatcmpl-9vj5477rfPJ0jx7RqI9jL7jWp25NT","object":"chat.completion.chunk","created":1723545014,"model":"gpt-4o-2024-05-13","system_fingerprint":"fp_c9aa9c0491","choices":[{"index":0,"delta":{"content":"',
DEFAULT 2024-08-13T10:30:26.181672Z '"},"logprobs":null,"finish_reason":null}]}'
DEFAULT 2024-08-13T10:30:26.181675Z ]
DEFAULT 2024-08-13T10:30:26.189158Z iteratorToStream error: SyntaxError: Unterminated string in JSON at position 208 (line 1 column 209)
DEFAULT 2024-08-13T10:30:26.189176Z at JSON.parse (<anonymous>)
DEFAULT 2024-08-13T10:30:26.189179Z at o.<anonymous> (/app/.next/server/chunks/425.js:28:6577)
DEFAULT 2024-08-13T10:30:26.189182Z at Generator.next (<anonymous>)
DEFAULT 2024-08-13T10:30:26.189185Z at o (/app/.next/server/chunks/425.js:28:4834)
DEFAULT 2024-08-13T10:30:26.189188Z at n (/app/.next/server/chunks/425.js:28:4945)
DEFAULT 2024-08-13T10:30:26.189192Z at process.processTicksAndRejections (node:internal/process/task_queues:95:5) 66ba2051041a4d1bd1556822 66bb35b3b6fceb68b275a036
DEFAULT 2024-08-13T10:30:26.189905Z iteratorToStream error

Seems like this json wasn't parsed
Plain Text
{
  "id": "chatcmpl-9vj5477rfPJ0jx7RqI9jL7jWp25NT",
  "object": "chat.completion.chunk",
  "created": 1723545014,
  "model": "gpt-4o-2024-05-13",
  "system_fingerprint": "fp_c9aa9c0491",
  "choices": [
    {
      "index": 0,
      "delta": {
        "content": "','"
      },
      "logprobs": null,
      "finish_reason": null
    }
  ]
}
2 comments
V
V
I'm ready to deploy to production. Are there some things I need to check before doing that? We have decent volume - 10k API calls, 150M tokens per month. Quick call?
4 comments
V
Interesting. Thanks!
I really want to setup the fallback from openAI to anthropic. Been trying to do that since yesterday via portkey
32 comments
v
V
V
C
Folks, I am facing a wierd issue. Both gpt-4o and claude 3.5-sonnet are giving me "invalid image" errors. But the images are fine. png, 40-50 kb in size.
Even more wierd, it is happening consistently for 1 user. While for others its fine.
19 comments
V
V
v
Hi team. Portkey is working well!
Is there a way to get alerts (like on company slack) when errors occur?!
3 comments
V
V
5 comments
V
V
G