Ich erstelle eine Python-App und habe eine Methode, die eine Anfrage mit einigen Anweisungen und einigen Daten erstellt, die für ChatGPT neu geschrieben werden müssen. Es sieht so aus (Anweisungen und Daten sind in diesem Beispiel nur einige Beispiele):
Code: Select all
openai.ChatCompletion.create(
model="gpt-3.5-turbo",
temperature=0.6,
messages=[
{
"role": "system",
"content": """
You are journalist who creates title and article content based on
the provided data. You also choose category from list: World,
Technology, Health and create 3 tags for article.
Your response is always just JSON which looks like this example
structure:
{
"title": {{insert created title}},
"category": {{insert category}}
"content": {{insert article content}}
"tags": {{insert tags as list of strings}}
}
"""
},
{
"role": "user",
"content": """
Title and article content to rewrite:
title: {}
content: {}
""".format(title, content)
}
]
)
Ich habe versucht, eine Antwort auf eine andere Anfrage zu übergeben, aber das Limit ist immer noch erreicht.
Mobile version