langchain.js
    Preparing search index...
    Index

    Constructors

    • Parameters

      • Optionalparams: { edges: Edge[]; nodes: Record<string, Node> }

      Returns Graph

    Properties

    edges: Edge[] = []
    nodes: Record<string, Node> = {}

    Methods

    • Parameters

      • source: Node
      • target: Node
      • Optionaldata: string
      • Optionalconditional: boolean

      Returns Edge

    • Parameters

      • Optionalparams: {
            curveStyle?: string;
            nodeColors?: Record<string, string>;
            withStyles?: boolean;
            wrapLabelNWords?: number;
        }

      Returns string

    • Parameters

      • Optionalparams: {
            backgroundColor?: string;
            curveStyle?: string;
            nodeColors?: Record<string, string>;
            withStyles?: boolean;
            wrapLabelNWords?: number;
        }

      Returns Promise<Blob>

    • Add all nodes and edges from another graph. Note this doesn't check for duplicates, nor does it connect the graphs.

      Parameters

      • graph: Graph
      • prefix: string = ""

      Returns (
          | undefined
          | {
              data: | RunnableInterface<
                  any,
                  any,
                  RunnableConfig<Record<string, any>>,
              >
              | RunnableIOSchema;
              id: string;
          }
      )[]

    • Returns undefined | Node

    • Returns undefined | Node

    • Return a new graph with all nodes re-identified, using their unique, readable names where possible.

      Returns Graph

    • Parameters

      Returns void

    • Returns Record<string, any>

    • Returns void

    • Returns void