A simple module to use Perplexity AI in Python.
Project description
Helpingai_T2
Helpingai_T2 is a Python module that allows you to interact with the Perplexity AI. It's simple to use and can be easily integrated into your Python projects.
Installation
You can install Helpingai_T2 using pip. Run the following command in your terminal:
python -m pip install -U Helpingai-T2
Join our Discord server for live chat, support, or if you have any issues with this package.
Support this repository:
- ⭐ Star the project: Star this repository. It means a lot to us! 💕
- 🎉 Join our Discord Server: Chat with us and others. Join here
- 📺 Subscribe to our YouTube channel: Stay updated with our latest tutorials and updates. Subscribe here
- 📬 Join our Telegram group: Join our community for discussions and support. Join here
Usage
Here are some examples of how you can use the Helpingai_T2 module in your code:
Single Prompt Example
This example takes a single input from the user and generates a response using the Perplexity AI.
from Helpingai_T2 import Perplexity
# Get a prompt from the user
prompt = input("👦: ")
# Generate a response using the Perplexity AI
for a in Perplexity().generate_answer(prompt):
print(f"🤖: {a['answer']}")
Continuous Conversation Example
This example continuously takes input from the user and generates responses, creating an ongoing conversation with the Perplexity AI.
from Helpingai_T2 import Perplexity
# Start a continuous conversation with the user
while True:
# Get a prompt from the user
prompt = input("👦: ")
# Generate a response using the Perplexity AI
for a in Perplexity().generate_answer(prompt):
print(f"🤖: {a['answer']}")
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 Helpingai_T2-0.3.tar.gz
.
File metadata
- Download URL: Helpingai_T2-0.3.tar.gz
- Upload date:
- Size: 18.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a57da7fcc88eb55dc0484d7ddc893a8cd8082374aa29b06ba07013c48783b83a |
|
MD5 | e90dfb94f573edd7b34fe2a93aee8b68 |
|
BLAKE2b-256 | 4d2cd962de19585795c1d632cee678ea5eaae928dcc27346983db6ae291ce6f0 |
File details
Details for the file Helpingai_T2-0.3-py3-none-any.whl
.
File metadata
- Download URL: Helpingai_T2-0.3-py3-none-any.whl
- Upload date:
- Size: 18.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1329b16c7fd6002c44b451bfc27575158328974f89fb9030ff629d45e96f1ac2 |
|
MD5 | 216bb0deb47c6021a7cb412e2437caa0 |
|
BLAKE2b-256 | da40ce77936744ac0ca31d71d7c1aaa50892f26f088eb4ac2eca4a478882bbfb |