langchain-multimodal
Work with multimodal inputs/outputs in LangChain - includes images, audio, video, content blocks, and vision capabilities
npx skills add majiayu000/claude-skill-registry --skill langchain-multimodal --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# langchain-multimodal (JavaScript/TypeScript) ## 概述 多模态支持让您能够处理图像、音频、视频和其他非文本数据。具有多模态功能的模型可以处理和生成这些不同格式的内容。 **核心概念:** - **内容块(Content Blocks)**:多模态数据的结构化表示 - **视觉(Vision)**:使用 GPT-4V、Claude、Gemini 进行图像理解 - **音频/视频**:新模型中出现的支持 - **标准格式**:跨提供商的内容块结构 ## 决策表 ### 多模态的模型选择 | 任务 | 推荐模型 | 原因 | |------|------------------|-----| | 图像理解 | GPT-4.1、Claude Sonnet、Gemini | 强大的视觉功能 | | 图像生成 | DALL-E(通过 OpenAI) | 专门用于生成 | | 文档分析(PDF) | Claude、GPT-4.1 | 处理复杂的布局 | | 音频转录 | Whisper(OpenAI) | 专门用于音频 | ### 输入方法 | 方法 | 何时使用 | 示例 | |--------|-------------|---------| | URL | 公共图像 | `{ type: "image", url: "https://..." }` | | Base64 | 私有/本地图像 | `{ type: "image", data: "base64..." }` | | 文件引用 | 提供商文件 API | `{ type: "image", fileId: "..." }` | ## 代码示例 ### 基本图像输入(URL) ```typescript import { ChatOpenAI } from "@langchain/openai"; import { HumanMessage } from "langchain"; const model = new ChatOpenAI({ model: "gpt-4.1" }); const message = new HumanMessage({ contentBlocks: [ { type: "text", text: "这张图片里有什么?" }, { type: "image", url: "https://example.com/photo.jpg", }, ], }); const response = await model.invoke([message]); console.log(response.content); ``` ### Base64 图像输入 ```typescript import { ChatOpenAI } from
- 概述
- 决策表
- 多模态的模型选择
- 输入方法
- 代码示例
- 基本图像输入(URL)
- Base64 图像输入
- 多张图像
- PDF 文档分析
- 音频输入(新兴)
- 访问多模态输出
- 使用 Claude 的视觉功能
- 使用 Gemini 的视觉功能
- 边界
What does the langchain-multimodal skill do?
Work with multimodal inputs/outputs in LangChain - includes images, audio, video, content blocks, and vision capabilities
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill langchain-multimodal --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
