Home / Function/ point() — langchain Function Reference

point() — langchain Function Reference

Architecture documentation for the point() function in graph_ascii.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  d9684099_24e5_2267_1d5c_54ff6c1d5f0d["point()"]
  76bb01c4_195c_1bd6_3c3d_0ecb71e225e5["AsciiCanvas"]
  d9684099_24e5_2267_1d5c_54ff6c1d5f0d -->|defined in| 76bb01c4_195c_1bd6_3c3d_0ecb71e225e5
  1dbc3354_2bab_b41d_7aa9_14f4624a2a20["line()"]
  1dbc3354_2bab_b41d_7aa9_14f4624a2a20 -->|calls| d9684099_24e5_2267_1d5c_54ff6c1d5f0d
  53579b11_7da2_b348_12e0_809b3a0e0405["text()"]
  53579b11_7da2_b348_12e0_809b3a0e0405 -->|calls| d9684099_24e5_2267_1d5c_54ff6c1d5f0d
  333b0598_86ec_e08e_fb9e_97bb5d448e1d["box()"]
  333b0598_86ec_e08e_fb9e_97bb5d448e1d -->|calls| d9684099_24e5_2267_1d5c_54ff6c1d5f0d
  style d9684099_24e5_2267_1d5c_54ff6c1d5f0d fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/core/langchain_core/runnables/graph_ascii.py lines 90–115

    def point(self, x: int, y: int, char: str) -> None:
        """Create a point on ASCII canvas.

        Args:
            x: x coordinate. Should be `>= 0` and `<` number of columns in
                the canvas.
            y: y coordinate. Should be `>= 0` an `<` number of lines in the
                canvas.
            char: character to place in the specified point on the
                canvas.

        Raises:
            ValueError: if char is not a single character or if
                coordinates are out of bounds.
        """
        if len(char) != 1:
            msg = "char should be a single character"
            raise ValueError(msg)
        if x >= self.cols or x < 0:
            msg = "x should be >= 0 and < number of columns"
            raise ValueError(msg)
        if y >= self.lines or y < 0:
            msg = "y should be >= 0 and < number of lines"
            raise ValueError(msg)

        self.canvas[y][x] = char

Domain

Subdomains

Called By

Frequently Asked Questions

What does point() do?
point() is a function in the langchain codebase, defined in libs/core/langchain_core/runnables/graph_ascii.py.
Where is point() defined?
point() is defined in libs/core/langchain_core/runnables/graph_ascii.py at line 90.
What calls point()?
point() is called by 3 function(s): box, line, text.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free