Home / Function/ test_to_chat_prompt_errors() — langchain Function Reference

test_to_chat_prompt_errors() — langchain Function Reference

Architecture documentation for the test_to_chat_prompt_errors() function in test_chat_models.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  479c001f_541f_4821_f0ba_79ce8df3cc17["test_to_chat_prompt_errors()"]
  ab3fd66d_3ad7_be56_7427_66f2c1a9d0a8["test_chat_models.py"]
  479c001f_541f_4821_f0ba_79ce8df3cc17 -->|defined in| ab3fd66d_3ad7_be56_7427_66f2c1a9d0a8
  style 479c001f_541f_4821_f0ba_79ce8df3cc17 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/partners/huggingface/tests/unit_tests/test_chat_models.py lines 79–84

def test_to_chat_prompt_errors(
    chat_hugging_face: Any, messages: list[BaseMessage], expected_error: str
) -> None:
    with pytest.raises(ValueError) as e:
        chat_hugging_face._to_chat_prompt(messages)
    assert expected_error in str(e.value)

Domain

Subdomains

Frequently Asked Questions

What does test_to_chat_prompt_errors() do?
test_to_chat_prompt_errors() is a function in the langchain codebase, defined in libs/partners/huggingface/tests/unit_tests/test_chat_models.py.
Where is test_to_chat_prompt_errors() defined?
test_to_chat_prompt_errors() is defined in libs/partners/huggingface/tests/unit_tests/test_chat_models.py at line 79.

Analyze Your Own Codebase

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

Try Supermodel Free