Curso-lenguaje-python/python-chatgpt/code/miPrograma.py
Manuel Vergara 09b13abe14 Add python-chatgpt
Signed-off-by: Manuel Vergara <manuel@vergaracarmona.es>
2023-05-29 23:25:00 +02:00

15 lines
183 B
Python

import os
import openai
from dotenv import load_dotenv
load_dotenv()
api_key = os.getenv('OPENAI_API_KEY')
openai.api_key = api_key
modelos = openai.Model.list()
print(modelos)