mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-04-26 08:56:21 +02:00
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:
parent
a70ae9793a
commit
3b8b9ea866
23 changed files with 800 additions and 986 deletions
|
|
@ -13,11 +13,11 @@ default_user = 'trustgraph'
|
|||
default_collection = 'default'
|
||||
default_doc_limit = 10
|
||||
|
||||
def question(url, question, user, collection, doc_limit):
|
||||
def question(url, flow_id, question, user, collection, doc_limit):
|
||||
|
||||
rag = Api(url)
|
||||
api = Api(url)
|
||||
|
||||
resp = rag.document_rag(
|
||||
resp = api.flow(flow_id).document_rag(
|
||||
question=question, user=user, collection=collection,
|
||||
doc_limit=doc_limit,
|
||||
)
|
||||
|
|
@ -37,11 +37,11 @@ def main():
|
|||
help=f'API URL (default: {default_url})',
|
||||
)
|
||||
|
||||
# parser.add_argument(
|
||||
# '--pulsar-api-key',
|
||||
# default=default_pulsar_api_key,
|
||||
# help=f'Pulsar API key',
|
||||
# )
|
||||
parser.add_argument(
|
||||
'-f', '--flow-id',
|
||||
default="0000",
|
||||
help=f'Flow ID (default: 0000)'
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
'-q', '--question',
|
||||
|
|
@ -73,6 +73,7 @@ def main():
|
|||
|
||||
question(
|
||||
url=args.url,
|
||||
flow_id = args.flow_id,
|
||||
question=args.question,
|
||||
user=args.user,
|
||||
collection=args.collection,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue