mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-05-07 06:12:38 +02:00
* Starting to spawn base package * More package hacking * Bedrock and VertexAI * Parquet split * Updated templates * Utils
40 lines
1 KiB
Python
40 lines
1 KiB
Python
|
|
from pulsar.schema import Record, Bytes, String, Boolean, Integer, Array, Double
|
|
from . topic import topic
|
|
from . types import Error, Value
|
|
|
|
############################################################################
|
|
|
|
# Graph RAG text retrieval
|
|
|
|
class GraphRagQuery(Record):
|
|
query = String()
|
|
|
|
class GraphRagResponse(Record):
|
|
error = Error()
|
|
response = String()
|
|
|
|
graph_rag_request_queue = topic(
|
|
'graph-rag', kind='non-persistent', namespace='request'
|
|
)
|
|
graph_rag_response_queue = topic(
|
|
'graph-rag-response', kind='non-persistent', namespace='response'
|
|
)
|
|
|
|
############################################################################
|
|
|
|
# Document RAG text retrieval
|
|
|
|
class DocumentRagQuery(Record):
|
|
query = String()
|
|
|
|
class DocumentRagResponse(Record):
|
|
error = Error()
|
|
response = String()
|
|
|
|
document_rag_request_queue = topic(
|
|
'doc-rag', kind='non-persistent', namespace='request'
|
|
)
|
|
document_rag_response_queue = topic(
|
|
'doc-rag-response', kind='non-persistent', namespace='response'
|
|
)
|