solve customized OpenAIVision model api_host issue #1125
Merged
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.
作者自述
描述
更正 OpenAIVision 内自定义 api_host 的调用。
更正后,以 DeepSeek V2 模型为例,相应 json 配置如下
运行结果
相关问题
#1117
补充信息
OpenAIVisionClient.__init__()
时已进行自定义 api_host 判断,并正确赋值给一系列self.xxx_url
,如下:此时各变量分别为
但在
_get_response()
和_single_query_at_once()
中,执行自定义api_host判断时各变量分别为
因此,相应的
requests.post
所对应的 url 应为self.chat_completion_url
,而非shared.state.chat_completion_url