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 | |
openai.api_key = os.getenv('OPENAI_API_KEY') | |
completion_model = 'text-davinci-003' | |
chat_model = 'gpt-3.5-turbo' | |
def text_completion_single(): | |
completion = openai.Completion.create(model=completion_model, prompt='What are the three primary colors?') |