实现Claude聊天功能配置项
This commit is contained in:
parent
595e5cceae
commit
6d267947bb
@ -46,7 +46,7 @@ MAX_RETRY = 2
|
|||||||
|
|
||||||
# OpenAI模型选择是(gpt4现在只对申请成功的人开放,体验gpt-4可以试试api2d)
|
# OpenAI模型选择是(gpt4现在只对申请成功的人开放,体验gpt-4可以试试api2d)
|
||||||
LLM_MODEL = "gpt-3.5-turbo" # 可选 ↓↓↓
|
LLM_MODEL = "gpt-3.5-turbo" # 可选 ↓↓↓
|
||||||
AVAIL_LLM_MODELS = ["gpt-3.5-turbo", "api2d-gpt-3.5-turbo", "gpt-4", "api2d-gpt-4", "chatglm", "moss", "newbing"]
|
AVAIL_LLM_MODELS = ["gpt-3.5-turbo", "api2d-gpt-3.5-turbo", "gpt-4", "api2d-gpt-4", "chatglm", "moss", "newbing", "claude"]
|
||||||
|
|
||||||
# 本地LLM模型如ChatGLM的执行方式 CPU/GPU
|
# 本地LLM模型如ChatGLM的执行方式 CPU/GPU
|
||||||
LOCAL_MODEL_DEVICE = "cpu" # 可选 "cuda"
|
LOCAL_MODEL_DEVICE = "cpu" # 可选 "cuda"
|
||||||
@ -75,3 +75,8 @@ NEWBING_STYLE = "creative" # ["creative", "balanced", "precise"]
|
|||||||
NEWBING_COOKIES = """
|
NEWBING_COOKIES = """
|
||||||
your bing cookies here
|
your bing cookies here
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
# slack-claude bot
|
||||||
|
# 下面的id怎么填写具体参见https://zhuanlan.zhihu.com/p/627485689
|
||||||
|
CLAUDE_BOT_ID = ''
|
||||||
|
SLACK_USER_TOKEN = ''
|
@ -22,6 +22,9 @@ from .bridge_chatglm import predict as chatglm_ui
|
|||||||
from .bridge_newbing import predict_no_ui_long_connection as newbing_noui
|
from .bridge_newbing import predict_no_ui_long_connection as newbing_noui
|
||||||
from .bridge_newbing import predict as newbing_ui
|
from .bridge_newbing import predict as newbing_ui
|
||||||
|
|
||||||
|
from .bridge_claude import predict_no_ui_long_connection as claude_noui
|
||||||
|
from .bridge_claude import predict as claude_ui
|
||||||
|
|
||||||
# from .bridge_tgui import predict_no_ui_long_connection as tgui_noui
|
# from .bridge_tgui import predict_no_ui_long_connection as tgui_noui
|
||||||
# from .bridge_tgui import predict as tgui_ui
|
# from .bridge_tgui import predict as tgui_ui
|
||||||
|
|
||||||
@ -130,6 +133,15 @@ model_info = {
|
|||||||
"tokenizer": tokenizer_gpt35,
|
"tokenizer": tokenizer_gpt35,
|
||||||
"token_cnt": get_token_num_gpt35,
|
"token_cnt": get_token_num_gpt35,
|
||||||
},
|
},
|
||||||
|
# claude
|
||||||
|
"claude": {
|
||||||
|
"fn_with_ui": claude_ui,
|
||||||
|
"fn_without_ui": claude_noui,
|
||||||
|
"endpoint": None,
|
||||||
|
"max_token": 4096,
|
||||||
|
"tokenizer": tokenizer_gpt35,
|
||||||
|
"token_cnt": get_token_num_gpt35,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user