songquanpeng / one-api

OpenAI 接口管理 & 分发系统,支持 Azure、Anthropic Claude、Google PaLM 2 & Gemini、智谱 ChatGLM、百度文心一言、讯飞星火认知、阿里通义千问、360 智脑以及腾讯混元,可用于二次分发管理 key,仅单可执行文件,已打包好 Docker 镜像,一键部署,开箱即用. OpenAI key management & redistribution system, using a single API for all LLMs, and features an English UI.
https://openai.justsong.cn/
MIT License
15.95k stars 3.69k forks source link

oneapi报错 #1553

Open lingaoan2024 opened 6 days ago

lingaoan2024 commented 6 days ago

例行检查

问题描述 本地ollama部署的qwen2,创建渠道测试成功,如下图: image

分别测试两次: 1、root用户创建渠道测试通过后,直接创建令牌,报错如下: 2024-06-23 03:36:42 [ERR] 2024/06/22 - 19:36:42 | 2024062219364230120484593645821 | 该令牌无权使用模型:qwen2 2024-06-23 03:36:42 [GIN] 2024/06/22 - 19:36:42 | 2024062219364230120484593645821 | 403 | 532.536µs | 172.22.0.7 | POST /v1/chat/completions 2、创建其他用户,创建令牌,复制key,重新docker compose fastgpt,报错如下 2024-06-23 03:55:07 2024/06/22 19:55:07 /build/model/cache.go:35 record not found 2024-06-23 03:55:07 [0.336ms] [rows:0] SELECT * FROM tokens WHERE key = 'fastgpt' ORDER BY tokens.id LIMIT 1 2024-06-23 03:55:07 [GIN] 2024/06/22 - 19:55:07 | 2024062219550783290268839514798 | 401 | 423.215µs | 172.22.0.7 | POST /v1/chat/completions 2024-06-23 03:55:07 [SYS] 2024/06/22 - 19:55:07 | CacheGetTokenByKey failed: record not found 2024-06-23 03:55:07 [ERR] 2024/06/22 - 19:55:07 | 2024062219550783290268839514798 | 无效的令牌 复现步骤

预期结果

lingaoan2024 commented 6 days ago

补充一下,docker安装 image: ghcr.io/songquanpeng/one-api:latest