Skip to content

Instantly share code, notes, and snippets.

View JorgeAgulloM's full-sized avatar
🦾

Jorge Agulló JorgeAgulloM

🦾
View GitHub Profile
@JorgeAgulloM
JorgeAgulloM / chatgpt_api.py
Created March 16, 2023 18:37 — forked from mouredev/chatgpt_api.py
Ejemplo de uso del API de ChatGPT desde Python
import openai # pip install openai
import typer # pip install "typer[all]"
from rich import print # pip install rich
from rich.table import Table
"""
Webs de interés:
- Módulo OpenAI: https://github.com/openai/openai-python
- Documentación API ChatGPT: https://platform.openai.com/docs/api-reference/chat
- Typer: https://typer.tiangolo.com