fix: ali image model cannot be found and the error with the incorrect response_format #1470
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
修复 #1467 #1240 里提到的问题
1、发出真实请求前去除 "ali-" 的模型名称前缀;
2、
ConvertImageRequest
转换请求完成后保存入上下文,用以修正返回时判断要求格式是否为 b64_json 无效的问题;我已确认该 PR 已自测通过,相关截图如下,成功在 open-webui 里用阿里的 wanx-v1 模型生成图片并显示:
PS:话说我觉得
Adaptor
的ConvertImageRequest
接口设计得有问题,为何别的方法都有c *gin.Context
入参,就它没有?我觉得它应该也要加上