NLP query to GraphQL service (#491)

This commit is contained in:
cybermaggedon 2025-09-04 13:39:47 +01:00 committed by GitHub
parent c078ca45cd
commit 8d4aa0069c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 440 additions and 5 deletions

View file

@ -7,16 +7,15 @@ from ..core.topic import topic
# NLP to Structured Query Service - converts natural language to GraphQL
class NLPToStructuredQueryRequest(Record):
natural_language_query = String()
class QuestionToStructuredQueryRequest(Record):
question = String()
max_results = Integer()
context_hints = Map(String()) # Optional context for query generation
class NLPToStructuredQueryResponse(Record):
class QuestionToStructuredQueryResponse(Record):
error = Error()
graphql_query = String() # Generated GraphQL query
variables = Map(String()) # GraphQL variables if any
detected_schemas = Array(String()) # Which schemas the query targets
confidence = Double()
############################################################################
############################################################################