Fix error, putting flow stuff into API

This commit is contained in:
Cyber MacGeddon 2025-05-03 10:00:16 +01:00
parent 031da4842d
commit b212dd3aae
11 changed files with 155 additions and 134 deletions

View file

@ -27,7 +27,7 @@ async def load_de(running, queue, url):
async with aiohttp.ClientSession() as session:
async with session.ws_connect(f"{url}load/document-embeddings") as ws:
async with session.ws_connect(url) as ws:
while running.get():
@ -141,6 +141,8 @@ async def run(running, **args):
# grow to eat all memory
de_q = asyncio.Queue(maxsize=10)
url = args["url"]
load_task = asyncio.create_task(
loader(
running=running,
@ -154,7 +156,8 @@ async def run(running, **args):
de_task = asyncio.create_task(
load_de(
running=running,
queue=de_q, url=args["url"] + "api/v1/"
queue=de_q,
url = f"{url}api/v1/flow/{flow_id}/import/document-embeddings"
)
)