test_get_buffer_string_with_function_call() — langchain Function Reference
Architecture documentation for the test_get_buffer_string_with_function_call() function in test_utils.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 7b887430_fa5c_ecce_217d_68eeac364dd9["test_get_buffer_string_with_function_call()"] ea3f8d89_f44b_6738_3cb9_a740a73cfca4["test_utils.py"] 7b887430_fa5c_ecce_217d_68eeac364dd9 -->|defined in| ea3f8d89_f44b_6738_3cb9_a740a73cfca4 style 7b887430_fa5c_ecce_217d_68eeac364dd9 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/core/tests/unit_tests/messages/test_utils.py lines 1721–1741
def test_get_buffer_string_with_function_call() -> None:
"""Test get_buffer_string with function call in additional_kwargs."""
messages = [
HumanMessage(content="Hello"),
AIMessage(
content="Hi",
additional_kwargs={
"function_call": {
"name": "test_function",
"arguments": '{"arg": "value"}',
}
},
),
]
# TODO: consider changing this
expected = (
"Human: Hello\n"
"AI: Hi{'name': 'test_function', 'arguments': '{\"arg\": \"value\"}'}"
)
actual = get_buffer_string(messages)
assert actual == expected
Domain
Subdomains
Source
Frequently Asked Questions
What does test_get_buffer_string_with_function_call() do?
test_get_buffer_string_with_function_call() is a function in the langchain codebase, defined in libs/core/tests/unit_tests/messages/test_utils.py.
Where is test_get_buffer_string_with_function_call() defined?
test_get_buffer_string_with_function_call() is defined in libs/core/tests/unit_tests/messages/test_utils.py at line 1721.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free