Skip to content

Simple proof-of-concept AI Chatbot

Notifications You must be signed in to change notification settings

kot-vn/ai-chatbot-poc

Repository files navigation

README

Init

docker compose build
docker compose up -d
pip install -r requirements.txt
python manage.py migrate

Serve

docker compose up -d
python manage.py runserver 0.0.0.0:8000

cUrl

create knowledge

curl --location 'http://localhost:8000/knowledge' \
--form 'openai_api_key="key"' \
--form 'file=@"example.txt"'

delete knowledge

curl --location --request DELETE 'http://localhost:8000/knowledge' \
--form 'url="gs://bucket_name/example.txt"'

chat

curl --location 'http://localhost:8000/knowledge/retrieve' \
--form 'openai_api_key="key"' \
--form 'question="what is your name?"' \
--form 'user_id="user_id"'