Skip to content

Commit

Permalink
auto terminate ask()
Browse files Browse the repository at this point in the history
  • Loading branch information
Kav-K committed Jan 11, 2023
1 parent 7de071d commit b2a923b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cogs/gpt_3_commands_and_converser.py
Original file line number Diff line number Diff line change
Expand Up @@ -1113,6 +1113,10 @@ async def ask(
user = ctx.user
prompt = prompt.strip()

# If the prompt isn't empty and the last character isn't a punctuation character, add a period.
if prompt and prompt[-1] not in [".", "!", "?"]:
prompt += "."

user_api_key = None
if USER_INPUT_API_KEYS:
user_api_key = await GPT3ComCon.get_user_api_key(user.id, ctx)
Expand Down

0 comments on commit b2a923b

Please sign in to comment.