Skip to content

Instantly share code, notes, and snippets.

@chandradeoarya
Created March 6, 2023 18:57
Show Gist options
  • Save chandradeoarya/0963c08c83e2e783ed99a636927c5fd3 to your computer and use it in GitHub Desktop.
Save chandradeoarya/0963c08c83e2e783ed99a636927c5fd3 to your computer and use it in GitHub Desktop.
python client for chatgpt
import openai
openai.api_key = "TOKEN"
completion = openai.ChatCompletion.create(
model="gpt-3.5-turbo",
messages=[{"role": "user", "content": "Reply as a Vedic Scholar."}]
)
print(completion)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment