Home / Function/ test_get_buffer_string_custom_tool_prefix() — langchain Function Reference

test_get_buffer_string_custom_tool_prefix() — langchain Function Reference

Architecture documentation for the test_get_buffer_string_custom_tool_prefix() function in test_utils.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  5b0aa6a7_dba9_2801_5113_48c21ea8aea7["test_get_buffer_string_custom_tool_prefix()"]
  ea3f8d89_f44b_6738_3cb9_a740a73cfca4["test_utils.py"]
  5b0aa6a7_dba9_2801_5113_48c21ea8aea7 -->|defined in| ea3f8d89_f44b_6738_3cb9_a740a73cfca4
  style 5b0aa6a7_dba9_2801_5113_48c21ea8aea7 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/core/tests/unit_tests/messages/test_utils.py lines 2672–2679

def test_get_buffer_string_custom_tool_prefix() -> None:
    """Test `get_buffer_string` with custom `tool_prefix`."""
    messages: list[BaseMessage] = [
        HumanMessage(content="Use a tool"),
        ToolMessage(tool_call_id="call_123", content="Tool result"),
    ]
    result = get_buffer_string(messages, tool_prefix="ToolResult")
    assert result == "Human: Use a tool\nToolResult: Tool result"

Subdomains

Frequently Asked Questions

What does test_get_buffer_string_custom_tool_prefix() do?
test_get_buffer_string_custom_tool_prefix() is a function in the langchain codebase, defined in libs/core/tests/unit_tests/messages/test_utils.py.
Where is test_get_buffer_string_custom_tool_prefix() defined?
test_get_buffer_string_custom_tool_prefix() is defined in libs/core/tests/unit_tests/messages/test_utils.py at line 2672.

Analyze Your Own Codebase

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

Try Supermodel Free