-
-
Save jamesmurdza/12e016907a21f6ae991fb60896e88daf to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import openai | |
import os | |
from dotenv import load_dotenv | |
load_dotenv() | |
openai.api_key = os.getenv("OPENAI_API_KEY") | |
messages = [ | |
{"role": "user", "content": "Who won the world series in 2020?"} | |
]; | |
response = openai.ChatCompletion.create( | |
model='gpt-3.5-turbo', | |
messages=messages, | |
max_tokens=193, | |
temperature=0, | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment