mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-04-29 02:23:44 +02:00
Feature/rag parameters (#311)
* Change document-rag and graph-rag processing so that the user can specify parameters. Changes in Pulsar services, Pulsar message schemas, gateway and command-line tools. User-visible changes in new parameters on command-line tools. * Fix bugs, graph-rag working * Get subgraph truncation in the right place * Graph RAG and document RAG working and configurable * Multi-hop path traversal GraphRAG * Add safety valve for path_size set too high
This commit is contained in:
parent
f1559c5944
commit
ef845d6c9b
12 changed files with 247 additions and 91 deletions
|
|
@ -23,6 +23,7 @@ class DocumentRagRequestor(ServiceRequestor):
|
|||
query=body["query"],
|
||||
user=body.get("user", "trustgraph"),
|
||||
collection=body.get("collection", "default"),
|
||||
doc_limit=int(body.get("doc-limit", 20)),
|
||||
)
|
||||
|
||||
def from_response(self, message):
|
||||
|
|
|
|||
|
|
@ -23,6 +23,10 @@ class GraphRagRequestor(ServiceRequestor):
|
|||
query=body["query"],
|
||||
user=body.get("user", "trustgraph"),
|
||||
collection=body.get("collection", "default"),
|
||||
entity_limit=int(body.get("entity-limit", 50)),
|
||||
triple_limit=int(body.get("triple-limit", 30)),
|
||||
max_subgraph_size=int(body.get("max-subgraph-size", 1000)),
|
||||
max_path_length=int(body.get("max-path-length", 2)),
|
||||
)
|
||||
|
||||
def from_response(self, message):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue