feat: 增加简化版json数据
This commit is contained in:
@@ -38,3 +38,14 @@ func (h *GraphHandler) GetStats(c *gin.Context) {
|
||||
stats := h.service.GetStats()
|
||||
c.JSON(http.StatusOK, stats)
|
||||
}
|
||||
|
||||
// @Summary 获取简化图数据
|
||||
// @Description 获取知识图谱的全部节点和边数据(仅保留核心信息,适合LLM处理)
|
||||
// @Produce json
|
||||
// @Success 200 {object} models.SimpleGraphData "成功"
|
||||
// @Failure 500 {object} models.ErrorResponse "内部错误"
|
||||
// @Router /api/graph/simpleJson [get]
|
||||
func (h *GraphHandler) GetSimpleGraphData(c *gin.Context) {
|
||||
data := h.service.GetSimpleGraphData()
|
||||
c.JSON(http.StatusOK, data)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user