Merge branch 'ingestion-flow' into langflow-ingestion-modes
This commit is contained in:
commit
1c5e61abdb
4 changed files with 72 additions and 54 deletions
2
Makefile
2
Makefile
|
|
@ -93,7 +93,7 @@ clean: stop
|
||||||
backend:
|
backend:
|
||||||
@echo "🐍 Starting backend locally..."
|
@echo "🐍 Starting backend locally..."
|
||||||
@if [ ! -f .env ]; then echo "⚠️ .env file not found. Copy .env.example to .env first"; exit 1; fi
|
@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:
|
frontend:
|
||||||
@echo "⚛️ Starting frontend locally..."
|
@echo "⚛️ Starting frontend locally..."
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -82,15 +82,13 @@ class LangflowFileService:
|
||||||
|
|
||||||
# Pass files via tweaks to File component (File-PSU37 from the flow)
|
# Pass files via tweaks to File component (File-PSU37 from the flow)
|
||||||
if file_paths:
|
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
|
# Pass JWT token via tweaks using the x-langflow-global-var- pattern
|
||||||
if jwt_token:
|
if jwt_token:
|
||||||
# Using the global variable pattern that Langflow expects for OpenSearch components
|
# Using the global variable pattern that Langflow expects for OpenSearch components
|
||||||
tweaks["OpenSearchHybrid-Ve6bS"] = {"jwt_token": jwt_token}
|
tweaks["OpenSearchHybrid-Ve6bS"] = {"jwt_token": jwt_token}
|
||||||
logger.debug(
|
logger.debug("[LF] Added JWT token to tweaks for OpenSearch components")
|
||||||
"[LF] Added JWT token to tweaks for OpenSearch components"
|
|
||||||
)
|
|
||||||
else:
|
else:
|
||||||
logger.warning("[LF] No JWT token provided")
|
logger.warning("[LF] No JWT token provided")
|
||||||
if tweaks:
|
if tweaks:
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
from typing import Any, Dict, Optional
|
from typing import Any, Dict
|
||||||
from agentd.tool_decorator import tool
|
from agentd.tool_decorator import tool
|
||||||
from config.settings import clients, INDEX_NAME, EMBED_MODEL
|
from config.settings import clients, INDEX_NAME, EMBED_MODEL
|
||||||
from auth_context import get_auth_context
|
from auth_context import get_auth_context
|
||||||
|
|
@ -166,11 +166,11 @@ class SearchService:
|
||||||
for hit in results["hits"]["hits"]:
|
for hit in results["hits"]["hits"]:
|
||||||
chunks.append(
|
chunks.append(
|
||||||
{
|
{
|
||||||
"filename": hit["_source"]["filename"],
|
"filename": hit["_source"].get("filename"),
|
||||||
"mimetype": hit["_source"]["mimetype"],
|
"mimetype": hit["_source"].get("mimetype"),
|
||||||
"page": hit["_source"]["page"],
|
"page": hit["_source"].get("page"),
|
||||||
"text": hit["_source"]["text"],
|
"text": hit["_source"].get("text"),
|
||||||
"score": hit["_score"],
|
"score": hit.get("_score"),
|
||||||
"source_url": hit["_source"].get("source_url"),
|
"source_url": hit["_source"].get("source_url"),
|
||||||
"owner": hit["_source"].get("owner"),
|
"owner": hit["_source"].get("owner"),
|
||||||
"owner_name": hit["_source"].get("owner_name"),
|
"owner_name": hit["_source"].get("owner_name"),
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue