Chatgpt with API using python.

preview_player
Показать описание
Chatgpt with API using python.

import os
import openai
import constants

model="gpt-3.5-turbo",
messages=[{"role": "user", "content": "List top 10 cities of India by expenses."}],
max_tokens=500,
temperature=0
)

print(response)