镜像自地址
https://github.com/binary-husky/gpt_academic.git
已同步 2025-12-06 06:26:47 +00:00
更新README
这个提交包含在:
26
toolbox.py
26
toolbox.py
@@ -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']
|
||||
在新工单中引用
屏蔽一个用户