mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-07-06 11:52:10 +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(
|
gr = GraphRag(
|
||||||
verbose=True,
|
verbose=True,
|
||||||
pulsar_host="pulsar://localhost:6650",
|
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 == "":
|
if query == "":
|
||||||
|
|
|
||||||
|
|
@ -6,8 +6,8 @@ from trustgraph.graph_rag_client import GraphRagClient
|
||||||
rag = GraphRagClient(pulsar_host="pulsar://localhost:6650")
|
rag = GraphRagClient(pulsar_host="pulsar://localhost:6650")
|
||||||
|
|
||||||
query="""
|
query="""
|
||||||
Identify any facts which provide an explanation of the explosion of the
|
This knowledge graph describes the Space Shuttle disaster.
|
||||||
space shuttle rocket boosters"""
|
Present 20 facts which are present in the knowledge graph."""
|
||||||
|
|
||||||
resp = rag.request(query)
|
resp = rag.request(query)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -271,6 +271,7 @@ Use only the provided knowledge statements to respond to the following:
|
||||||
|
|
||||||
if self.verbose:
|
if self.verbose:
|
||||||
print("Invoke LLM...", flush=True)
|
print("Invoke LLM...", flush=True)
|
||||||
|
print(prompt)
|
||||||
|
|
||||||
resp = self.llm.request(prompt)
|
resp = self.llm.request(prompt)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -88,8 +88,8 @@ class Processor(ConsumerProducer):
|
||||||
emb_response_queue=emb_response_queue,
|
emb_response_queue=emb_response_queue,
|
||||||
ge_request_queue=ge_request_queue,
|
ge_request_queue=ge_request_queue,
|
||||||
ge_response_queue=ge_response_queue,
|
ge_response_queue=ge_response_queue,
|
||||||
triples_request_queue=triples_request_queue,
|
tpl_request_queue=triples_request_queue,
|
||||||
triples_response_queue=triples_response_queue,
|
tpl_response_queue=triples_response_queue,
|
||||||
verbose=True,
|
verbose=True,
|
||||||
entity_limit=entity_limit,
|
entity_limit=entity_limit,
|
||||||
triple_limit=triple_limit,
|
triple_limit=triple_limit,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue