This is a Flask API application that serves a chatbot using the Nusantara-7b-Indo-Chat model. The application leverages transformers, sentence embeddings, and ChromaDB for managing a retrieval-based question-answering (QA) system.
Nusantara-7b-Indo-Chat is part of the Nusantara series, which consists of Open Weight Language Models specifically designed for the Indonesian language (Bahasa Indonesia). Nusantara is based on the Qwen1.5 Language Model and has been fine-tuned using Indonesian datasets.
As a chat-implemented language model, Nusantara is highly capable of handling question-answering and responding to instructions in Bahasa Indonesia. Therefore, this application works best when interacting in the Indonesian language.
Nusantara-7b-Indo-Chat for text generation.LazarusNLP/all-indo-e5-small-v4 for text embeddings.torch with CUDA supportClone the repository:
git clone https://github.com/naobyprawira/rag-llm-chatbot-api.git
cd rag-llm-chatbot-api
Create a virtual environment and activate it:
python3 -m venv venv
source venv/bin/activate
Install the required Python packages:
pip install -r requirements.txt
Place your data file (dataset.xlsx) in the project directory.
Ensure that your system has a CUDA-compatible GPU with the necessary drivers installed.
Run the Flask application:
python app.py
The API will be available at http://127.0.0.1:5000/api/chatbot.
/api/chatbotPOST{
"query": "Your question here"
}
{
"response": "Chatbot's response here"
}
You can use curl to test the API:
curl -X POST http://127.0.0.1:5000/api/chatbot \
-H "Content-Type: application/json" \
-d '{"query": "Bagaimana evolusi teknologi memengaruhi cara manusia hidup dan bekerja selama ribuan tahun?"}'
Andhikardg, hanifaditia, hauraadzkiaa , marcelbinggi03, naobyprawira
This is a Flask API application that serves a chatbot using the Nusantara-7b-Indo-Chat model. The application leverages transformers, sentence embeddings, and ChromaDB for managing a retrieval-based question-answering (QA) system.
Nusantara-7b-Indo-Chat is part of the Nusantara series, which consists of Open Weight Language Models specifically designed for the Indonesian language (Bahasa Indonesia). Nusantara is based on the Qwen1.5 Language Model and has been fine-tuned using Indonesian datasets.
As a chat-implemented language model, Nusantara is highly capable of handling question-answering and responding to instructions in Bahasa Indonesia. Therefore, this application works best when interacting in the Indonesian language.
Nusantara-7b-Indo-Chat for text generation.LazarusNLP/all-indo-e5-small-v4 for text embeddings.torch with CUDA supportClone the repository:
git clone https://github.com/naobyprawira/rag-llm-chatbot-api.git
cd rag-llm-chatbot-api
Create a virtual environment and activate it:
python3 -m venv venv
source venv/bin/activate
Install the required Python packages:
pip install -r requirements.txt
Place your data file (dataset.xlsx) in the project directory.
Ensure that your system has a CUDA-compatible GPU with the necessary drivers installed.
Run the Flask application:
python app.py
The API will be available at http://127.0.0.1:5000/api/chatbot.
/api/chatbotPOST{
"query": "Your question here"
}
{
"response": "Chatbot's response here"
}
You can use curl to test the API:
curl -X POST http://127.0.0.1:5000/api/chatbot \
-H "Content-Type: application/json" \
-d '{"query": "Bagaimana evolusi teknologi memengaruhi cara manusia hidup dan bekerja selama ribuan tahun?"}'
Andhikardg, hanifaditia, hauraadzkiaa , marcelbinggi03, naobyprawira