#I'm trying to make a discord bot that uses a YouTube about me page to write a short description

5 messages · Page 1 of 1 (latest)

crude bobcat
#

However, the bot requires input from the console to process the playground request. What could be causing this?

#

`
def open_ai_func(OPENAI_API_KEY, openai, channel_about, AI_ON, channel_name):

if AI_ON == False:
    channel_description = "OPEN AI SUPPORT COMING SOON!"
else:
    openai.api_key = OPENAI_API_KEY
    text_input = str(input(channel_about))
    text_input = text_input.strip()

    response = openai.Completion.create(
            engine="text-davinci-002",
            prompt="\nDescription\n\ndescribe the following in 20 words that MUST start with\n \n\n\""+channel_name+" - A channel that...'\"\n\n\n"+channel_about+"\n\n\n\n",
            temperature=0.9,
            max_tokens=256,
            top_p=1,
            frequency_penalty=0,
            presence_penalty=0
            )

`

#

thatys the function

#

This is where I'm calling the function in my code

channel_description = open_ai_func(OPENAI_API_KEY, openai, channel_about, AI_ON) if channel_description == None: print("No desription at this time.") else: print(f"{channel_description}") await message.channel.send(f"{channel_name}\r{channel_id_link}") await delete_me_2.delete()

#

The problem is happening between "channel_description = " and "print(f"{channel_description}")"