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

@@ -45,7 +45,7 @@ class OpenAIBot(Bot):
def reply_text(self, query, user_id, retry_count=0):
try:
response = openai.Completion.create(
model="text-davinci-003", # 对话模型的名称
model= conf().get("model") or "text-davinci-003", # 对话模型的名称
prompt=query,
temperature=0.9, # 值在[0,1]之间,越大表示回复越具有不确定性
max_tokens=1200, # 回复最大的字符数