1:"$Sreact.fragment" 2:I[31,[],""] 3:I[3331,[],""] 5:I[6045,[],"OutletBoundary"] 7:I[923,[],"AsyncMetadataOutlet"] 9:I[6045,[],"ViewportBoundary"] b:I[6045,[],"MetadataBoundary"] c:"$Sreact.suspense" e:I[4293,[],""] :HL["/_next/static/css/2361be48fe3f9cd5.css","style"] 0:{"P":null,"b":"m5tNwFFaXp3ebnJp_wTaz","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/2361be48fe3f9cd5.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"}]}]}]]}],{"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":["$L4",null,["$","$L5",null,{"children":["$L6",["$","$L7",null,{"promise":"$@8"}]]}]]}],{},null,false]},null,false]},null,false]},null,false],["$","$1","h",{"children":[null,[["$","$L9",null,{"children":"$La"}],null],["$","$Lb",null,{"children":["$","div",null,{"hidden":true,"children":["$","$c",null,{"fallback":null,"children":"$Ld"}]}]}]]}],false]],"m":"$undefined","G":["$e",[]],"s":false,"S":true} f:I[4742,["742","static/chunks/742-371c6136941b441c.js","953","static/chunks/app/blog/%5Bslug%5D/page-597c8504c0e17404.js"],""] 4:["$","div",null,{"className":"text-black bg-zinc-200","children":[["$","div",null,{"className":"pt-2 pb-2 pl-3 pr-3 ","children":["$","$Lf",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 rounded-xl border py-6 shadow-sm text-black bg-zinc-100 border-none","children":[["$","div",null,{"data-slot":"card-header","className":"@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-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":["$L10","AI"]}]]}]}],"$L11","$L12"]}]]}],"$L13"]}] 10:["$","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"]}] 11:["$","div",null,{"data-slot":"card-content","className":"px-6","children":["$","div",null,{"className":"pl-2 pr-2","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","$L14","\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"]}]}] 12:["$","div",null,{"data-slot":"card-footer","className":"flex items-center px-6 [.border-t]:pt-6"}] 13:["$","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."}]]}]}]}] 14:["$","h4",null,{"className":"text-base font-bold pt-2 pb-1","children":"requirements.txt"}] 15:["$","div",null,{"className":"p-1","children":"インストールしたライブラリは以下の二つである。"}] 16:["$","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]"}]," にしている。"]}] 17:["$","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を選ぶにしても共通して使用される。"]}] 18:["$","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"]}]]]}]}]}]}] 19:["$","div",null,{"className":"p-1","children":"二つ目のライブラリに関しては使用するLLMによってインストールするライブラリが異なる。"}] 1a:["$","div",null,{"className":"p-1","children":"例として、"}] 1b:["$","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"]}] 1c:["$","div",null,{"className":"p-1","children":"をインストールする必要がある。"}] 1d:["$","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を使用する場合"}]}] 1e:["$","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]"]}]]]}]}]}]}] 1f:["$","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を使用する場合"}]}] 20:["$","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]"]}]]]}]}]}]}] 21:["$","h4",null,{"className":"text-base font-bold pt-2 pb-1","children":"main.py"}] 22:["$","div",null,{"className":"p-1","children":"Pythonの実行ファイルは以下の通りである。"}] 23:["$","div",null,{"className":"p-1","children":"ほとんどは公式サイトに載せられているままではあるが、\r\nファイルの全体像は以下のようになっている。"}] 24:["$","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"]}],"$L2f","$L30","$L31","$L32","$L33","$L34","$L35","$L36","$L37","$L38","$L39","$L3a","$L3b","$L3c","$L3d","$L3e","$L3f","$L40","$L41","$L42"]]}]}]}]}] 25:["$","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. モデルの選択"]}]]]}]}]}],"の部分を以下のように変える。"]}] 26:["$","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":[")"]}]]]}]}]}]}] 27:["$","h3",null,{"className":"text-lg font-bold pt-2 pb-2","children":"実行結果"}] 28:["$","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"}]}] 29:["$","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":["':"]}],"$L43","$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"]]}]}]}]}] 2a:["$","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"}]}] 2b:["$","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 "]}],"$L97","$L98"," * **おーい、俺だよ!** (Ooii, ore da yo!)\r\n","$L99","$L9a","$L9b","$L9c","$L9d","$L9e","$L9f","$La0","$La1","$La2","$La3","$La4","$La5","$La6","$La7","$La8","$La9","$Laa","\r\n","$Lab","$Lac","$Lad","$Lae","$Laf","$Lb0","$Lb1"," * **やあ!私だよ!** (Yaa! Watashi da yo!) - General/Female\r\n"," * **やあ!俺だよ!** (Yaa! Ore da yo!) - Male\r\n","$Lb2","$Lb3","$Lb4","$Lb5","$Lb6","$Lb7","$Lb8","$Lb9","$Lba","$Lbb","$Lbc","\r\n","$Lbd","$Lbe","$Lbf","$Lc0"]]}]}]}]}] 2c:["$","h2",null,{"className":"text-xl font-bold pt-3 pb-3","children":"まとめ"}] 2d:["$","div",null,{"className":"p-1","children":"これまでOpenAIやGeminiのライブラリを使った開発などを行ってきたが、\r\nLangChainを使う事によりLLMの切り替えがとても簡単であった。"}] 2e:["$","div",null,{"className":"p-1","children":"APIを使う際には有料になる事が多いLLMであるが、\r\n用途に合わせて切り替える事でコスト削減を見込める。\r\nこれは予算が限られている個人開発ではとても魅力的である。"}] 2f:["$","span","code-segement51",{"className":"hljs-function","style":{},"children":["("]}] 30:["$","span","code-segement52",{"className":"hljs-function","style":{"color":"#a2fca2"},"children":["\"Hi, there! It's me!\""]}] 31:["$","span","code-segement53",{"className":"hljs-function","style":{},"children":["),\r\n"]}] 32:["$","span","code-segement54",{"className":"hljs-function","style":{},"children":["]\r\n"]}] 33:["$","span","code-segement55",{"className":"hljs-function","style":{},"children":["\r\n"]}] 34:["$","span","code-segement56",{"className":"hljs-function","style":{},"children":[""]}] 35:["$","span","code-segement57",{"className":"hljs-function hljs-class","style":{"color":"#ade5fc"},"children":["result"]}] 36:["$","span","code-segement58",{"className":"hljs-function","style":{},"children":[" = "]}] 37:["$","span","code-segement59",{"className":"hljs-function","style":{"color":"#ade5fc"},"children":["model.invoke"]}] 38:["$","span","code-segement60",{"className":"hljs-function","style":{},"children":["("]}] 39:["$","span","code-segement61",{"className":"hljs-function","style":{"color":"#ade5fc"},"children":["messages"]}] 3a:["$","span","code-segement62",{"className":"hljs-function","style":{},"children":[")"]}] 3b:["$","span","code-segement63",{"className":"$undefined","style":{},"children":["\r\n"]}] 3c:["$","span","code-segement64",{"className":"$undefined","style":{},"children":[""]}] 3d:["$","span","code-segement65",{"className":"hljs-function","style":{"color":"#ffa"},"children":["print"]}] 3e:["$","span","code-segement66",{"className":"hljs-function","style":{},"children":["("]}] 3f:["$","span","code-segement67",{"className":"hljs-function","style":{"color":"#a2fca2"},"children":["'result:'"]}] 40:["$","span","code-segement68",{"className":"hljs-function","style":{},"children":[", "]}] 41:["$","span","code-segement69",{"className":"hljs-function hljs-class","style":{"color":"#ade5fc"},"children":["result"]}] 42:["$","span","code-segement70",{"className":"hljs-function","style":{},"children":[")"]}] 43:["$","span","code-segement49",{"className":"$undefined","style":{},"children":[" {"]}] 44:["$","span","code-segement50",{"className":"$undefined","style":{"color":"#d36363"},"children":["'audio_tokens"]}] 45:["$","span","code-segement51",{"className":"$undefined","style":{"color":"#d36363"},"children":["':"]}] 46:["$","span","code-segement52",{"className":"$undefined","style":{},"children":[" "]}] 47:["$","span","code-segement53",{"className":"$undefined","style":{"color":"#d36363"},"children":["0"]}] 48:["$","span","code-segement54",{"className":"$undefined","style":{},"children":[", "]}] 49:["$","span","code-segement55",{"className":"$undefined","style":{"color":"#d36363"},"children":["'cached_tokens"]}] 4a:["$","span","code-segement56",{"className":"$undefined","style":{"color":"#d36363"},"children":["':"]}] 4b:["$","span","code-segement57",{"className":"$undefined","style":{},"children":[" "]}] 4c:["$","span","code-segement58",{"className":"$undefined","style":{"color":"#d36363"},"children":["0"]}] 4d:["$","span","code-segement59",{"className":"$undefined","style":{},"children":["}}, "]}] 4e:["$","span","code-segement60",{"className":"$undefined","style":{"color":"#d36363"},"children":["'model_name"]}] 4f:["$","span","code-segement61",{"className":"$undefined","style":{"color":"#d36363"},"children":["':"]}] 50:["$","span","code-segement62",{"className":"$undefined","style":{},"children":[" "]}] 51:["$","span","code-segement63",{"className":"$undefined","style":{"color":"#d36363"},"children":["'gpt-4o-mini-2024-07-18"]}] 52:["$","span","code-segement64",{"className":"$undefined","style":{},"children":["', "]}] 53:["$","span","code-segement65",{"className":"$undefined","style":{"color":"#d36363"},"children":["'system_fingerprint"]}] 54:["$","span","code-segement66",{"className":"$undefined","style":{"color":"#d36363"},"children":["':"]}] 55:["$","span","code-segement67",{"className":"$undefined","style":{},"children":[" \r\n"]}] 56:["$","span","code-segement68",{"className":"$undefined","style":{},"children":[""]}] 57:["$","span","code-segement69",{"className":"$undefined","style":{"color":"#d36363"},"children":["'fp_34a54ae93c"]}] 58:["$","span","code-segement70",{"className":"$undefined","style":{},"children":["', "]}] 59:["$","span","code-segement71",{"className":"$undefined","style":{"color":"#d36363"},"children":["'id"]}] 5a:["$","span","code-segement72",{"className":"$undefined","style":{"color":"#d36363"},"children":["':"]}] 5b:["$","span","code-segement73",{"className":"$undefined","style":{},"children":[" "]}] 5c:["$","span","code-segement74",{"className":"$undefined","style":{"color":"#d36363"},"children":["'chatcmpl-BywqXDZ04b98W9TAvfF2zMqjR8Ef5"]}] 5d:["$","span","code-segement75",{"className":"$undefined","style":{},"children":["', "]}] 5e:["$","span","code-segement76",{"className":"$undefined","style":{"color":"#d36363"},"children":["'service_tier"]}] 5f:["$","span","code-segement77",{"className":"$undefined","style":{"color":"#d36363"},"children":["':"]}] 60:["$","span","code-segement78",{"className":"$undefined","style":{},"children":[" "]}] 61:["$","span","code-segement79",{"className":"$undefined","style":{"color":"#d36363"},"children":["'default"]}] 62:["$","span","code-segement80",{"className":"$undefined","style":{},"children":["', "]}] 63:["$","span","code-segement81",{"className":"$undefined","style":{"color":"#d36363"},"children":["'finish_reason"]}] 64:["$","span","code-segement82",{"className":"$undefined","style":{"color":"#d36363"},"children":["':"]}] 65:["$","span","code-segement83",{"className":"$undefined","style":{},"children":[" "]}] 66:["$","span","code-segement84",{"className":"$undefined","style":{"color":"#d36363"},"children":["'stop"]}] 67:["$","span","code-segement85",{"className":"$undefined","style":{},"children":["', "]}] 68:["$","span","code-segement86",{"className":"$undefined","style":{"color":"#d36363"},"children":["'logprobs"]}] 69:["$","span","code-segement87",{"className":"$undefined","style":{"color":"#d36363"},"children":["':"]}] 6a:["$","span","code-segement88",{"className":"$undefined","style":{},"children":[" None} id="]}] 6b:["$","span","code-segement89",{"className":"$undefined","style":{"color":"#d36363"},"children":["'run--d50c1310-ad44-4f41-b98f-6b52c5d17fb5-0"]}] 6c:["$","span","code-segement90",{"className":"$undefined","style":{},"children":["' usage_metadata={"]}] 6d:["$","span","code-segement91",{"className":"$undefined","style":{"color":"#d36363"},"children":["'input_tokens"]}] 6e:["$","span","code-segement92",{"className":"$undefined","style":{"color":"#d36363"},"children":["':"]}] 6f:["$","span","code-segement93",{"className":"$undefined","style":{},"children":[" "]}] 70:["$","span","code-segement94",{"className":"$undefined","style":{"color":"#d36363"},"children":["25"]}] 71:["$","span","code-segement95",{"className":"$undefined","style":{},"children":[", "]}] 72:["$","span","code-segement96",{"className":"$undefined","style":{"color":"#d36363"},"children":["'output_tokens"]}] 73:["$","span","code-segement97",{"className":"$undefined","style":{"color":"#d36363"},"children":["':"]}] 74:["$","span","code-segement98",{"className":"$undefined","style":{},"children":[" "]}] 75:["$","span","code-segement99",{"className":"$undefined","style":{"color":"#d36363"},"children":["6"]}] 76:["$","span","code-segement100",{"className":"$undefined","style":{},"children":[", "]}] 77:["$","span","code-segement101",{"className":"$undefined","style":{"color":"#d36363"},"children":["'total_tokens"]}] 78:["$","span","code-segement102",{"className":"$undefined","style":{"color":"#d36363"},"children":["':"]}] 79:["$","span","code-segement103",{"className":"$undefined","style":{},"children":[" "]}] 7a:["$","span","code-segement104",{"className":"$undefined","style":{"color":"#d36363"},"children":["31"]}] 7b:["$","span","code-segement105",{"className":"$undefined","style":{},"children":[", "]}] 7c:["$","span","code-segement106",{"className":"$undefined","style":{"color":"#d36363"},"children":["'input_token_details"]}] 7d:["$","span","code-segement107",{"className":"$undefined","style":{"color":"#d36363"},"children":["':"]}] 7e:["$","span","code-segement108",{"className":"$undefined","style":{},"children":[" {"]}] 7f:["$","span","code-segement109",{"className":"$undefined","style":{"color":"#d36363"},"children":["'audio"]}] 80:["$","span","code-segement110",{"className":"$undefined","style":{"color":"#d36363"},"children":["':"]}] 81:["$","span","code-segement111",{"className":"$undefined","style":{},"children":[" "]}] 82:["$","span","code-segement112",{"className":"$undefined","style":{"color":"#d36363"},"children":["0"]}] 83:["$","span","code-segement113",{"className":"$undefined","style":{},"children":[", "]}] 84:["$","span","code-segement114",{"className":"$undefined","style":{"color":"#d36363"},"children":["'cache_read"]}] 85:["$","span","code-segement115",{"className":"$undefined","style":{"color":"#d36363"},"children":["':"]}] 86:["$","span","code-segement116",{"className":"$undefined","style":{},"children":[" "]}] 87:["$","span","code-segement117",{"className":"$undefined","style":{"color":"#d36363"},"children":["0"]}] 88:["$","span","code-segement118",{"className":"$undefined","style":{},"children":["}, "]}] 89:["$","span","code-segement119",{"className":"$undefined","style":{"color":"#d36363"},"children":["'output_token_details"]}] 8a:["$","span","code-segement120",{"className":"$undefined","style":{"color":"#d36363"},"children":["':"]}] 8b:["$","span","code-segement121",{"className":"$undefined","style":{},"children":[" {"]}] 8c:["$","span","code-segement122",{"className":"$undefined","style":{"color":"#d36363"},"children":["'audio"]}] 8d:["$","span","code-segement123",{"className":"$undefined","style":{"color":"#d36363"},"children":["':"]}] 8e:["$","span","code-segement124",{"className":"$undefined","style":{},"children":[" "]}] 8f:["$","span","code-segement125",{"className":"$undefined","style":{"color":"#d36363"},"children":["0"]}] 90:["$","span","code-segement126",{"className":"$undefined","style":{},"children":[", "]}] 91:["$","span","code-segement127",{"className":"$undefined","style":{"color":"#d36363"},"children":["'reasoning"]}] 92:["$","span","code-segement128",{"className":"$undefined","style":{"color":"#d36363"},"children":["':"]}] 93:["$","span","code-segement129",{"className":"$undefined","style":{},"children":[" \r\n"]}] 94:["$","span","code-segement130",{"className":"$undefined","style":{},"children":[""]}] 95:["$","span","code-segement131",{"className":"$undefined","style":{"color":"#d36363"},"children":["0"]}] 96:["$","span","code-segement132",{"className":"$undefined","style":{},"children":["}}"]}] 97:["$","span","code-segement51",{"className":"$undefined","style":{"color":"#fcc28c"},"children":["friend"]}] 98:["$","span","code-segement52",{"className":"$undefined","style":{},"children":[", announcing arrival):** \r\n"]}] 99:["$","span","code-segement54",{"className":"$undefined","style":{},"children":[" * "]}] 9a:["$","span","code-segement55",{"className":"$undefined","style":{"color":"#a2fca2"},"children":["\"おーい\""]}] 9b:["$","span","code-segement56",{"className":"$undefined","style":{},"children":[" (Ooii) "]}] 9c:["$","span","code-segement57",{"className":"$undefined","style":{"color":"#ffa"},"children":["is"]}] 9d:["$","span","code-segement58",{"className":"$undefined","style":{},"children":[" a more robust way "]}] 9e:["$","span","code-segement59",{"className":"$undefined","style":{"color":"#fcc28c"},"children":["to"]}] 9f:["$","span","code-segement60",{"className":"$undefined","style":{},"children":[" "]}] a0:["$","span","code-segement61",{"className":"$undefined","style":{"color":"#fcc28c"},"children":["get"]}] a1:["$","span","code-segement62",{"className":"$undefined","style":{},"children":[" someone"]}] a2:["$","span","code-segement63",{"className":"$undefined","style":{"color":"#888"},"children":["'s attention, like \"Hey!\" or \"Yoo-hoo!\"."]}] a3:["$","span","code-segement64",{"className":"$undefined","style":{},"children":["\r\n"]}] a4:["$","span","code-segement65",{"className":"$undefined","style":{},"children":[" * "]}] a5:["$","span","code-segement66",{"className":"$undefined","style":{"color":"#a2fca2"},"children":["\"俺だよ\""]}] a6:["$","span","code-segement67",{"className":"$undefined","style":{},"children":[" (ore da yo) means "]}] a7:["$","span","code-segement68",{"className":"$undefined","style":{"color":"#a2fca2"},"children":["\"It's me!\""]}] a8:["$","span","code-segement69",{"className":"$undefined","style":{},"children":[" (ore "]}] a9:["$","span","code-segement70",{"className":"$undefined","style":{"color":"#ffa"},"children":["is"]}] aa:["$","span","code-segement71",{"className":"$undefined","style":{},"children":[" a casual, masculine pronoun).\r\n"]}] ab:["$","span","code-segement73",{"className":"$undefined","style":{},"children":[""]}] ac:["$","span","code-segement74",{"className":"$undefined","style":{"color":"#d36363"},"children":["3"]}] ad:["$","span","code-segement75",{"className":"$undefined","style":{},"children":[". **Very casual greeting (e.g., seeing a "]}] ae:["$","span","code-segement76",{"className":"$undefined","style":{"color":"#fcc28c"},"children":["friend"]}] af:["$","span","code-segement77",{"className":"$undefined","style":{},"children":[" "]}] b0:["$","span","code-segement78",{"className":"$undefined","style":{"color":"#fcc28c"},"children":["from"]}] b1:["$","span","code-segement79",{"className":"$undefined","style":{},"children":[" a distance):**\r\n"]}] b2:["$","span","code-segement82",{"className":"$undefined","style":{},"children":[" * "]}] b3:["$","span","code-segement83",{"className":"$undefined","style":{"color":"#a2fca2"},"children":["\"やあ\""]}] b4:["$","span","code-segement84",{"className":"$undefined","style":{},"children":[" (Yaa) "]}] b5:["$","span","code-segement85",{"className":"$undefined","style":{"color":"#ffa"},"children":["is"]}] b6:["$","span","code-segement86",{"className":"$undefined","style":{},"children":[" a very casual "]}] b7:["$","span","code-segement87",{"className":"$undefined","style":{"color":"#a2fca2"},"children":["\"Hi\""]}] b8:["$","span","code-segement88",{"className":"$undefined","style":{},"children":[" "]}] b9:["$","span","code-segement89",{"className":"$undefined","style":{"color":"#ffa"},"children":["or"]}] ba:["$","span","code-segement90",{"className":"$undefined","style":{},"children":[" "]}] bb:["$","span","code-segement91",{"className":"$undefined","style":{"color":"#a2fca2"},"children":["\"Hey\""]}] bc:["$","span","code-segement92",{"className":"$undefined","style":{},"children":[".\r\n"]}] bd:["$","span","code-segement94",{"className":"$undefined","style":{},"children":["Choose the one that best fits the specific situation "]}] be:["$","span","code-segement95",{"className":"$undefined","style":{"color":"#ffa"},"children":["and"]}] bf:["$","span","code-segement96",{"className":"$undefined","style":{},"children":[" the speaker"]}] c0:["$","span","code-segement97",{"className":"$undefined","style":{"color":"#888"},"children":["'s gender. The first two options are very common for announcing one's presence."]}] a:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]] 6:null c1:I[8723,[],"IconMark"] 8:{"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"}],["$","$Lc1","3",{}]],"error":null,"digest":"$undefined"} d:"$8:metadata"