更新README

这个提交包含在:
binary-husky
2023-11-12 23:31:50 +08:00
父节点 67a98de841
当前提交 7e56ace2c0
共有 20 个文件被更改,包括 3242 次插入2507 次删除

查看文件

@@ -1098,14 +1098,11 @@ def get_chat_handle():
def get_plugin_default_kwargs():
"""
"""
from toolbox import get_conf, ChatBotWithCookies
WEB_PORT, LLM_MODEL, API_KEY = \
get_conf('WEB_PORT', 'LLM_MODEL', 'API_KEY')
from toolbox import ChatBotWithCookies
cookies = load_chat_cookies()
llm_kwargs = {
'api_key': API_KEY,
'llm_model': LLM_MODEL,
'api_key': cookies['api_key'],
'llm_model': cookies['llm_model'],
'top_p':1.0,
'max_length': None,
'temperature':1.0,
@@ -1120,25 +1117,21 @@ def get_plugin_default_kwargs():
"chatbot_with_cookie": chatbot,
"history": [],
"system_prompt": "You are a good AI.",
"web_port": WEB_PORT
"web_port": None
}
return DEFAULT_FN_GROUPS_kwargs
def get_chat_default_kwargs():
"""
"""
from toolbox import get_conf
LLM_MODEL, API_KEY = get_conf('LLM_MODEL', 'API_KEY')
cookies = load_chat_cookies()
llm_kwargs = {
'api_key': API_KEY,
'llm_model': LLM_MODEL,
'api_key': cookies['api_key'],
'llm_model': cookies['llm_model'],
'top_p':1.0,
'max_length': None,
'temperature':1.0,
}
default_chat_kwargs = {
"inputs": "Hello there, are you ready?",
"llm_kwargs": llm_kwargs,
@@ -1150,3 +1143,6 @@ def get_chat_default_kwargs():
return default_chat_kwargs
def get_max_token(llm_kwargs):
from request_llms.bridge_all import model_info
return model_info[llm_kwargs['llm_model']]['max_token']