Skip to content

Commit

Permalink
Format Python code with psf/black push
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions authored and github-actions committed Jan 5, 2023
1 parent 6cea6da commit 9bbfa2d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion models/openai_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,10 @@ async def valid_text_request(self, response):
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):
"""
Expand Down

0 comments on commit 9bbfa2d

Please sign in to comment.