From 6b57e49c39ceca80e4be732d12b14cd069b852a5 Mon Sep 17 00:00:00 2001 From: commit111 Date: Thu, 17 Jul 2025 12:36:08 -0700 Subject: [PATCH 1/2] fix missing arg --- app/app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/app.py b/app/app.py index 61af9c6..958908d 100644 --- a/app/app.py +++ b/app/app.py @@ -193,7 +193,7 @@ def handle_webhook(): # Fetch the conversation and generate an LLM answer for the user logger.info(f"Detected a user reply in conversation {conversation_id}; fetching an answer from LLM...") - answer_intercom_conversation(app.rag_system, conversation_id) + answer_intercom_conversation(app.rag_system, conversation_id, topic) else: logger.info(f"Received webhook for unsupported topic: {topic}; no action taken.") From 53b5974df4221eef1eafcc896157c9e4c27db784 Mon Sep 17 00:00:00 2001 From: commit111 Date: Thu, 17 Jul 2025 12:37:30 -0700 Subject: [PATCH 2/2] load the sentence transformers in dockerfile --- app/Dockerfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/Dockerfile b/app/Dockerfile index d3cfd57..4d4ccb9 100644 --- a/app/Dockerfile +++ b/app/Dockerfile @@ -33,6 +33,9 @@ COPY requirements.txt /app/ # Install Python dependencies RUN pip install --no-cache-dir -r requirements.txt +# Preload the sentence transformer model to cache +RUN python -c "from sentence_transformers import SentenceTransformer; SentenceTransformer('all-MiniLM-L6-v2')" + # Copy the application source code into the container COPY . /app