test_standard.py — langchain Source File
Architecture documentation for test_standard.py, a python file in the langchain codebase. 6 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR a3bf8006_3ea6_0ec2_d430_2ec0bfbcdf9e["test_standard.py"] 8e2034b7_ceb8_963f_29fc_2ea6b50ef9b3["typing"] a3bf8006_3ea6_0ec2_d430_2ec0bfbcdf9e --> 8e2034b7_ceb8_963f_29fc_2ea6b50ef9b3 120e2591_3e15_b895_72b6_cb26195e40a6["pytest"] a3bf8006_3ea6_0ec2_d430_2ec0bfbcdf9e --> 120e2591_3e15_b895_72b6_cb26195e40a6 ba43b74d_3099_7e1c_aac3_cf594720469e["langchain_core.language_models"] a3bf8006_3ea6_0ec2_d430_2ec0bfbcdf9e --> ba43b74d_3099_7e1c_aac3_cf594720469e cf3a1085_fa3f_4d54_9103_3f99d5f9b897["langchain_core.rate_limiters"] a3bf8006_3ea6_0ec2_d430_2ec0bfbcdf9e --> cf3a1085_fa3f_4d54_9103_3f99d5f9b897 8f882798_3f47_fa1f_5253_3b7193f357a9["langchain_tests.integration_tests"] a3bf8006_3ea6_0ec2_d430_2ec0bfbcdf9e --> 8f882798_3f47_fa1f_5253_3b7193f357a9 911b1ca7_bbd4_e5b9_a95a_85924a01fe43["langchain_groq"] a3bf8006_3ea6_0ec2_d430_2ec0bfbcdf9e --> 911b1ca7_bbd4_e5b9_a95a_85924a01fe43 style a3bf8006_3ea6_0ec2_d430_2ec0bfbcdf9e fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
"""Standard LangChain interface tests."""
from typing import Literal
import pytest
from langchain_core.language_models import BaseChatModel
from langchain_core.rate_limiters import InMemoryRateLimiter
from langchain_tests.integration_tests import (
ChatModelIntegrationTests,
)
from langchain_groq import ChatGroq
rate_limiter = InMemoryRateLimiter(requests_per_second=0.2)
class TestGroq(ChatModelIntegrationTests):
@property
def chat_model_class(self) -> type[BaseChatModel]:
return ChatGroq
@property
def chat_model_params(self) -> dict:
return {"model": "llama-3.3-70b-versatile", "rate_limiter": rate_limiter}
@pytest.mark.xfail(
reason="Groq models have inconsistent tool calling performance. See: "
"https://github.com/langchain-ai/langchain/discussions/19990"
)
def test_bind_runnables_as_tools(self, model: BaseChatModel) -> None:
super().test_bind_runnables_as_tools(model)
@pytest.mark.xfail(reason="Retry flaky tool calling behavior")
@pytest.mark.retry(count=3, delay=1)
def test_tool_calling(self, model: BaseChatModel) -> None:
super().test_tool_calling(model)
@pytest.mark.xfail(reason="Retry flaky tool calling behavior")
@pytest.mark.retry(count=3, delay=1)
async def test_tool_calling_async(self, model: BaseChatModel) -> None:
await super().test_tool_calling_async(model)
@pytest.mark.xfail(reason="Retry flaky tool calling behavior")
@pytest.mark.retry(count=3, delay=1)
def test_tool_calling_with_no_arguments(self, model: BaseChatModel) -> None:
super().test_tool_calling_with_no_arguments(model)
@property
def supports_json_mode(self) -> bool:
return True
@pytest.mark.parametrize("schema_type", ["pydantic", "typeddict", "json_schema"])
def test_json_schema(
schema_type: Literal["pydantic", "typeddict", "json_schema"],
) -> None:
class JsonSchemaTests(ChatModelIntegrationTests):
@property
def chat_model_class(self) -> type[ChatGroq]:
return ChatGroq
@property
def chat_model_params(self) -> dict:
return {"model": "openai/gpt-oss-120b", "rate_limiter": rate_limiter}
@property
def structured_output_kwargs(self) -> dict:
return {"method": "json_schema"}
test_instance = JsonSchemaTests()
model = test_instance.chat_model_class(**test_instance.chat_model_params)
JsonSchemaTests().test_structured_output(model, schema_type)
Domain
Subdomains
Functions
Classes
Dependencies
- langchain_core.language_models
- langchain_core.rate_limiters
- langchain_groq
- langchain_tests.integration_tests
- 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, MessageSchema subdomain.
What functions are defined in test_standard.py?
test_standard.py defines 1 function(s): test_json_schema.
What does test_standard.py depend on?
test_standard.py imports 6 module(s): langchain_core.language_models, langchain_core.rate_limiters, langchain_groq, langchain_tests.integration_tests, pytest, typing.
Where is test_standard.py in the architecture?
test_standard.py is located at libs/partners/groq/tests/integration_tests/test_standard.py (domain: CoreAbstractions, subdomain: MessageSchema, directory: libs/partners/groq/tests/integration_tests).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free