Feature/flow api 3 (#358)

* Working mux socket

* Change API to incorporate flow

* Add Flow ID to all relevant CLIs, not completely implemented

* Change tg-processor-state to use API gateway

* Updated all CLIs

* New tg-show-flow-state command

* tg-show-flow-state shows classes too
This commit is contained in:
cybermaggedon 2025-05-03 10:39:53 +01:00 committed by GitHub
parent a70ae9793a
commit 3b8b9ea866
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
23 changed files with 800 additions and 986 deletions

View file

@ -17,13 +17,13 @@ default_max_subgraph_size = 150
default_max_path_length = 2
def question(
url, question, user, collection, entity_limit, triple_limit,
url, flow_id, question, user, collection, entity_limit, triple_limit,
max_subgraph_size, max_path_length
):
rag = Api(url)
api = Api(url)
resp = rag.graph_rag(
resp = api.flow(flow_id).graph_rag(
question=question, user=user, collection=collection,
entity_limit=entity_limit, triple_limit=triple_limit,
max_subgraph_size=max_subgraph_size,
@ -45,6 +45,12 @@ def main():
help=f'API URL (default: {default_url})',
)
parser.add_argument(
'-f', '--flow-id',
default="0000",
help=f'Flow ID (default: 0000)'
)
parser.add_argument(
'-q', '--question',
required=True,
@ -93,6 +99,7 @@ def main():
question(
url=args.url,
flow_id = args.flow_id,
question=args.question,
user=args.user,
collection=args.collection,