-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
feat: support multipart/form-data format request #1690
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1690 +/- ##
======================================
Coverage ? 1.27%
======================================
Files ? 145
Lines ? 10379
Branches ? 0
======================================
Hits ? 132
Misses ? 10233
Partials ? 14 ☔ View full report in Codecov by Sentry. |
就是这个问题的出现是代码本身的问题 原先的代码不能解析multipart/form-data类型的数据 现在可以解析了 使用最新版代码构建就不会有这个问题了 |
这个应该还是不行 这次就解决这一个问题 |
common/gin.go
Outdated
type ModelRequest struct { | ||
Model string `json:"model" form:"model"` | ||
} | ||
|
||
func UnmarshalBodyReusable(c *gin.Context, v any) error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
为什么不直接使用ShouldBind,可以直接判断请求类型来去解析,这里解析成ModelRequest再转成json再由json解析成传入参数,没有必要。
Thx~ |
引起whisper-1问题的部分代码更新是还没合并到 v0.6.9-alpha.2容器版本里面吗? |
1 similar comment
引起whisper-1问题的部分代码更新是还没合并到 v0.6.9-alpha.2容器版本里面吗? |
引起whisper-1问题的部分代码更新是还没合并到 v0.6.9-alpha.2容器版本里面吗? |
* "add parser multipart/form-data" * chore: fix impl * chore: update impl --------- Co-authored-by: JustSong <[email protected]>
close #1655
我已确认该 PR 已自测通过,相关截图如下: