From 9bbfa2de7ad5d4dc62fb0f718d17b235b7bdf66b Mon Sep 17 00:00:00 2001 From: github-actions <${GITHUB_ACTOR}@users.noreply.github.com> Date: Thu, 5 Jan 2023 02:55:05 +0000 Subject: [PATCH] Format Python code with psf/black push --- models/openai_model.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/models/openai_model.py b/models/openai_model.py index 29c57bb..70d4f5f 100644 --- a/models/openai_model.py +++ b/models/openai_model.py @@ -312,7 +312,10 @@ class Model: tokens_used = int(response["usage"]["total_tokens"]) self.usage_service.update_usage(tokens_used) except: - raise ValueError("The API returned an invalid response: " + str(response['error']['message'])) + raise ValueError( + "The API returned an invalid response: " + + str(response["error"]["message"]) + ) async def send_summary_request(self, prompt): """