{"id":75504,"date":"2024-10-07T13:40:00","date_gmt":"2024-10-07T04:40:00","guid":{"rendered":"https:\/\/www.creationline.com\/tech-blog\/?p=75504"},"modified":"2024-10-07T12:32:26","modified_gmt":"2024-10-07T03:32:26","slug":"langgraph%e3%82%92llm%e3%81%aa%e3%81%97%e3%81%a7%e3%81%a1%e3%82%87%e3%81%a3%e3%81%a8%e8%a7%a6%e3%81%a3%e3%81%a6%e3%81%bf%e3%82%88%e3%81%86-langgraph-langchain-ai-llm-python","status":"publish","type":"post","link":"https:\/\/www.creationline.com\/tech-blog\/author\/higuchi\/75504","title":{"rendered":"LangGraph\u3092LLM\u306a\u3057\u3067\u3061\u3087\u3063\u3068\u89e6\u3063\u3066\u307f\u3088\u3046 #langgraph #langchain #ai #llm #python"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">\u306f\u3058\u3081\u306b<\/h2>\n\n\n\n<p><a href=\"https:\/\/langchain-ai.github.io\/langgraph\/\" target=\"_blank\" rel=\"noreferrer noopener\">LangGraph<\/a>\u3068\u306f\u3001LLM (Lagre Language Models; \u5927\u898f\u6a21\u8a00\u8a9e\u30e2\u30c7\u30eb)\u3092\u4f7f\u7528\u3057\u305f\u3001\u30b9\u30c6\u30fc\u30c8\u30d5\u30eb\u306a\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u3084\u30ef\u30fc\u30af\u30d5\u30ed\u30fc\u3092\u4f5c\u6210\u3059\u308b\u305f\u3081\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u3067\u3059\u3002LLM\u3092\u4f7f\u7528\u3057\u305f\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u958b\u767a\u3059\u308b\u305f\u3081\u306e\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u3067\u3042\u308b<a href=\"https:\/\/www.langchain.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">LangChain<\/a>\u306e\u5144\u5f1f\u3068\u3044\u3063\u305f\u611f\u3058\u3067\u3059\u3002<\/p>\n\n\n\n<p>LangGraph\u3092\u4f7f\u3046\u3068\u3086\u304f\u3086\u304f\u306fAI\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u306a\u3069\u3092\u5bb9\u6613\u306b\u4f5c\u308c\u305d\u3046\u306a\u306e\u3067\u3001\u307e\u305a\u53d6\u3063\u639b\u304b\u308a\u3068\u3057\u3066LangGraph\u305d\u306e\u3082\u306e\u304c\u3069\u3046\u3044\u3046\u3082\u306e\u306a\u306e\u304b\u3001\u3068<a href=\"https:\/\/langchain-ai.github.io\/langgraph\/#example\" target=\"_blank\" rel=\"noreferrer noopener\">Example<\/a>\u3084<a href=\"https:\/\/langchain-ai.github.io\/langgraph\/tutorials\/\" target=\"_blank\" rel=\"noreferrer noopener\">Tutorials<\/a>\u3092\u958b\u3044\u3066\u307f\u307e\u3059\u3002\u3059\u308b\u3068\u6700\u521d\u304b\u3089LLM\u95a2\u9023\u30b3\u30fc\u30c9\u304c\u5165\u3063\u3066\u3044\u308b\u306e\u3067\u3001LangGraph\u305d\u306e\u3082\u306e\u3092\u77e5\u308a\u305f\u3044\u3068\u3044\u3046\u5411\u304d\u306b\u306f\u5c11\u3057\u3057\u3093\u3069\u3044\u306a\u3068\u611f\u3058\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<p>\u305d\u3053\u3067LLM\u95a2\u9023\u30b3\u30fc\u30c9\u3092\u307e\u3063\u305f\u304f\u66f8\u304b\u305a\u3001LangGraph\u305d\u306e\u3082\u306e\u306e\u52d5\u304d\u3092\u898b\u308b\u305f\u3081\u306e\u30b3\u30fc\u30c9\u3092\u8abf\u3079\u306a\u304c\u3089\u66f8\u3044\u3066\u307f\u305f\u306e\u3067\u672c\u7a3f\u3067\u3054\u7d39\u4ecb\u3057\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002LangGraph\u306e\u6587\u6cd5\u3084\u4ed5\u69d8\u306a\u3069\u306f\u8a73\u3057\u304f\u89e6\u308c\u307e\u305b\u3093\u3002\u305d\u308c\u3089\u306b\u95a2\u3057\u3066\u306f\u516c\u5f0f\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3082\u4f75\u305b\u3066\u3054\u89a7\u304f\u3060\u3055\u3044\u3002<\/p>\n\n\n\n<p>\u307e\u305f\u3001\u6b21\u306e\u8a18\u4e8b\u3092\u53c2\u8003\u306b\u3055\u305b\u3066\u3044\u305f\u3060\u304d\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/zenn.dev\/pharmax\/articles\/8796b892eed183\" target=\"_blank\" rel=\"noreferrer noopener\">LangGraph\u306e\u57fa\u672c\u7684\u306a\u4f7f\u3044\u65b9<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/zenn.dev\/pharmax\/articles\/148bc9497d68dd\" target=\"_blank\" rel=\"noreferrer noopener\">LangGraph\u3067\u30b0\u30e9\u30d5\u304b\u3089\u5225\u306e\u30b0\u30e9\u30d5\u3092\u547c\u3073\u51fa\u3059<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/zenn.dev\/pharmax\/articles\/78f2e6a51a459e\" target=\"_blank\" rel=\"noreferrer noopener\">LangGraph\u304a\u3051\u308bNode\u306e\u4e26\u5217\u5b9f\u884c\u306b\u3064\u3044\u3066<\/a><\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">\u300c\u30ce\u30fc\u30c9\u300d\u3068\u300c\u30a8\u30c3\u30b8\u300d<\/h2>\n\n\n\n<p>\u307e\u305a\u300c\u30b0\u30e9\u30d5\u300d\u3068\u3044\u3046\u6982\u5ff5\u306b\u304a\u3044\u3066\u3001\u70b9\u3067\u3042\u308b\u300c\u30ce\u30fc\u30c9\u300d\u3068\u7dda\u3067\u3042\u308b\u300c\u30a8\u30c3\u30b8\u300d\u3068\u3044\u3046\u69cb\u6210\u8981\u7d20\u3092\u62bc\u3055\u3048\u3066\u304a\u304f\u5fc5\u8981\u304c\u3042\u308a\u305d\u3046\u3067\u3059\u3002LangGraph\u306b\u304a\u3044\u3066\u3082\u3001\u51e6\u7406\u3092\u62c5\u5f53\u3059\u308b\u300c\u30ce\u30fc\u30c9\u300d\u3068\u51e6\u7406\u540c\u58eb\u3092\u63a5\u7d9a\u3059\u308b\u300c\u30a8\u30c3\u30b8\u300d\u3068\u3044\u3046\u3001\u6b21\u306e\u3088\u3046\u306a\u56f3\u306b\u306a\u308a\u305d\u3046\u3067\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"600\" height=\"234\" src=\"\/tech-blog\/cms_x3GWkuX\/wp-content\/uploads\/2024\/10\/langgraph-node-and-edge.png\" alt=\"\" class=\"wp-image-75505\" srcset=\"https:\/\/www.creationline.com\/tech-blog\/cms_x3GWkuX\/wp-content\/uploads\/2024\/10\/langgraph-node-and-edge.png 600w, https:\/\/www.creationline.com\/tech-blog\/cms_x3GWkuX\/wp-content\/uploads\/2024\/10\/langgraph-node-and-edge-360x140.png 360w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">\uff12\u3064\u306e\u30ce\u30fc\u30c9\u3092\u63a5\u7d9a\u3059\u308b<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>value<\/code> \u3092 <code>1<\/code> \u306b\u3059\u308b <code>node1<\/code><\/li>\n\n\n\n<li><code>value<\/code> \u3092 <code>2<\/code> \u306b\u3059\u308b <code>node2<\/code><\/li>\n<\/ul>\n\n\n\n<p>\u3068\uff12\u3064\u306e\u30ce\u30fc\u30c9\u304c\u3042\u308a\u3001<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u51e6\u7406\u306f <code>node1<\/code> \u304b\u3089 <code>node2<\/code> \u306b\u9032\u3080<\/li>\n<\/ul>\n\n\n\n<p>\u3068\u3044\u3046\u30a8\u30c3\u30b8\u3067\uff12\u3064\u306e\u30ce\u30fc\u30c9\u3092\u63a5\u7d9a\u3059\u308b\u3068\u3057\u307e\u3059\u3002\u307e\u305f\u3001<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>node1<\/code> \u304b\u3089\u59cb\u307e\u308b<\/li>\n\n\n\n<li><code>node2<\/code> \u3067\u7d42\u308f\u308b<\/li>\n<\/ul>\n\n\n\n<p>\u3068\u3044\u3046\u6d41\u308c\u3068\u3057\u307e\u3059\u3002\u3053\u3053\u3067 <code>value<\/code> \u306e\u521d\u671f\u5024\u3092 <code>0<\/code> \u3068\u3057\u3066\u958b\u59cb\u3059\u308bLangGraph\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u66f8\u3044\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">from typing_extensions import TypedDict\nfrom langgraph.graph import StateGraph\n\n# \u30b0\u30e9\u30d5\u5185\u3067\u53d7\u3051\u6e21\u3057\u3055\u308c\u308b\u30b9\u30c6\u30fc\u30c8\u30d5\u30eb\u306a\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u5ba3\u8a00\nclass State(TypedDict):\n    value: str\n\n# value \u3092 1 \u306b\u3059\u308b node1\ndef node1(state: State):\n    return {\"value\": \"1\"}\n\n# value \u3092 2 \u306b\u3059\u308b node2\ndef node2(state: State):\n    return {\"value\": \"2\"}\n\n# \u30b9\u30c6\u30fc\u30c8\u30d5\u30eb\u306a\u30b0\u30e9\u30d5\u306e\u521d\u671f\u5316\nworkflow = StateGraph(State)\n\n# \u30b0\u30e9\u30d5\u306b\u30ce\u30fc\u30c9\u3092\u8ffd\u52a0\nworkflow.add_node(\"node1\", node1)\nworkflow.add_node(\"node2\", node2)\n\n# \u30b0\u30e9\u30d5\u306b\u30a8\u30c3\u30b8\u3092\u8ffd\u52a0: \u51e6\u7406\u306f node1 \u304b\u3089 node2 \u306b\u9032\u3080\nworkflow.add_edge(\"node1\", \"node2\")\n\n# node1 \u304b\u3089\u59cb\u307e\u308b\nworkflow.set_entry_point(\"node1\")\n\n# node2 \u3067\u7d42\u308f\u308b\nworkflow.set_finish_point(\"node2\")\n\n# \u30b0\u30e9\u30d5\u3092\u30b3\u30f3\u30d1\u30a4\u30eb\napp = workflow.compile()\n\n# \u30b0\u30e9\u30d5\u3092\u30a2\u30b9\u30ad\u30fc\u30a2\u30fc\u30c8\u3067\u8868\u793a\napp.get_graph().print_ascii()\n\n# \u30b0\u30e9\u30d5\u3092\u5b9f\u884c\u3001\u5f15\u6570\u306f\u5024\u306e\u521d\u671f\u5024\nprint(app.invoke({\"value\": \"0\"}))<\/pre>\n\n\n\n<p>\u3053\u306e\u3088\u3046\u306a\u5f62\u306b\u306a\u308a\u307e\u3059\u3002 <code>add_node<\/code> \u3068 <code>add_edge<\/code> \u306e\u5b57\u9762\u304c\u4f3c\u3066\u3044\u308b\u306e\u3067\u4e26\u3093\u3067\u3044\u308b\u3068\u76ee\u304c\u6ed1\u308b\u306e\u3067\u3059\u304c\u2026\u3002\u30b3\u30e1\u30f3\u30c8\u3092\u5165\u308c\u305f\u308a\u3001LangGraph\u306e\u7406\u89e3\u304c\u9032\u3081\u3070\u898b\u5206\u3051\u304c\u3064\u304f\u3088\u3046\u306b\u306a\u3063\u3066\u304f\u308b\u304b\u306a\u3068\u601d\u3044\u307e\u3059\u3002\u307e\u305f\u3001LLM\u95a2\u4fc2\u306e\u30b3\u30fc\u30c9\u3092\u542b\u3081\u305a\u3001\u7d14\u7c8b\u306bLangGraph\u306e\u307f\u306e\u30b3\u30fc\u30c9\u306b\u306a\u3063\u3066\u3044\u308b\u306e\u3067\u3001\u307e\u3060\u4f55\u3092\u3084\u3063\u3066\u3044\u308b\u304b\u5206\u304b\u308a\u3084\u3059\u3044\u306f\u305a\u3067\u3059\u3002<\/p>\n\n\n\n<p>\u3053\u308c\u3092\u5b9f\u884c\u3059\u308b\u3068\u6b21\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">+-----------+\n| __start__ |\n+-----------+\n      *\n      *\n      *\n  +-------+\n  | node1 |\n  +-------+\n      *\n      *\n      *\n  +-------+\n  | node2 |\n  +-------+\n      *\n      *\n      *\n +---------+\n | __end__ |\n +---------+\n{'value': '2'}<\/pre>\n\n\n\n<p><code>value<\/code> \u304c <code>0<\/code> \u3067\u958b\u59cb\u3057\u3001 <code>2<\/code> \u3068\u306a\u3063\u3066\u7d42\u308f\u308a\u307e\u3057\u305f\u3002\u9014\u4e2d\u306e <code>1<\/code> \u3068\u306a\u3063\u3066\u3044\u308b\u3068\u3053\u308d\u304c\u898b\u3048\u307e\u305b\u3093\u304c\u3001\u30b9\u30af\u30ea\u30d7\u30c8\u306e\u6700\u7d42\u884c\u3092\u3001<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">print(app.invoke({\"value\": \"0\"} ,debug=True))<\/pre>\n\n\n\n<p>\u3068\u3059\u308b\u3053\u3068\u3067\u30c7\u30d0\u30c3\u30b0\u51fa\u529b\u304c\u6709\u52b9\u3068\u306a\u308a\u3001\u6b21\u306e\u3088\u3046\u306b\u9014\u4e2d\u7d4c\u904e\u3082\u308f\u304b\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">[-2:checkpoint] State at the end of step -2:\n{}\n[0:tasks] Starting step 0 with 1 task:\n- __start__ -> {'value': '0'}\n[0:writes] Finished step 0 with writes to 1 channel:\n- value -> '0'\n[-2:checkpoint] State at the end of step -2:\n{'value': '0'}\n[1:tasks] Starting step 1 with 1 task:\n- node1 -> {'value': '0'}\n[1:writes] Finished step 1 with writes to 1 channel:\n- value -> '1'\n[-2:checkpoint] State at the end of step -2:\n{'value': '1'}\n[2:tasks] Starting step 2 with 1 task:\n- node2 -> {'value': '1'}\n[2:writes] Finished step 2 with writes to 1 channel:\n- value -> '2'<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u30b0\u30e9\u30d5\u306e\u6761\u4ef6\u5206\u5c90<\/h2>\n\n\n\n<p>\u30b0\u30e9\u30d5\u306b\u6761\u4ef6\u5206\u5c90\u3092\u4f5c\u308a\u307e\u3059\u3002\u7279\u306b\u6ce8\u76ee\u3059\u308b\u3068\u3053\u308d\u3060\u3051\u306b\u30b3\u30e1\u30f3\u30c8\u3092\u3064\u3051\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">from typing import Literal\nfrom typing_extensions import TypedDict\nfrom langgraph.graph import StateGraph\nimport random\n\nclass State(TypedDict):\n    value: str\n\ndef start_node(state: State):\n    return {\"value\": \"start\"}\n\ndef east_node(state: State):\n    return {\"value\": \"east\"}\n\ndef west_node(state: State):\n    return {\"value\": \"west\"}\n\ndef end_node(state: State):\n    return {\"value\": state[\"value\"]}\n\nworkflow = StateGraph(State)\n\nworkflow.add_node(\"start_node\", start_node)\nworkflow.add_node(\"east_node\",  east_node)\nworkflow.add_node(\"west_node\",  west_node)\nworkflow.add_node(\"end_node\",   end_node)\n\nworkflow.set_entry_point(\"start_node\")\n\n# \u30e9\u30f3\u30c0\u30e0\u306b east_node \u304b west_node \u306b\u5206\u5c90\ndef routing(state: State) -> Literal[\"east_node\", \"west_node\"]:\n    if random.randint(0,1) == 0:\n       return \"east_node\"\n    else:\n       return \"west_node\"\n\n# \u30b0\u30e9\u30d5\u306b\u6761\u4ef6\u5206\u5c90\u30a8\u30c3\u30b8\u3092\u8ffd\u52a0\nworkflow.add_conditional_edges(\"start_node\", routing)\n\nworkflow.add_edge(\"east_node\", \"end_node\")\nworkflow.add_edge(\"west_node\", \"end_node\")\n\nworkflow.set_finish_point(\"end_node\")\n\napp = workflow.compile()\napp.get_graph().print_ascii()\nprint(app.invoke({\"value\": \"0\"}))<\/pre>\n\n\n\n<p><code>start_node<\/code> \u304b\u3089\u958b\u59cb\u3057\u3001\u30e9\u30f3\u30c0\u30e0\u306b <code>east_node<\/code> \u304b <code>west_node<\/code> \u3092\u901a\u308a\u3001 <code>end_node<\/code> \u3067\u7d42\u4e86\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">            +-----------+\n            | __start__ |\n            +-----------+\n                  *\n                  *\n                  *\n            +------------+\n            | start_node |\n            +------------+\n           ...         ...\n          .               .\n        ..                 ..\n+-----------+           +-----------+\n| east_node |           | west_node |\n+-----------+           +-----------+\n           ***         ***\n              *       *\n               **   **\n            +----------+\n            | end_node |\n            +----------+\n                  *\n                  *\n                  *\n             +---------+\n             | __end__ |\n             +---------+\n{'value': 'east'}<\/pre>\n\n\n\n<p>\u5b9f\u884c\u3059\u308b\u305f\u3073\u306b\u3001\u6700\u7d42\u7d50\u679c\u304c <code>{'value': 'east'}<\/code> \u304b <code>{'value': 'west'}<\/code> \u306b\u306a\u308a\u307e\u3059\u3002\u30e9\u30f3\u30c0\u30e0\u306a\u306e\u3067\u3001\u540c\u3058\u7d50\u679c\u304c\u7d9a\u304f\u3053\u3068\u3082\u3042\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u5024\u306e\u8ffd\u52a0<\/h2>\n\n\n\n<p>\u3053\u308c\u307e\u3067\u306f <code>value<\/code> \u3068\u3044\u3046 <code>str<\/code> \u5f62\u5f0f\u306e\u5024\u3092\u4e0a\u66f8\u304d\u3057\u3066\u3044\u307e\u3057\u305f\u3002\u3053\u3053\u3067\u306f <code>str<\/code> \u5f62\u5f0f\u306e\u5024\u3092\u8981\u7d20\u3068\u3057\u3066\u6301\u3064 <code>list<\/code> \u5f62\u5f0f\u3068\u3057\u3066\u5024\u3092\u8ffd\u52a0\u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">from typing import Annotated\nfrom typing_extensions import TypedDict\nfrom langgraph.graph import StateGraph\nfrom operator import add\n\n# \u30b0\u30e9\u30d5\u5185\u3067\u53d7\u3051\u6e21\u3057\u3055\u308c\u308b\u30b9\u30c6\u30fc\u30c8\u30d5\u30eb\u306a\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u5ba3\u8a00\n# list[str] \u306b\u306f add (\u8ffd\u52a0) \u3092\u884c\u3046\nclass State(TypedDict):\n    value: Annotated[list[str], add]\n\n# value \u306b\u300cnode1\u300d\u3092\u8ffd\u52a0\u3059\u308b node1\ndef node1(state: State):\n    return {\"value\": [\"node1\"]}\n\n# value \u306b\u300cnode2\u300d\u3092\u8ffd\u52a0\u3059\u308b node2\ndef node2(state: State):\n    return {\"value\": [\"node2\"]}\n\nworkflow = StateGraph(State)\n\nworkflow.add_node(\"node1\", node1)\nworkflow.add_node(\"node2\", node2)\n\nworkflow.add_edge(\"node1\", \"node2\")\n\nworkflow.set_entry_point(\"node1\")\nworkflow.set_finish_point(\"node2\")\n\napp = workflow.compile()\napp.get_graph().print_ascii()\nprint(app.invoke({\"value\": []}))<\/pre>\n\n\n\n<p>\u3053\u308c\u3092\u5b9f\u884c\u3059\u308b\u3068\u6b21\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">+-----------+\n| __start__ |\n+-----------+\n      *\n      *\n      *\n  +-------+\n  | node1 |\n  +-------+\n      *\n      *\n      *\n  +-------+\n  | node2 |\n  +-------+\n      *\n      *\n      *\n +---------+\n | __end__ |\n +---------+\n{'value': ['node1', 'node2']}<\/pre>\n\n\n\n<p>\u521d\u671f\u5024 <code>[]<\/code> \u3067\u958b\u59cb\u3057\u305f <code>value<\/code> \u306b\u8981\u7d20\u304c2\u3064\u8ffd\u52a0\u3055\u308c\u3001 <code>['node1', 'node2']<\/code> \u3067\u7d42\u4e86\u3057\u3066\u3044\u308b\u3053\u3068\u304c\u308f\u304b\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">2\u3064\u306e\u30ce\u30fc\u30c9\u3092\u4e26\u5217\u5b9f\u884c<\/h2>\n\n\n\n<p>\u5148\u7a0b\u306f2\u3064\u306e\u30ce\u30fc\u30c9\u3092\u6761\u4ef6\u5206\u5c90\u3001\u3064\u307e\u308a\u3069\u3061\u3089\u304b1\u3064\u3060\u3051\u3092\u5b9f\u884c\u3057\u3066\u3044\u307e\u3057\u305f\u304c\u3001\u4eca\u56de\u306f2\u3064\u306e\u30ce\u30fc\u30c9\u3092\u4e26\u5217\u5b9f\u884c\u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">from typing import Annotated, Literal\nfrom typing_extensions import TypedDict\nfrom langgraph.graph import StateGraph\nfrom operator import add\n\nclass State(TypedDict):\n    value: Annotated[list[str], add]\n\ndef start_node(state: State):\n    return {\"value\": [\"start\"]}\n\ndef east_node(state: State):\n    return {\"value\": [\"east\"]}\n\ndef west_node(state: State):\n    return {\"value\": [\"west\"]}\n\ndef end_node(state: State):\n    return {\"value\": [\"end\"]}\n\nworkflow = StateGraph(State)\n\nworkflow.add_node(\"start_node\", start_node)\nworkflow.add_node(\"east_node\",  east_node)\nworkflow.add_node(\"west_node\",  west_node)\nworkflow.add_node(\"end_node\",   end_node)\n\nworkflow.set_entry_point(\"start_node\")\n\n# start_node \u304b\u3089 east_node \u3068 west_node \u3067\u5206\u5c90\nworkflow.add_edge(\"start_node\", \"east_node\")\nworkflow.add_edge(\"start_node\", \"west_node\")\n\n# east_node \u3068 west_node \u304b\u3089 end_node \u3078\u5408\u6d41\nworkflow.add_edge([\"east_node\", \"west_node\"], \"end_node\")\n\nworkflow.set_finish_point(\"end_node\")\n\napp = workflow.compile()\napp.get_graph().print_ascii()\nprint(app.invoke({\"value\": []}))<\/pre>\n\n\n\n<p>\u6761\u4ef6\u5206\u5c90\u306e\u3068\u304d\u306f <code>add_conditional_edges<\/code> \u304c\u5fc5\u8981\u3067\u3057\u305f\u304c\u3001\u4e26\u5217\u5b9f\u884c\u3059\u308b\u969b\u306f\u5358\u7d14\u306b <code>add_edge<\/code> \u3067\u8907\u6570\u306e\u30a8\u30c3\u30b8\u3092\u5f15\u304f\u3060\u3051\u3067OK\u3067\u3059\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">            +-----------+\n            | __start__ |\n            +-----------+\n                  *\n                  *\n                  *\n            +------------+\n            | start_node |\n            +------------+\n           ***         ***\n          *               *\n        **                 **\n+-----------+           +-----------+\n| east_node |           | west_node |\n+-----------+           +-----------+\n           ***         ***\n              *       *\n               **   **\n            +----------+\n            | end_node |\n            +----------+\n                  *\n                  *\n                  *\n             +---------+\n             | __end__ |\n             +---------+\n{'value': ['start', 'east', 'west', 'end']}<\/pre>\n\n\n\n<p>\u3053\u306e\u3088\u3046\u306b\u7279\u5225\u306a\u30b3\u30fc\u30c9\u3092\u66f8\u304b\u305a\u3068\u3082\u3001\u4e26\u5217\u5b9f\u884c\u3067\u304d\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u30ce\u30fc\u30c9\u6570\u304c\u7570\u306a\u308b\u4e26\u5217\u5b9f\u884c<\/h2>\n\n\n\n<p>\u30ce\u30fc\u30c9\u304c2\u3064\u306e\u30eb\u30fc\u30c8\u3068\u3001\u30ce\u30fc\u30c9\u304c1\u3064\u306e\u30eb\u30fc\u30c8\u306b\u5206\u5c90\u3057\u3001\u4e26\u5217\u5b9f\u884c\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">from typing import Annotated, Literal\nfrom typing_extensions import TypedDict\nfrom langgraph.graph import StateGraph\nfrom operator import add\n\nclass State(TypedDict):\n    value: Annotated[list[str], add]\n\ndef start_node(state: State):\n    return {\"value\": [\"start\"]}\n\ndef east1_node(state: State):\n    return {\"value\": [\"east1\"]}\n\ndef east2_node(state: State):\n    return {\"value\": [\"east2\"]}\n\ndef west_node(state: State):\n    return {\"value\": [\"west\"]}\n\ndef end_node(state: State):\n    return {\"value\": [\"end\"]}\n\nworkflow = StateGraph(State)\n\nworkflow.add_node(\"start_node\", start_node)\nworkflow.add_node(\"east1_node\",  east1_node)\nworkflow.add_node(\"east2_node\",  east2_node)\nworkflow.add_node(\"west_node\",  west_node)\nworkflow.add_node(\"end_node\",   end_node)\n\nworkflow.set_entry_point(\"start_node\")\n\n# start_node \u304b\u3089 east1_node\u3001east1_node \u304b\u3089 east2_node \u3078\nworkflow.add_edge(\"start_node\", \"east1_node\")\nworkflow.add_edge(\"east1_node\", \"east2_node\")\n\n# start_node \u304b\u3089 west_node \u3078\nworkflow.add_edge(\"start_node\", \"west_node\")\n\n# east2_node \u3068 west_node \u304b\u3089 end_node \u3078\u5408\u6d41\nworkflow.add_edge([\"east2_node\", \"west_node\"], \"end_node\")\n\nworkflow.set_finish_point(\"end_node\")\n\napp = workflow.compile()\napp.get_graph().print_ascii()\n\nprint(app.invoke({\"value\": []}))<\/pre>\n\n\n\n<p>\u3053\u306e\u5834\u5408\u3082\u7279\u5225\u306a\u30b3\u30fc\u30c9\u3092\u66f8\u304f\u5fc5\u8981\u306f\u3042\u308a\u307e\u305b\u3093\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">             +-----------+\n             | __start__ |\n             +-----------+\n                   *\n                   *\n                   *\n            +------------+\n            | start_node |\n            +------------+\n            ***          **\n           *               **\n         **                  **\n+------------+                 **\n| east1_node |                  *\n+------------+                  *\n       *                        *\n       *                        *\n       *                        *\n+------------+           +-----------+\n| east2_node |           | west_node |\n+------------+           +-----------+\n            ***         ***\n               *       *\n                **   **\n             +----------+\n             | end_node |\n             +----------+\n                   *\n                   *\n                   *\n              +---------+\n              | __end__ |\n              +---------+\n{'value': ['start', 'east1', 'west', 'east2', 'end']}<\/pre>\n\n\n\n<p>\u30a2\u30b9\u30ad\u30fc\u30a2\u30fc\u30c8\u3067\u306f <code>east2_node<\/code> \u3068 <code>west_node<\/code> \u304c\u6a2a\u306b\u4e26\u3093\u3067\u3044\u308b\u306e\u3067 <code>west_node<\/code> \u304c\u5f85\u305f\u3055\u308c\u3066\u3044\u308b\u3088\u3046\u306b\u898b\u3048\u307e\u3059\u304c\u3001\u5b9f\u969b\u306f <code>east1_node<\/code> \u3068 <code>west_node<\/code> \u304c\u5148\u306b\u5b9f\u884c\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u3055\u3089\u306b\u30ce\u30fc\u30c9\u6570\u304c\u7570\u306a\u308b\u4e26\u5217\u5b9f\u884c<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>east1_node<\/code> <code>east2_node<\/code><\/li>\n\n\n\n<li><code>west_node<\/code><\/li>\n\n\n\n<li><code>north1_node<\/code> <code>north2_node<\/code> <code>north3_node<\/code><\/li>\n<\/ul>\n\n\n\n<p>\u306e3\u30eb\u30fc\u30c8\u3092\u4e26\u5217\u5b9f\u884c\u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">from typing import Annotated, Literal\nfrom typing_extensions import TypedDict\nfrom langgraph.graph import StateGraph\nfrom operator import add\n\nclass State(TypedDict):\n    value: Annotated[list[str], add]\n\ndef start_node(state: State):\n    return {\"value\": [\"start\"]}\n\ndef east1_node(state: State):\n    return {\"value\": [\"east1\"]}\n\ndef east2_node(state: State):\n    return {\"value\": [\"east2\"]}\n\ndef west_node(state: State):\n    return {\"value\": [\"west\"]}\n\ndef north1_node(state: State):\n    return {\"value\": [\"north1\"]}\n\ndef north2_node(state: State):\n    return {\"value\": [\"north2\"]}\n\ndef north3_node(state: State):\n    return {\"value\": [\"north3\"]}\n\ndef end_node(state: State):\n    return {\"value\": [\"end\"]}\n\nworkflow = StateGraph(State)\n\nworkflow.add_node(\"start_node\",  start_node)\nworkflow.add_node(\"east1_node\",  east1_node)\nworkflow.add_node(\"east2_node\",  east2_node)\nworkflow.add_node(\"west_node\",   west_node)\nworkflow.add_node(\"north1_node\", north1_node)\nworkflow.add_node(\"north2_node\", north2_node)\nworkflow.add_node(\"north3_node\", north3_node)\nworkflow.add_node(\"end_node\",    end_node)\n\nworkflow.set_entry_point(\"start_node\")\n\nworkflow.add_edge(\"start_node\", \"east1_node\")\nworkflow.add_edge(\"east1_node\", \"east2_node\")\n\nworkflow.add_edge(\"start_node\", \"west_node\")\n\nworkflow.add_edge(\"start_node\",  \"north1_node\")\nworkflow.add_edge(\"north1_node\", \"north2_node\")\nworkflow.add_edge(\"north2_node\", \"north3_node\")\n\nworkflow.add_edge([\"east2_node\", \"west_node\", \"north3_node\"], \"end_node\")\n\nworkflow.set_finish_point(\"end_node\")\n\napp = workflow.compile()\napp.get_graph().print_ascii()\nprint(app.invoke({\"value\": []}))<\/pre>\n\n\n\n<p>\u3053\u308c\u3092\u5b9f\u884c\u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">                          +-----------+\n                          | __start__ |\n                          +-----------+\n                                 *\n                                 *\n                                 *\n                          +------------+\n                          | start_node |\n                       ***+------------+****\n                   ****          *          ****\n               ****              *              ****\n            ***                  *                  ****\n+-------------+                  *                      ***\n| north1_node |                  *                        *\n+-------------+                  *                        *\n        *                        *                        *\n        *                        *                        *\n        *                        *                        *\n+-------------+                  *                 +------------+\n| north2_node |                  *                 | east1_node |\n+-------------+                  *                 +------------+\n        *                        *                        *\n        *                        *                        *\n        *                        *                        *\n+-------------+           +-----------+            +------------+\n| north3_node |           | west_node |            | east2_node |\n+-------------+****       +-----------+         ***+------------+\n                   ****          *          ****\n                       ****      *      ****\n                           ***   *   ***\n                           +----------+\n                           | end_node |\n                           +----------+\n                                 *\n                                 *\n                                 *\n                           +---------+\n                           | __end__ |\n                           +---------+\n{'value': ['start', 'east1', 'west', 'north1', 'east2', 'north2', 'north3', 'end']}<\/pre>\n\n\n\n<p>\u3053\u306e\u3088\u3046\u306a\u7d50\u679c\u306b\u306a\u308a\u307e\u3057\u305f\u3002\u30a2\u30b9\u30ad\u30fc\u30a2\u30fc\u30c8\u3067\u306f\u30ba\u30ec\u3066\u3057\u307e\u3063\u3066\u3044\u307e\u3059\u304c\u3001 <code>east1_node<\/code> <code>west_node<\/code> <code>north1_node<\/code> \u304c\u307e\u305a\u5b9f\u884c\u3055\u308c\u3001\u6b21\u306b <code>east2_node<\/code> <code>north2_node<\/code> \u304c\u5b9f\u884c\u3001\u6700\u5f8c\u306b <code>north3_node<\/code> \u304c\u5b9f\u884c\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u4e26\u5217\u5b9f\u884c\u3068\u306f\u8a00\u3044\u307e\u3059\u304c\u7d50\u679c\u3092\u898b\u3066\u307f\u308b\u3068\u3001\u30b0\u30e9\u30d5\u306b\u8ffd\u52a0\u3057\u305f\u9806\u756a\u3067\u30ce\u30fc\u30c9\u304c\u5b9f\u884c\u3055\u308c\u3066\u3044\u308b\u3053\u3068\u306b\u6ce8\u76ee\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u30eb\u30fc\u30d7\u5b9f\u884c<\/h2>\n\n\n\n<p>\u3053\u3053\u307e\u3067\u306f\u660e\u793a\u7684\u306b\u8907\u6570\u306e\u30ce\u30fc\u30c9\u3092\u8ffd\u52a0\u3057\u3066\u3044\u307e\u3057\u305f\u304c\u3001\u30eb\u30fc\u30d7\u3092\u7528\u3044\u3066\u8907\u6570\u306e\u30ce\u30fc\u30c9\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">from typing import Annotated, Literal\nfrom typing_extensions import TypedDict\nfrom langgraph.graph import StateGraph\nfrom operator import add\nimport random\nfrom langgraph.constants import Send\n\nclass State(TypedDict):\n    value: Annotated[list[str], add]\n    num: int\n\ndef start_node(state: State):\n    return\n\ndef proc_node(state: State):\n    return {\"value\": [state[\"num\"]]}\n\n# 3\u56de\u30eb\u30fc\u30d7\ndef continue_to_proc(state: State):\n    return [Send(\"proc_node\", {\"num\": i}) for i in range(3)]\n\ndef end_node(state: State):\n    return\n\nworkflow = StateGraph(State)\n\nworkflow.add_node(\"start_node\", start_node)\nworkflow.add_node(\"proc_node\",  proc_node)\nworkflow.add_node(\"end_node\",   end_node)\n\nworkflow.set_entry_point(\"start_node\")\n\nworkflow.add_conditional_edges(\"start_node\", continue_to_proc, [\"proc_node\"])\n\nworkflow.add_edge(\"proc_node\", \"end_node\")\n\nworkflow.set_finish_point(\"end_node\")\n\napp = workflow.compile()\napp.get_graph().print_ascii()\nprint(app.invoke({\"value\": []}))<\/pre>\n\n\n\n<p>\u6b21\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">+-----------+\n| __start__ |\n+-----------+\n       *\n       *\n       *\n+------------+\n| start_node |\n+------------+\n       .\n       .\n       .\n+-----------+\n| proc_node |\n+-----------+\n       *\n       *\n       *\n +----------+\n | end_node |\n +----------+\n       *\n       *\n       *\n  +---------+\n  | __end__ |\n  +---------+\n{'value': [0, 1, 2]}<\/pre>\n\n\n\n<p>\u30a2\u30b9\u30ad\u30fc\u30a2\u30fc\u30c8\u304b\u3089\u306f\u308f\u304b\u308a\u307e\u305b\u3093\u304c <code>proc_node<\/code> \u304c3\u56de\u5b9f\u884c\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u958b\u59cb\u3068\u7d42\u4e86\u3092\u7565\u8a18\u3059\u308b<\/h2>\n\n\n\n<p><code>START<\/code> \u3068 <code>END<\/code> \u3092\u4f7f\u3046\u3068\u3001\u958b\u59cb\u30ce\u30fc\u30c9\u3068\u7d42\u4e86\u30ce\u30fc\u30c9\u306e\u660e\u793a\u7684\u306a\u7528\u610f\u3084 <code>set_entry_point<\/code> \u3068 <code>set_finish_point<\/code> \u306e\u6307\u5b9a\u304c\u4e0d\u8981\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">from typing import Annotated, Literal\nfrom typing_extensions import TypedDict\nfrom langgraph.graph import StateGraph, START, END\nfrom operator import add\nimport random\nfrom langgraph.constants import Send\n\nclass State(TypedDict):\n    value: Annotated[list[str], add]\n    num: int\n\ndef proc_node(state: State):\n    return {\"value\": [state[\"num\"]]}\n\ndef continue_to_proc(state: State):\n    return [Send(\"proc_node\", {\"num\": i}) for i in range(3)]\n\nworkflow = StateGraph(State)\n\nworkflow.add_node(\"proc_node\",  proc_node)\n\n# START \u304b\u3089\u59cb\u3081\u308b\nworkflow.add_conditional_edges(START, continue_to_proc, [\"proc_node\"])\n\n# END \u3067\u7d42\u308f\u308b\nworkflow.add_edge(\"proc_node\", END)\n\napp = workflow.compile()\napp.get_graph().print_ascii()\nprint(app.invoke({\"value\": []}))<\/pre>\n\n\n\n<p>\u3059\u3063\u304d\u308a\u66f8\u3051\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">+-----------+\n| __start__ |\n+-----------+\n      .\n      .\n      .\n+-----------+\n| proc_node |\n+-----------+\n      *\n      *\n      *\n +---------+\n | __end__ |\n +---------+\n{'value': [0, 1, 2]}<\/pre>\n\n\n\n<p>\u30b0\u30e9\u30d5\u306e\u63cf\u753b\u3082\u3059\u3063\u304d\u308a\u3057\u3066\u304a\u308a\u3001\u7d50\u679c\u3082\u5909\u308f\u308a\u307e\u305b\u3093\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u30ef\u30fc\u30af\u30d5\u30ed\u30fc\u306e\u30e2\u30c3\u30af\u30a2\u30c3\u30d7<\/h2>\n\n\n\n<p>\u7a81\u7136\u8907\u96d1\u306a\u3053\u3068\u3092\u3084\u3063\u3066\u307f\u307e\u3059\u3002<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>\u65e5\u672c\u8a9e\u3067\u8cea\u554f\u6587\u3092\u53d7\u3051\u53d6\u308b\u3002<\/li>\n\n\n\n<li>\u65e5\u672c\u8a9e\u306e\u8cea\u554f\u6587\u3092\u82f1\u8a33\u30fb\u8981\u7d04\u3059\u308b\u3002<\/li>\n\n\n\n<li>\u82f1\u8a9e\u306e\u8cea\u554f\u6587\u3067\u30a6\u30a7\u30d6\u691c\u7d22\u3059\u308b\u3002<\/li>\n\n\n\n<li>\u691c\u7d22\u3067\u30d2\u30c3\u30c8\u3057\u305fURL\u3092\u53d6\u5f97\u30fb\u65e5\u672c\u8a9e\u8a33\u30fb\u8981\u7d04\u3059\u308b\u3002<\/li>\n\n\n\n<li>\u7d50\u679c\u3092\u51fa\u529b\u3059\u308b\u3002<\/li>\n<\/ol>\n\n\n\n<p>\u3068\u3044\u3046\u30e2\u30c3\u30af\u30a2\u30c3\u30d7\u3092\u4f5c\u308a\u307e\u3059\u3002\u3042\u304f\u307e\u3067\u30e2\u30c3\u30af\u30a2\u30c3\u30d7\u306a\u306e\u3067\u5b9f\u969b\u306b\u7ffb\u8a33\u3084\u8981\u7d04\u306a\u3069\u306f\u3057\u307e\u305b\u3093\u3002LangGraph\u3067\u51e6\u7406\u306e\u6d41\u308c\u3092\u3069\u3046\u8868\u73fe\u3059\u308b\u306e\u304b\u3001\u3068\u3044\u3046\u89b3\u70b9\u306b\u7d5e\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">from typing import Annotated, Literal\nfrom typing_extensions import TypedDict\nfrom langgraph.graph import StateGraph, START, END\nfrom operator import add\nfrom langgraph.constants import Send\n\nclass State(TypedDict):\n    question: str\n    urls: list[str]\n    answers: Annotated[list[dict], add]\n\nclass IterState(TypedDict):\n    url: str\n\ndef translate_summerize_question(state: State):\n    # XXX: \u82f1\u8a33\u30fb\u8981\u7d04\u51e6\u7406\n    translate_summerize_q = \"What is Docker?\"\n    return {\"question\": translate_summerize_q}\n\ndef search_web(state: State):\n    # XXX: \u691c\u7d22\u51e6\u7406\n    urls = [\n        \"https:\/\/docs.docker.com\/get-started\/docker-overview\/\",\n        \"https:\/\/aws.amazon.com\/docker\/\",\n        \"https:\/\/www.ibm.com\/topics\/docker\",\n        \"https:\/\/www.techtarget.com\/searchitoperations\/definition\/Docker\",\n        \"https:\/\/www.geeksforgeeks.org\/introduction-to-docker\/\",\n    ]\n    return {\"urls\": urls}\n\ndef scrape_translate_summerize_web(state: IterState):\n    url = state[\"url\"]\n    # XXX: \u30a6\u30a7\u30d6\u53d6\u5f97\u30fb\u7ffb\u8a33\u30fb\u8981\u7d04\u51e6\u7406\n    content = url.replace(\"https:\/\/\",\"\").replace(\"\/\",\"_\")\n    return {\"answers\": [{url: content}]}\n\ndef continue_to_scrape(state: State):\n    return [Send(\"scrape_translate_summerize_web\", {\"url\": s}) for s in state[\"urls\"]]\n\nworkflow = StateGraph(State)\n\nworkflow.add_node(\"translate_summerize_question\", translate_summerize_question)\nworkflow.add_node(\"search_web\", search_web)\nworkflow.add_node(\"scrape_translate_summerize_web\", scrape_translate_summerize_web)\n\nworkflow.add_edge(START, \"translate_summerize_question\")\nworkflow.add_edge(\"translate_summerize_question\", \"search_web\")\nworkflow.add_conditional_edges(\"search_web\", continue_to_scrape, [\"scrape_translate_summerize_web\"])\nworkflow.add_edge(\"scrape_translate_summerize_web\", END)\n\napp = workflow.compile()\napp.get_graph().print_ascii()\nstats = app.invoke({\"question\": \"Docker\u3068\u306f\u4f55\u3067\u3059\u304b\uff1f\"})\n\nprint()\nprint(\"question: \" + stats[\"question\"])\nprint()\n\nfor a in stats[\"answers\"]:\n    print(a)<\/pre>\n\n\n\n<p>\u6b21\u306e\u3088\u3046\u306a\u7d50\u679c\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">          +-----------+\n          | __start__ |\n          +-----------+\n                 *\n                 *\n                 *\n +------------------------------+\n | translate_summerize_question |\n +------------------------------+\n                 *\n                 *\n                 *\n          +------------+\n          | search_web |\n          +------------+\n                 .\n                 .\n                 .\n+--------------------------------+\n| scrape_translate_summerize_web |\n+--------------------------------+\n                 *\n                 *\n                 *\n            +---------+\n            | __end__ |\n            +---------+\n\nquestion: What is Docker?\n\n{'https:\/\/docs.docker.com\/get-started\/docker-overview\/': 'docs.docker.com_get-started_docker-overview_'}\n{'https:\/\/aws.amazon.com\/docker\/': 'aws.amazon.com_docker_'}\n{'https:\/\/www.ibm.com\/topics\/docker': 'www.ibm.com_topics_docker'}\n{'https:\/\/www.techtarget.com\/searchitoperations\/definition\/Docker': 'www.techtarget.com_searchitoperations_definition_Docker'}\n{'https:\/\/www.geeksforgeeks.org\/introduction-to-docker\/': 'www.geeksforgeeks.org_introduction-to-docker_'}<\/pre>\n\n\n\n<p>\u30ef\u30fc\u30af\u30d5\u30ed\u30fc\u3092LangGraph\u3067\u8868\u73fe\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3057\u305f\u3002\u3042\u3068\u306f\u3053\u308c\u3092\u3082\u3068\u306b\u3001\u5b9f\u969b\u306bLLM\u3084\u30a6\u30a7\u30d6\u53d6\u5f97\u51e6\u7406\u306a\u3069\u3092\u7d44\u307f\u8fbc\u3093\u3067\u3044\u304f\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u304c\u3001\u672c\u7a3f\u306e\u8da3\u65e8\u304b\u3089\u5916\u308c\u308b\u306e\u3067\u4e00\u65e6\u3053\u3053\u307e\u3067\u3068\u3057\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u307e\u3068\u3081<\/h2>\n\n\n\n<p>\u672c\u7a3f\u3067\u306fLangGraph\u305d\u306e\u3082\u306e\u306e\u52d5\u304d\u3092\u898b\u308b\u305f\u3081\u306b\u3001LLM\u95a2\u9023\u30b3\u30fc\u30c9\u3092\u307e\u3063\u305f\u304f\u66f8\u304b\u305a\u306b\u30ef\u30fc\u30af\u30d5\u30ed\u30fc\u30b0\u30e9\u30d5\u3092\u8868\u73fe\u3059\u308b\u3053\u3068\u306e\u307f\u306b\u7126\u70b9\u3092\u7d5e\u3063\u3066\u30b3\u30fc\u30c9\u3092\u66f8\u3044\u3066\u307f\u307e\u3057\u305f\u3002LangGraph\u306b\u96c6\u4e2d\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u305f\u306e\u3067\u7406\u89e3\u304c\u9032\u307f\u3001\u3053\u306e\u5f8c\u3067LLM\u95a2\u9023\u30b3\u30fc\u30c9\u3092\u8ffd\u52a0\u3057\u305f\u308a\u3001\u3055\u3089\u306bLangGraph\u306e\u6a5f\u80fd\u3092\u4f7f\u3063\u305f\u308a\u3059\u308b\u4e0a\u3067\u306e\u571f\u53f0\u306b\u306a\u3063\u305f\u304b\u3068\u601d\u3044\u307e\u3059\u3002\u591a\u5206LLM\u95a2\u9023\u30b3\u30fc\u30c9\u304c\u542b\u307e\u308c\u305fLangGraph\u306e\u30b3\u30fc\u30c9\u3092\u898b\u3066\u3082\u76ee\u304c\u6ed1\u3089\u306a\u304f\u306a\u3063\u305f\u306f\u305a\u3067\u3059\u3002<\/p>\n\n\n\n<p>\u4eca\u5f8c\u306f\u5f15\u304d\u7d9a\u304d\u3001LLM\u95a2\u9023\u30b3\u30fc\u30c9\u3092\u542b\u3081\u305f\u3082\u306e\u3084\u3001\u3055\u3089\u306b\u8907\u96d1\u306a\u30ef\u30fc\u30af\u30d5\u30ed\u30fc\u306e\u4f5c\u6210\u306b\u6311\u6226\u3057\u3066\u3044\u3053\u3046\u3068\u601d\u3044\u307e\u3059\u3002\u7d9a\u5831\u3092\u304a\u5f85\u3061\u304f\u3060\u3055\u3044\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u306f\u3058\u3081\u306b LangGraph\u3068\u306f\u3001LLM (Lagre Language Models; \u5927\u898f\u6a21\u8a00\u8a9e\u30e2\u30c7\u30eb)\u3092\u4f7f\u7528\u3057\u305f\u3001\u30b9\u30c6\u30fc\u30c8\u30d5\u30eb\u306a\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u3084\u30ef\u30fc\u30af\u30d5\u30ed\u30fc\u3092\u4f5c\u6210\u3059\u308b\u305f\u3081\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u3067\u3059\u3002LLM\u3092\u4f7f\u7528\u3057\u305f\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7 [&#8230;]<\/p>\n","protected":false},"author":2,"featured_media":75505,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"content-type":"","footnotes":""},"categories":[779,31,1004,323],"tags":[],"class_list":["post-75504","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ai","category-higuchi","category-llm","category-python"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>LangGraph\u3092LLM\u306a\u3057\u3067\u3061\u3087\u3063\u3068\u89e6\u3063\u3066\u307f\u3088\u3046 #langgraph #langchain #ai #llm #python - Tech Blog\uff5c\u30af\u30ea\u30a8\u30fc\u30b7\u30e7\u30f3\u30e9\u30a4\u30f3<\/title>\n<meta name=\"description\" content=\"AI, d-higuchi, LLM, Python |\u306f\u3058\u3081\u306b LangGraph\u3068\u306f\u3001LLM (Lagre Language Models;\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.creationline.com\/tech-blog\/author\/higuchi\/75504\" \/>\n<meta property=\"og:locale\" content=\"ja_JP\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"LangGraph\u3092LLM\u306a\u3057\u3067\u3061\u3087\u3063\u3068\u89e6\u3063\u3066\u307f\u3088\u3046 #langgraph #langchain #ai #llm #python - Tech Blog\uff5c\u30af\u30ea\u30a8\u30fc\u30b7\u30e7\u30f3\u30e9\u30a4\u30f3\" \/>\n<meta property=\"og:description\" content=\"AI, d-higuchi, LLM, Python |\u306f\u3058\u3081\u306b LangGraph\u3068\u306f\u3001LLM (Lagre Language Models;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.creationline.com\/tech-blog\/author\/higuchi\/75504\" \/>\n<meta property=\"og:site_name\" content=\"Tech Blog\uff5c\u30af\u30ea\u30a8\u30fc\u30b7\u30e7\u30f3\u30e9\u30a4\u30f3\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/creationline\" \/>\n<meta property=\"article:published_time\" content=\"2024-10-07T04:40:00+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.creationline.com\/tech-blog\/cms_x3GWkuX\/wp-content\/uploads\/2024\/10\/langgraph-node-and-edge.png\" \/>\n\t<meta property=\"og:image:width\" content=\"600\" \/>\n\t<meta property=\"og:image:height\" content=\"234\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Daisuke Higuchi\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@creationline\" \/>\n<meta name=\"twitter:site\" content=\"@creationline\" \/>\n<meta name=\"twitter:label1\" content=\"\u57f7\u7b46\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"Daisuke Higuchi\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593\" \/>\n\t<meta name=\"twitter:data2\" content=\"9\u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/author\\\/higuchi\\\/75504#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/author\\\/higuchi\\\/75504\"},\"author\":{\"name\":\"Daisuke Higuchi\",\"@id\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/#\\\/schema\\\/person\\\/16f1373831fb6fd17387f16ae1195206\"},\"headline\":\"LangGraph\u3092LLM\u306a\u3057\u3067\u3061\u3087\u3063\u3068\u89e6\u3063\u3066\u307f\u3088\u3046 #langgraph #langchain #ai #llm #python\",\"datePublished\":\"2024-10-07T04:40:00+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/author\\\/higuchi\\\/75504\"},\"wordCount\":46,\"image\":{\"@id\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/author\\\/higuchi\\\/75504#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/cms_x3GWkuX\\\/wp-content\\\/uploads\\\/2024\\\/10\\\/langgraph-node-and-edge.png\",\"articleSection\":[\"AI\",\"d-higuchi\",\"LLM\",\"Python\"],\"inLanguage\":\"ja\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/author\\\/higuchi\\\/75504\",\"url\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/author\\\/higuchi\\\/75504\",\"name\":\"LangGraph\u3092LLM\u306a\u3057\u3067\u3061\u3087\u3063\u3068\u89e6\u3063\u3066\u307f\u3088\u3046 #langgraph #langchain #ai #llm #python - Tech Blog\uff5c\u30af\u30ea\u30a8\u30fc\u30b7\u30e7\u30f3\u30e9\u30a4\u30f3\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/author\\\/higuchi\\\/75504#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/author\\\/higuchi\\\/75504#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/cms_x3GWkuX\\\/wp-content\\\/uploads\\\/2024\\\/10\\\/langgraph-node-and-edge.png\",\"datePublished\":\"2024-10-07T04:40:00+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/#\\\/schema\\\/person\\\/16f1373831fb6fd17387f16ae1195206\"},\"description\":\"AI, d-higuchi, LLM, Python |\u306f\u3058\u3081\u306b LangGraph\u3068\u306f\u3001LLM (Lagre Language Models;\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/author\\\/higuchi\\\/75504#breadcrumb\"},\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/author\\\/higuchi\\\/75504\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/author\\\/higuchi\\\/75504#primaryimage\",\"url\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/cms_x3GWkuX\\\/wp-content\\\/uploads\\\/2024\\\/10\\\/langgraph-node-and-edge.png\",\"contentUrl\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/cms_x3GWkuX\\\/wp-content\\\/uploads\\\/2024\\\/10\\\/langgraph-node-and-edge.png\",\"width\":600,\"height\":234},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/author\\\/higuchi\\\/75504#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"HOME\",\"item\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"ChatGPT\uff06AI\",\"item\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/chatgpt-ai\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"AI\",\"item\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/chatgpt-ai\\\/ai\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"LangGraph\u3092LLM\u306a\u3057\u3067\u3061\u3087\u3063\u3068\u89e6\u3063\u3066\u307f\u3088\u3046 #langgraph #langchain #ai #llm #python\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/#website\",\"url\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/\",\"name\":\"Tech Blog\uff5c\u30af\u30ea\u30a8\u30fc\u30b7\u30e7\u30f3\u30e9\u30a4\u30f3\",\"description\":\"\u30a2\u30b8\u30e3\u30a4\u30eb\uff06DevOps\u3001\u30af\u30e9\u30a6\u30c9\u30cd\u30a4\u30c6\u30a3\u30d6\u3001AI\uff06LLM\u306e\u5148\u7aef\u6280\u8853\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"ja\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/#\\\/schema\\\/person\\\/16f1373831fb6fd17387f16ae1195206\",\"name\":\"Daisuke Higuchi\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/cms_x3GWkuX\\\/wp-content\\\/uploads\\\/2023\\\/08\\\/d-higuchi-wp-icon-230x230.png\",\"url\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/cms_x3GWkuX\\\/wp-content\\\/uploads\\\/2023\\\/08\\\/d-higuchi-wp-icon-230x230.png\",\"contentUrl\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/cms_x3GWkuX\\\/wp-content\\\/uploads\\\/2023\\\/08\\\/d-higuchi-wp-icon-230x230.png\",\"caption\":\"Daisuke Higuchi\"},\"description\":\"Chef\u30fbDocker\u30fbMirantis\u88fd\u54c1\u306a\u3069\u306e\u6280\u8853\u8981\u7d20\u306b\u52a0\u3048\u3066\u3001\u4f1a\u8b70\u306e\u9032\u3081\u65b9\u30fb\u6587\u7ae0\u306e\u66f8\u304d\u65b9\u306a\u3069\u306e\u696d\u52d9\u6539\u5584\u306b\u3082\u53d6\u308a\u7d44\u3093\u3067\u3044\u307e\u3059\u3002\u300cChef\u6d3b\u7528\u30ac\u30a4\u30c9\u300d\u5171\u8457\u306e\u307b\u304b\u3001Debian Official Developer\u3082\u3084\u3063\u3066\u3044\u307e\u3059\u3002\",\"url\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/author\\\/higuchi\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"LangGraph\u3092LLM\u306a\u3057\u3067\u3061\u3087\u3063\u3068\u89e6\u3063\u3066\u307f\u3088\u3046 #langgraph #langchain #ai #llm #python - Tech Blog\uff5c\u30af\u30ea\u30a8\u30fc\u30b7\u30e7\u30f3\u30e9\u30a4\u30f3","description":"AI, d-higuchi, LLM, Python |\u306f\u3058\u3081\u306b LangGraph\u3068\u306f\u3001LLM (Lagre Language Models;","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.creationline.com\/tech-blog\/author\/higuchi\/75504","og_locale":"ja_JP","og_type":"article","og_title":"LangGraph\u3092LLM\u306a\u3057\u3067\u3061\u3087\u3063\u3068\u89e6\u3063\u3066\u307f\u3088\u3046 #langgraph #langchain #ai #llm #python - Tech Blog\uff5c\u30af\u30ea\u30a8\u30fc\u30b7\u30e7\u30f3\u30e9\u30a4\u30f3","og_description":"AI, d-higuchi, LLM, Python |\u306f\u3058\u3081\u306b LangGraph\u3068\u306f\u3001LLM (Lagre Language Models;","og_url":"https:\/\/www.creationline.com\/tech-blog\/author\/higuchi\/75504","og_site_name":"Tech Blog\uff5c\u30af\u30ea\u30a8\u30fc\u30b7\u30e7\u30f3\u30e9\u30a4\u30f3","article_publisher":"https:\/\/www.facebook.com\/creationline","article_published_time":"2024-10-07T04:40:00+00:00","og_image":[{"width":600,"height":234,"url":"https:\/\/www.creationline.com\/tech-blog\/cms_x3GWkuX\/wp-content\/uploads\/2024\/10\/langgraph-node-and-edge.png","type":"image\/png"}],"author":"Daisuke Higuchi","twitter_card":"summary_large_image","twitter_creator":"@creationline","twitter_site":"@creationline","twitter_misc":{"\u57f7\u7b46\u8005":"Daisuke Higuchi","\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593":"9\u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.creationline.com\/tech-blog\/author\/higuchi\/75504#article","isPartOf":{"@id":"https:\/\/www.creationline.com\/tech-blog\/author\/higuchi\/75504"},"author":{"name":"Daisuke Higuchi","@id":"https:\/\/www.creationline.com\/tech-blog\/#\/schema\/person\/16f1373831fb6fd17387f16ae1195206"},"headline":"LangGraph\u3092LLM\u306a\u3057\u3067\u3061\u3087\u3063\u3068\u89e6\u3063\u3066\u307f\u3088\u3046 #langgraph #langchain #ai #llm #python","datePublished":"2024-10-07T04:40:00+00:00","mainEntityOfPage":{"@id":"https:\/\/www.creationline.com\/tech-blog\/author\/higuchi\/75504"},"wordCount":46,"image":{"@id":"https:\/\/www.creationline.com\/tech-blog\/author\/higuchi\/75504#primaryimage"},"thumbnailUrl":"https:\/\/www.creationline.com\/tech-blog\/cms_x3GWkuX\/wp-content\/uploads\/2024\/10\/langgraph-node-and-edge.png","articleSection":["AI","d-higuchi","LLM","Python"],"inLanguage":"ja"},{"@type":"WebPage","@id":"https:\/\/www.creationline.com\/tech-blog\/author\/higuchi\/75504","url":"https:\/\/www.creationline.com\/tech-blog\/author\/higuchi\/75504","name":"LangGraph\u3092LLM\u306a\u3057\u3067\u3061\u3087\u3063\u3068\u89e6\u3063\u3066\u307f\u3088\u3046 #langgraph #langchain #ai #llm #python - Tech Blog\uff5c\u30af\u30ea\u30a8\u30fc\u30b7\u30e7\u30f3\u30e9\u30a4\u30f3","isPartOf":{"@id":"https:\/\/www.creationline.com\/tech-blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.creationline.com\/tech-blog\/author\/higuchi\/75504#primaryimage"},"image":{"@id":"https:\/\/www.creationline.com\/tech-blog\/author\/higuchi\/75504#primaryimage"},"thumbnailUrl":"https:\/\/www.creationline.com\/tech-blog\/cms_x3GWkuX\/wp-content\/uploads\/2024\/10\/langgraph-node-and-edge.png","datePublished":"2024-10-07T04:40:00+00:00","author":{"@id":"https:\/\/www.creationline.com\/tech-blog\/#\/schema\/person\/16f1373831fb6fd17387f16ae1195206"},"description":"AI, d-higuchi, LLM, Python |\u306f\u3058\u3081\u306b LangGraph\u3068\u306f\u3001LLM (Lagre Language Models;","breadcrumb":{"@id":"https:\/\/www.creationline.com\/tech-blog\/author\/higuchi\/75504#breadcrumb"},"inLanguage":"ja","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.creationline.com\/tech-blog\/author\/higuchi\/75504"]}]},{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.creationline.com\/tech-blog\/author\/higuchi\/75504#primaryimage","url":"https:\/\/www.creationline.com\/tech-blog\/cms_x3GWkuX\/wp-content\/uploads\/2024\/10\/langgraph-node-and-edge.png","contentUrl":"https:\/\/www.creationline.com\/tech-blog\/cms_x3GWkuX\/wp-content\/uploads\/2024\/10\/langgraph-node-and-edge.png","width":600,"height":234},{"@type":"BreadcrumbList","@id":"https:\/\/www.creationline.com\/tech-blog\/author\/higuchi\/75504#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"HOME","item":"https:\/\/www.creationline.com\/tech-blog"},{"@type":"ListItem","position":2,"name":"ChatGPT\uff06AI","item":"https:\/\/www.creationline.com\/tech-blog\/chatgpt-ai"},{"@type":"ListItem","position":3,"name":"AI","item":"https:\/\/www.creationline.com\/tech-blog\/chatgpt-ai\/ai"},{"@type":"ListItem","position":4,"name":"LangGraph\u3092LLM\u306a\u3057\u3067\u3061\u3087\u3063\u3068\u89e6\u3063\u3066\u307f\u3088\u3046 #langgraph #langchain #ai #llm #python"}]},{"@type":"WebSite","@id":"https:\/\/www.creationline.com\/tech-blog\/#website","url":"https:\/\/www.creationline.com\/tech-blog\/","name":"Tech Blog\uff5c\u30af\u30ea\u30a8\u30fc\u30b7\u30e7\u30f3\u30e9\u30a4\u30f3","description":"\u30a2\u30b8\u30e3\u30a4\u30eb\uff06DevOps\u3001\u30af\u30e9\u30a6\u30c9\u30cd\u30a4\u30c6\u30a3\u30d6\u3001AI\uff06LLM\u306e\u5148\u7aef\u6280\u8853","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.creationline.com\/tech-blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ja"},{"@type":"Person","@id":"https:\/\/www.creationline.com\/tech-blog\/#\/schema\/person\/16f1373831fb6fd17387f16ae1195206","name":"Daisuke Higuchi","image":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.creationline.com\/tech-blog\/cms_x3GWkuX\/wp-content\/uploads\/2023\/08\/d-higuchi-wp-icon-230x230.png","url":"https:\/\/www.creationline.com\/tech-blog\/cms_x3GWkuX\/wp-content\/uploads\/2023\/08\/d-higuchi-wp-icon-230x230.png","contentUrl":"https:\/\/www.creationline.com\/tech-blog\/cms_x3GWkuX\/wp-content\/uploads\/2023\/08\/d-higuchi-wp-icon-230x230.png","caption":"Daisuke Higuchi"},"description":"Chef\u30fbDocker\u30fbMirantis\u88fd\u54c1\u306a\u3069\u306e\u6280\u8853\u8981\u7d20\u306b\u52a0\u3048\u3066\u3001\u4f1a\u8b70\u306e\u9032\u3081\u65b9\u30fb\u6587\u7ae0\u306e\u66f8\u304d\u65b9\u306a\u3069\u306e\u696d\u52d9\u6539\u5584\u306b\u3082\u53d6\u308a\u7d44\u3093\u3067\u3044\u307e\u3059\u3002\u300cChef\u6d3b\u7528\u30ac\u30a4\u30c9\u300d\u5171\u8457\u306e\u307b\u304b\u3001Debian Official Developer\u3082\u3084\u3063\u3066\u3044\u307e\u3059\u3002","url":"https:\/\/www.creationline.com\/tech-blog\/author\/higuchi"}]}},"_links":{"self":[{"href":"https:\/\/www.creationline.com\/tech-blog\/wp-json\/wp\/v2\/posts\/75504","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.creationline.com\/tech-blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.creationline.com\/tech-blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.creationline.com\/tech-blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.creationline.com\/tech-blog\/wp-json\/wp\/v2\/comments?post=75504"}],"version-history":[{"count":1,"href":"https:\/\/www.creationline.com\/tech-blog\/wp-json\/wp\/v2\/posts\/75504\/revisions"}],"predecessor-version":[{"id":75506,"href":"https:\/\/www.creationline.com\/tech-blog\/wp-json\/wp\/v2\/posts\/75504\/revisions\/75506"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.creationline.com\/tech-blog\/wp-json\/wp\/v2\/media\/75505"}],"wp:attachment":[{"href":"https:\/\/www.creationline.com\/tech-blog\/wp-json\/wp\/v2\/media?parent=75504"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.creationline.com\/tech-blog\/wp-json\/wp\/v2\/categories?post=75504"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.creationline.com\/tech-blog\/wp-json\/wp\/v2\/tags?post=75504"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}