chore(ai): add proto-generated graphql schema reference

Python service needs strawberry-graphql federation implementation
This commit is contained in:
SpecialX
2026-07-15 00:20:21 +08:00
parent d3b126ed9d
commit 35aa56537d
2 changed files with 569 additions and 0 deletions

View File

@@ -0,0 +1,141 @@
# 自动生成的 GraphQL Federation 子图v2.1 M0
# 源文件ai.proto
# 请勿手动修改;如需调整,改 proto 后重新运行 pnpm run proto:gen-graphql
extend type Query
type GeneratedReport @key(fields: "id") {
id: String
content: String
summary: String
recommendations: String
degraded: Boolean
degraded_reason: String
}
input ChatRequestInput {
messages: ChatMessage
model: String
temperature: Float
user_id: String
session_id: String
data_scope: String
}
type ChatMessage {
role: String
content: String
}
input ChatResponseInput {
content: String
model: String
usage: Usage
degraded: Boolean
degraded_reason: String
}
type Usage {
prompt_tokens: Int
completion_tokens: Int
total_tokens: Int
latency_ms: Int
}
type ChatChunk {
content: String
done: Boolean
}
input GenerateQuestionRequestInput {
prompt: String
subject: String
difficulty: String
grade: String
knowledge_point_ids: String
question_type: String
count: Int
}
type GeneratedQuestion {
question: String
answer: String
explanation: String
question_type: String
difficulty: String
knowledge_point_ids: String
evaluation_score: Float
degraded: Boolean
degraded_reason: String
}
type GeneratedQuestionChunk {
content: String
done: Boolean
complete_question: GeneratedQuestion
}
input OptimizeExpressionRequestInput {
text: String
context: String
}
type OptimizedExpression {
optimized: String
suggestions: String
degraded: Boolean
degraded_reason: String
}
input GenerateLessonPlanRequestInput {
class_id: String
subject_id: String
topic: String
target_difficulty: String
question_count: Int
user_id: String
data_scope: String
}
input LessonPlanResponseInput {
workflow_id: String
status: String
estimated_completion_seconds: Int
degraded: Boolean
degraded_reason: String
}
input GetLessonPlanStatusRequestInput {
workflow_id: String
}
type LessonPlanStatus {
workflow_id: String
status: String
questions: GeneratedQuestion
error: String
degraded: Boolean
degraded_reason: String
}
input ConfirmLessonPlanRequestInput {
workflow_id: String
}
type ConfirmResult {
success: Boolean
persisted_question_ids: String
error: String
}
input GenerateReportRequestInput {
class_id: String
report_type: String
student_id: String
user_id: String
data_scope: String
}
extend type Query {
lessonPlanStatus: LessonPlanStatus
}