Skip to content

Commit

Permalink
pre commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Sarthak5598 committed Jun 29, 2024
1 parent e60c2d4 commit 679a7eb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,11 +183,11 @@ def gpt_bot(payload):
if len(doubt) > 20:
client.chat_postMessage(channel=user, text="Please enter less than 20 characters")
return

if total_token_used + token_per_prompt > token_limit:
client.chat_postMessage(channel=user, text="Exceeds Token Limit")
return

try:
response = openai_client.Completion.create(
messages=[{"role": "user", "content": prompt}],
Expand Down

0 comments on commit 679a7eb

Please sign in to comment.