buildKnowledgeGraph assembles the graph from the live stores. Safe to call with a nil memory store or persona handler — it simply yields a smaller graph.
()
| 59 | // buildKnowledgeGraph assembles the graph from the live stores. Safe to call |
| 60 | // with a nil memory store or persona handler — it simply yields a smaller graph. |
| 61 | func (cli *ChatCLI) buildKnowledgeGraph() *knowledge.Graph { |
| 62 | g := knowledge.New() |
| 63 | cli.addMemoryNodes(g) |
| 64 | cli.addSkillNodes(g) |
| 65 | linkWikilinks(g) |
| 66 | return g |
| 67 | } |
| 68 | |
| 69 | func (cli *ChatCLI) addMemoryNodes(g *knowledge.Graph) { |
| 70 | if cli.memoryStore == nil { |