From 67ef0b125510d39bd242affe6f82300ae5048cee Mon Sep 17 00:00:00 2001 From: ivan deng Date: Fri, 5 May 2023 07:11:40 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=84=E7=90=86=E8=B7=A8=E5=9F=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app_chatgpt/models/ai_robot.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app_chatgpt/models/ai_robot.py b/app_chatgpt/models/ai_robot.py index 954f28d0..883479bf 100644 --- a/app_chatgpt/models/ai_robot.py +++ b/app_chatgpt/models/ai_robot.py @@ -65,13 +65,13 @@ GPT-3 A set of models that can understand and generate natural language Try adjusting temperature or Top P but not both """) # 避免使用常用词 - frequency_penalty = fields.Float('Frequency penalty', default=0.1, + frequency_penalty = fields.Float('Frequency penalty', default=1, help=""" Reduce the chance of repeating a token proportionally based on how often it has appeared in the text so far. This decreases the likelihood of repeating the exact same text in a response. """) # 越大模型就趋向于生成更新的话题,惩罚已经出现过的文本 - presence_penalty = fields.Float('Presence penalty', default=0.1, + presence_penalty = fields.Float('Presence penalty', default=1, help=""" Reduce the chance of repeating any token that has appeared in the text at all so far. This increases the likelihood of introducing new topics in a response. @@ -373,7 +373,7 @@ GPT-3 A set of models that can understand and generate natural language top_p=top_p, frequency_penalty=frequency_penalty, presence_penalty=presence_penalty, - stop=stop, + stop=None, request_timeout=request_timeout, ) if 'choices' in response: