This is the HuggingChat API server for RirikoAI.
RirikoHuggingChat-Server | RirikoLLaMA-Server |
---|---|
Uses the HuggingChat API | Runs the OpenLLaMA model in your PC (No internet API calls) |
Does not host the model in your RAM / GPU | Hosts the model in your RAM / GPU |
Censored | Uncensored |
Sign up for HuggingFace Account: https://huggingface.co/join
HuggingFace is kind enough to let us use the API for free. Please be kind and mindful not to abuse it.
https://www.python.org/downloads/release/python-3110/ (Install it to C:\Python311)
- Download this file https://bootstrap.pypa.io/get-pip.py (Download this to C:\Python311 or the same directory where your Python installation is)
- Open your terminal (Command Prompt / PowerShell)
- Change dir to the Python installation folder:
cd C:\Python311
- Install pip:
python get-pip.py
- Check if pip is successfully installed:
pip --version
python3 -m venv venv
pip install -r requirements.txt
Copy and enter your email and password
flask run --host=0.0.0.0 -p 5000
The server will now run locally at: http://127.0.0.1:5000. You can send a POST request to http://localhost:5000/api/v1/ask
API endpoint for your chatbot.
Example API request: POST /api/v1/ask
with JSON in the body
{
"prompt": "Hello! I'm Angel!",
"user_id": "angel",
"system_prompt": "Your name is Ririko, and you are now talking to Angel"
}
Use the same user_id
in the json body so conversations persists.
{
"answer": "Hello Angel! It's nice to meet you. Is there anything you need help with or would you like to chat for a bit?"
}
- HuggingFace (https://huggingface.co/)
- Soulter/hugging-chat-api (https://github.com/Soulter/hugging-chat-api)