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.
#558
Motivation
Anthropic Claude的API与OpenAI的不兼容,希望增加对Claude的支持
Modifications
在
.gitignore
中添加了.conda
文件夹,对使用conda环境的用户更加友好在
requirements.txt
添加了anthropic库添加了
anthropic_source.py
,用以处理Anthropic API(警告:尚未对上传图片进行测试,可能这部分存在bug)在
func_tool_manager.py
文件中增加了get_func_desc_anthropic_style()
函数,以处理Anthropic的函数调用API。在
default.py
中添加claude模板需要的进一步改进
在前端面板的“服务提供商配置”上添加
anthropic_chat_completion
类型前端面板将“服务提供商配置”中的“文本生成模型”里“模型最大输出长度(tokens) (max_tokens)”对于
anthropic_chat_completion
类型改为常驻或显式的,因为调用Anthropic API,max_tokens
是必须的