trustgraph/trustgraph-base/trustgraph/schema/services/retrieval.py
cybermaggedon 5de56c5dbc
Schema structure refactor (#451)
* Write schema refactor spec

* Implemented schema refactor spec
2025-08-04 21:42:57 +01:00

36 lines
876 B
Python

from pulsar.schema import Record, Bytes, String, Boolean, Integer, Array, Double
from ..core.topic import topic
from ..core.primitives import Error, Value
############################################################################
# Graph RAG text retrieval
class GraphRagQuery(Record):
query = String()
user = String()
collection = String()
entity_limit = Integer()
triple_limit = Integer()
max_subgraph_size = Integer()
max_path_length = Integer()
class GraphRagResponse(Record):
error = Error()
response = String()
############################################################################
# Document RAG text retrieval
class DocumentRagQuery(Record):
query = String()
user = String()
collection = String()
doc_limit = Integer()
class DocumentRagResponse(Record):
error = Error()
response = String()