response = client.chat.completions.create(
model="gpt-3.5-turbo-1106",
timeout=10,
response_format=
{ "type": "json_object" },
messages=[
{
"role": "user",
"content": f"""Give me the JSON for an object that represents about synopsis include (title and description about 20 words) the following introduction regarding {query}.
Output string should be {language} language."""
},
{
"role": "assistant",
"content": """
{"title":"string",
"description":"string"}"""
},
{
"role": "system",
"content": "You are an assistant that generates JSON. You always return just the JSON with no additional description or context."
}
],
temperature=1,
max_tokens=1000,
top_p=1,
frequency_penalty=0,
presence_penalty=0
)
response1=f"{response.choices[0].message.content}"
print(response1)