"The ChatGPT Requests module is a Python package that provides a convenient interface for making requests to the ChatGPT language model."
Project description
pythonGPT
pythonGPT Requests Module
The pythonGPT Requests module is a Python package that provides a convenient interface for making requests to the ChatGPT language model. It abstracts away the complexity of interacting with the model's API, allowing developers to easily integrate ChatGPT into their applications.
You can ask one question by request function, or you can send a file of questions separated by a question mark to requests function, and you will get a text file with the answers.
you can have your APi key from this link after signing in https://platform.openai.com/account/api-keys
Key Features:
- Simple API: The module provides a high-level API that simplifies the process of sending messages and receiving responses from the ChatGPT model.
- Stateful Conversations: It supports stateful conversations, enabling users to have multi-turn interactions by maintaining context across messages.
- Error Handling: The module includes robust error handling to gracefully handle API errors and timeouts, ensuring a reliable integration.
Usage Example:
from pythonGPT import PythonGPT
chatgpt = ChatGPT(api_key='your-api-key')
# Making a request
response = chatgpt.request("Hello, how are you?")
print(response)
# Submit multiple requests by txt file
response = chatgpt.requests('file.txt')
print(response)
MIT License
Copyright (c) 2023 Ahmed Sheded
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pythonGPT3-1.0.1.tar.gz.
File metadata
- Download URL: pythonGPT3-1.0.1.tar.gz
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9e7da10931f992d3409201d527f889994801c2202ffe013724ea43a579dc61c7
|
|
| MD5 |
b3d6fa64aba2b86020f2c6f6da1754c1
|
|
| BLAKE2b-256 |
9e91471ccf6c11736b0c2598baf9a7a8de904791dd24d2f2988ad96aa0c70d92
|
File details
Details for the file pythonGPT3-1.0.1-py3-none-any.whl.
File metadata
- Download URL: pythonGPT3-1.0.1-py3-none-any.whl
- Upload date:
- Size: 4.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
39cf31ade2548c98b210c7bbb30f4fb2890a19a9c83e0430948bfedf44ff81b9
|
|
| MD5 |
180e46b8d22760df00b0953a4a60047e
|
|
| BLAKE2b-256 |
48685aab53875bb4f206beeefc7e1f4a8d1303a98b9233cb8c5f4387db234018
|