org.llm4s.knowledgegraph
package org.llm4s.knowledgegraph
Members list
Packages
package org.llm4s.knowledgegraph.engine
package org.llm4s.knowledgegraph.neo4j
package org.llm4s.knowledgegraph.query
package org.llm4s.knowledgegraph.storage
package org.llm4s.knowledgegraph.tool
Type members
Classlikes
Represents an edge (relationship) between two nodes.
Represents an edge (relationship) between two nodes.
Value parameters
- properties
-
Additional attributes of the relationship (preserves JSON types)
- relationship
-
The type of relationship (e.g., "WORKS_FOR", "LOCATED_IN")
- source
-
The ID of the source node
- target
-
The ID of the target node
Attributes
- Example
-
val worksFor = Edge("alice", "acme", "WORKS_FOR") val located = Edge("acme", "sf", "LOCATED_IN", Map("since" -> ujson.Str("2020"))) - Source
- KnowledgeGraph.scala
- Supertypes
Represents a Knowledge Graph containing nodes and edges.
Represents a Knowledge Graph containing nodes and edges.
Value parameters
- edges
-
List of Edges in the graph
- nodes
-
Map of Node ID to Node object
Attributes
- Example
-
val alice = Node("alice", "Person", Map("name" -> ujson.Str("Alice"))) val acme = Node("acme", "Organization", Map("name" -> ujson.Str("Acme Corp"))) val edge = Edge("alice", "acme", "WORKS_FOR") val graph = Graph.empty .addNode(alice) .addNode(acme) .addEdge(edge) graph.getNeighbors("alice") // Set(acme) graph.findNodesByLabel("Person") // List(alice) - Companion
- object
- Source
- KnowledgeGraph.scala
- Supertypes
object Graph
Represents a node (entity) in the knowledge graph.
Represents a node (entity) in the knowledge graph.
Value parameters
- id
-
Unique identifier for the node
- label
-
The type or category of the entity (e.g., "Person", "Organization")
- properties
-
Additional attributes of the entity (preserves JSON types)
Attributes
- Example
-
val person = Node("alice", "Person", Map("name" -> ujson.Str("Alice Smith"))) val org = Node("acme", "Organization") - Source
- KnowledgeGraph.scala
- Supertypes
In this article
