Skip to content

Chat API is error or undefined #438

Description

@WallenHan

例行检查

  • [x ] 我已确认目前没有类似 issue
  • [ x] 我已完整查看过项目 README,以及项目文档
  • [ x] 我使用了自己的 key,并确认我的 key 是可正常使用的
  • [x ] 我理解并愿意跟进此 issue,协助测试和提供反馈
  • 我理解并认可上述内容,并理解项目维护者精力有限,不遵循规则的 issue 可能会被无视或直接关闭

你的版本

  • 公有云版本
  • [x ] 私有部署版本

问题描述
使用基于 https://github.com/xusenlinzy/api-for-open-llm 项目包装的 openai 的接口
接口使用

# openai 基本地址,可用作中转。
OPENAI_BASE_URL=http://api-openllm-host/v1

使用的 latest 镜像 v4.5.1
和这个类似的问题 #397

复现步骤

预期结果
预期正常响应
相关截图

{
  stack: 'Error: 500 status code (no body)\n' +
    '    at Function.generate (webpack-internal:///(api)/../../node_modules/.pnpm/registry.npmmirror.com+openai@4.12.4_encoding@0.1.13/node_modules/openai/error.mjs:77:20)\n' +
    '    at OpenAI.makeStatusError (webpack-internal:///(api)/../../node_modules/.pnpm/registry.npmmirror.com+openai@4.12.4_encoding@0.1.13/node_modules/openai/core.mjs:274:65)\n' +
    '    at OpenAI.makeRequest (webpack-internal:///(api)/../../node_modules/.pnpm/registry.npmmirror.com+openai@4.12.4_encoding@0.1.13/node_modules/openai/core.mjs:313:30)\n' +
    '    at processTicksAndRejections (node:internal/process/task_queues:96:5)\n' +
    '    at async Object.dispatchChatCompletion [as chatNode] (webpack-internal:///(api)/./src/service/moduleDispatch/chat/oneapi.ts:80:22)\n' +
    '    at async moduleRun (webpack-internal:///(api)/./src/pages/api/v1/chat/completions.ts:355:29)\n' +
    '    at async Promise.all (index 0)\n' +
    '    at async Promise.all (index 0)\n' +
    '    at async Promise.all (index 0)\n' +
    '    at async Promise.all (index 0)\n' +
    '    at async Promise.all (index 1)\n' +
    '    at async dispatchModules (webpack-internal:///(api)/./src/pages/api/v1/chat/completions.ts:379:5)\n' +
    '    at async handler (webpack-internal:///(api)/./src/pages/api/v1/chat/completions.ts:136:74)'
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions