mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-07-06 03:42:11 +02:00
Fix issues, RAG working with new services
This commit is contained in:
parent
7f630a3619
commit
dc6ca7c0eb
4 changed files with 7 additions and 4 deletions
|
|
@ -8,6 +8,8 @@ query = " ".join(sys.argv[1:])
|
|||
gr = GraphRag(
|
||||
verbose=True,
|
||||
pulsar_host="pulsar://localhost:6650",
|
||||
completion_request_queue="non-persistent://tg/request/text-completion-rag",
|
||||
completion_response_queue="non-persistent://tg/response/text-completion-rag-response",
|
||||
)
|
||||
|
||||
if query == "":
|
||||
|
|
|
|||
|
|
@ -6,8 +6,8 @@ from trustgraph.graph_rag_client import GraphRagClient
|
|||
rag = GraphRagClient(pulsar_host="pulsar://localhost:6650")
|
||||
|
||||
query="""
|
||||
Identify any facts which provide an explanation of the explosion of the
|
||||
space shuttle rocket boosters"""
|
||||
This knowledge graph describes the Space Shuttle disaster.
|
||||
Present 20 facts which are present in the knowledge graph."""
|
||||
|
||||
resp = rag.request(query)
|
||||
|
||||
|
|
|
|||
|
|
@ -271,6 +271,7 @@ Use only the provided knowledge statements to respond to the following:
|
|||
|
||||
if self.verbose:
|
||||
print("Invoke LLM...", flush=True)
|
||||
print(prompt)
|
||||
|
||||
resp = self.llm.request(prompt)
|
||||
|
||||
|
|
|
|||
|
|
@ -88,8 +88,8 @@ class Processor(ConsumerProducer):
|
|||
emb_response_queue=emb_response_queue,
|
||||
ge_request_queue=ge_request_queue,
|
||||
ge_response_queue=ge_response_queue,
|
||||
triples_request_queue=triples_request_queue,
|
||||
triples_response_queue=triples_response_queue,
|
||||
tpl_request_queue=triples_request_queue,
|
||||
tpl_response_queue=triples_response_queue,
|
||||
verbose=True,
|
||||
entity_limit=entity_limit,
|
||||
triple_limit=triple_limit,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue