mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-04-25 08:26:21 +02:00
* Tweak the structured query schema * Structure query service * Gateway support for nlp-query and structured-query * API support * Added CLI * Update tests * More tests
18 lines
567 B
Python
18 lines
567 B
Python
from pulsar.schema import Record, String, Map, Array
|
|
|
|
from ..core.primitives import Error
|
|
from ..core.topic import topic
|
|
|
|
############################################################################
|
|
|
|
# Structured Query Service - executes GraphQL queries
|
|
|
|
class StructuredQueryRequest(Record):
|
|
question = String()
|
|
|
|
class StructuredQueryResponse(Record):
|
|
error = Error()
|
|
data = String() # JSON-encoded GraphQL response data
|
|
errors = Array(String()) # GraphQL errors if any
|
|
|
|
############################################################################
|