test_system_invoke() — langchain Function Reference
Architecture documentation for the test_system_invoke() function in test_chat_models.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 6b9dd7fa_2c9e_9ee1_da83_5f971422746e["test_system_invoke()"] f27640dd_3870_5548_d153_f9504ae1021f["test_chat_models.py"] 6b9dd7fa_2c9e_9ee1_da83_5f971422746e -->|defined in| f27640dd_3870_5548_d153_f9504ae1021f style 6b9dd7fa_2c9e_9ee1_da83_5f971422746e fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/partners/anthropic/tests/integration_tests/test_chat_models.py lines 262–280
def test_system_invoke() -> None:
"""Test invoke tokens with a system message."""
llm = ChatAnthropic(model_name=MODEL_NAME) # type: ignore[call-arg, call-arg]
prompt = ChatPromptTemplate.from_messages(
[
(
"system",
"You are an expert cartographer. If asked, you are a cartographer. "
"STAY IN CHARACTER",
),
("human", "Are you a mathematician?"),
],
)
chain = prompt | llm
result = chain.invoke({})
assert isinstance(result.content, str)
Domain
Subdomains
Source
Frequently Asked Questions
What does test_system_invoke() do?
test_system_invoke() is a function in the langchain codebase, defined in libs/partners/anthropic/tests/integration_tests/test_chat_models.py.
Where is test_system_invoke() defined?
test_system_invoke() is defined in libs/partners/anthropic/tests/integration_tests/test_chat_models.py at line 262.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free