test_standard.py — langchain Source File
Architecture documentation for test_standard.py, a python file in the langchain codebase. 7 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 5de92bdd_1f7e_a805_4794_9089aa803f56["test_standard.py"] b6ee5de5_719a_eeb5_1e11_e9c63bc22ef8["pathlib"] 5de92bdd_1f7e_a805_4794_9089aa803f56 --> b6ee5de5_719a_eeb5_1e11_e9c63bc22ef8 8e2034b7_ceb8_963f_29fc_2ea6b50ef9b3["typing"] 5de92bdd_1f7e_a805_4794_9089aa803f56 --> 8e2034b7_ceb8_963f_29fc_2ea6b50ef9b3 120e2591_3e15_b895_72b6_cb26195e40a6["pytest"] 5de92bdd_1f7e_a805_4794_9089aa803f56 --> 120e2591_3e15_b895_72b6_cb26195e40a6 ba43b74d_3099_7e1c_aac3_cf594720469e["langchain_core.language_models"] 5de92bdd_1f7e_a805_4794_9089aa803f56 --> ba43b74d_3099_7e1c_aac3_cf594720469e d758344f_537f_649e_f467_b9d7442e86df["langchain_core.messages"] 5de92bdd_1f7e_a805_4794_9089aa803f56 --> d758344f_537f_649e_f467_b9d7442e86df 8f882798_3f47_fa1f_5253_3b7193f357a9["langchain_tests.integration_tests"] 5de92bdd_1f7e_a805_4794_9089aa803f56 --> 8f882798_3f47_fa1f_5253_3b7193f357a9 eb5de5b0_c779_ee86_47b7_8943e2d80af9["langchain_anthropic"] 5de92bdd_1f7e_a805_4794_9089aa803f56 --> eb5de5b0_c779_ee86_47b7_8943e2d80af9 style 5de92bdd_1f7e_a805_4794_9089aa803f56 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
"""Standard LangChain interface tests."""
from pathlib import Path
from typing import Literal, cast
import pytest
from langchain_core.language_models import BaseChatModel
from langchain_core.messages import AIMessage, BaseMessageChunk
from langchain_tests.integration_tests import ChatModelIntegrationTests
from langchain_anthropic import ChatAnthropic
REPO_ROOT_DIR = Path(__file__).parents[5]
MODEL = "claude-3-5-haiku-20241022"
class TestAnthropicStandard(ChatModelIntegrationTests):
"""Use standard chat model integration tests against the `ChatAnthropic` class."""
@property
def chat_model_class(self) -> type[BaseChatModel]:
return ChatAnthropic
@property
def chat_model_params(self) -> dict:
return {"model": MODEL}
@property
def supports_image_inputs(self) -> bool:
return True
@property
def supports_image_urls(self) -> bool:
return True
@property
def supports_pdf_inputs(self) -> bool:
return True
@property
def supports_image_tool_message(self) -> bool:
return True
@property
def supports_pdf_tool_message(self) -> bool:
return True
@property
def supports_anthropic_inputs(self) -> bool:
return True
@property
def enable_vcr_tests(self) -> bool:
return True
@property
def supported_usage_metadata_details(
self,
) -> dict[
// ... (127 more lines)
Domain
Subdomains
Dependencies
- langchain_anthropic
- langchain_core.language_models
- langchain_core.messages
- langchain_tests.integration_tests
- pathlib
- pytest
- typing
Source
Frequently Asked Questions
What does test_standard.py do?
test_standard.py is a source file in the langchain codebase, written in python. It belongs to the CoreAbstractions domain, Serialization subdomain.
What functions are defined in test_standard.py?
test_standard.py defines 3 function(s): _invoke, test_native_structured_output, test_native_structured_output_async.
What does test_standard.py depend on?
test_standard.py imports 7 module(s): langchain_anthropic, langchain_core.language_models, langchain_core.messages, langchain_tests.integration_tests, pathlib, pytest, typing.
Where is test_standard.py in the architecture?
test_standard.py is located at libs/partners/anthropic/tests/integration_tests/test_standard.py (domain: CoreAbstractions, subdomain: Serialization, directory: libs/partners/anthropic/tests/integration_tests).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free