langchain DOC: remove_node typo in runnables/ graph

neskvpey  于 3个月前  发布在  其他
关注(0)|答案(1)|浏览(88)

URL

https://api.python.langchain.com/en/latest/runnables/langchain_core.runnables.graph.Graph.html

待办事项清单

  • 为这个问题添加了一个非常描述性的标题。
  • 如果适用,我包含了一个指向我参考的文档页面的链接。

当前文档的问题:

https://github.com/langchain-ai/langchain/blob/master/libs/core/langchain_core/runnables/graph.py 中的 remove_node 代码如下

def remove_node(self, node: Node) -> None:
        """Remove a node from the graphm and all edges connected to it."""
        self.nodes.pop(node.id)
        self.edges = [
            edge
            for edge in self.edges
            if edge.source != node.id and edge.target != node.id
        ]
``` graph is spelled graphm

### Idea or request for content:

```python
 def remove_node(self, node: Node) -> None:
        """Remove a node from the **graph** and all edges connected to it."""
        self.nodes.pop(node.id)
        self.edges = [
            edge
            for edge in self.edges
            if edge.source != node.id and edge.target != node.id
        ]

应该将 graphm 替换为 graph

wj8zmpe1

wj8zmpe11#

URL:

23910 (评论)

拼写错误已修复(grahm-->graph)

相关问题