AtomdffAI commited on
Commit
06c67ff
·
1 Parent(s): 0c4ea60

Update bot/chatgpt/chat_gpt_bot.py

Browse files
Files changed (1) hide show
  1. bot/chatgpt/chat_gpt_bot.py +4 -4
bot/chatgpt/chat_gpt_bot.py CHANGED
@@ -44,11 +44,11 @@ class ChatGPTBot(Bot):
44
  response = openai.ChatCompletion.create(
45
  model="gpt-3.5-turbo", # 对话模型的名称
46
  messages=query,
47
- temperature=1, # 值在[0,1]之间,越大表示回复越具有不确定性
48
- max_tokens=500, # 回复最大的字符数
49
  top_p=1,
50
- frequency_penalty=2, # [-2,2]之间,该值越大则更倾向于产生不同的内容
51
- presence_penalty=2, # [-2,2]之间,该值越大则更倾向于产生不同的内容
52
  )
53
  # res_content = response.choices[0]['text'].strip().replace('<|endoftext|>', '')
54
  logger.info(response.choices[0]['message']['content'])
 
44
  response = openai.ChatCompletion.create(
45
  model="gpt-3.5-turbo", # 对话模型的名称
46
  messages=query,
47
+ temperature=0.5, # 值在[0,1]之间,越大表示回复越具有不确定性
48
+ max_tokens=1500, # 回复最大的字符数
49
  top_p=1,
50
+ frequency_penalty=0.5, # [-2,2]之间,该值越大则更倾向于产生不同的内容
51
+ presence_penalty=0.5, # [-2,2]之间,该值越大则更倾向于产生不同的内容
52
  )
53
  # res_content = response.choices[0]['text'].strip().replace('<|endoftext|>', '')
54
  logger.info(response.choices[0]['message']['content'])