Skip to content

ZahidGalea/powered-chatbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Powered QA LLM

Table of Contents

Infrastructure Setup

Navigate to the production infrastructure directory:

cd infrastructure/prod
export GOOGLE_APPLICATION_CREDENTIALS=.json
terraform plan -out=plan.tfplan
terraform apply "plan.tfplan"

Building Docker Images

Chatbot & UI

Set the version:

export VERSION=$(cat ./VERSION)

Chatbot core

docker build -t zahidgalea/powered-chatbot-app:$VERSION ./chatbot
docker build -t zahidgalea/powered-chatbot-app:latest ./chatbot
docker push zahidgalea/powered-chatbot-app:$VERSION
docker push zahidgalea/powered-chatbot-app:latest

Chatbot UI

docker build -t zahidgalea/chatbot-ui:$VERSION ./ui
docker build -t zahidgalea/chatbot-ui:latest ./ui
docker push zahidgalea/chatbot-ui:$VERSION
docker push zahidgalea/chatbot-ui:latest

Deployment in Kubernetes (K8S)

Navigate to the helm folder and set up the app cluster:

export VERSION=$(cat ./VERSION)
cd helm
gcloud container clusters get-credentials chatbot-llm-gke --region us-east1 --project chatbot-llm-395402
helm upgrade powered-chatbot . --namespace powered-chatbot --install --create-namespace --debug --set app_version=$VERSION
kubectl config set-context --current --namespace=powered-chatbot
kubectl apply -f ./secrets/

To forward from kubernetes to localhost

kubectl port-forward service/powered-chatbot-app-service 5001:5001 &
kubectl port-forward service/ui-service  80:80 &

Development and Iteration

UI Development

export VERSION=$(cat ./VERSION)
docker build -t zahidgalea/chatbot-ui:$VERSION ./ui
docker run -v ${pwd}/ui:/app/ zahidgalea/chatbot-ui:$VERSION

Bot Development

Fast Iteration Deployment

Build, push, and deploy changes quickly:

export VERSION=$(cat ./VERSION)
docker build -t zahidgalea/powered-chatbot-app:$VERSION ./chatbot
docker push zahidgalea/powered-chatbot-app:$VERSION
cd helm
helm upgrade powered-chatbot . --namespace powered-chatbot --install --create-namespace --debug --set app_version=$VERSION

Future Implementation

View the future implementations here.

Collaboration Rules

  1. Branching: Always create a feature branch for any new feature or fix. Do not push directly to the main branch.
  2. Commit Messages: Ensure your commit messages are meaningful and follow best practices.
  3. Code Reviews: Every pull request should be reviewed by at least one other developer before merging into the main branch.
  4. Testing: Ensure that all unit tests pass before submitting a pull request. Add new tests for new features.
  5. Documentation: Update the documentation as needed when adding or modifying features.

About

LLM with own documents

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published