diff --git a/tests/test_engine.py b/tests/test_engine.py index df1dee4..8c9b8b1 100644 --- a/tests/test_engine.py +++ b/tests/test_engine.py @@ -408,7 +408,8 @@ def test_get_body(self): } ], 'stream': True, - 'temperature': 1.0})) + 'temperature': 1.0 + })) def test_get_body_without_stream(self): model = 'gpt-4o' @@ -432,7 +433,7 @@ def test_get_body_without_stream(self): 'content': 'test content' } ], - 'temperature': 1.0, + 'temperature': 1.0 })) @patch(module_name + '.openai.EbookTranslator') @@ -584,7 +585,8 @@ def mock_get_body(text): 'messages': [ {'role': 'system', 'content': 'some prompt...'}, {'role': 'user', 'content': text}], - 'temperature': 1.0}) + 'temperature': 1.0 + }) self.mock_translator.get_body.side_effect = mock_get_body file_id = self.batch_translator.upload( @@ -853,12 +855,12 @@ def test_translate(self, mock_request, mock_et): 'URLs/addresses should be preserved as is in the translation\'s output. ') data = json.dumps({ 'stream': False, - 'messages': [{'role': 'user', 'content': 'Hello World!'}], - 'temperature': 1.0, - 'model': model, 'max_tokens': 4096, + 'model': model, 'top_k': 1, - 'system': prompt + 'system': prompt, + 'messages': [{'role': 'user', 'content': 'Hello World!'}], + 'temperature': 1.0 }) mock_et.__version__ = '1.0.0' headers = { @@ -918,7 +920,7 @@ def test_translate_stream(self, mock_request, mock_et): 'top_k': 1, 'system': prompt, 'messages': [{'role': 'user', 'content': 'Hello World!'}], - 'temperature': 1.0, + 'temperature': 1.0 }) mock_et.__version__ = '1.0.0' headers = {