A simple Python library to interact with GPTs models
Project description
Busia GPT Service
busia_gpt_service is a Python package designed to interact with the Busia GPT models (such as busiai and chatgpt) through an easy-to-use API interface. This package allows you to send prompts to the Busia GPT models and receive responses, enabling you to integrate advanced AI functionalities into your own applications or scripts.
Note:
This package is developed exclusively for use by the developer and their friends. Only authorized users who possess a valid API key will be able to access the service. If you're not familiar with the developer or do not have a key, you will not be able to use the API.
Features
Simple interface to interact with GPT models. Supports both BusiAI and ChatGPT models. Requires a valid API key for authentication. Handles common errors such as invalid API keys and insufficient tokens. Provides clear error messages to guide you through any issues.
Installation
To install the busiagptservice package, you can use pip:
pip install busiagptservice
Alternatively, if you want to install it directly from the repository:
git clone https://github.com/MakordDEV/BusiaGPTService.git
cd BusiaGPTService
pip install .
Usage
To use the busiagptservice package, you must have a valid API key. Once you have your API key, you can start interacting with the Busia GPT models.
#Example:
from busia_gpt_service import BusiaGPT_Service
# Create an instance of the service
service = BusiaGPT_Service()
# Set your API key (this should be provided to you by the developer)
service.api_key = "YOUR_API_KEY"
# Send a prompt to the chatgpt model
response = service.use_chatgpt("Tell me a joke!")
# Print the response from the model
print(response["choices"][0]["message"]["content"])
In this example:
You create an instance of BusiaGPT_Service. Set your API key to authenticate your requests. Send a prompt to the chatgpt model (or busiai model). The response from the model is printed.
Available Methods:
use_busiai(prompt): Sends a prompt to the busiai model. use_chatgpt(prompt): Sends a prompt to the chatgpt model.
API Key
Getting an API Key: To use the busia_gpt_service package, you must obtain an API key. This API key is only available to the developer and their friends. Unauthorized users will not be able to access the service.
If you are a trusted user, contact the developer for your API key.
Set the API Key:
Once you have the key, you can set it in your code like so:
service.api_key = "YOUR_API_KEY"
Make sure to keep your API key secure and do not share it publicly.
Error Handling
The service includes built-in error handling for common issues:
APIKeyMissingOrInvalidError: Raised if no API key is provided or the API key is invalid. NotEnoughTokensError: Raised if there are insufficient tokens to process the request. RequestError: Raised for any general errors encountered during the API request. Contributing Since this package is designed only for the developer and their trusted users, contributions from others are not expected at this time. If you believe you need access to the API or want to contribute, please contact the developer directly.
License
This project is not licensed for public use and is only intended for use by the developer and their friends. Please refrain from distributing or sharing the package for malicious purposes.
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 busiagptservice-0.1.0.tar.gz.
File metadata
- Download URL: busiagptservice-0.1.0.tar.gz
- Upload date:
- Size: 4.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
53414b21cd79e92231c855640da404e7f4ade8863192ca1533b0e1d5871b2491
|
|
| MD5 |
86b66aed05667ab6c1b718593d8f5408
|
|
| BLAKE2b-256 |
c9de6a00f655d4264783123cd8c466b72958b95440257ff4a39a51f78709f9b7
|
File details
Details for the file busiagptservice-0.1.0-py3-none-any.whl.
File metadata
- Download URL: busiagptservice-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1891fb28de2593b464d72e61de02b591afd8030660a69d39c413b1a6c57276f8
|
|
| MD5 |
ddb698e5a1925d927f62cc15b16dc7df
|
|
| BLAKE2b-256 |
4c418fcf331f711cfdce5a828f1d3e94a30414cdd21a8ccd9f6a3b25331058cc
|