Friday, 29 July 2022
import os
import openai
openai.api_key = os.getenv("OPENAI_API_KEY")
response = openai.Completion.create(
model="text-davinci-002",
prompt="keywords: \"natural way to get rid of fleas\"\nGenerate blog topics on: \"How to Get Rid of Fleas in Your Home\"\nGenerate blog sections for the following topic: \"How to Get Rid of Fleas in Your Home\"\nExpand the following blog section: \"How to Get Rid of Fleas in Your Home\"\n\n\n\n\n\n\n",
temperature=0.7,
max_tokens=2000,
top_p=1,
frequency_penalty=0,
presence_penalty=0
)
Skip to content
Product
Team
Enterprise
Explore
Marketplace
Pricing
Sign in
Sign up
skolo-online /
ai-blog-writer-openai
Public
Code
Issues
Pull requests
Actions
Projects
Wiki
Security
Insights
ai-blog-writer-openai/templates/index.html
@skolo-online
skolo-online Initial commit
Latest commit 60671c4 on Dec 28, 2021
History
1 contributor
102 lines (73 sloc) 3.45 KB
Skolo
Footer
© 2022 GitHub, Inc.
Footer navigation
Terms
Privacy
Security
Status
Docs
Contact GitHub
Pricing
API
Training
Blog
About
Skolo Online Blog Writing Tool
The Skolo blog writing tool will allow you to enter a blog topic and keywords --- and get in return a full blog that you can use anywhere. The tool intiially provides a list of topic ideas to choose from, once you select a topic, you can go ahead and generate a full content AI blog.
1. {{blogTopicIdeas|safe}}
{{blogSectionIdeas|safe}}
{{blogExpanded|safe}}
import os
import openai
openai.api_key = os.getenv("OPENAI_API_KEY")
response = openai.Completion.create(
model="text-davinci-002",
prompt="Create an outline for an essay about Nikola Tesla and his contributions to technology:",
temperature=0,
max_tokens=150,
top_p=1,
frequency_penalty=0,
presence_penalty=0
)
import openai
import config
openai.api_key = config.OPENAI_API_KEY
def openAIQuery(query):
response = openai.Completion.create(
engine="davinci-instruct-beta-v3",
prompt=query,
temperature=0.8,
max_tokens=200,
top_p=1,
frequency_penalty=0,
presence_penalty=0)
if 'choices' in response:
if len(response['choices']) > 0:
answer = response['choices'][0]['text']
else:
answer = 'Opps sorry, you beat the AI this time'
else:
answer = 'Opps sorry, you beat the AI this time'
return answer
Subscribe to:
Comments (Atom)