Giter Club home page Giter Club logo

Comments (7)

songquanpeng avatar songquanpeng commented on July 21, 2024

这是因为讯飞侧主动关闭了 websocket(oneapi 这里错误处理有点问题),我这里是可以的:
image

from one-api.

songquanpeng avatar songquanpeng commented on July 21, 2024

现在可以正确处理错误了

from one-api.

magicdmer avatar magicdmer commented on July 21, 2024

现在可以正确处理错误了

使用docker-compose pull更新后,更悲剧了,测试按钮都通不过了,错误如下:

one-api-one-api-1  | [SYS] 2024/03/25 - 11:16:53 | One API v0.6.4-alpha.1 started
one-api-one-api-1  | [SYS] 2024/03/25 - 11:16:53 | SQL_DSN not set, using SQLite as database
one-api-one-api-1  | [SYS] 2024/03/25 - 11:16:53 | database migration started
one-api-one-api-1  | [SYS] 2024/03/25 - 11:16:53 | database migrated
one-api-one-api-1  | [SYS] 2024/03/25 - 11:16:53 | REDIS_CONN_STRING not set, Redis is not enabled
one-api-one-api-1  | [SYS] 2024/03/25 - 11:16:53 | using theme default
one-api-one-api-1  | [SYS] 2024/03/25 - 11:16:53 | initializing token encoders
one-api-one-api-1  | [SYS] 2024/03/25 - 11:16:53 | token encoders initialized
one-api-one-api-1  | [GIN] 2024/03/25 - 11:16:58 | 202403251116582822908288264597 | 200 |    1.320695ms |   221.232.57.78 |     GET /api/models
one-api-one-api-1  | [GIN] 2024/03/25 - 11:16:58 | 202403251116582992809719676140 | 200 |    1.924366ms |   221.232.57.78 |     GET /api/channel/?p=0
one-api-one-api-1  | [SYS] 2024/03/25 - 11:17:06 | error reading stream response: websocket: close 1000 (normal): close this ws conn
one-api-one-api-1  |
one-api-one-api-1  |
one-api-one-api-1  | 2024/03/25 11:17:06 [Recovery] 2024/03/25 - 11:17:06 panic recovered:
one-api-one-api-1  | runtime error: invalid memory address or nil pointer dereference
one-api-one-api-1  | /usr/local/go/src/runtime/panic.go:261 (0x4555b7)
one-api-one-api-1  | /usr/local/go/src/runtime/signal_unix.go:881 (0x455585)
one-api-one-api-1  | /build/relay/channel/openai/util.go:7 (0xcd74af)
one-api-one-api-1  | /build/relay/channel/xunfei/main.go:174 (0xcd75ac)
one-api-one-api-1  | /build/relay/channel/xunfei/adaptor.go:59 (0xcd54a5)
one-api-one-api-1  | /build/controller/channel-test.go:94 (0xceb48b)
one-api-one-api-1  | /build/controller/channel-test.go:129 (0xcebae4)
one-api-one-api-1  | /go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:174 (0xc60ace)
one-api-one-api-1  | /build/middleware/auth.go:68 (0xc60783)
one-api-one-api-1  | /build/middleware/auth.go:79 (0xd0c4d7)
one-api-one-api-1  | /go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:174 (0xd051f5)
one-api-one-api-1  | /go/pkg/mod/github.com/gin-contrib/[email protected]/handler.go:60 (0xd051dd)
one-api-one-api-1  | /go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:174 (0x93c06a)
one-api-one-api-1  | /go/pkg/mod/github.com/gin-contrib/[email protected]/sessions.go:54 (0xd0e588)
one-api-one-api-1  | /go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:174 (0x947e3c)
one-api-one-api-1  | /go/pkg/mod/github.com/gin-gonic/[email protected]/logger.go:240 (0x947e23)
one-api-one-api-1  | /go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:174 (0x93c06a)
one-api-one-api-1  | /build/middleware/request-id.go:17 (0xd0e965)
one-api-one-api-1  | /go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:174 (0x948cf9)
one-api-one-api-1  | /go/pkg/mod/github.com/gin-gonic/[email protected]/recovery.go:102 (0x948ce7)
one-api-one-api-1  | /go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:174 (0x94732d)
one-api-one-api-1  | /go/pkg/mod/github.com/gin-gonic/[email protected]/gin.go:620 (0x946fbc)
one-api-one-api-1  | /go/pkg/mod/github.com/gin-gonic/[email protected]/gin.go:576 (0x946af1)
one-api-one-api-1  | /usr/local/go/src/net/http/server.go:3137 (0x6f082d)
one-api-one-api-1  | /usr/local/go/src/net/http/server.go:2039 (0x6ebbe7)
one-api-one-api-1  | /usr/local/go/src/runtime/asm_amd64.s:1695 (0x472c80)
one-api-one-api-1  |

from one-api.

magicdmer avatar magicdmer commented on July 21, 2024

切换为v0.6.3的tag,测试是正常的,聊天还是有问题,内容如下:

one-api-one-api-1  | [SYS] 2024/03/25 - 11:28:50 | One API v0.6.3 started
one-api-one-api-1  | [SYS] 2024/03/25 - 11:28:50 | SQL_DSN not set, using SQLite as database
one-api-one-api-1  | [SYS] 2024/03/25 - 11:28:50 | database migration started
one-api-one-api-1  | [SYS] 2024/03/25 - 11:28:50 | database migrated
one-api-one-api-1  | [SYS] 2024/03/25 - 11:28:50 | REDIS_CONN_STRING not set, Redis is not enabled
one-api-one-api-1  | [SYS] 2024/03/25 - 11:28:50 | using theme default
one-api-one-api-1  | [SYS] 2024/03/25 - 11:28:50 | initializing token encoders
one-api-one-api-1  | [SYS] 2024/03/25 - 11:28:50 | token encoders initialized
one-api-one-api-1  | [SYS] 2024/03/25 - 11:28:57 | failed to get token encoder for model SparkDesk-v3.5: no encoding for model SparkDesk-v3.5, using encoder for gpt-3.5-turbo
one-api-one-api-1  | [INFO] 2024/03/25 - 11:28:57 | 202403251128577538040795288785 | user 1 has enough quota 99399452, trusted and no need to pre-consume
one-api-one-api-1  | [SYS] 2024/03/25 - 11:28:58 | error reading stream response: websocket: close 1000 (normal): close this ws conn
one-api-one-api-1  | [GIN] 2024/03/25 - 11:28:58 | 202403251128577538040795288785 | 200 |  979.367594ms |      172.27.0.2 |    POST /v1/chat/completions
one-api-one-api-1  | [INFO] 2024/03/25 - 11:28:58 | 202403251128577538040795288785 | record consume log: userId=1, channelId=9, promptTokens=0, completionTokens=0, modelName=SparkDesk-v3.5, tokenName=mg_key, quota=0, content=模型倍率 1.29,分组倍率 1.00,补全倍率 1.00

from one-api.

jetydu avatar jetydu commented on July 21, 2024

确实是,pull新的后,连测试都不正常了

from one-api.

songquanpeng avatar songquanpeng commented on July 21, 2024

我怀疑是你的key有问题,你的key有对应模型的权限么

from one-api.

magicdmer avatar magicdmer commented on July 21, 2024

我怀疑是你的key有问题,你的key有对应模型的权限么

不好意思,是这样的,这坑爹的讯飞。我创建了一个应用,讯飞星火都生成密钥和key了,竟然还需要再申请给这个应用开通使用权限,刚开通后好了,其他模型就没这些b事

from one-api.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.