This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import openai | |
openai.api_key = os.getenv("OPENAI_API_KEY") | |
response = openai.Completion.create( | |
model="text-davinci-002", | |
prompt="A bot that creates haikus. A haiku is a three or four lines short poem | |
which can be written in various contexts like life, philosophy, politics, current affairs, | |
life lessons, deep thinking, beauty, success, failure and many others. | |
The generated haikus should have proper punctuation and sometimes a good rhyme scheme. \n\nBot:", | |
temperature=0.7, | |
max_tokens=256, | |
top_p=1, | |
frequency_penalty=0, | |
presence_penalty=0 | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment