langchain/docs
dayvidborges 52e57cdc20
docs: update multimodal PDF and image usage for gpt-4.1 (#31595)
docs: update multimodal PDF and image usage for gpt-4.1

**Description:**
This update revises the LangChain documentation to support the new
GPT-4.1 multimodal API format. It fixes the previous broken example for
PDF uploads (which returned a 400 error: "Missing required parameter:
'messages[0].content[1].file'") and adds clear instructions on how to
include base64-encoded images for OpenAI models.

**Issue:**
error appointed in foruns for pdf load into api ->
'''
@[Albaeld](https://github.com/Albaeld)
Albaeld
[8 days
ago](https://github.com/langchain-ai/langchain/discussions/27702#discussioncomment-13369460)
This simply does not work with openai:gpt-4.1. I get:
Error code: 400 - {'error': {'message': "Missing required parameter:
'messages[0].content[1].file'.", 'type': 'invalid_request_error',
'param': 'messages[0].content[1].file', 'code':
'missing_required_parameter'}}
'''

**Dependencies:**
None

**Twitter handle:**
N/A

---------

Co-authored-by: Chester Curme <chester.curme@gmail.com>
2025-06-14 17:52:01 -04:00
..
api_reference Fix: Extend pyproject.toml check in create_api_rst.py to langchain/libs folder (#31128) 2025-05-15 16:53:45 -04:00
cassettes infra: update cassettes for notebook (#31407) 2025-05-29 15:21:29 +00:00
data
docs docs: update multimodal PDF and image usage for gpt-4.1 (#31595) 2025-06-14 17:52:01 -04:00
scripts docs: Update MongoDB feature status (#31553) 2025-06-10 15:42:17 -04:00
src docs: Update Milvus feature table (#31472) 2025-06-03 16:56:52 -04:00
static docs: Update Google Analytics tag in docs (#31001) 2025-04-24 10:19:10 -07:00
.gitignore
.yarnrc.yml
babel.config.js
docusaurus.config.js revert incident banner (#31592) 2025-06-12 17:25:09 -04:00
ignore-step.sh infra: run docs build on packages.yml updates (#29796) 2025-02-19 18:45:30 +00:00
Makefile docs: fix httpx conflicts with overrides in docs build (#29180) 2025-01-13 21:25:00 +00:00
package.json
README.md
sidebars.js
vercel_overrides.txt infra: add to vercel overrides (#31170) 2025-05-08 20:36:43 +00:00
vercel_requirements.txt
vercel.json docs: remove integration page with DSPy (#31278) 2025-05-19 10:10:20 -04:00
yarn.lock

LangChain Documentation

For more information on contributing to our documentation, see the Documentation Contributing Guide