feat: 增加简化版json数据
This commit is contained in:
@@ -24,3 +24,24 @@ type GraphData struct {
|
||||
Nodes []Node `json:"nodes"`
|
||||
Edges []Edge `json:"edges"`
|
||||
}
|
||||
|
||||
// SimpleNode 简化版节点结构,仅保留核心信息,适合 LLM 处理
|
||||
type SimpleNode struct {
|
||||
ID string `json:"id" example:"1"`
|
||||
Label string `json:"label" example:"人工智能"`
|
||||
Type string `json:"type,omitempty" example:"概念"`
|
||||
}
|
||||
|
||||
// SimpleEdge 简化版边结构,仅保留核心信息,适合 LLM 处理
|
||||
type SimpleEdge struct {
|
||||
Source string `json:"source" example:"1"`
|
||||
Target string `json:"target" example:"2"`
|
||||
Type string `json:"type,omitempty" example:"CONTAINS"`
|
||||
Label string `json:"label,omitempty" example:"包含"`
|
||||
}
|
||||
|
||||
// SimpleGraphData 简化版图数据,适合 LLM 处理
|
||||
type SimpleGraphData struct {
|
||||
Nodes []SimpleNode `json:"nodes"`
|
||||
Edges []SimpleEdge `json:"edges"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user