This project is a chatbot that helps users find activities, ask about an activity details, and choose the best activity based on their focuses and commitments. It is designed to be used in Indorelawan, a platform that connects people with activities and opportunities in Indonesia.
THIS IS A POC. THINGS MAY NOT WORKING AS EXPECTED.
- Fetches activities from Indorelawan API
- Allow using embeddings to store activities (WIP)
- Use Groq as an AI inference engine
- Use LangChain as a framework for building the chatbot
Before you can start using the AI assistant, you need to have the following:
- Node.js and npm installed on your system.
- A Groq API key from Groq.ai.
- Clone the repository:
git clone https://github.com/dennypradipta/indira.git
- Install the dependencies:
cd indira
npm install
- Create a
.env
file in the root directory of the project and add the following variables:
GROQ_API_KEY=gsk_your-api-key
MODEL_NAME=llama-3.1-70b-versatile
TEMPERATURE=0.1
MAX_TOKENS=300
MAX_RETRIES=3
STREAMING=true
ACTIVITY_URL=https://api.festivalrelawan.com/api/activity/ai
BASE_URL=https://www.indorelawan.org
SESSION_SECRET=aku-anak-sehat-tubuhku-kuat
PORT=3001
NODE_ENV=development
EMBEDDING_MODEL='Xenova/all-MiniLM-L6-v2'
FETCH_DATA_INTERVAL="* */1 * * *"
- Start the server:
npm run dev
- Open your API tester (e.g., Postman, Bruno, etc) and send a POST request to
http://localhost:3001/chat
with the following JSON body:
{
"question": "Saya pengen ikut aktivitas, tapi bingung mau ikut yang mana"
}
The response will be a Markdown-formatted response from the AI assistant.