fix: 修复接入智谱提供商后,工具调用无限循环的问题,并停止支持 glm-4v-flash #2931
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.
fixes: #2912
Motivation / 动机
修复智谱提供商下工具调用无限循环的问题。这个问题是未及时更新 zhipu_source.py 的部分方法参数导致工具调用的响应未有正确被添加到上下文中导致的。
Modifications / 改动点
移除了对智谱模型的专门支持。
Verification Steps / 验证步骤
Screenshots or Test Results / 运行截图或测试结果
Compatibility & Breaking Changes / 兼容性与破坏性变更
破坏性不大。
Checklist / 检查清单
requirements.txt和pyproject.toml文件相应位置。/ I have ensured that no new dependencies are introduced, OR if new dependencies are introduced, they have been added to the appropriate locations inrequirements.txtandpyproject.toml.Sourcery 总结
修复智谱聊天补全(Zhipu Chat Completion)提供程序中的无限循环,并通过删除过时的方法重写并回退到基础的 OpenAI 实现来移除对 glm-4v-flash 的专门支持。
Bug 修复:
改进:
Original summary in English
Summary by Sourcery
Fix infinite loop in Zhipu Chat Completion provider and remove specialized glm-4v-flash support by deleting the outdated method override and falling back to the base OpenAI implementation
Bug Fixes:
Enhancements: