Loading modules/translators/trans_chatgpt.py +3 −2 Original line number Diff line number Diff line Loading @@ -318,8 +318,6 @@ class GPTTranslator(BaseTranslator): 'messages': messages, 'temperature': self.temperature, 'top_p': self.top_p, 'frequency_penalty': self.params['frequency penalty'], 'presence_penalty ': self.params['presence penalty'] } max_tokens = self.max_tokens // 2 # Assuming that half of the tokens are used for the query func_parameters = inspect.signature(openai.chat.completions.create).parameters Loading @@ -327,6 +325,9 @@ class GPTTranslator(BaseTranslator): func_args['max_completion_tokens'] = max_tokens else: func_args['max_tokens'] = max_tokens if 'presence_penalty' in func_parameters: func_args['presence_penalty'] = self.params['presence penalty'] func_args['frequency_penalty'] = self.params['frequency penalty'] if OPENAPI_V1_API: openai_chatcompletions_create = openai.chat.completions.create Loading modules/translators/trans_chatgpt_exp.py +3 −2 Original line number Diff line number Diff line Loading @@ -257,8 +257,6 @@ Then stop, without any other explanations or notes. 'messages': messages, 'temperature': self.temperature, 'top_p': self.top_p, 'frequency_penalty': self.params['frequency penalty'], 'presence_penalty ': self.params['presence penalty'] } max_tokens = self.max_tokens // 2 # Assuming that half of the tokens are used for the query func_parameters = inspect.signature(openai.chat.completions.create).parameters Loading @@ -266,6 +264,9 @@ Then stop, without any other explanations or notes. func_args['max_completion_tokens'] = max_tokens else: func_args['max_tokens'] = max_tokens if 'presence_penalty' in func_parameters: func_args['presence_penalty'] = self.params['presence penalty'] func_args['frequency_penalty'] = self.params['frequency penalty'] if OPENAPI_V1_API: openai_chatcompletions_create = openai.chat.completions.create Loading requirements.txt +1 −1 Original line number Diff line number Diff line Loading @@ -37,7 +37,7 @@ requests Pillow>=10.0.1 beautifulsoup4 colorama openai openai>=1.59.5 pyyaml natsort py7zr Loading Loading
modules/translators/trans_chatgpt.py +3 −2 Original line number Diff line number Diff line Loading @@ -318,8 +318,6 @@ class GPTTranslator(BaseTranslator): 'messages': messages, 'temperature': self.temperature, 'top_p': self.top_p, 'frequency_penalty': self.params['frequency penalty'], 'presence_penalty ': self.params['presence penalty'] } max_tokens = self.max_tokens // 2 # Assuming that half of the tokens are used for the query func_parameters = inspect.signature(openai.chat.completions.create).parameters Loading @@ -327,6 +325,9 @@ class GPTTranslator(BaseTranslator): func_args['max_completion_tokens'] = max_tokens else: func_args['max_tokens'] = max_tokens if 'presence_penalty' in func_parameters: func_args['presence_penalty'] = self.params['presence penalty'] func_args['frequency_penalty'] = self.params['frequency penalty'] if OPENAPI_V1_API: openai_chatcompletions_create = openai.chat.completions.create Loading
modules/translators/trans_chatgpt_exp.py +3 −2 Original line number Diff line number Diff line Loading @@ -257,8 +257,6 @@ Then stop, without any other explanations or notes. 'messages': messages, 'temperature': self.temperature, 'top_p': self.top_p, 'frequency_penalty': self.params['frequency penalty'], 'presence_penalty ': self.params['presence penalty'] } max_tokens = self.max_tokens // 2 # Assuming that half of the tokens are used for the query func_parameters = inspect.signature(openai.chat.completions.create).parameters Loading @@ -266,6 +264,9 @@ Then stop, without any other explanations or notes. func_args['max_completion_tokens'] = max_tokens else: func_args['max_tokens'] = max_tokens if 'presence_penalty' in func_parameters: func_args['presence_penalty'] = self.params['presence penalty'] func_args['frequency_penalty'] = self.params['frequency penalty'] if OPENAPI_V1_API: openai_chatcompletions_create = openai.chat.completions.create Loading
requirements.txt +1 −1 Original line number Diff line number Diff line Loading @@ -37,7 +37,7 @@ requests Pillow>=10.0.1 beautifulsoup4 colorama openai openai>=1.59.5 pyyaml natsort py7zr Loading