feat: model name log, args help hint and the proxy of key does not participate in the judgment.
This commit is contained in:
@@ -16,7 +16,7 @@ from chatglm.tool_registry import dispatch_tool, extract_code, get_tools
|
||||
functions = get_tools()
|
||||
|
||||
|
||||
class ChatGLM():
|
||||
class ChatGLM:
|
||||
|
||||
def __init__(self, config={}, wcf: Optional[Wcf] = None, max_retry=5) -> None:
|
||||
openai.api_key = config.get('key', 'XXX')
|
||||
@@ -35,6 +35,9 @@ class ChatGLM():
|
||||
"tool": [{"role": "system", "content": "Answer the following questions as best as you can. You have access to the following tools:"}],
|
||||
"code": [{"role": "system", "content": "你是一位智能AI助手,你叫ChatGLM,你连接着一台电脑,但请注意不能联网。在使用Python解决任务时,你可以运行代码并得到结果,如果运行结果有错误,你需要尽可能对代码进行改进。你可以处理用户上传到电脑上的文件,文件默认存储路径是{}。".format(self.filePath)}]}
|
||||
|
||||
def __repr__(self):
|
||||
return 'ChatGLM'
|
||||
|
||||
def get_answer(self, question: str, wxid: str) -> str:
|
||||
# wxid或者roomid,个人时为微信id,群消息时为群id
|
||||
if '#帮助' == question:
|
||||
|
||||
Reference in New Issue
Block a user