title: openai python not giving response
body: <p>I am trying to create a discord.py bot. However when I am sending a message with <code>Human:</code> it is not giving any response. No error message is being shown either. Also, when I am trying to print <code>response</code> or <code>answer</code> it is not printing them either.</p>
  <p>Here is my code:</p>
  <pre><code>import discord
  import openai
  intents = discord.Intents(messages=True)
  client = discord.Client(intents=intents)
  openai.api_key = openAPIKey
  start_sequence = &quot;AI:&quot;
  restart_sequence = &quot;Human:&quot;
  
  
  @client.event
  async def on_ready():
      print(&quot;Logged in&quot;)
  
  
  @client.event
  async def on_message(message):
      if message.author == client.user:
          return
      if message.content.startswith(f&quot;{restart_sequence}&quot;):
          msg = message.content
          response = openai.Completion.create(
              engine=&quot;text-davinci-002&quot;,
              prompt= f&quot;AI is a chatbot that reluctantly answers questions with sarcastic responses:{msg}, {start_sequence}&quot;,
              temperature=0.5,
              max_tokens=60,
              top_p=0.3,
              frequency_penalty=0.5,
              presence_penalty=0.5,
              stop=[&quot; Human:&quot;, &quot; AI:&quot;],
          )
          print(response)
          #answer = response.choices[0].text
          await message.channel.send(f&quot;AI:{response}&quot;)
  
  
  client.run(
      discordBotKey)
  </code></pre>
  <p>Note: To hide by Discord and OpenAI keys I replaced them with <code>discordBotKey</code> and <code>openAPIKey</code> respectively. In the real code, they are filled with the correct keys</p>