ckt1031 / one-api

OpenAI 接口管理 & 分发系统,支持多种渠道包括 Azure,可用于二次分发管理 key,仅单可执行文件,已打包好 Docker 镜像,一键部署,开箱即用. OpenAI key management & redistribution system, supports English UI.
https://openai.justsong.cn/
MIT License
29 stars 15 forks source link

Unexpected token and invalid character #1

Closed kwekewk closed 1 year ago

kwekewk commented 1 year ago

Routine Inspection

Problem Description

  1. 服务返回错误,代码:500: {"error":{"message":"invalid character 'd' looking for beginning of value","type":"one_api_error","param":"","code":"unmarshal_response_body_failed"}} This happen on many custom endpoint error returned from Immersive translate
  2. Unexpected token 'd', "data: {"id"... is not valid JSON This happen on many custom endpoint error returned from Immersive translate
  3. Unexpected token 'd', "data: {"ch"... is not valid JSON Immersive translate
  4. Error generating title! Unexpected token 'd', "data: {"ch"... is not valid JSON BetterChat
  5. So far, I've found just two projects that return errors.

Reproduction Steps

  1. Start Poe-server
  2. Add to one-api
  3. Input Key and Endpoint to Immersive translate and BetterChat return error 3 and 4

Expected Result

kwekewk commented 1 year ago

from chatgpt-in-terminal

Background Title auto-generation Error: Expecting value: line 1 column 1 (char 0). Check log 
for more information

Perhaps the error occurred because One-API returned a different JSON from OpenAI.

ckt1031 commented 1 year ago

Let me check