test_openai_pdf_inputs() — langchain Function Reference
Architecture documentation for the test_openai_pdf_inputs() function in test_responses_standard.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD a80cbf5d_8d5f_81e7_c681_adc8bbeced2a["test_openai_pdf_inputs()"] 25cafc0a_8f3b_2d49_7e58_88f79aca1167["TestOpenAIResponses"] a80cbf5d_8d5f_81e7_c681_adc8bbeced2a -->|defined in| 25cafc0a_8f3b_2d49_7e58_88f79aca1167 style a80cbf5d_8d5f_81e7_c681_adc8bbeced2a fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/partners/openai/tests/integration_tests/chat_models/test_responses_standard.py lines 58–79
def test_openai_pdf_inputs(self, model: BaseChatModel) -> None:
"""Test that the model can process PDF inputs."""
super().test_openai_pdf_inputs(model)
# Responses API additionally supports files via URL
url = "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf"
message = HumanMessage(
[
{"type": "text", "text": "What is the document title, verbatim?"},
{"type": "file", "url": url},
]
)
_ = model.invoke([message])
# Test OpenAI Responses format
message = HumanMessage(
[
{"type": "text", "text": "What is the document title, verbatim?"},
{"type": "input_file", "file_url": url},
]
)
_ = model.invoke([message])
Domain
Subdomains
Source
Frequently Asked Questions
What does test_openai_pdf_inputs() do?
test_openai_pdf_inputs() is a function in the langchain codebase, defined in libs/partners/openai/tests/integration_tests/chat_models/test_responses_standard.py.
Where is test_openai_pdf_inputs() defined?
test_openai_pdf_inputs() is defined in libs/partners/openai/tests/integration_tests/chat_models/test_responses_standard.py at line 58.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free