Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

grmini-pro-vision报错 #22

Open
5 tasks done
YOMIkio opened this issue Mar 14, 2024 · 2 comments
Open
5 tasks done

grmini-pro-vision报错 #22

YOMIkio opened this issue Mar 14, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@YOMIkio
Copy link

YOMIkio commented Mar 14, 2024

例行检查

  • 我已确认目前没有类似 issue
  • 我已确认我已升级到最新版本
  • 我已完整查看过项目 README,尤其是常见问题部分
  • 我理解并愿意跟进此 issue,协助测试和提供反馈
  • 我理解并认可上述内容,并理解项目维护者精力有限,不遵循规则的 issue 可能会被无视或直接关闭

问题描述
nextchat使用grmini-pro-vision报错
[SYS] 2024/03/14 - 10:35:04 | panic detected: interface conversion: interface {} is model.MessageImageUrl, not openai.MessageImageUrl
[SYS] 2024/03/14 - 10:35:04 | stacktrace from panic: goroutine 2572 [running]:
runtime/debug.Stack()
/usr/local/go/src/runtime/debug/stack.go:24 +0x5e
one-api/router.SetRelayRouter.RelayPanicRecover.func2.1()
/build/middleware/recover.go:17 +0x70
panic({0x10407a0?, 0xc001f9d4a0?})
/usr/local/go/src/runtime/panic.go:770 +0x132
one-api/relay/channel/gemini.ConvertRequest({{0xc000c53020, 0x11}, {0xc0008742c8, 0x5, 0x8}, {0x0, 0x0}, 0x0, 0xfa0, 0x3fe0000000000000, ...})
/build/relay/channel/gemini/main.go:85 +0xaba
one-api/relay/channel/gemini.(*Adaptor).ConvertRequest(0x314b030?, 0xc0000030b0?, 0x1175fb8?, 0x11?)
/build/relay/channel/gemini/adaptor.go:43 +0x78
one-api/relay/controller.RelayTextHelper(0xc0004dc700)
/build/relay/controller/text.go:113 +0x8b9
one-api/controller.relay(0xc001fe06c5?, 0x14?)
/build/controller/relay.go:34 +0x52
one-api/controller.Relay(0xc0004dc700)
/build/controller/relay.go:42 +0x85
github.com/gin-gonic/gin.(*Context).Next(0xc0004dc700)
/go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/context.go:174 +0x2b
one-api/router.SetRelayRouter.Distribute.func4(0xc0004dc700)
/build/middleware/distributor.go:103 +0x3f4
github.com/gin-gonic/gin.(*Context).Next(0xc0004dc700)
/go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/context.go:174 +0x2b
one-api/router.SetRelayRouter.TokenAuth.func3(0xc0004dc700)
/build/middleware/auth.go:184 +0x4c5
github.com/gin-gonic/gin.(*Context).Next(0xc0004dc700)
/go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/context.go:174 +0x2b
one-api/router.SetRelayRouter.RelayPanicRecover.func2(0xc0004dc798?)
/build/middleware/recover.go:27 +0x45
github.com/gin-gonic/gin.(*Context).Next(0xc0004dc700)
/go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/context.go:174 +0x2b
main.main.Sessions.func5(0xc0004dc700)
/go/pkg/mod/github.com/gin-contrib/sessions@v0.0.5/sessions.go:54 +0x169
github.com/gin-gonic/gin.(*Context).Next(...)
/go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/context.go:174
github.com/gin-gonic/gin.LoggerWithConfig.func1(0xc0004dc700)
/go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/logger.go:240 +0xdd
github.com/gin-gonic/gin.(*Context).Next(0xc0004dc700)
/go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/context.go:174 +0x2b
main.main.RequestId.func4(0xc0004dc700)
/build/middleware/request-id.go:16 +0x136
github.com/gin-gonic/gin.(*Context).Next(...)
/go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/context.go:174
github.com/gin-gonic/gin.CustomRecoveryWithWriter.func1(0xc0004dc700)
/go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/recovery.go:102 +0x7a
github.com/gin-gonic/gin.(*Context).Next(...)
/go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/context.go:174
github.com/gin-gonic/gin.(*Engine).handleHTTPRequest(0xc000534340, 0xc0004dc700)
/go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/gin.go:620 +0x66e
github.com/gin-gonic/gin.(*Engine).ServeHTTP(0xc000534340, {0x3148dc0, 0xc001fae700}, 0xc000bdd9e0)
/go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/gin.go:576 +0x1b2
net/http.serverHandler.ServeHTTP({0x3145cc8?}, {0x3148dc0?, 0xc001fae700?}, 0x6?)
/usr/local/go/src/net/http/server.go:3137 +0x8e
net/http.(*conn).serve(0xc0003b3560, {0x314b030, 0xc0000dfce0})
/usr/local/go/src/net/http/server.go:2039 +0x5e8
created by net/http.(*Server).Serve in goroutine 1
/usr/local/go/src/net/http/server.go:3285 +0x4b4
复现步骤

预期结果

@YOMIkio YOMIkio added the bug Something isn't working label Mar 14, 2024
@ai365vip
Copy link
Owner

修复了一下,支持openai 4v的格式 直接对话不行

@YOMIkio
Copy link
Author

YOMIkio commented Mar 14, 2024

修复了一下,支持openai 4v的格式 直接对话不行

ok,现在这个不让直接对话了,非要带个图片

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants