Skip to content

Instantly share code, notes, and snippets.

View maurogoyeneche's full-sized avatar

Mauro Goyeneche maurogoyeneche

View GitHub Profile
@maurogoyeneche
maurogoyeneche / chatgpt_api.py
Created March 27, 2023 00:47 — 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