Skip to content

Sample react application that send requests to a python app using a simple model for a chat bot

Notifications You must be signed in to change notification settings

josunect/chatbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is a sample react application that send requests to a python app using a simple model for a chat bot, to be deployed in the mesh.

image

Requirements:

  • docker
  • python
  • minikube

image

For minikube, run this before build the container to have the image available: eval $(minikube docker-env)

Download the model:

wget https://huggingface.co/TheBloke/TinyLlama-1.1B-Chat-v1.0-GGUF/resolve/main/tinyllama-1.1b-chat-v1.0.Q4_K_M.gguf -O openchat.gguf

Prepare environment:

kubectl create ns chatbot
kubectl label namespace chatbot istio-injection=enabled

Build the backend:

docker build -t chatbot .
kubectl apply -f chatbot.yaml -n chatbot

Build the frontend. From /frontend:

docker build -t chatbot-api .

Add to the mesh

kubectl apply -f deployment.yaml -n chatbot
kubectl apply -f gw.yaml -n chatbot

Run (Note that the react app is pointing to localhost:6080):

kubectl port-forward svc/istio-ingressgateway 6080:80 -n istio-system

About

Sample react application that send requests to a python app using a simple model for a chat bot

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published