Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
076d07b
WIP adding support for magic trek with /magic-trek-chatbot route
ian-katsuno Jan 28, 2025
5ceab8b
created terraform to deploy llm-graph-builder to ecs
ian-katsuno Feb 3, 2025
dbe6c0e
fixed regular /chat_bot route by not calling extract_tools for that r…
ian-katsuno Feb 5, 2025
ebb630b
adjusted lesson topic tool description, added frontned container defi…
ian-katsuno Feb 11, 2025
0391460
replaced neo4j favicons with ft ones
ian-katsuno Feb 11, 2025
e4ad52e
frontend replaced logo.svg and logo-color.svg with ft logo vectors
ian-katsuno Feb 11, 2025
d25f1e2
upodated backend to point to new neo4j db
ian-katsuno Mar 13, 2025
6f10579
changed tool call extraction to openai directly, added pedagogy, lear…
ian-katsuno Mar 19, 2025
7c122da
modified descriptions for keyword function so it doesn't get called o…
ian-katsuno Mar 19, 2025
8b4fd64
modified pedagogy to be more general
ian-katsuno Mar 24, 2025
ad76828
Merge pull request #1 from FuturetalkDev/openai-tool-calling
ian-katsuno Mar 24, 2025
4e644b1
fixed keyword tool calling by changing model, added direct chat compl…
ian-katsuno Mar 25, 2025
e04c48a
Merge pull request #2 from FuturetalkDev/openai-tool-calling
ian-katsuno Mar 26, 2025
f5d6a50
updated score.py to point to grade 6 aura instance
ian-katsuno Mar 31, 2025
c498512
Merge pull request #4 from FuturetalkDev/update-to-new-neo4j-sandbox
ian-katsuno Mar 31, 2025
7634473
parllelized extract_tools call in process_chat rponse
ian-katsuno Apr 1, 2025
038efe8
Merge pull request #5 from FuturetalkDev/update-to-new-neo4j-sandbox
ian-katsuno Apr 1, 2025
82d0fbc
added enviornment variable setting to disable TOKENIZERS_PARALLELISM …
ian-katsuno Apr 3, 2025
df5ef2c
added educationLevel based metadata filtering in vector search
ian-katsuno May 7, 2025
9c841cc
created requireGrounding property
ian-katsuno May 29, 2025
26fef8d
Merge pull request #6 from FuturetalkDev/vector-education-metadata-fi…
ian-katsuno May 29, 2025
d9d3ff4
resolved merge conflicts between magic-trek-v0 and llm-graph-builder …
ian-katsuno Jun 10, 2025
0b0e19b
got things working after merge
ian-katsuno Jun 24, 2025
b5a6aa7
installed contextgem and document_metadata_extractor
ian-katsuno Jun 24, 2025
2381f7b
Merge pull request #8 from FuturetalkDev/june-2025-contextgem-integra…
ian-katsuno Jun 24, 2025
44ac172
moved neo4j config into the .env file
ian-katsuno Jun 25, 2025
3af3a38
Merge pull request #9 from FuturetalkDev/june-2025-neo4j-config-refactor
ian-katsuno Jun 25, 2025
5f6fc9e
added document_names to magic_trek_chat_bot
ian-katsuno Jul 21, 2025
271ce6b
require-grounding-api-param
ian-katsuno Jul 29, 2025
9c88caa
added metrix-demo-dev enviornment, alb for https
ian-katsuno Aug 12, 2025
973c259
Merge pull request #10 from FuturetalkDev/chat_bot_require_grounding
ian-katsuno Aug 12, 2025
08598c2
added service, added gpg download to backend Dockerfile
ian-katsuno Aug 12, 2025
c2c6936
Merge pull request #11 from FuturetalkDev/chat_bot_require_grounding
ian-katsuno Aug 12, 2025
b3fb217
added in fix for filter_properties
ian-katsuno Aug 12, 2025
98e6d5a
added deploy logic for metrix-demo-dev environment
ian-katsuno Aug 12, 2025
f1d242d
Merge pull request #12 from FuturetalkDev/chat_bot_require_grounding
ian-katsuno Aug 12, 2025
d085d5b
chnaged task definition to use sha tags
ian-katsuno Aug 12, 2025
0b4cbb1
Merge pull request #13 from FuturetalkDev/chat_bot_require_grounding
ian-katsuno Aug 12, 2025
7b94df4
added unstructured[docx,pptx,md]
ian-katsuno Aug 16, 2025
e89349c
added filter_properties api param to QA_RAG_GROUNDED
ian-katsuno Aug 16, 2025
07f7898
pinned python base image in backend Dockerfile to bullseye
ian-katsuno Sep 8, 2025
fd92113
Merge pull request #14 from FuturetalkDev/filter-properties-api-2
ian-katsuno Sep 8, 2025
878f3cb
made magic-trek-chatbot route take neo4j credentials through api
ian-katsuno Sep 10, 2025
41685c8
opened magic-trek-chatbot to accept model via api
ian-katsuno Sep 10, 2025
241c60e
terraform: modified ALB idle timeout 60s->360s
ian-katsuno Sep 15, 2025
7c7debb
Merge pull request #15 from FuturetalkDev/dynamic-neo4j-connection
ian-katsuno Sep 15, 2025
3b3fc19
added chunk_similarity_threshold as API param
ian-katsuno Sep 18, 2025
786939a
re-added session_id as a api parameter for magic-trek-chatbot
ian-katsuno Sep 18, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 28 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -172,5 +172,32 @@ google-cloud-cli-linux-x86_64.tar.gz
.vennv
newenv
files

