wzpan/ChatGPT-python-example
演示如何使用4行代码调用ChatGPT的官方API
This is a brief example showing how a developer can make a request to OpenAI's ChatGPT API using just a few lines of Python code. It takes a text prompt as input and returns a text response from the specified ChatGPT model. This is intended for Python developers who want to integrate ChatGPT's capabilities into their own applications or scripts.
No commits in the last 6 months.
Use this if you are a Python developer looking for a minimal example to quickly understand how to send requests to the ChatGPT API.
Not ideal if you are looking for a ready-to-use application or a comprehensive library for advanced AI integrations beyond a basic API call.
Stars
25
Forks
2
Language
Python
License
MIT
Category
Last pushed
Nov 08, 2023
Commits (30d)
0
Get this data via API
curl "https://pt-edge.onrender.com/api/v1/quality/llm-tools/wzpan/ChatGPT-python-example"
Open to everyone — 100 requests/day, no key needed. Get a free key for 1,000/day.
Higher-rated alternatives
rawandahmad698/PyChatGPT
⚡️ Python client for the ChatGPT API with, conversation tracking, proxy support and more.
k4l1sh/alexa-gpt
A tutorial on how to use ChatGPT in Alexa
Simatwa/WebChatGPT
Python SDK/API for ChatGPT Web-Version
toshiakit/MatGPT
MATLAB app to access ChatGPT API from OpenAI
minimaxir/simpleaichat
Python package for easily interfacing with chat apps, with robust features and minimal code complexity.