feat: add config for model selection #471

This commit is contained in:
zhayujie
2023-03-15 23:27:51 +08:00
parent b404e2c51f
commit 3c04325aae
9 changed files with 54 additions and 12 deletions

View File

@@ -63,7 +63,7 @@ class ChatGPTBot(Bot):
'''
try:
response = openai.ChatCompletion.create(
model="gpt-3.5-turbo", # 对话模型的名称
model= conf().get("model") or "gpt-3.5-turbo", # 对话模型的名称
messages=session,
temperature=0.9, # 值在[0,1]之间,越大表示回复越具有不确定性
#max_tokens=4096, # 回复最大的字符数