transitive-bullshit / agentic

AI agent stdlib that works with any LLM and TypeScript AI SDK.
https://agentic.so
MIT License
16.38k stars 2.14k forks source link

SyntaxError: Unexpected number in JSON at position 4 #557

Closed kirito141211 closed 1 year ago

kirito141211 commented 1 year ago

Verify latest release

Verify webapp is working

Environment details

Node v18.12.1

Describe the Bug

When I use ChatGPTUnofficialProxyAPI, "SyntaxError: Unexpected number in JSON at position 4" happens sometimes . I found the point of the problem herechatgpt/src/chatgpt-unofficial-proxy-api.ts:197:22 OPENAI will send data like "2023-05-01 02:34:13.241659" It's not a json, so the bug happens Please fix it, thank you.

transitive-bullshit commented 1 year ago

I'm likely going to deprecate the unofficial API soon due to too many issues like this. See also https://github.com/transitive-bullshit/chatgpt-api/issues/453

transitive-bullshit commented 1 year ago

The latest release relaxes the JSON parsing for the unofficial API which should resolve this issue: https://github.com/transitive-bullshit/chatgpt-api/releases/tag/v5.2.4

Please re-open if you're still seeing it.