@langchain/core
Version:
Core LangChain.js abstractions and schemas
1 lines • 3.12 kB
Source Map (JSON)
{"version":3,"file":"graph.d.cts","names":["RunnableInterface","RunnableIOSchema","Node","Edge","Graph","Record","__types_js0","RunnableConfig","Blob","Promise"],"sources":["../../src/runnables/graph.d.ts"],"sourcesContent":["import type { RunnableInterface, RunnableIOSchema, Node, Edge } from \"./types.js\";\nexport { Node, Edge };\nexport declare class Graph {\n nodes: Record<string, Node>;\n edges: Edge[];\n constructor(params?: {\n nodes: Record<string, Node>;\n edges: Edge[];\n });\n toJSON(): Record<string, any>;\n addNode(data: RunnableInterface | RunnableIOSchema, id?: string, metadata?: Record<string, any>): Node;\n removeNode(node: Node): void;\n addEdge(source: Node, target: Node, data?: string, conditional?: boolean): Edge;\n firstNode(): Node | undefined;\n lastNode(): Node | undefined;\n /**\n * Add all nodes and edges from another graph.\n * Note this doesn't check for duplicates, nor does it connect the graphs.\n */\n extend(graph: Graph, prefix?: string): ({\n id: string;\n data: RunnableIOSchema | RunnableInterface<any, any, import(\"./types.js\").RunnableConfig<Record<string, any>>>;\n } | undefined)[];\n trimFirstNode(): void;\n trimLastNode(): void;\n /**\n * Return a new graph with all nodes re-identified,\n * using their unique, readable names where possible.\n */\n reid(): Graph;\n drawMermaid(params?: {\n withStyles?: boolean;\n curveStyle?: string;\n nodeColors?: Record<string, string>;\n wrapLabelNWords?: number;\n }): string;\n drawMermaidPng(params?: {\n withStyles?: boolean;\n curveStyle?: string;\n nodeColors?: Record<string, string>;\n wrapLabelNWords?: number;\n backgroundColor?: string;\n }): Promise<Blob>;\n}\n//# sourceMappingURL=graph.d.ts.map"],"mappings":";;;cAEqBI,KAAAA;EAAAA,KAAAA,EACVC,MADe,CAAA,MAAA,EACAH,IADA,CAAA;EACAA,KAAAA,EACfC,IADeD,EAAAA;EAAfG,WAAAA,CAAAA,MAGIA,CAHJA,EAAAA;IACAF,KAAAA,EAEIE,MAFJF,CAAAA,MAAAA,EAEmBD,IAFnBC,CAAAA;IA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