Edge
org.llm4s.knowledgegraph.Edge
case class Edge(source: String, target: String, relationship: String, properties: Map[String, Value])
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"))) - Graph
-
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass Any
Members list
In this article