# start of ian-added gitignore
#terraform GITIGNORE

# Local .terraform directories
**/.terraform/*


*.tfvars
*.tfvars.json

# .tfstate files
*.tfstate
*.tfstate.*

# Crash log files
crash.log
crash.*.log

# Ignore transient lock info files created by terraform apply
.terraform.tfstate.lock.info

# Ignore CLI configuration files
.terraformrc
terraform.rc
# end of ian-added gitignore

startupbackend.sh
startupfrontend.sh
startupfrontend.sh
51 changes: 45 additions & 6 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,26 +1,65 @@
FROM python:3.10-slim
FROM python:3.10-slim-bullseye
WORKDIR /code
ENV PORT 8000
EXPOSE 8000
# Install dependencies and clean up in one layer
# ENV PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION python
# Clean up apt cache and install keyring packages
RUN rm -rf /var/lib/apt/lists/* && \
apt-get clean && \
apt-get -o Acquire::AllowInsecureRepositories=true update && \
apt-get install -y --no-install-recommends --no-install-suggests \
debian-keyring \
debian-archive-keyring \
gnupg \
ca-certificates && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

# Install system dependencies
# this was added before pinned python:3.10-slim-bullseye, shouldn't need it anymore
# RUN apt-get update && apt-get install -y --no-install-recommends \
# libgl1 \
# && rm -rf /var/lib/apt/lists/*

# Now update and install dependencies including build tools
RUN apt-get update && \
apt-get install -y --no-install-recommends \
apt-get install -y --no-install-recommends --no-install-suggests \
libmagic1 \
libgl1-mesa-glx \
libreoffice \
cmake \
poppler-utils \
tesseract-ocr && \
tesseract-ocr \
build-essential \
python3-dev \
gcc \
autoconf \
automake \
libtool \
pkg-config && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

# Manually fetch the latest Debian signing key before updating apt repositories
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 648ACFD622F3D138

# Set LD_LIBRARY_PATH
ENV LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH

ENV PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION='python'

# Copy requirements file and install Python dependencies
COPY requirements.txt constraints.txt /code/
# --no-cache-dir --upgrade
RUN pip --version
RUN pip install --upgrade pip
RUN pip install -r requirements.txt -c constraints.txt
RUN pip --version
RUN pip install -r requirements.txt -c constraints.txt
RUN python -c "import torch; print(f'PyTorch version: {torch.__version__}'); print(f'CUDA available: {torch.cuda.is_available()}'); print(f'CUDA device count: {torch.cuda.device_count()}')"
# RUN pip install -r requirements.txt
# Copy application code
COPY . /code

# Set command
CMD ["gunicorn", "score:app", "--workers", "8","--threads", "8", "--worker-class", "uvicorn.workers.UvicornWorker", "--bind", "0.0.0.0:8000", "--timeout", "300"]
# CMD ["gunicorn", "score:app", "--workers", "8","--threads", "8", "--worker-class", "uvicorn.workers.UvicornWorker", "--bind", "0.0.0.0:8000", "--timeout", "300"] # original line
CMD ["gunicorn", "score:app", "--workers", "2","--threads", "2", "--worker-class", "uvicorn.workers.UvicornWorker", "--bind", "0.0.0.0:8000", "--timeout", "300"]
77 changes: 77 additions & 0 deletions backend/Pipfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

[packages]
accelerate = "==1.6.0"
asyncio = "==3.4.3"
boto3 = "==1.37.29"
botocore = "==1.37.29"
certifi = "==2025.1.31"
fastapi = "==0.115.11"
fastapi-health = "==0.4.0"
google-api-core = "==2.24.2"
google-auth = "==2.38.0"
google-auth-oauthlib = "==1.2.1"
google-cloud-core = "==2.4.3"
json-repair = "==0.39.1"
pip-install = "==1.3.5"
langchain = "==0.3.23"
langchain-aws = "==0.2.18"
langchain-anthropic = "==0.3.9"
langchain-fireworks = "==0.2.9"
langchain-community = "==0.3.19"
langchain-core = "==0.3.51"
langchain-experimental = "==0.3.4"
langchain-google-vertexai = "==2.0.19"
langchain-groq = "==0.2.5"
langchain-openai = "==0.3.12"
langchain-text-splitters = "==0.3.8"
langchain-huggingface = "==0.1.2"
langdetect = "==1.0.9"
langsmith = "==0.3.26"
langserve = "==0.3.1"
neo4j-rust-ext = "*"
nltk = "==3.9.1"
openai = "==1.71.0"
opencv-python = "==4.11.0.86"
psutil = "==7.0.0"
pydantic = "==2.10.6"
python-dotenv = "==1.0.1"
python-magic = "==0.4.27"
pypdf2 = "==3.0.1"
pymupdf = "==1.25.5"
starlette = "==0.46.1"
sse-starlette = "==2.2.1"
starlette-session = "==0.4.3"
tqdm = "==4.67.1"
unstructured-client = "==0.32.3"
unstructured-inference = "==0.8.10"
urllib3 = "==2.3.0"
uvicorn = "==0.34.0"
gunicorn = "==23.0.0"
wikipedia = "==1.4.0"
wrapt = "==1.17.2"
yarl = "==1.18.3"
youtube-transcript-api = "==1.0.3"
zipp = "==3.21.0"
sentence-transformers = "==4.0.2"
google-cloud-logging = "==3.11.4"
pypandoc = "==1.15"
graphdatascience = "==1.14"
secweb = "==1.18.1"
ragas = "==0.2.14"
rouge-score = "==0.1.2"
langchain-neo4j = "==0.4.0"
pypandoc-binary = "==1.15"
chardet = "==5.2.0"
contextgem = "==0.8.1"
# we need to backpropagate this unstructured with doctypes to requirements.txt, right now it has unstructured[all-docs]
unstructured = {extras = ["pptx", "md", "docx"], version = "*"}

[dev-packages]

[requires]
python_version = "3.10"
python_full_version = "3.10.15"
Loading