Merge branch 'ingestion-flow' into langflow-ingestion-modes

This commit is contained in:
Edwin Jose 2025-09-08 19:32:41 -04:00 committed by GitHub
commit 1c5e61abdb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 72 additions and 54 deletions

View file

@ -93,7 +93,7 @@ clean: stop
backend:
@echo "🐍 Starting backend locally..."
@if [ ! -f .env ]; then echo "⚠️ .env file not found. Copy .env.example to .env first"; exit 1; fi
cd src && uv run python main.py
uv run python src/main.py
frontend:
@echo "⚛️ Starting frontend locally..."

File diff suppressed because one or more lines are too long

View file

@ -82,15 +82,13 @@ class LangflowFileService:
# Pass files via tweaks to File component (File-PSU37 from the flow)
if file_paths:
tweaks["File-PSU37"] = {"path": file_paths}
tweaks["File-PSU37"] = {"file_path": file_paths}
# Pass JWT token via tweaks using the x-langflow-global-var- pattern
if jwt_token:
# Using the global variable pattern that Langflow expects for OpenSearch components
tweaks["OpenSearchHybrid-Ve6bS"] = {"jwt_token": jwt_token}
logger.debug(
"[LF] Added JWT token to tweaks for OpenSearch components"
)
logger.debug("[LF] Added JWT token to tweaks for OpenSearch components")
else:
logger.warning("[LF] No JWT token provided")
if tweaks:

View file

@ -1,4 +1,4 @@
from typing import Any, Dict, Optional
from typing import Any, Dict
from agentd.tool_decorator import tool
from config.settings import clients, INDEX_NAME, EMBED_MODEL
from auth_context import get_auth_context
@ -166,11 +166,11 @@ class SearchService:
for hit in results["hits"]["hits"]:
chunks.append(
{
"filename": hit["_source"]["filename"],
"mimetype": hit["_source"]["mimetype"],
"page": hit["_source"]["page"],
"text": hit["_source"]["text"],
"score": hit["_score"],
"filename": hit["_source"].get("filename"),
"mimetype": hit["_source"].get("mimetype"),
"page": hit["_source"].get("page"),
"text": hit["_source"].get("text"),
"score": hit.get("_score"),
"source_url": hit["_source"].get("source_url"),
"owner": hit["_source"].get("owner"),
"owner_name": hit["_source"].get("owner_name"),