Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.
Python agentagentic-aiagentic-frameworkagentic-workflowaiautomationclaudedeepseekgenaigptllmlow-codemcpnextjsno-codeopenaipythonskillsworkflow
add nltk punkt resource (#7063)
Jyong169cde6c3cb8
diff --git a/api/Dockerfile b/api/Dockerfileindex adf9173f970..06a6f43631e 100644--- a/api/Dockerfile+++ b/api/Dockerfile@@ -55,6 +55,9 @@ ENV VIRTUAL_ENV=/app/api/.venvCOPY --from=packages ${VIRTUAL_ENV} ${VIRTUAL_ENV}ENV PATH="${VIRTUAL_ENV}/bin:${PATH}"+# Download nltk data+RUN python -c "import nltk; nltk.download('punkt')"+# Copy source codeCOPY . /app/api/diff --git a/api/core/rag/rerank/weight_rerank.py b/api/core/rag/rerank/weight_rerank.pyindex d07f94adb77..d8a78739826 100644--- a/api/core/rag/rerank/weight_rerank.py+++ b/api/core/rag/rerank/weight_rerank.py@@ -159,10 +159,9 @@ class WeightRerankRunner:if 'score' in document.metadata:query_vector_scores.append(document.metadata['score'])else:- content_vector = document.metadata['vector']# transform to NumPyvec1 = np.array(query_vector)- vec2 = np.array(document.metadata['vector'])+ vec2 = np.array(document.vector)# calculate dot productdot_product = np.dot(vec1, vec2)