A Python wrapper for the SplitticAPI
Project description
The SplitticAPI Library provides a convenient Python interface for interacting with the Splittic API, allowing users to integrate Splittic’s AI functionality into their applications. This library is designed to be easy to use and flexible for both asynchronous and synchronous programming.
Installation
To install the SplitticAPI Library, use the following command:
pip install SplitticAPI
Getting Started
Obtain API Key: - Visit the FreeAI discord server. - Retrieve your API key from the #api channel.
Initialize ChatModule: - Import the ChatModule class from SplitticAPI.meowgpt. - Set the global API key using ChatModule.initialize(api_key).
Create a Chat Instance: - Create a new chat instance using ChatModule.create_chat(api_key). - Each instance automatically generates a unique chat ID.
Send Messages: - Use the reply(message) method to send a synchronous message and get a reply. - Optionally, use the async_reply(message) method for asynchronous interactions.
Example
from SplitticAPI.meowgpt import ChatModule
# Set the global API key
api_key = "your_api_key_here"
ChatModule.initialize(api_key)
# Create a ChatModule instance with a unique chat ID
chat_instance = ChatModule.create_chat(api_key)
# Send a synchronous message and get a reply
def main():
reply = chat_instance.reply("Hi")
print(reply)
# Run the program
if __name__ == "__main__":
main()
For more detailed information, refer to the official Splittic API documentation.
License
This library is released under the MIT License. Feel free to use, modify, and distribute it according to your needs.
Project details
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
File details
Details for the file SplitticAPI-1.3.1.tar.gz
.
File metadata
- Download URL: SplitticAPI-1.3.1.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a42923a7b1799ff764e59a8b429f8c20c46e364e4157bbbcc623b09193f14ba8 |
|
MD5 | 506f9664099d30458f0397ed36a1b19d |
|
BLAKE2b-256 | ac5b7466d46bebc63d1e1f7caa01d0207ea1f5d152af8aede050db67c4743b26 |
File details
Details for the file SplitticAPI-1.3.1-py3-none-any.whl
.
File metadata
- Download URL: SplitticAPI-1.3.1-py3-none-any.whl
- Upload date:
- Size: 4.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5c3f0d002f3f02c7df31e69767accee140a7e811f2b414612ae096fa18ecb230 |
|
MD5 | 3464ec266daa112486d701b0ffc84255 |
|
BLAKE2b-256 | 861977f285c0a231b7c631bee660503121ede03141d6a5ab5c7213da0113bdbc |