1:"$Sreact.fragment" 2:I[31,[],""] 3:I[3331,[],""] 4:I[1730,["771","static/chunks/771-ea220fc1ce9f84f5.js","584","static/chunks/app/blog/layout-5cef4dc08b65889b.js"],"GoogleAnalytics"] 6:I[6045,[],"OutletBoundary"] 8:I[923,[],"AsyncMetadataOutlet"] a:I[6045,[],"ViewportBoundary"] c:I[6045,[],"MetadataBoundary"] d:"$Sreact.suspense" f:I[4293,[],""] :HL["/_next/static/css/46a7e12bb88c5b4f.css","style"] 0:{"P":null,"b":"aJhzzw8f2U44tx2RVd8Jd","p":"","c":["","blog","0003"],"i":false,"f":[[["",{"children":["blog",{"children":[["slug","0003","d"],{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true]}],["",["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["blog",["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/46a7e12bb88c5b4f.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]],["$","html",null,{"children":[["$","body",null,{"children":["$","$L2",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]}],["$","$L4",null,{"gaId":"G-8HT6Z1EJBQ"}]]}]]}],{"children":[["slug","0003","d"],["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["__PAGE__",["$","$1","c",{"children":["$L5",null,["$","$L6",null,{"children":["$L7",["$","$L8",null,{"promise":"$@9"}]]}]]}],{},null,false]},null,false]},null,false]},null,false],["$","$1","h",{"children":[null,[["$","$La",null,{"children":"$Lb"}],null],["$","$Lc",null,{"children":["$","div",null,{"hidden":true,"children":["$","$d",null,{"fallback":null,"children":"$Le"}]}]}]]}],false]],"m":"$undefined","G":["$f",[]],"s":false,"S":true} 10:I[4742,["742","static/chunks/742-371c6136941b441c.js","953","static/chunks/app/blog/%5Bslug%5D/page-597c8504c0e17404.js"],""] 5:["$","div",null,{"className":"text-black bg-zinc-200","children":[["$","div",null,{"className":"pt-2 pb-2 pl-3 pr-3 ","children":["$","$L10",null,{"href":"/","className":"hover:text-gray-500","children":["$","svg",null,{"ref":"$undefined","xmlns":"http://www.w3.org/2000/svg","width":24,"height":24,"viewBox":"0 0 24 24","fill":"none","stroke":"currentColor","strokeWidth":2,"strokeLinecap":"round","strokeLinejoin":"round","className":"lucide lucide-house","aria-hidden":"true","children":[["$","path","5wwlr5",{"d":"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8"}],["$","path","1d0kgt",{"d":"M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"}],"$undefined"]}]}]}],["$","div",null,{"className":"p-3","children":[["$","div",null,{"className":"text-center text-3xl","children":"🦅"}],["$","div",null,{"className":"text-4xl font-bold text-center pt-2 pb-2","children":"LangChainを使ってみた!"}],["$","div",null,{"className":"text-right pb-3","children":[["$","div",null,{"children":["公開日 ","2025/08/02"]}],["$","div",null,{"children":["更新日 ","2025/08/02"]}]]}],["$","div",null,{"data-slot":"card","className":"flex flex-col gap-6 border py-6 shadow-sm text-black bg-zinc-100 border-none rounded","children":[["$","div",null,{"data-slot":"card-header","className":"@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6 px-3 md:px-6","children":["$","div",null,{"className":"flex w-full flex-wrap gap-2","children":[["$","span","0",{"data-slot":"badge","className":"inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden border-transparent [a&]:hover:bg-secondary/90 bg-teal-600 text-white dark:bg-blue-600","children":[["$","svg",null,{"ref":"$undefined","xmlns":"http://www.w3.org/2000/svg","width":24,"height":24,"viewBox":"0 0 24 24","fill":"none","stroke":"currentColor","strokeWidth":2,"strokeLinecap":"round","strokeLinejoin":"round","className":"lucide lucide-badge-check","aria-hidden":"true","children":[["$","path","3c2336",{"d":"M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z"}],["$","path","dzmm74",{"d":"m9 12 2 2 4-4"}],"$undefined"]}],"プログラミング"]}],["$","span","1",{"data-slot":"badge","className":"inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden border-transparent [a&]:hover:bg-secondary/90 bg-teal-600 text-white dark:bg-blue-600","children":[["$","svg",null,{"ref":"$undefined","xmlns":"http://www.w3.org/2000/svg","width":24,"height":24,"viewBox":"0 0 24 24","fill":"none","stroke":"currentColor","strokeWidth":2,"strokeLinecap":"round","strokeLinejoin":"round","className":"lucide lucide-badge-check","aria-hidden":"true","children":[["$","path","3c2336",{"d":"M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z"}],["$","path","dzmm74",{"d":"m9 12 2 2 4-4"}],"$undefined"]}],"Python"]}],["$","span","2",{"data-slot":"badge","className":"inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden border-transparent [a&]:hover:bg-secondary/90 bg-teal-600 text-white dark:bg-blue-600","children":["$L11","AI"]}]]}]}],"$L12","$L13"]}]]}],"$L14"]}] 11:["$","svg",null,{"ref":"$undefined","xmlns":"http://www.w3.org/2000/svg","width":24,"height":24,"viewBox":"0 0 24 24","fill":"none","stroke":"currentColor","strokeWidth":2,"strokeLinecap":"round","strokeLinejoin":"round","className":"lucide lucide-badge-check","aria-hidden":"true","children":[["$","path","3c2336",{"d":"M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z"}],["$","path","dzmm74",{"d":"m9 12 2 2 4-4"}],"$undefined"]}] 12:["$","div",null,{"data-slot":"card-content","className":"px-3 md:px-6","children":[["$","h2",null,{"className":"text-xl font-bold pt-3 pb-3","children":"あらすじ"}],"\n",["$","div",null,{"className":"p-1","children":"最近はChatGPTを使うだけでなく、仕事でもLLMを使った開発に携わる事が増えてきた。"}],"\n",["$","div",null,{"className":"p-1","children":["そんな中、",["$","strong",null,{"className":"bg-stone-300 text-stone-800 text-sm px-2 py-0.5 rounded-full","children":"LangChain"}],"を使った開発が有名であると聞き、これを試してみようと考えた。"]}],"\n",["$","h2",null,{"className":"text-xl font-bold pt-3 pb-3","children":"実装してみた"}],"\n",["$","div",null,{"className":"p-1","children":"公式に書かれている内容を基にして作ってみた!"}],"\n",["$","div",null,{"className":"p-1","children":"実装する際にポイントとなるのは以下の通りである。"}],"\n",["$","ul",null,{"className":"pt-2 pb-2","children":["\n",["$","li",null,{"className":"list-disc list-inside pl-2","children":["OpenAI APIのキーを取得し、環境変数に",["$","strong",null,{"className":"bg-stone-300 text-stone-800 text-sm px-2 py-0.5 rounded-full","children":"OPENAI_API_KEY"}],"を設定する"]}],"\n"]}],"\n",["$","div",null,{"className":"p-1","children":["$","strong",null,{"className":"bg-stone-300 text-stone-800 text-sm px-2 py-0.5 rounded-full","children":"キーを取得するにはChatGPTの有料プランに入る必要がある。"}]}],"\n",["$","div",null,{"className":"p-1","children":"あとはPythonのコードをそのままコピーするだけでも実行できた。"}],"\n",["$","h3",null,{"className":"text-lg font-bold pt-2 pb-2","children":"環境変数を設定"}],"\n",["$","h4",null,{"className":"text-base font-bold pt-2 pb-1","children":".env"}],"\n",["$","div",null,{"className":"p-1","children":"先に環境変数を用意する。"}],"\n",["$","div",null,{"className":"p-1","children":"私はdocker composeを使ってコンテナを実行するので、\r\n.envファイルとdocker-compose-ymlにそれぞれ以下の内容を記載する。"}],"\n",["$","pre",null,{"children":["$","div",null,{"className":"pt-3 pb-3","children":["$","pre",null,{"style":{"display":"block","overflowX":"auto","padding":"0.5em","background":"#333","color":"white"},"children":["$","code",null,{"className":"language-bash","style":{"whiteSpace":"pre"},"children":[false,[["$","span","code-segement0",{"className":"$undefined","style":{},"children":["OPENAI_API_KEY=...省略..."]}]]]}]}]}]}],"\n",["$","h4",null,{"className":"text-base font-bold pt-2 pb-1","children":"docker-compose.yml"}],"\n",["$","div",null,{"className":"p-1","children":["docker-compose.ymlの一部分を写しているが、\r\nここで重要なのは",["$","strong",null,{"className":"bg-stone-300 text-stone-800 text-sm px-2 py-0.5 rounded-full","children":"args"}],", ",["$","strong",null,{"className":"bg-stone-300 text-stone-800 text-sm px-2 py-0.5 rounded-full","children":"env_file"}],"の箇所である。"]}],"\n",["$","pre",null,{"children":["$","div",null,{"className":"pt-3 pb-3","children":["$","pre",null,{"style":{"display":"block","overflowX":"auto","padding":"0.5em","background":"#333","color":"white"},"children":["$","code",null,{"className":"language-yml","style":{"whiteSpace":"pre"},"children":[false,[["$","span","code-segement0",{"className":"$undefined","style":{"color":"#d36363"},"children":["services:"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":["\r"]}],["$","span","code-segement2",{"className":"$undefined","style":{"color":"#d36363"},"children":["\n"]}],["$","span","code-segement3",{"className":"$undefined","style":{"color":"#d36363"},"children":["app:"]}],["$","span","code-segement4",{"className":"$undefined","style":{},"children":["\r"]}],["$","span","code-segement5",{"className":"$undefined","style":{"color":"#d36363"},"children":["\n"]}],["$","span","code-segement6",{"className":"$undefined","style":{"color":"#d36363"},"children":[" build:"]}],["$","span","code-segement7",{"className":"$undefined","style":{},"children":["\r"]}],["$","span","code-segement8",{"className":"$undefined","style":{"color":"#d36363"},"children":["\n"]}],["$","span","code-segement9",{"className":"$undefined","style":{"color":"#d36363"},"children":[" context:"]}],["$","span","code-segement10",{"className":"$undefined","style":{},"children":[" app/.\r"]}],["$","span","code-segement11",{"className":"$undefined","style":{"color":"#d36363"},"children":["\n"]}],["$","span","code-segement12",{"className":"$undefined","style":{"color":"#d36363"},"children":[" args:"]}],["$","span","code-segement13",{"className":"$undefined","style":{},"children":["\r\n"]}],["$","span","code-segement14",{"className":"$undefined","style":{},"children":[" - OPENAI_API_KEY:${OPENAI_API_KEY}\r"]}],["$","span","code-segement15",{"className":"$undefined","style":{"color":"#d36363"},"children":["\n"]}],["$","span","code-segement16",{"className":"$undefined","style":{"color":"#d36363"},"children":[" env_file:"]}],["$","span","code-segement17",{"className":"$undefined","style":{},"children":["\r\n"]}]," - app/.env"]]}]}]}]}],"\n",["$","h3",null,{"className":"text-lg font-bold pt-2 pb-2","children":"実行ファイルを用意"}],"\n","$L15","\n","$L16","\n","$L17","\n","$L18","\n","$L19","\n","$L1a","\n","$L1b","\n","$L1c","\n","$L1d","\n","$L1e","\n","$L1f","\n","$L20","\n","$L21","\n","$L22","\n","$L23","\n","$L24","\n","$L25","\n","$L26","\n","$L27","\n","$L28","\n","$L29","\n","$L2a","\n","$L2b","\n","$L2c","\n","$L2d","\n","$L2e","\n","$L2f"]}] 13:["$","div",null,{"data-slot":"card-footer","className":"flex items-center px-6 [.border-t]:pt-6"}] 14:["$","footer",null,{"className":"bg-neutral-800 text-white mt-16 py-6","children":["$","div",null,{"className":"container mx-auto px-4","children":["$","div",null,{"className":"flex flex-col md:flex-row justify-between items-center","children":[["$","div",null,{"className":"flex space-x-4 mb-4 md:mb-0"}],["$","p",null,{"className":"text-sm text-gray-400","children":"© 2025 Shinjo Syntax. All rights reserved."}]]}]}]}] 15:["$","h4",null,{"className":"text-base font-bold pt-2 pb-1","children":"requirements.txt"}] 16:["$","div",null,{"className":"p-1","children":"インストールしたライブラリは以下の二つである。"}] 17:["$","div",null,{"className":"p-1","children":["今回はOpenAI APIのLLMを使用しているので、二つ目のライブラリは ",["$","strong",null,{"className":"bg-stone-300 text-stone-800 text-sm px-2 py-0.5 rounded-full","children":"langchain[openai]"}]," にしている。"]}] 18:["$","div",null,{"className":"p-1","children":["一つ目のライブラリは",["$","strong",null,{"className":"bg-stone-300 text-stone-800 text-sm px-2 py-0.5 rounded-full","children":"langchain"}],"であり、これはどのLLMを選ぶにしても共通して使用される。"]}] 19:["$","pre",null,{"children":["$","div",null,{"className":"pt-3 pb-3","children":["$","pre",null,{"style":{"display":"block","overflowX":"auto","padding":"0.5em","background":"#333","color":"white"},"children":["$","code",null,{"className":"language-txt","style":{"whiteSpace":"pre"},"children":[false,[["$","span","code-segement0",{"className":"$undefined","style":{"color":"#ffa"},"children":["langchain"]}]]]}]}]}]}] 1a:["$","div",null,{"className":"p-1","children":"二つ目のライブラリに関しては使用するLLMによってインストールするライブラリが異なる。"}] 1b:["$","div",null,{"className":"p-1","children":"例として、"}] 1c:["$","ul",null,{"className":"pt-2 pb-2","children":["\n",["$","li",null,{"className":"list-disc list-inside pl-2","children":["OpenAIを使用する場合は",["$","strong",null,{"className":"bg-stone-300 text-stone-800 text-sm px-2 py-0.5 rounded-full","children":"langchain[openai]"}],"、"]}],"\n",["$","li",null,{"className":"list-disc list-inside pl-2","children":["Google Geminiを使用する場合は",["$","strong",null,{"className":"bg-stone-300 text-stone-800 text-sm px-2 py-0.5 rounded-full","children":"langchain[google-genai]"}]]}],"\n"]}] 1d:["$","div",null,{"className":"p-1","children":"をインストールする必要がある。"}] 1e:["$","h5",null,{"className":"font-bold pt-2","children":["$","strong",null,{"className":"bg-stone-300 text-stone-800 text-sm px-2 py-0.5 rounded-full","children":"OpenAIを使用する場合"}]}] 1f:["$","pre",null,{"children":["$","div",null,{"className":"pt-3 pb-3","children":["$","pre",null,{"style":{"display":"block","overflowX":"auto","padding":"0.5em","background":"#333","color":"white"},"children":["$","code",null,{"className":"language-sh","style":{"whiteSpace":"pre"},"children":[false,[["$","span","code-segement0",{"className":"$undefined","style":{},"children":["langchain[openai]"]}]]]}]}]}]}] 20:["$","h5",null,{"className":"font-bold pt-2","children":["$","strong",null,{"className":"bg-stone-300 text-stone-800 text-sm px-2 py-0.5 rounded-full","children":"Google Geminiを使用する場合"}]}] 21:["$","pre",null,{"children":["$","div",null,{"className":"pt-3 pb-3","children":["$","pre",null,{"style":{"display":"block","overflowX":"auto","padding":"0.5em","background":"#333","color":"white"},"children":["$","code",null,{"className":"language-sh","style":{"whiteSpace":"pre"},"children":[false,[["$","span","code-segement0",{"className":"$undefined","style":{},"children":["langchain[google-genai]"]}]]]}]}]}]}] 22:["$","h4",null,{"className":"text-base font-bold pt-2 pb-1","children":"main.py"}] 23:["$","div",null,{"className":"p-1","children":"Pythonの実行ファイルは以下の通りである。"}] 24:["$","div",null,{"className":"p-1","children":"ほとんどは公式サイトに載せられているままではあるが、\r\nファイルの全体像は以下のようになっている。"}] 25:["$","pre",null,{"children":["$","div",null,{"className":"pt-3 pb-3","children":["$","pre",null,{"style":{"display":"block","overflowX":"auto","padding":"0.5em","background":"#333","color":"white"},"children":["$","code",null,{"className":"language-py","style":{"whiteSpace":"pre"},"children":[false,[["$","span","code-segement0",{"className":"$undefined","style":{},"children":["# "]}],["$","span","code-segement1",{"className":"$undefined","style":{"color":"#d36363"},"children":["1"]}],["$","span","code-segement2",{"className":"$undefined","style":{},"children":[". モデルの選択\r\n"]}],["$","span","code-segement3",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement4",{"className":"$undefined","style":{"color":"#ade5fc"},"children":["from"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement6",{"className":"$undefined","style":{"color":"#ade5fc"},"children":["langchain.chat_models"]}],["$","span","code-segement7",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement8",{"className":"$undefined","style":{"color":"#ade5fc"},"children":["import"]}],["$","span","code-segement9",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement10",{"className":"$undefined","style":{"color":"#ade5fc"},"children":["init_chat_model"]}],["$","span","code-segement11",{"className":"$undefined","style":{},"children":["\r\n"]}],"\r\n",["$","span","code-segement13",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement14",{"className":"$undefined","style":{"color":"#ade5fc"},"children":["model"]}],["$","span","code-segement15",{"className":"$undefined","style":{},"children":[" = "]}],["$","span","code-segement16",{"className":"hljs-function","style":{"color":"#ffa"},"children":["init_chat_model"]}],["$","span","code-segement17",{"className":"hljs-function","style":{},"children":["("]}],["$","span","code-segement18",{"className":"hljs-function","style":{"color":"#a2fca2"},"children":["\"gpt-4o-mini\""]}],["$","span","code-segement19",{"className":"hljs-function","style":{},"children":[", "]}],["$","span","code-segement20",{"className":"hljs-function","style":{"color":"#ade5fc"},"children":["model_provider"]}],["$","span","code-segement21",{"className":"hljs-function","style":{},"children":["="]}],["$","span","code-segement22",{"className":"hljs-function","style":{"color":"#a2fca2"},"children":["\"openai\""]}],["$","span","code-segement23",{"className":"hljs-function","style":{},"children":[")"]}],["$","span","code-segement24",{"className":"$undefined","style":{},"children":["\r\n"]}],"\r\n",["$","span","code-segement26",{"className":"$undefined","style":{},"children":["# "]}],["$","span","code-segement27",{"className":"$undefined","style":{"color":"#d36363"},"children":["2"]}],["$","span","code-segement28",{"className":"$undefined","style":{},"children":[". LangChainを実行\r\n"]}],["$","span","code-segement29",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement30",{"className":"$undefined","style":{"color":"#ade5fc"},"children":["from"]}],["$","span","code-segement31",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement32",{"className":"$undefined","style":{"color":"#ade5fc"},"children":["langchain_core.messages"]}],["$","span","code-segement33",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement34",{"className":"$undefined","style":{"color":"#ade5fc"},"children":["import"]}],["$","span","code-segement35",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement36",{"className":"$undefined","style":{"color":"#ade5fc"},"children":["HumanMessage"]}],["$","span","code-segement37",{"className":"$undefined","style":{},"children":[", "]}],["$","span","code-segement38",{"className":"$undefined","style":{"color":"#ade5fc"},"children":["SystemMessage"]}],["$","span","code-segement39",{"className":"$undefined","style":{},"children":["\r\n"]}],"\r\n",["$","span","code-segement41",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement42",{"className":"$undefined","style":{"color":"#ade5fc"},"children":["messages"]}],["$","span","code-segement43",{"className":"$undefined","style":{},"children":[" = [\r\n"]}],["$","span","code-segement44",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement45",{"className":"hljs-function","style":{"color":"#ffa"},"children":["SystemMessage"]}],["$","span","code-segement46",{"className":"hljs-function","style":{},"children":["("]}],["$","span","code-segement47",{"className":"hljs-function","style":{"color":"#a2fca2"},"children":["\"Translate the following from English into Japanese\""]}],["$","span","code-segement48",{"className":"hljs-function","style":{},"children":["),\r\n"]}],["$","span","code-segement49",{"className":"hljs-function","style":{},"children":[" "]}],["$","span","code-segement50",{"className":"hljs-function","style":{"color":"#ffa"},"children":["HumanMessage"]}],"$L30","$L31","$L32","$L33","$L34","$L35","$L36","$L37","$L38","$L39","$L3a","$L3b","$L3c","$L3d","$L3e","$L3f","$L40","$L41","$L42","$L43"]]}]}]}]}] 26:["$","div",null,{"className":"p-1","children":["上記では",["$","strong",null,{"className":"bg-stone-300 text-stone-800 text-sm px-2 py-0.5 rounded-full","children":"OpenAIのgpt-4o-mini"}],"を使用しているが、\r\nGeminiを使いたいときはファイル内の",["$","div",null,{"className":"pt-3 pb-3","children":["$","pre",null,{"style":{"display":"block","overflowX":"auto","padding":"0.5em","background":"#333","color":"white"},"children":["$","code",null,{"className":"language-text","style":{"whiteSpace":"pre"},"children":[false,[["$","span","code-segement0",{"className":"$undefined","style":{},"children":["# 1. モデルの選択"]}]]]}]}]}],"の部分を以下のように変える。"]}] 27:["$","pre",null,{"children":["$","div",null,{"className":"pt-3 pb-3","children":["$","pre",null,{"style":{"display":"block","overflowX":"auto","padding":"0.5em","background":"#333","color":"white"},"children":["$","code",null,{"className":"language-py","style":{"whiteSpace":"pre"},"children":[false,[["$","span","code-segement0",{"className":"$undefined","style":{"color":"#888"},"children":["# 1. モデルの選択"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":["\r\n"]}],["$","span","code-segement2",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement3",{"className":"$undefined","style":{"color":"#fcc28c"},"children":["from"]}],["$","span","code-segement4",{"className":"$undefined","style":{},"children":[" langchain.chat_models import init_chat_model\r\n"]}],"\r\n",["$","span","code-segement6",{"className":"$undefined","style":{},"children":["model = init_chat_model("]}],["$","span","code-segement7",{"className":"$undefined","style":{"color":"#a2fca2"},"children":["\"gemini-2.5-flash\""]}],["$","span","code-segement8",{"className":"$undefined","style":{},"children":[", "]}],["$","span","code-segement9",{"className":"$undefined","style":{"color":"#ffa"},"children":["model_provider"]}],["$","span","code-segement10",{"className":"$undefined","style":{},"children":["="]}],["$","span","code-segement11",{"className":"$undefined","style":{"color":"#a2fca2"},"children":["\"google_genai\""]}],["$","span","code-segement12",{"className":"$undefined","style":{},"children":[")"]}]]]}]}]}]}] 28:["$","h3",null,{"className":"text-lg font-bold pt-2 pb-2","children":"実行結果"}] 29:["$","h4",null,{"className":"text-base font-bold pt-2 pb-1","children":["$","strong",null,{"className":"bg-stone-300 text-stone-800 text-sm px-2 py-0.5 rounded-full","children":"gpt-4o-mini"}]}] 2a:["$","pre",null,{"children":["$","div",null,{"className":"pt-3 pb-3","children":["$","pre",null,{"style":{"display":"block","overflowX":"auto","padding":"0.5em","background":"#333","color":"white"},"children":["$","code",null,{"className":"language-sh","style":{"whiteSpace":"pre"},"children":[false,[["$","span","code-segement0",{"className":"$undefined","style":{},"children":["result: content="]}],["$","span","code-segement1",{"className":"$undefined","style":{"color":"#d36363"},"children":["'こんにちは!私だよ!"]}],["$","span","code-segement2",{"className":"$undefined","style":{},"children":["' additional_kwargs={"]}],["$","span","code-segement3",{"className":"$undefined","style":{"color":"#d36363"},"children":["'refusal"]}],["$","span","code-segement4",{"className":"$undefined","style":{"color":"#d36363"},"children":["':"]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":[" None} response_metadata={"]}],["$","span","code-segement6",{"className":"$undefined","style":{"color":"#d36363"},"children":["'token_usage"]}],["$","span","code-segement7",{"className":"$undefined","style":{"color":"#d36363"},"children":["':"]}],["$","span","code-segement8",{"className":"$undefined","style":{},"children":[" {"]}],["$","span","code-segement9",{"className":"$undefined","style":{"color":"#d36363"},"children":["'completion_tokens"]}],["$","span","code-segement10",{"className":"$undefined","style":{"color":"#d36363"},"children":["':"]}],["$","span","code-segement11",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement12",{"className":"$undefined","style":{"color":"#d36363"},"children":["6"]}],["$","span","code-segement13",{"className":"$undefined","style":{},"children":[", "]}],["$","span","code-segement14",{"className":"$undefined","style":{"color":"#d36363"},"children":["'prompt_tokens"]}],["$","span","code-segement15",{"className":"$undefined","style":{"color":"#d36363"},"children":["':"]}],["$","span","code-segement16",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement17",{"className":"$undefined","style":{"color":"#d36363"},"children":["25"]}],["$","span","code-segement18",{"className":"$undefined","style":{},"children":[", "]}],["$","span","code-segement19",{"className":"$undefined","style":{"color":"#d36363"},"children":["'total_tokens"]}],["$","span","code-segement20",{"className":"$undefined","style":{"color":"#d36363"},"children":["':"]}],["$","span","code-segement21",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement22",{"className":"$undefined","style":{"color":"#d36363"},"children":["31"]}],["$","span","code-segement23",{"className":"$undefined","style":{},"children":[", "]}],["$","span","code-segement24",{"className":"$undefined","style":{"color":"#d36363"},"children":["'completion_tokens_details"]}],["$","span","code-segement25",{"className":"$undefined","style":{"color":"#d36363"},"children":["':"]}],["$","span","code-segement26",{"className":"$undefined","style":{},"children":[" {"]}],["$","span","code-segement27",{"className":"$undefined","style":{"color":"#d36363"},"children":["'accepted_prediction_tokens"]}],["$","span","code-segement28",{"className":"$undefined","style":{"color":"#d36363"},"children":["':"]}],["$","span","code-segement29",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement30",{"className":"$undefined","style":{"color":"#d36363"},"children":["0"]}],["$","span","code-segement31",{"className":"$undefined","style":{},"children":[", "]}],["$","span","code-segement32",{"className":"$undefined","style":{"color":"#d36363"},"children":["'audio_tokens"]}],["$","span","code-segement33",{"className":"$undefined","style":{"color":"#d36363"},"children":["':"]}],["$","span","code-segement34",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement35",{"className":"$undefined","style":{"color":"#d36363"},"children":["0"]}],["$","span","code-segement36",{"className":"$undefined","style":{},"children":[", "]}],["$","span","code-segement37",{"className":"$undefined","style":{"color":"#d36363"},"children":["'reasoning_tokens"]}],["$","span","code-segement38",{"className":"$undefined","style":{"color":"#d36363"},"children":["':"]}],["$","span","code-segement39",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement40",{"className":"$undefined","style":{"color":"#d36363"},"children":["0"]}],["$","span","code-segement41",{"className":"$undefined","style":{},"children":[", "]}],["$","span","code-segement42",{"className":"$undefined","style":{"color":"#d36363"},"children":["'rejected_prediction_tokens"]}],["$","span","code-segement43",{"className":"$undefined","style":{"color":"#d36363"},"children":["':"]}],["$","span","code-segement44",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement45",{"className":"$undefined","style":{"color":"#d36363"},"children":["0"]}],["$","span","code-segement46",{"className":"$undefined","style":{},"children":["}, "]}],["$","span","code-segement47",{"className":"$undefined","style":{"color":"#d36363"},"children":["'prompt_tokens_details"]}],["$","span","code-segement48",{"className":"$undefined","style":{"color":"#d36363"},"children":["':"]}],"$L44","$L45","$L46","$L47","$L48","$L49","$L4a","$L4b","$L4c","$L4d","$L4e","$L4f","$L50","$L51","$L52","$L53","$L54","$L55","$L56","$L57","$L58","$L59","$L5a","$L5b","$L5c","$L5d","$L5e","$L5f","$L60","$L61","$L62","$L63","$L64","$L65","$L66","$L67","$L68","$L69","$L6a","$L6b","$L6c","$L6d","$L6e","$L6f","$L70","$L71","$L72","$L73","$L74","$L75","$L76","$L77","$L78","$L79","$L7a","$L7b","$L7c","$L7d","$L7e","$L7f","$L80","$L81","$L82","$L83","$L84","$L85","$L86","$L87","$L88","$L89","$L8a","$L8b","$L8c","$L8d","$L8e","$L8f","$L90","$L91","$L92","$L93","$L94","$L95","$L96","$L97"]]}]}]}]}] 2b:["$","h4",null,{"className":"text-base font-bold pt-2 pb-1","children":["$","strong",null,{"className":"bg-stone-300 text-stone-800 text-sm px-2 py-0.5 rounded-full","children":"gemini-2.5-flash"}]}] 2c:["$","pre",null,{"children":["$","div",null,{"className":"pt-3 pb-3","children":["$","pre",null,{"style":{"display":"block","overflowX":"auto","padding":"0.5em","background":"#333","color":"white"},"children":["$","code",null,{"className":"language-sh","style":{"whiteSpace":"pre"},"children":[false,[["$","span","code-segement0",{"className":"$undefined","style":{"color":"#d36363"},"children":["result:"]}],["$","span","code-segement1",{"className":"$undefined","style":{},"children":[" Here are a few natural ways "]}],["$","span","code-segement2",{"className":"$undefined","style":{"color":"#fcc28c"},"children":["to"]}],["$","span","code-segement3",{"className":"$undefined","style":{},"children":[" translate "]}],["$","span","code-segement4",{"className":"$undefined","style":{"color":"#a2fca2"},"children":["\"Hi, there! It's me!\""]}],["$","span","code-segement5",{"className":"$undefined","style":{},"children":[" depending "]}],["$","span","code-segement6",{"className":"$undefined","style":{"color":"#fcc28c"},"children":["on"]}],["$","span","code-segement7",{"className":"$undefined","style":{},"children":[" the context "]}],["$","span","code-segement8",{"className":"$undefined","style":{"color":"#ffa"},"children":["and"]}],["$","span","code-segement9",{"className":"$undefined","style":{},"children":[" speaker"]}],["$","span","code-segement10",{"className":"$undefined","style":{"color":"#888"},"children":["'s gender:"]}],["$","span","code-segement11",{"className":"$undefined","style":{},"children":["\r\n"]}],"\r\n",["$","span","code-segement13",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement14",{"className":"$undefined","style":{"color":"#d36363"},"children":["1"]}],["$","span","code-segement15",{"className":"$undefined","style":{},"children":[". **General / Female speaker (e.g., knocking "]}],["$","span","code-segement16",{"className":"$undefined","style":{"color":"#fcc28c"},"children":["on"]}],["$","span","code-segement17",{"className":"$undefined","style":{},"children":[" a door, calling out):** \r\n"]}]," * **はーい、私だよ!** (Haaai, watashi da yo!)\r\n",["$","span","code-segement19",{"className":"$undefined","style":{},"children":[" * "]}],["$","span","code-segement20",{"className":"$undefined","style":{"color":"#a2fca2"},"children":["\"はーい\""]}],["$","span","code-segement21",{"className":"$undefined","style":{},"children":[" (Haaai) "]}],["$","span","code-segement22",{"className":"$undefined","style":{"color":"#ffa"},"children":["is"]}],["$","span","code-segement23",{"className":"$undefined","style":{},"children":[" a friendly, soft way "]}],["$","span","code-segement24",{"className":"$undefined","style":{"color":"#fcc28c"},"children":["to"]}],["$","span","code-segement25",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement26",{"className":"$undefined","style":{"color":"#fcc28c"},"children":["get"]}],["$","span","code-segement27",{"className":"$undefined","style":{},"children":[" attention, "]}],["$","span","code-segement28",{"className":"$undefined","style":{"color":"#ffa"},"children":["like"]}],["$","span","code-segement29",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement30",{"className":"$undefined","style":{"color":"#a2fca2"},"children":["\"Hi!\""]}],["$","span","code-segement31",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement32",{"className":"$undefined","style":{"color":"#ffa"},"children":["or"]}],["$","span","code-segement33",{"className":"$undefined","style":{},"children":[" "]}],["$","span","code-segement34",{"className":"$undefined","style":{"color":"#a2fca2"},"children":["\"Yes?\""]}],["$","span","code-segement35",{"className":"$undefined","style":{},"children":[".\r\n"]}],["$","span","code-segement36",{"className":"$undefined","style":{},"children":[" * "]}],["$","span","code-segement37",{"className":"$undefined","style":{"color":"#a2fca2"},"children":["\"私だよ\""]}],["$","span","code-segement38",{"className":"$undefined","style":{},"children":[" (watashi da yo) means "]}],["$","span","code-segement39",{"className":"$undefined","style":{"color":"#a2fca2"},"children":["\"It's me!\""]}],["$","span","code-segement40",{"className":"$undefined","style":{},"children":[" (watashi "]}],["$","span","code-segement41",{"className":"$undefined","style":{"color":"#ffa"},"children":["is"]}],["$","span","code-segement42",{"className":"$undefined","style":{},"children":[" a general/female pronoun, da yo "]}],["$","span","code-segement43",{"className":"$undefined","style":{"color":"#ffa"},"children":["is"]}],["$","span","code-segement44",{"className":"$undefined","style":{},"children":[" casual emphasis).\r\n"]}],"\r\n",["$","span","code-segement46",{"className":"$undefined","style":{},"children":[""]}],["$","span","code-segement47",{"className":"$undefined","style":{"color":"#d36363"},"children":["2"]}],["$","span","code-segement48",{"className":"$undefined","style":{},"children":[". **Male speaker (e.g., calling out "]}],["$","span","code-segement49",{"className":"$undefined","style":{"color":"#fcc28c"},"children":["to"]}],["$","span","code-segement50",{"className":"$undefined","style":{},"children":[" a "]}],"$L98","$L99"," * **おーい、俺だよ!** (Ooii, ore da yo!)\r\n","$L9a","$L9b","$L9c","$L9d","$L9e","$L9f","$La0","$La1","$La2","$La3","$La4","$La5","$La6","$La7","$La8","$La9","$Laa","$Lab","\r\n","$Lac","$Lad","$Lae","$Laf","$Lb0","$Lb1","$Lb2"," * **やあ!私だよ!** (Yaa! Watashi da yo!) - General/Female\r\n"," * **やあ!俺だよ!** (Yaa! Ore da yo!) - Male\r\n","$Lb3","$Lb4","$Lb5","$Lb6","$Lb7","$Lb8","$Lb9","$Lba","$Lbb","$Lbc","$Lbd","\r\n","$Lbe","$Lbf","$Lc0","$Lc1"]]}]}]}]}] 2d:["$","h2",null,{"className":"text-xl font-bold pt-3 pb-3","children":"まとめ"}] 2e:["$","div",null,{"className":"p-1","children":"これまでOpenAIやGeminiのライブラリを使った開発などを行ってきたが、\r\nLangChainを使う事によりLLMの切り替えがとても簡単であった。"}] 2f:["$","div",null,{"className":"p-1","children":"APIを使う際には有料になる事が多いLLMであるが、\r\n用途に合わせて切り替える事でコスト削減を見込める。\r\nこれは予算が限られている個人開発ではとても魅力的である。"}] 30:["$","span","code-segement51",{"className":"hljs-function","style":{},"children":["("]}] 31:["$","span","code-segement52",{"className":"hljs-function","style":{"color":"#a2fca2"},"children":["\"Hi, there! It's me!\""]}] 32:["$","span","code-segement53",{"className":"hljs-function","style":{},"children":["),\r\n"]}] 33:["$","span","code-segement54",{"className":"hljs-function","style":{},"children":["]\r\n"]}] 34:["$","span","code-segement55",{"className":"hljs-function","style":{},"children":["\r\n"]}] 35:["$","span","code-segement56",{"className":"hljs-function","style":{},"children":[""]}] 36:["$","span","code-segement57",{"className":"hljs-function hljs-class","style":{"color":"#ade5fc"},"children":["result"]}] 37:["$","span","code-segement58",{"className":"hljs-function","style":{},"children":[" = "]}] 38:["$","span","code-segement59",{"className":"hljs-function","style":{"color":"#ade5fc"},"children":["model.invoke"]}] 39:["$","span","code-segement60",{"className":"hljs-function","style":{},"children":["("]}] 3a:["$","span","code-segement61",{"className":"hljs-function","style":{"color":"#ade5fc"},"children":["messages"]}] 3b:["$","span","code-segement62",{"className":"hljs-function","style":{},"children":[")"]}] 3c:["$","span","code-segement63",{"className":"$undefined","style":{},"children":["\r\n"]}] 3d:["$","span","code-segement64",{"className":"$undefined","style":{},"children":[""]}] 3e:["$","span","code-segement65",{"className":"hljs-function","style":{"color":"#ffa"},"children":["print"]}] 3f:["$","span","code-segement66",{"className":"hljs-function","style":{},"children":["("]}] 40:["$","span","code-segement67",{"className":"hljs-function","style":{"color":"#a2fca2"},"children":["'result:'"]}] 41:["$","span","code-segement68",{"className":"hljs-function","style":{},"children":[", "]}] 42:["$","span","code-segement69",{"className":"hljs-function hljs-class","style":{"color":"#ade5fc"},"children":["result"]}] 43:["$","span","code-segement70",{"className":"hljs-function","style":{},"children":[")"]}] 44:["$","span","code-segement49",{"className":"$undefined","style":{},"children":[" {"]}] 45:["$","span","code-segement50",{"className":"$undefined","style":{"color":"#d36363"},"children":["'audio_tokens"]}] 46:["$","span","code-segement51",{"className":"$undefined","style":{"color":"#d36363"},"children":["':"]}] 47:["$","span","code-segement52",{"className":"$undefined","style":{},"children":[" "]}] 48:["$","span","code-segement53",{"className":"$undefined","style":{"color":"#d36363"},"children":["0"]}] 49:["$","span","code-segement54",{"className":"$undefined","style":{},"children":[", "]}] 4a:["$","span","code-segement55",{"className":"$undefined","style":{"color":"#d36363"},"children":["'cached_tokens"]}] 4b:["$","span","code-segement56",{"className":"$undefined","style":{"color":"#d36363"},"children":["':"]}] 4c:["$","span","code-segement57",{"className":"$undefined","style":{},"children":[" "]}] 4d:["$","span","code-segement58",{"className":"$undefined","style":{"color":"#d36363"},"children":["0"]}] 4e:["$","span","code-segement59",{"className":"$undefined","style":{},"children":["}}, "]}] 4f:["$","span","code-segement60",{"className":"$undefined","style":{"color":"#d36363"},"children":["'model_name"]}] 50:["$","span","code-segement61",{"className":"$undefined","style":{"color":"#d36363"},"children":["':"]}] 51:["$","span","code-segement62",{"className":"$undefined","style":{},"children":[" "]}] 52:["$","span","code-segement63",{"className":"$undefined","style":{"color":"#d36363"},"children":["'gpt-4o-mini-2024-07-18"]}] 53:["$","span","code-segement64",{"className":"$undefined","style":{},"children":["', "]}] 54:["$","span","code-segement65",{"className":"$undefined","style":{"color":"#d36363"},"children":["'system_fingerprint"]}] 55:["$","span","code-segement66",{"className":"$undefined","style":{"color":"#d36363"},"children":["':"]}] 56:["$","span","code-segement67",{"className":"$undefined","style":{},"children":[" \r\n"]}] 57:["$","span","code-segement68",{"className":"$undefined","style":{},"children":[""]}] 58:["$","span","code-segement69",{"className":"$undefined","style":{"color":"#d36363"},"children":["'fp_34a54ae93c"]}] 59:["$","span","code-segement70",{"className":"$undefined","style":{},"children":["', "]}] 5a:["$","span","code-segement71",{"className":"$undefined","style":{"color":"#d36363"},"children":["'id"]}] 5b:["$","span","code-segement72",{"className":"$undefined","style":{"color":"#d36363"},"children":["':"]}] 5c:["$","span","code-segement73",{"className":"$undefined","style":{},"children":[" "]}] 5d:["$","span","code-segement74",{"className":"$undefined","style":{"color":"#d36363"},"children":["'chatcmpl-BywqXDZ04b98W9TAvfF2zMqjR8Ef5"]}] 5e:["$","span","code-segement75",{"className":"$undefined","style":{},"children":["', "]}] 5f:["$","span","code-segement76",{"className":"$undefined","style":{"color":"#d36363"},"children":["'service_tier"]}] 60:["$","span","code-segement77",{"className":"$undefined","style":{"color":"#d36363"},"children":["':"]}] 61:["$","span","code-segement78",{"className":"$undefined","style":{},"children":[" "]}] 62:["$","span","code-segement79",{"className":"$undefined","style":{"color":"#d36363"},"children":["'default"]}] 63:["$","span","code-segement80",{"className":"$undefined","style":{},"children":["', "]}] 64:["$","span","code-segement81",{"className":"$undefined","style":{"color":"#d36363"},"children":["'finish_reason"]}] 65:["$","span","code-segement82",{"className":"$undefined","style":{"color":"#d36363"},"children":["':"]}] 66:["$","span","code-segement83",{"className":"$undefined","style":{},"children":[" "]}] 67:["$","span","code-segement84",{"className":"$undefined","style":{"color":"#d36363"},"children":["'stop"]}] 68:["$","span","code-segement85",{"className":"$undefined","style":{},"children":["', "]}] 69:["$","span","code-segement86",{"className":"$undefined","style":{"color":"#d36363"},"children":["'logprobs"]}] 6a:["$","span","code-segement87",{"className":"$undefined","style":{"color":"#d36363"},"children":["':"]}] 6b:["$","span","code-segement88",{"className":"$undefined","style":{},"children":[" None} id="]}] 6c:["$","span","code-segement89",{"className":"$undefined","style":{"color":"#d36363"},"children":["'run--d50c1310-ad44-4f41-b98f-6b52c5d17fb5-0"]}] 6d:["$","span","code-segement90",{"className":"$undefined","style":{},"children":["' usage_metadata={"]}] 6e:["$","span","code-segement91",{"className":"$undefined","style":{"color":"#d36363"},"children":["'input_tokens"]}] 6f:["$","span","code-segement92",{"className":"$undefined","style":{"color":"#d36363"},"children":["':"]}] 70:["$","span","code-segement93",{"className":"$undefined","style":{},"children":[" "]}] 71:["$","span","code-segement94",{"className":"$undefined","style":{"color":"#d36363"},"children":["25"]}] 72:["$","span","code-segement95",{"className":"$undefined","style":{},"children":[", "]}] 73:["$","span","code-segement96",{"className":"$undefined","style":{"color":"#d36363"},"children":["'output_tokens"]}] 74:["$","span","code-segement97",{"className":"$undefined","style":{"color":"#d36363"},"children":["':"]}] 75:["$","span","code-segement98",{"className":"$undefined","style":{},"children":[" "]}] 76:["$","span","code-segement99",{"className":"$undefined","style":{"color":"#d36363"},"children":["6"]}] 77:["$","span","code-segement100",{"className":"$undefined","style":{},"children":[", "]}] 78:["$","span","code-segement101",{"className":"$undefined","style":{"color":"#d36363"},"children":["'total_tokens"]}] 79:["$","span","code-segement102",{"className":"$undefined","style":{"color":"#d36363"},"children":["':"]}] 7a:["$","span","code-segement103",{"className":"$undefined","style":{},"children":[" "]}] 7b:["$","span","code-segement104",{"className":"$undefined","style":{"color":"#d36363"},"children":["31"]}] 7c:["$","span","code-segement105",{"className":"$undefined","style":{},"children":[", "]}] 7d:["$","span","code-segement106",{"className":"$undefined","style":{"color":"#d36363"},"children":["'input_token_details"]}] 7e:["$","span","code-segement107",{"className":"$undefined","style":{"color":"#d36363"},"children":["':"]}] 7f:["$","span","code-segement108",{"className":"$undefined","style":{},"children":[" {"]}] 80:["$","span","code-segement109",{"className":"$undefined","style":{"color":"#d36363"},"children":["'audio"]}] 81:["$","span","code-segement110",{"className":"$undefined","style":{"color":"#d36363"},"children":["':"]}] 82:["$","span","code-segement111",{"className":"$undefined","style":{},"children":[" "]}] 83:["$","span","code-segement112",{"className":"$undefined","style":{"color":"#d36363"},"children":["0"]}] 84:["$","span","code-segement113",{"className":"$undefined","style":{},"children":[", "]}] 85:["$","span","code-segement114",{"className":"$undefined","style":{"color":"#d36363"},"children":["'cache_read"]}] 86:["$","span","code-segement115",{"className":"$undefined","style":{"color":"#d36363"},"children":["':"]}] 87:["$","span","code-segement116",{"className":"$undefined","style":{},"children":[" "]}] 88:["$","span","code-segement117",{"className":"$undefined","style":{"color":"#d36363"},"children":["0"]}] 89:["$","span","code-segement118",{"className":"$undefined","style":{},"children":["}, "]}] 8a:["$","span","code-segement119",{"className":"$undefined","style":{"color":"#d36363"},"children":["'output_token_details"]}] 8b:["$","span","code-segement120",{"className":"$undefined","style":{"color":"#d36363"},"children":["':"]}] 8c:["$","span","code-segement121",{"className":"$undefined","style":{},"children":[" {"]}] 8d:["$","span","code-segement122",{"className":"$undefined","style":{"color":"#d36363"},"children":["'audio"]}] 8e:["$","span","code-segement123",{"className":"$undefined","style":{"color":"#d36363"},"children":["':"]}] 8f:["$","span","code-segement124",{"className":"$undefined","style":{},"children":[" "]}] 90:["$","span","code-segement125",{"className":"$undefined","style":{"color":"#d36363"},"children":["0"]}] 91:["$","span","code-segement126",{"className":"$undefined","style":{},"children":[", "]}] 92:["$","span","code-segement127",{"className":"$undefined","style":{"color":"#d36363"},"children":["'reasoning"]}] 93:["$","span","code-segement128",{"className":"$undefined","style":{"color":"#d36363"},"children":["':"]}] 94:["$","span","code-segement129",{"className":"$undefined","style":{},"children":[" \r\n"]}] 95:["$","span","code-segement130",{"className":"$undefined","style":{},"children":[""]}] 96:["$","span","code-segement131",{"className":"$undefined","style":{"color":"#d36363"},"children":["0"]}] 97:["$","span","code-segement132",{"className":"$undefined","style":{},"children":["}}"]}] 98:["$","span","code-segement51",{"className":"$undefined","style":{"color":"#fcc28c"},"children":["friend"]}] 99:["$","span","code-segement52",{"className":"$undefined","style":{},"children":[", announcing arrival):** \r\n"]}] 9a:["$","span","code-segement54",{"className":"$undefined","style":{},"children":[" * "]}] 9b:["$","span","code-segement55",{"className":"$undefined","style":{"color":"#a2fca2"},"children":["\"おーい\""]}] 9c:["$","span","code-segement56",{"className":"$undefined","style":{},"children":[" (Ooii) "]}] 9d:["$","span","code-segement57",{"className":"$undefined","style":{"color":"#ffa"},"children":["is"]}] 9e:["$","span","code-segement58",{"className":"$undefined","style":{},"children":[" a more robust way "]}] 9f:["$","span","code-segement59",{"className":"$undefined","style":{"color":"#fcc28c"},"children":["to"]}] a0:["$","span","code-segement60",{"className":"$undefined","style":{},"children":[" "]}] a1:["$","span","code-segement61",{"className":"$undefined","style":{"color":"#fcc28c"},"children":["get"]}] a2:["$","span","code-segement62",{"className":"$undefined","style":{},"children":[" someone"]}] a3:["$","span","code-segement63",{"className":"$undefined","style":{"color":"#888"},"children":["'s attention, like \"Hey!\" or \"Yoo-hoo!\"."]}] a4:["$","span","code-segement64",{"className":"$undefined","style":{},"children":["\r\n"]}] a5:["$","span","code-segement65",{"className":"$undefined","style":{},"children":[" * "]}] a6:["$","span","code-segement66",{"className":"$undefined","style":{"color":"#a2fca2"},"children":["\"俺だよ\""]}] a7:["$","span","code-segement67",{"className":"$undefined","style":{},"children":[" (ore da yo) means "]}] a8:["$","span","code-segement68",{"className":"$undefined","style":{"color":"#a2fca2"},"children":["\"It's me!\""]}] a9:["$","span","code-segement69",{"className":"$undefined","style":{},"children":[" (ore "]}] aa:["$","span","code-segement70",{"className":"$undefined","style":{"color":"#ffa"},"children":["is"]}] ab:["$","span","code-segement71",{"className":"$undefined","style":{},"children":[" a casual, masculine pronoun).\r\n"]}] ac:["$","span","code-segement73",{"className":"$undefined","style":{},"children":[""]}] ad:["$","span","code-segement74",{"className":"$undefined","style":{"color":"#d36363"},"children":["3"]}] ae:["$","span","code-segement75",{"className":"$undefined","style":{},"children":[". **Very casual greeting (e.g., seeing a "]}] af:["$","span","code-segement76",{"className":"$undefined","style":{"color":"#fcc28c"},"children":["friend"]}] b0:["$","span","code-segement77",{"className":"$undefined","style":{},"children":[" "]}] b1:["$","span","code-segement78",{"className":"$undefined","style":{"color":"#fcc28c"},"children":["from"]}] b2:["$","span","code-segement79",{"className":"$undefined","style":{},"children":[" a distance):**\r\n"]}] b3:["$","span","code-segement82",{"className":"$undefined","style":{},"children":[" * "]}] b4:["$","span","code-segement83",{"className":"$undefined","style":{"color":"#a2fca2"},"children":["\"やあ\""]}] b5:["$","span","code-segement84",{"className":"$undefined","style":{},"children":[" (Yaa) "]}] b6:["$","span","code-segement85",{"className":"$undefined","style":{"color":"#ffa"},"children":["is"]}] b7:["$","span","code-segement86",{"className":"$undefined","style":{},"children":[" a very casual "]}] b8:["$","span","code-segement87",{"className":"$undefined","style":{"color":"#a2fca2"},"children":["\"Hi\""]}] b9:["$","span","code-segement88",{"className":"$undefined","style":{},"children":[" "]}] ba:["$","span","code-segement89",{"className":"$undefined","style":{"color":"#ffa"},"children":["or"]}] bb:["$","span","code-segement90",{"className":"$undefined","style":{},"children":[" "]}] bc:["$","span","code-segement91",{"className":"$undefined","style":{"color":"#a2fca2"},"children":["\"Hey\""]}] bd:["$","span","code-segement92",{"className":"$undefined","style":{},"children":[".\r\n"]}] be:["$","span","code-segement94",{"className":"$undefined","style":{},"children":["Choose the one that best fits the specific situation "]}] bf:["$","span","code-segement95",{"className":"$undefined","style":{"color":"#ffa"},"children":["and"]}] c0:["$","span","code-segement96",{"className":"$undefined","style":{},"children":[" the speaker"]}] c1:["$","span","code-segement97",{"className":"$undefined","style":{"color":"#888"},"children":["'s gender. The first two options are very common for announcing one's presence."]}] b:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]] 7:null c2:I[8723,[],"IconMark"] 9:{"metadata":[["$","title","0",{"children":"LangChainを使ってみた!"}],["$","meta","1",{"name":"description","content":"Generated by Next.js"}],["$","link","2",{"rel":"icon","href":"/icon.png?6322cf53d61108b8","type":"image/png","sizes":"256x256"}],["$","$Lc2","3",{}]],"error":null,"digest":"$undefined"} e:"$9:metadata"