PyGptRes is a Python module for interacting with OpenAI's GPT-3.5 Turbo API to create natural language conversations with cutting-edge language models.
Project description
PyGptRes
PyGptRes is a Python module for interacting with OpenAI's GPT-3.5 Turbo API to create natural language conversations with cutting-edge language models.
Usage
Here's how to use this module in your Python code:
from pygpt import PyGpt
if __name__ == "__main__":
pygpt = PyGpt()
pygpt.login("ACCESS TOKEN")
pygpt.init()
pygpt.send("Hello?")
Be sure to initialize your PyGptRes instance by first calling the login method with your access token and then calling init to configure the necessary URL and headers.
Example Usage
Here's a simple example of using PyGptRes to send a message to the GPT-3.5 Turbo API:
# Initialize PyGptRes
pygpt = PyGptRes()
pygpt.login("YOUR_ACCESS_TOKEN")
pygpt.init()
Send a message to the API
response = pygpt.send("Hello, how are you?")
Process the API response
print(response)`
Make sure to replace "YOUR_ACCESS_TOKEN" with your actual access token.
License
This project is licensed under the MIT License.
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
File details
Details for the file PyGptRes-0.1.0.tar.gz.
File metadata
- Download URL: PyGptRes-0.1.0.tar.gz
- Upload date:
- Size: 2.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
49b29fbb6ad51e1fd8ebbb8c5cdfe95ca2f50ed2cd4ac4b08476c22d36b3a441
|
|
| MD5 |
04726ce6d039a39cce5bd1ab03507099
|
|
| BLAKE2b-256 |
19df8ca91851dad599a55cdd1fc71b28c6b43b58655b1a81ed0ef89cd5ad083a
|