Fix issues, RAG working with new services

This commit is contained in:
Cyber MacGeddon 2024-08-13 09:13:17 +01:00
parent 7f630a3619
commit dc6ca7c0eb
4 changed files with 7 additions and 4 deletions

View file

@ -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 == "":

View file

@ -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)

View file

@ -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)

View file

@ -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,