test(projekt-matching): e2e helper scripts; component gates verified

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
tlg
2026-07-09 15:49:08 +02:00
parent cef4041500
commit 53b5de28bc
3 changed files with 67 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
#!/usr/bin/env python3
"""Run Flow 2 directly via the Langflow run API from the host."""
import json
import os
import sys
sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..", ".."))
from projektmatch.config import Cfg # noqa: E402
from projektmatch.ingest import dispatch_flow2 # noqa: E402
env = dict(line.split("=", 1) for line in open(
os.path.expanduser("~/.config/projekt-matching/env"))
if "=" in line.strip())
cfg = Cfg(flow2_id=env["FLOW2_ID"].strip(),
langflow_api_key=env["LANGFLOW_API_KEY"].strip(),
langflow_base="http://127.0.0.1:8090")
result = dispatch_flow2(cfg, {"canonical": sys.argv[1],
"title": sys.argv[2] if len(sys.argv) > 2
else "Test"})
print(json.dumps(result, indent=2, ensure_ascii=False))