BadModel Class — langchain Architecture
Architecture documentation for the BadModel class in test_base.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 20fba99c_8aea_5e5c_7f1c_5efb5da93345["BadModel"] bd382a4e_442c_13ae_530c_6e34bc43623d["test_base.py"] 20fba99c_8aea_5e5c_7f1c_5efb5da93345 -->|defined in| bd382a4e_442c_13ae_530c_6e34bc43623d 3dba61eb_71e4_4fa4_ab86_8c3aa00d46cc["validate_response()"] 20fba99c_8aea_5e5c_7f1c_5efb5da93345 -->|method| 3dba61eb_71e4_4fa4_ab86_8c3aa00d46cc
Relationship Graph
Source Code
libs/partners/openai/tests/integration_tests/chat_models/test_base.py lines 1218–1227
class BadModel(BaseModel):
response: str
@field_validator("response")
@classmethod
def validate_response(cls, v: str) -> str:
if v != "bad":
msg = 'response must be exactly "bad"'
raise ValueError(msg)
return v
Source
Frequently Asked Questions
What is the BadModel class?
BadModel is a class in the langchain codebase, defined in libs/partners/openai/tests/integration_tests/chat_models/test_base.py.
Where is BadModel defined?
BadModel is defined in libs/partners/openai/tests/integration_tests/chat_models/test_base.py at line 1218.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free