Kaveen Kumarasinghe 2 years ago
commit 0a7ee2e4ca

@ -312,7 +312,10 @@ class Model:
tokens_used = int(response["usage"]["total_tokens"]) tokens_used = int(response["usage"]["total_tokens"])
self.usage_service.update_usage(tokens_used) self.usage_service.update_usage(tokens_used)
except: 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): async def send_summary_request(self, prompt):
""" """

Loading…
Cancel
Save