<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>fallpoke</author_name>
  <author_url>https://blog.hatena.ne.jp/fallpoke/</author_url>
  <blog_title>誰かの技術置き場</blog_title>
  <blog_url>https://fallpoke-tech.hatenadiary.jp/</blog_url>
  <categories>
    <anon>生成AI</anon>
    <anon>自然言語処理</anon>
    <anon>画像処理</anon>
    <anon>備忘録</anon>
    <anon>Python</anon>
  </categories>
  <description>お疲れ様です。 LangChainのChatでは、LLMが画像をサポートしていれば画像入力ができることを知ったので試してみました。 今回作成したコードは以下に置いていますので参考にしてください。 github.com 入力方法 早速ですが入力の方法について解説します。 LangChainのMessageを使用し、contentに&quot;type&quot;: &quot;image_url&quot;を指定することで画像を入力することができます。 画像データはURLで渡すか、ローカルから読み込んだ画像ファイルをbase64エンコードした文字列を渡す形になります。 LangChainの場合、この2パターンが基本になります。 一部モ…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Ffallpoke-tech.hatenadiary.jp%2Fentry%2F2026%2F08%2F06%2F003507&quot; title=&quot;LangChainでローカル画像をbase64エンコードしてChatモデルに渡す実装メモ【備忘録】 - 誰かの技術置き場&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url>https://cdn-ak.f.st-hatena.com/images/fotolife/f/fallpoke/20260806/20260806002529.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2026-08-06 00:35:07</published>
  <title>LangChainでローカル画像をbase64エンコードしてChatモデルに渡す実装メモ【備忘録】</title>
  <type>rich</type>
  <url>https://fallpoke-tech.hatenadiary.jp/entry/2026/08/06/003507</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
