{"id":77298,"date":"2025-05-13T08:00:00","date_gmt":"2025-05-12T23:00:00","guid":{"rendered":"https:\/\/www.creationline.com\/tech-blog\/?p=77298"},"modified":"2025-05-12T19:12:08","modified_gmt":"2025-05-12T10:12:08","slug":"ollama%e3%81%a8langchain%e3%81%a7deepseek%e3%82%92%e3%83%ad%e3%83%bc%e3%82%ab%e3%83%abpc%e3%81%a7%e5%8b%95%e3%81%8b%e3%81%9d%e3%81%86-ai-llm-ollama-langchain-deepseek","status":"publish","type":"post","link":"https:\/\/www.creationline.com\/tech-blog\/author\/higuchi\/77298","title":{"rendered":"Ollama\u3068LangChain\u3067DeepSeek\u3092\u30ed\u30fc\u30ab\u30ebPC\u3067\u52d5\u304b\u305d\u3046 #ai #llm #ollama #langchain #deepseek"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">\u306f\u3058\u3081\u306b<\/h2>\n\n\n\n<p>\u4ee5\u524d\u306e\u8a18\u4e8b\u300c<a href=\"https:\/\/www.creationline.com\/tech-blog\/71494\" target=\"_blank\" rel=\"noreferrer noopener\">\u304a\u3046\u3061\u3067ChatGPT\u3084\u3063\u3066\u307f\u305f\u3044\uff01 \u30ed\u30fc\u30ab\u30ebLLM(\u5927\u898f\u6a21\u8a00\u8a9e\u30e2\u30c7\u30eb)\u306f\u3069\u3053\u307e\u3067\u3067\u304d\u308b\u304b\uff1f<\/a>\u300d\u3067\u306f\u3001\u30ed\u30fc\u30ab\u30ebPC\u3067LLM\u3092\u4f53\u9a13\u3059\u308b\u306e\u306b<a href=\"https:\/\/github.com\/ggml-org\/llama.cpp\" target=\"_blank\" rel=\"noreferrer noopener\">llama.cpp<\/a>\u3092\u30d3\u30eb\u30c9\u3057\u3066\u4f7f\u3063\u3066\u3044\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<p>\u4eca\u56de\u306f<a href=\"https:\/\/ollama.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">Ollama<\/a>\u3092\u4f7f\u3044\u3001<a href=\"https:\/\/github.com\/deepseek-ai\/DeepSeek-R1\" target=\"_blank\" rel=\"noreferrer noopener\">DeepSeek-R1<\/a>\u3092\u52d5\u304b\u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u524d\u63d0\u6761\u4ef6<\/h2>\n\n\n\n<p>\u672c\u7a3f\u3067\u4f7f\u7528\u3057\u305f\u30ed\u30fc\u30ab\u30ebPC\u306e\u30b9\u30da\u30c3\u30af\u306f\u6b21\u306e\u901a\u308a\u3067\u3059\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/www.intel.co.jp\/content\/www\/jp\/ja\/products\/sku\/52213\/intel-core-i72600-processor-8m-cache-up-to-3-80-ghz\/specifications.html\" target=\"_blank\" rel=\"noreferrer noopener\">Intel Core i7-2600<\/a> (3.4GHz, 2011\u5e74\u767a\u58f2)<\/li>\n\n\n\n<li><a href=\"https:\/\/www.nvidia.com\/ja-jp\/geforce\/10-series\/\" target=\"_blank\" rel=\"noreferrer noopener\">NVIDIA GeForce GTX 1050 Ti<\/a> (\u30e1\u30e2\u30ea4GB, 2016\u5e74\u767a\u58f2)<\/li>\n\n\n\n<li>\u30e1\u30e2\u30ea 32GB<\/li>\n<\/ul>\n\n\n\n<p>\u30cf\u30fc\u30c9\u30a6\u30a7\u30a2\u306f\u4ee5\u524d\u306e\u8a18\u4e8b\u300c<a href=\"https:\/\/www.creationline.com\/tech-blog\/71494\" target=\"_blank\" rel=\"noreferrer noopener\">\u304a\u3046\u3061\u3067ChatGPT\u3084\u3063\u3066\u307f\u305f\u3044\uff01 \u30ed\u30fc\u30ab\u30ebLLM(\u5927\u898f\u6a21\u8a00\u8a9e\u30e2\u30c7\u30eb)\u306f\u3069\u3053\u307e\u3067\u3067\u304d\u308b\u304b\uff1f<\/a>\u300d\u3067\u4f7f\u7528\u3057\u305f\u3082\u306e\u3068\u5909\u308f\u308a\u3042\u308a\u307e\u305b\u3093\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/www.debian.org\/\" target=\"_blank\" rel=\"noreferrer noopener\">Debian GNU\/Linux<\/a><\/li>\n\n\n\n<li><a href=\"http:\/\/:\/\/wiki.debian.org\/NvidiaGraphicsDrivers\" target=\"_blank\" rel=\"noreferrer noopener\">NVIDIA Accelerated Linux Graphics Driver<\/a> 535.216.01<\/li>\n\n\n\n<li><a href=\"https:\/\/wiki.debian.org\/NvidiaGraphicsDrivers\" target=\"_blank\" rel=\"noreferrer noopener\">CUDA Toolkit<\/a> 11.8.89<\/li>\n<\/ul>\n\n\n\n<p>\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u306f\u4ee5\u524d\u306e\u8a18\u4e8b\u3068\u5c11\u3057\u30d0\u30fc\u30b8\u30e7\u30f3\u304c\u7570\u306a\u308b\u4ee5\u5916\u306f\u9055\u3044\u3042\u308a\u307e\u305b\u3093\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Ollama\u3068\u306f<\/h2>\n\n\n\n<p><a href=\"https:\/\/ollama.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">Ollama<\/a>\u3068\u306f\u3001<a href=\"https:\/\/github.com\/ggml-org\/llama.cpp\" target=\"_blank\" rel=\"noreferrer noopener\">llama.cpp<\/a>\u3092\u5185\u8535\u3057\u3066\u624b\u8efd\u306bLLM\u3092\u5b9f\u884c\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u305f\u30c4\u30fc\u30eb\u3067\u3059\u3002\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3082\u624b\u8efd\u3067\u3001<a href=\"https:\/\/www.docker.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">Docker<\/a>\u30b3\u30f3\u30c6\u30ca\u3068\u3057\u3066\u3082\u5b9f\u884c\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u672c\u7a3f\u3067\u306fDocker\u30b3\u30f3\u30c6\u30ca\u3068\u3057\u3066\u8a66\u3057\u3066\u307f\u307e\u3059\u3002\u5148\u306e\u901a\u308a\u3001\u672c\u7a3f\u3067\u306fNVIDIA GPU\u3092\u4f7f\u3063\u3066\u3044\u308b\u306e\u3067\u4e8b\u524d\u306b<a href=\"https:\/\/docs.nvidia.com\/datacenter\/cloud-native\/container-toolkit\/latest\/install-guide.html#installation\" target=\"_blank\" rel=\"noreferrer noopener\">NVIDIA Container Toolkit<\/a>\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u304c\u5fc5\u8981\u3067\u3059\u3002\u8a73\u7d30\u306f<a href=\"https:\/\/github.com\/ollama\/ollama\/blob\/main\/docs\/docker.md\" target=\"_blank\" rel=\"noreferrer noopener\">Ollama Docker image<\/a>\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n\n\n\n<p>Docker\u3084NVIDIA Container Toolkit\u306e\u6e96\u5099\u304c\u3067\u304d\u305f\u3089\u3001\u6b21\u306e\u30b3\u30de\u30f3\u30c9\u3067Ollama\u30b5\u30fc\u30d0\u30b3\u30f3\u30c6\u30ca\u3092\u8d77\u52d5\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">% docker run -d --gpus=all -v ollama:\/root\/.ollama -p 11434:11434 --name ollama ollama\/ollama<\/pre>\n\n\n\n<p>\u4ee5\u964d\u306f\u3053\u306e\u30b3\u30f3\u30c6\u30ca\u3092\u5229\u7528\u3057\u3066\u64cd\u4f5c\u3092\u884c\u3063\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">DeepSeek-R1\u3068\u306f<\/h2>\n\n\n\n<p><a href=\"https:\/\/github.com\/deepseek-ai\/DeepSeek-R1\" target=\"_blank\" rel=\"noreferrer noopener\">DeepSeek-R1<\/a>\u3068\u306f\u3001\u4e2d\u56fdDeepSeek\u793e\u304c2025\u5e741\u6708\u306b\u767a\u8868\u3057\u305fLLM\u3067\u3059\u3002\u5f53\u6642\u306b\u8a55\u4fa1\u3092\u5f97\u3066\u3044\u305f<a href=\"https:\/\/openai.com\/ja-JP\/o1\/\" target=\"_blank\" rel=\"noreferrer noopener\">OpenAI o1<\/a>\u4e26\u307f\u306e\u6027\u80fd\u306e\u30e2\u30c7\u30eb\u3092MIT\u30e9\u30a4\u30bb\u30f3\u30b9\u3067\u30aa\u30fc\u30d7\u30f3\u30bd\u30fc\u30b9\u5316\u3057\u305f\u3053\u3068\u3001API\u5229\u7528\u6599\u304c\u4f4e\u984d\u306a\u3053\u3068\u3067\u5927\u304d\u306a\u8a71\u984c\u3092\u547c\u3073\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<p>DeepSeek-R1\u306f<a href=\"https:\/\/ollama.com\/library\/deepseek-r1\" target=\"_blank\" rel=\"noreferrer noopener\">Ollama\u3067\u3059\u3050\u5229\u7528\u3067\u304d\u308b<\/a>\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002\u65e9\u901f\u8a66\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">% docker exec -it ollama ollama run deepseek-r1<\/pre>\n\n\n\n<p>\u521d\u56de\u306f\u30e2\u30c7\u30eb\u306e\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u304c\u3042\u308b\u306e\u3067\u6642\u9593\u304c\u304b\u304b\u308a\u307e\u3059\u30022025\u5e744\u6708\u73fe\u5728\u3001deepseek-r1 \u306f 7b \u304c\u30c7\u30d5\u30a9\u30eb\u30c8\u3068\u306a\u3063\u3066\u3044\u308b\u305f\u3081\u3001\u7d04 5GB \u306e\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u304c\u767a\u751f\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=\"\">>>> Send a message (\/? for help)<\/pre>\n\n\n\n<p>\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u304c\u5b8c\u4e86\u3059\u308b\u3068\u3001\u3053\u306e\u3088\u3046\u306a\u5165\u529b\u30d7\u30ed\u30f3\u30d7\u30c8\u304c\u8868\u793a\u3055\u308c\u308b\u306e\u3067\u3001\u3072\u3068\u307e\u305a\u6328\u62f6\u3057\u3066\u307f\u307e\u3057\u3087\u3046\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=\"\">>>> \u3053\u3093\u306b\u3061\u306f\u3002\u3042\u306a\u305f\u306f\u8ab0\u3067\u3059\u304b\uff1f\n&lt;think>\n\n&lt;\/think>\n\n\u60a8\u597d\uff01\u6211\u662f\u7531\u4e2d\u56fd\u7684\u6df1\u5ea6\u6c42\u7d22\uff08DeepSeek\uff09\u516c\u53f8\u5f00\u53d1\u7684\u667a\u80fd\u52a9\u624bDeepSeek-R1\u3002\u5982\u60a8\u6709\n\u4efb\u4f55\u4efb\u4f55\u95ee\u9898\uff0c\u6211\u4f1a\u5c3d\u6211\u6240\u80fd\u4e3a\u60a8\u63d0\u4f9b\u5e2e\u52a9\u3002\n\n>>> Send a message (\/? for help)<\/pre>\n\n\n\n<p>\u4e2d\u56fd\u8a9e\u3067\u300c\u3053\u3093\u306b\u3061\u306f\uff01\u79c1\u306f\u4e2d\u56fd\u306eDeepSeek\u793e\u304c\u958b\u767a\u3057\u305fAI\u30a2\u30b7\u30b9\u30bf\u30f3\u30c8DeepSeek-R1\u3067\u3059\u3002\u8cea\u554f\u304c\u3042\u308c\u3070\u3001\u5168\u529b\u3067\u304a\u624b\u4f1d\u3044\u3057\u307e\u3059\u300d\u3068\u3044\u3063\u305f\u5185\u5bb9\u306e\u7b54\u3048\u304c\u8fd4\u3063\u3066\u304d\u307e\u3057\u305f\u3002\u3053\u3061\u3089\u306e\u5165\u529b\u5185\u5bb9\u3092\u7406\u89e3\u3057\u3066\u3044\u308b\u3088\u3046\u3067\u3059\u304c\u3001\u3053\u3061\u3089\u304c\u3059\u3050\u7406\u89e3\u3067\u304d\u308b\u8a00\u8a9e\u3067\u56de\u7b54\u3057\u3066\u307b\u3057\u3044\u3067\u3059\u3002\u4f55\u5ea6\u304b\u5165\u529b\u3057\u3066\u307f\u307e\u3057\u305f\u304c\u3001\u6b8b\u5ff5\u306a\u304c\u3089\u65e5\u672c\u8a9e\u306f\u3042\u307e\u308a\u5f97\u610f\u3067\u306f\u306a\u3044\u3088\u3046\u3067\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u65e5\u672c\u8a9e\u30c7\u30fc\u30bf\u3067\u8ffd\u52a0\u5b66\u7fd2\u3057\u305fDeepSeek-R1<\/h3>\n\n\n\n<p>DeepSeek-R1\u516c\u958b\u5f8c\u3001\u30b5\u30a4\u30d0\u30fc\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u793e\u304c<a href=\"https:\/\/x.com\/CyberAgent_PR\/status\/1883783524836413468\" target=\"_blank\" rel=\"noreferrer noopener\">\u65e5\u672c\u8a9e\u30c7\u30fc\u30bf\u3067\u8ffd\u52a0\u5b66\u7fd2\u3092\u884c\u3063\u305f\u30e2\u30c7\u30eb\u3092\u516c\u958b<\/a>\u3057\u307e\u3057\u305f\u3002\u5143\u306e\u30e2\u30c7\u30eb\u3067\u3042\u308b <a href=\"https:\/\/huggingface.co\/deepseek-ai\/DeepSeek-R1-Distill-Qwen-14B\" target=\"_blank\" rel=\"noreferrer noopener\">DeepSeek-R1-Distill-Qwen-14B<\/a> \u306b\u65e5\u672c\u8a9e\u30c7\u30fc\u30bf\u3067\u8ffd\u52a0\u5b66\u7fd2\u3057\u305f\u3082\u306e\u3067\u3059\u3002\u305f\u3060\u3001\u30e9\u30a4\u30bb\u30f3\u30b9\u306b\u6b21\u306e2\u70b9\u306e\u6307\u6458\u304c\u306a\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/x.com\/shujisado\/status\/1884015229983760772\" target=\"_blank\" rel=\"noreferrer noopener\">\u30e9\u30a4\u30bb\u30f3\u30b9\u304c\u6d3e\u751f\u5143\u306eDeepSeek\u793e\u306e\u307f\u306e\u8457\u4f5c\u6a29\u8868\u8a18\u306b\u306a\u3063\u3066\u304a\u308a\u307e\u3059\u3002<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/x.com\/featherogs\/status\/1884196356304285872\" target=\"_blank\" rel=\"noreferrer noopener\">\u5143\u306eAlibaba Cloud\u306e\u8457\u4f5c\u6a29\u8868\u793a\u304a\u3088\u3073\u30e9\u30a4\u30bb\u30f3\u30b9\u6587\u306e\u30b3\u30d4\u30fc\u3082\u5171\u306b\u914d\u5e03\u3057\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/a><\/li>\n<\/ul>\n\n\n\n<p>\u3053\u308c\u3089\u304c\u89e3\u6c7a\u3059\u308c\u3070\u3001\u5229\u7528\u3057\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">LangChain\u304b\u3089Ollama\u3092\u901a\u3057\u3066DeepSeek-R1\u3092\u5229\u7528\u3059\u308b<\/h2>\n\n\n\n<p><a href=\"https:\/\/www.langchain.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">LangChain<\/a>\u306b\u306fOllama\u30b5\u30fc\u30d0\u3092\u5229\u7528\u3057\u3066\u30c1\u30e3\u30c3\u30c8\u3067\u304d\u308b<a href=\"https:\/\/python.langchain.com\/docs\/integrations\/chat\/ollama\/\" target=\"_blank\" rel=\"noreferrer noopener\">ChatOllama<\/a>\u304c\u7528\u610f\u3055\u308c\u3066\u3044\u308b\u306e\u3067\u305d\u308c\u3092\u5229\u7528\u3057\u307e\u3057\u3087\u3046\u3002\u6b21\u306e\u3088\u3046\u306a\u30b3\u30fc\u30c9\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\nfrom typing_extensions import TypedDict\nfrom langgraph.graph import StateGraph, START, END\nfrom langgraph.graph.message import add_messages\nfrom langchain_core.messages import BaseMessage\nfrom langchain_ollama import ChatOllama\nfrom langgraph.checkpoint.memory import MemorySaver\n\nimport os\nfrom dotenv import load_dotenv\nload_dotenv()\n\nllm = ChatOllama(\n    model=\"deepseek-r1\",\n    base_url=\"http:\/\/localhost:11434\",\n)\n\nclass State(TypedDict):\n    messages: Annotated[list, add_messages]\n\ndef chatbot(state: State):\n    res = llm.invoke(state[\"messages\"])\n    return {\"messages\": res}\n\ngraph_builder = StateGraph(State)\ngraph_builder.add_node(\"chatbot\", chatbot)\ngraph_builder.set_entry_point(\"chatbot\")\ngraph_builder.set_finish_point(\"chatbot\")\n\nmemory = MemorySaver()\ngraph = graph_builder.compile(checkpointer=memory)\n\ndef stream_graph_updates(user_input: str):\n    events = graph.stream(\n        {\"messages\": [(\"user\", user_input)]},\n        {\"configurable\": {\"thread_id\": \"1\"}},\n        stream_mode=\"messages\",\n    )\n    for msg, metadata in events:\n        if msg.content:\n           print(msg.content, end=\"\", flush=True)\n    print()\n\nwhile True:\n    try:\n        user_input = input(\"User: \")\n        if user_input.lower() in [\"quit\", \"exit\", \"q\"]:\n            print(\"Goodbye!\")\n            break\n        stream_graph_updates(user_input)\n    except Exception as e:\n        print(f\"error: {e}\")\n        break<\/pre>\n\n\n\n<p>\u904e\u53bb\u8a18\u4e8b\u300c<a href=\"https:\/\/www.creationline.com\/tech-blog\/75785\" target=\"_blank\" rel=\"noreferrer noopener\">LangGraph\u306e\u4f1a\u8a71\u5c65\u6b74\u3092\u30e1\u30e2\u30ea\u4fdd\u6301\u3057\u3088\u3046<\/a>\u300d\u304b\u3089\u3001\u91cd\u8981\u306a\u5dee\u5206\u3092\u898b\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"diff\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">-from langchain_openai import AzureChatOpenAI\n+from langchain_ollama import ChatOllama<\/pre>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"diff\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">-# os.getenv(\"AZURE_OPENAI_API_KEY\")\n-# os.getenv(\"AZURE_OPENAI_ENDPOINT\")\n-llm = AzureChatOpenAI(\n-         azure_deployment = os.getenv(\"AZURE_OPENAI_MODEL_NAME\"),\n-         api_version = os.getenv(\"AZURE_OPENAI_API_VERSION\"),\n-         temperature = 0.95,\n-         max_tokens = 1024,\n-      )\n+llm = ChatOllama(\n+    model=\"deepseek-r1\",\n+    base_url=\"http:\/\/localhost:11434\",\n+)<\/pre>\n\n\n\n<p><a href=\"https:\/\/azure.microsoft.com\/ja-jp\/products\/ai-services\/openai-service\" target=\"_blank\" rel=\"noreferrer noopener\">Azure OpenAI<\/a>\u3067\u306f\u306a\u304f<a href=\"https:\/\/python.langchain.com\/docs\/integrations\/chat\/ollama\/\" target=\"_blank\" rel=\"noreferrer noopener\">ChatOllama<\/a>\u7d4c\u7531\u3067\u3001\u30ed\u30fc\u30ab\u30eb\u306eOllama\u30b5\u30fc\u30d0\u306eDeepSeek-R1\u3092\u4f7f\u3046\u3088\u3046\u306b\u5909\u66f4\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"diff\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">-from yaspin import yaspin<\/pre>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"diff\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\"> def chatbot(state: State):\n-    with yaspin(text=\"Processing\", color=\"yellow\") as spinner:\n-        res = llm.invoke(state[\"messages\"])\n-        spinner.ok(\"&#x2705; \")\n+    res = llm.invoke(state[\"messages\"])<\/pre>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"diff\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">-        stream_mode=\"values\"\n+        stream_mode=\"messages\",\n     )\n-    for event in events:\n-        print(event[\"messages\"][-1].content)\n+    for msg, metadata in events:\n+        if msg.content:\n+           print(msg.content, end=\"\", flush=True)\n+    print()<\/pre>\n\n\n\n<p>\u30ed\u30fc\u30ab\u30ebPC\u304c\u8ca7\u5f31\u306a\u306e\u3067\u3001\u7d50\u679c\u3092\u307e\u3068\u3081\u3066\u51fa\u3059\u3068\u5f85\u3061\u6642\u9593\u304c\u9577\u3059\u304e\u3066\u30e6\u30fc\u30b6\u4f53\u9a13\u304c\u3068\u3066\u3082\u60aa\u3044\u3067\u3059\u3002\u305d\u306e\u305f\u3081\u3001\u30c8\u30fc\u30af\u30f3\u3054\u3068\u306b\u51fa\u529b\u3059\u308b <code>messages<\/code> \u30e2\u30fc\u30c9\u3092\u4f7f\u7528\u3057\u3001\u51fa\u529b\u65b9\u6cd5\u3092\u5909\u66f4\u3057\u3066\u3044\u307e\u3059\u3002\u8a73\u7d30\u306f <a href=\"https:\/\/langchain-ai.github.io\/langgraph\/concepts\/streaming\/#streaming-graph-outputs-stream-and-astream\" target=\"_blank\" rel=\"noreferrer noopener\">Streaming graph outputs<\/a>\u3092\u3054\u89a7\u304f\u3060\u3055\u3044\u3002<\/p>\n\n\n\n<p>\u3053\u308c\u3092\u5b9f\u884c\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002\u5143\u306eDeepSeek-R1\u306f\u65e5\u672c\u8a9e\u304c\u82e6\u624b\u306a\u306e\u3067\u82f1\u8a9e\u3067\u4f1a\u8a71\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=\"\">User: Hello, my name is Bob.\n&lt;think>\nOkay, the user just said \"Hello, my name is Bob.\" I should respond warmly.\n\nMaybe say something like, \"Hello, nice to meet you! How can I assist you today?\" That sounds friendly and open.\n\nI'll keep it simple and welcoming so they feel comfortable asking for help.\n&lt;\/think>\n\nHello, nice to meet you! How can I assist you today?<\/pre>\n\n\n\n<p><code>&lt;think&gt; ... &lt;\/think&gt;<\/code> \u306e\u90e8\u5206\u3067\u3001\u3069\u306e\u3088\u3046\u306b\u8fd4\u7b54\u3057\u3088\u3046\u304b\u8003\u3048\u3066\u3044\u308b\u3068\u3053\u308d\u304c\u898b\u3048\u3066\u9762\u767d\u3044\u3067\u3059\u3002\u7d9a\u3051\u3066\u540d\u524d\u3092\u805e\u3044\u3066\u307f\u307e\u3057\u3087\u3046\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=\"\">User: Please tell me my name.\n&lt;think>\nAlright, let's see what the user is asking here. They've just told me their name is Bob after greeting me.\n\nBut then in their next query, they simply ask, \"Please tell me my name.\" That seems a bit straightforward. Maybe they're testing if I can repeat names or perhaps they want to confirm that I know their name as Bob from the previous conversation.\n\nI should acknowledge that and respond clearly. Since their name is Bob, it's likely they just want confirmation or a simple affirmation of their identity here.\n\nSo, my response should be friendly and straightforward. Maybe something like, \"Hello Bob! It's great to have you with us today.\" That way, I'm addressing them by their correct name and making a positive statement.\n\nI don't see any deeper need here; they just want their name confirmed or acknowledged. So keeping it brief but warm makes sense.\n&lt;\/think>\n\nHello Bob! It's great to have you with us today.<\/pre>\n\n\n\n<p>\u300c\u3061\u3083\u3093\u3068\u7b54\u3048\u3089\u308c\u308b\u304b\u3069\u3046\u304b\u8a66\u3057\u3066\u3044\u308b\u307f\u305f\u3044\u3060\u300d(Maybe they're testing if I can repeat names.)\u3068\u3001\u3053\u3061\u3089\u306e\u610f\u56f3\u3092\u898b\u629c\u3044\u3066\u3044\u307e\u3059 \ud83d\ude42<\/p>\n\n\n\n<p>\u56de\u7b54\u901f\u5ea6\u306f\u6b21\u306e\u52d5\u753b\u3092\u898b\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002NVIDIA GPU\u3067\u3082\u30e1\u30e2\u30ea4GB\u306e\u3053\u306e\u901f\u5ea6\u3067\u5e38\u7528\u3059\u308b\u306e\u306f\u53b3\u3057\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1296\" height=\"818\" src=\"https:\/\/www.creationline.com\/tech-blog\/cms_x3GWkuX\/wp-content\/uploads\/2025\/05\/ollama-deepseek.gif\" alt=\"\" class=\"wp-image-77300\"\/><\/figure>\n\n\n\n<p>\u7d9a\u3051\u3066\u8cea\u554f\u3057\u3066\u307f\u307e\u3057\u3087\u3046\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=\"\">User: Please teach me what is Linux.<\/pre>\n\n\n\n<p>\u3053\u306e\u5f8c\u3001\u6700\u521d\u306e <code>&lt;think&gt;<\/code> \u304c\u51fa\u308b\u307e\u30671\u5206\u304f\u3089\u3044\u5f85\u305f\u3055\u308c\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=\"\">&lt;think>\nOkay, the user has asked about Linux again. They previously mentioned their name and now are looking to learn more about it.\n\nI should start by welcoming them back and providing a clear, concise explanation of what Linux is.\n\nMaybe explain that Linux is an open-source operating system, commonly used for servers or development purposes.\n\nI'll also mention its history with the Linus Torvalds creation at AAN\u5206\u5f00 and its popularity today due to its flexibility and cost-effectiveness.\n\nKeeping it friendly and informative should help them understand quickly.\n&lt;\/think><\/pre>\n\n\n\n<p><code>AAN\u5206\u5f00<\/code> \u3068\u306f\u4f55\u3067\u3057\u3087\u3046\u304b\uff1f \u300c\u5206\u5f00\u300d\u306f\u65e5\u672c\u8a9e\u3067\u300c\u5225\u7d19\u300d\u3089\u3057\u3044\u306e\u3067\u3001\u88dc\u8db3\u60c5\u5831\u3068\u3057\u3066\u3001\u3068\u3044\u3046\u610f\u5473\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002\u5b9f\u969b\u306e\u7b54\u3048\u3082\u898b\u3066\u307f\u307e\u3057\u3087\u3046\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=\"\">Hello! Welcome back. Let me explain what Linux is.\n\nLinux is an open-source operating system originally created by Linus Torvalds in 1991 under the name \"Linear Unix\" (later renamed to \"Linux\"). It was designed as a free software alternative to proprietary operating systems like Microsoft Windows and Unix.\n\nKey features of Linux:\n- **Open-source**: Source code is freely available for anyone to view, modify, or enhance.\n- **Cost-effective**: Often used in servers because it's free to use (FOSS).\n- **Customizable**: Developers can modify the system to meet their needs.\n- **Stable and secure**: Regular updates help maintain security.\n\nLinux is widely used in servers, supercomputers, and other systems where reliability and customization are important. It also powers a significant number of websites and applications due to its stability and flexibility.\n\nWould you like me to explain something specific about Linux?<\/pre>\n\n\n\n<p>Linux\u304c\u5f53\u521d\u300cLinear Unix\u300d\u3068\u3044\u3046\u540d\u524d\u3060\u3063\u305f\u3068\u3044\u3046\u306e\u306f\u521d\u3081\u3066\u805e\u3044\u305f\u3093\u3067\u3059\u304c\u2026\u8abf\u3079\u3066\u3082\u305d\u3046\u3044\u3046\u30a8\u30d4\u30bd\u30fc\u30c9\u306f\u898b\u3064\u304b\u3089\u306a\u304b\u3063\u305f\u306e\u3067\u9593\u9055\u3044\u3060\u3068\u601d\u3044\u307e\u3059\u3002\u306a\u304a\u4eee\u306e\u540d\u524d\u3068\u3057\u3066\u306f\u300cLinus's Minix\u300d\u3084\u300cFreax\u300d\u304c\u6709\u540d\u3067\u3059\u3002<\/p>\n\n\n\n<p>\u6b21\u306b\u30d7\u30ed\u30d7\u30e9\u30a4\u30a8\u30bf\u30eaOS\u306b\u5bfe\u3059\u308b\u30d5\u30ea\u30fc\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u4ee3\u66ff\u3068\u3057\u3066\u8a2d\u8a08\u3055\u308c\u305f\u3068\u3044\u3046\u306e\u3082\u3001\u7d50\u679c\u7684\u306b\u305d\u3046\u306a\u3063\u3066\u3044\u308b\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u304c\u3001\u6700\u521d\u304b\u3089\u305d\u308c\u304c\u76ee\u7684\u3067\u3042\u308b\u304b\u306e\u3088\u3046\u306a\u8aac\u660e\u306f\u8a00\u3044\u904e\u304e\u3060\u3068\u601d\u3044\u307e\u3059\u3002\u300c\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u304c\u91cd\u8981\u306a\u30b7\u30b9\u30c6\u30e0\u3067\u5e83\u304f\u7528\u3044\u3089\u308c\u3066\u3044\u308b(widely used \u2026 systems where \u2026 customization are important)\u300d\u3068\u3044\u3046\u306e\u3082\u4f55\u304b\u9055\u3046\u6c17\u304c\u3057\u307e\u3059\u3002\u304a\u304a\u3088\u305d\u5f53\u305f\u3063\u3066\u308b\u3051\u3069\u3001\u4f55\u3060\u304b\u602a\u3057\u3044\u305e\u3001\u3068\u3044\u3046\u304f\u3089\u3044\u306e\u56de\u7b54\u3067\u3057\u305f\u3002<\/p>\n\n\n\n<p>\u3055\u3089\u306b\u805e\u3044\u3066\u307f\u307e\u3057\u3087\u3046\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=\"\">User: Please explain who is Linus Torvalds.\n&lt;think>\nAlright, the user just asked about Linus Torvalds after I explained Linux. They might be curious about the history behind it or why his name is so important in this context.\n\nI should provide a simple and clear explanation of who he is, when he was born, where he's from, and how he developed Linux.\n\nIt's also good to mention that while he didn't invent Linux, he played a significant role in its creation.\n&lt;\/think>\n\nLinus Torvalds is the creator of the Linux operating system. He was born on April 29, 1965, in Jyv\u00e4skyl\u00e4, Finland. Initially an academic researcher, he developed Linux as a free, open-source alternative to proprietary software.\n\nLinus's work on Linux has made him one of the most recognizable names in the open-source community, and many consider his contributions to be as significant as the Unix or Windows creators due to the vast impact Linux has had globally.<\/pre>\n\n\n\n<p>\u8a95\u751f\u65e5\u3068\u751f\u8a95\u5730\u304c\u9593\u9055\u3063\u3066\u3044\u307e\u3059\uff08\u6b63\u3057\u304f\u306fDec 28, 1969, \u30d8\u30eb\u30b7\u30f3\u30ad\uff09\u3002Linus\u306f\u5927\u5b66\u306e\u5728\u5b66\u4e2d\u3001\u3059\u306a\u308f\u3061\u5b66\u751f\u306e\u3046\u3061\u306bLinux\u3092\u767a\u8868\u3057\u3066\u3044\u308b\u306e\u3067\u3001\u300c\u5f53\u521d\u306f\u5b66\u8853\u7814\u7a76\u8005 (Initially an academic researcher)\u300d\u3092\u300c\u5b66\u751f\u300d\u3068\u89e3\u91c8\u3067\u304d\u306a\u304f\u3082\u306a\u3044\u306a\u3068\u306f\u601d\u3044\u307e\u3059\u304c\u2026\u30b7\u30f3\u30d7\u30eb\u306b\u300cStudent\u300d\u304c\u51fa\u3066\u3053\u306a\u304b\u3063\u305f\u306e\u304b\u306a\u3068\u601d\u3044\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\u306f<a href=\"https:\/\/ollama.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">Ollama<\/a>\u3092\u4f7f\u3044\u3001<a href=\"https:\/\/github.com\/deepseek-ai\/DeepSeek-R1\" target=\"_blank\" rel=\"noreferrer noopener\">DeepSeek-R1<\/a>\u3092\u52d5\u304b\u3057\u3001<a href=\"https:\/\/www.langchain.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">LangChain<\/a>\u3092\u4f7f\u3063\u3066\u7c21\u5358\u306a\u30c1\u30e3\u30c3\u30c8\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u4f5c\u3063\u3066\u307f\u307e\u3057\u305f\u3002\u304b\u306a\u308a\u7c21\u5358\u306b\u30ed\u30fc\u30ab\u30ebPC\u3067LLM\u3092\u52d5\u304b\u3059\u3053\u3068\u304c\u3067\u304d\u3001\u4f1a\u8a71\u3067\u304d\u308b\u3053\u3068\u304c\u308f\u304b\u308a\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<p>\u7d20\u306eDeepSeek-R1\u306f\u65e5\u672c\u8a9e\u304c\u82e6\u624b\u306a\u306e\u3067\u82f1\u8a9e\u3067\u4f1a\u8a71\u3057\u307e\u3057\u305f\u304c\u3001\u4eca\u56de\u8a66\u3057\u305f\u8cea\u554f\u6587\u306e\u7b54\u3048\u306f\u305d\u306e\u307e\u307e\u4fe1\u3058\u308b\u308f\u3051\u306b\u306f\u3044\u304b\u306a\u3044\u3001\u3061\u3087\u3063\u3068\u6b8b\u5ff5\u306a\u3082\u306e\u3067\u3057\u305f\u3002\u3082\u3057\u304b\u3059\u308b\u3068\u4e2d\u56fd\u8a9e\u3067\u4f1a\u8a71\u3057\u305f\u3089\u3082\u3063\u3068\u7cbe\u5ea6\u304c\u3088\u304b\u3063\u305f\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u304c\u3001\u7b46\u8005\u306f\u4e2d\u56fd\u8a9e\u304c\u308f\u304b\u3089\u306a\u3044\u3057\u3001\u30a6\u30a7\u30d6\u7ffb\u8a33\u3092\u4f7f\u3063\u305f\u3068\u3057\u3066\u3082\u7ffb\u8a33\u304c\u6b63\u3057\u3044\u304b\u3069\u3046\u304b\u3092\u8a55\u4fa1\u3067\u304d\u306a\u3044\u306e\u3067\u2026\u3002<\/p>\n\n\n\n<p>\u7cbe\u5ea6\u304c\u305d\u308c\u307b\u3069\u5fc5\u8981\u306a\u3044\u5834\u9762\u3001\u4f8b\u3048\u3070\u30c1\u30e3\u30c3\u30c8\u30a2\u30d7\u30ea\u304c\u4e00\u901a\u308a\u52d5\u4f5c\u3059\u308b\u304b\u3069\u3046\u304b\u3092\u78ba\u304b\u3081\u305f\u3044\u5834\u5408\u306a\u3069\u3001\u5916\u90e8\u306eLLM\u3092\u5229\u7528\u3059\u308b\u305f\u3081\u306e\u6599\u91d1\u3084\u79d8\u5bc6\u306b\u3057\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044API\u30ad\u30fc\u306e\u7ba1\u7406\u306b\u6c17\u3092\u4f7f\u308f\u305a\u306b\u3001\u958b\u767a\u76ee\u7684\u306b\u624b\u8efd\u306b\u4f7f\u3048\u308b\u3068\u3044\u3046\u306e\u306f\u5927\u304d\u3044\u3067\u3059\u3002<\/p>\n\n\n\n<p>\u3082\u3057\u304b\u3059\u308b\u3068\u30ed\u30fc\u30ab\u30ebPC\u306e\u8ca7\u5f31\u3055\u304c\u539f\u56e0\u306a\u306e\u3067\u30b9\u30da\u30c3\u30af\u30a2\u30c3\u30d7\u3057\u306a\u3051\u308c\u3070\u7121\u7406\u306a\u306e\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u304c\u3001\u4eca\u5f8c\u306e\u7cbe\u5ea6\u5411\u4e0a\u306b\u306f\u5f15\u304d\u7d9a\u304d\u671f\u5f85\u3057\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u306f\u3058\u3081\u306b \u4ee5\u524d\u306e\u8a18\u4e8b\u300c\u304a\u3046\u3061\u3067ChatGPT\u3084\u3063\u3066\u307f\u305f\u3044\uff01 \u30ed\u30fc\u30ab\u30ebLLM(\u5927\u898f\u6a21\u8a00\u8a9e\u30e2\u30c7\u30eb)\u306f\u3069\u3053\u307e\u3067\u3067\u304d\u308b\u304b\uff1f\u300d\u3067\u306f\u3001\u30ed\u30fc\u30ab\u30ebPC\u3067LLM\u3092\u4f53\u9a13\u3059\u308b\u306e\u306bllama.cpp\u3092\u30d3\u30eb\u30c9\u3057\u3066\u4f7f\u3063\u3066\u3044\u307e\u3057\u305f\u3002 \u4eca\u56de\u306fOllam [&#8230;]<\/p>\n","protected":false},"author":2,"featured_media":77300,"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-77298","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>Ollama\u3068LangChain\u3067DeepSeek\u3092\u30ed\u30fc\u30ab\u30ebPC\u3067\u52d5\u304b\u305d\u3046 #ai #llm #ollama #langchain #deepseek - 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 \u4ee5\u524d\u306e\u8a18\u4e8b\u300c\u304a\u3046\u3061\u3067ChatGPT\u3084\u3063\u3066\u307f\u305f\u3044\uff01\" \/>\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\/77298\" \/>\n<meta property=\"og:locale\" content=\"ja_JP\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Ollama\u3068LangChain\u3067DeepSeek\u3092\u30ed\u30fc\u30ab\u30ebPC\u3067\u52d5\u304b\u305d\u3046 #ai #llm #ollama #langchain #deepseek - 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 \u4ee5\u524d\u306e\u8a18\u4e8b\u300c\u304a\u3046\u3061\u3067ChatGPT\u3084\u3063\u3066\u307f\u305f\u3044\uff01\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.creationline.com\/tech-blog\/author\/higuchi\/77298\" \/>\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=\"2025-05-12T23:00:00+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.creationline.com\/tech-blog\/cms_x3GWkuX\/wp-content\/uploads\/2025\/05\/ollama-deepseek-1024x646.gif\" \/>\n\t<meta property=\"og:image:width\" content=\"1024\" \/>\n\t<meta property=\"og:image:height\" content=\"646\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/gif\" \/>\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=\"6\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\\\/77298#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/author\\\/higuchi\\\/77298\"},\"author\":{\"name\":\"Daisuke Higuchi\",\"@id\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/#\\\/schema\\\/person\\\/16f1373831fb6fd17387f16ae1195206\"},\"headline\":\"Ollama\u3068LangChain\u3067DeepSeek\u3092\u30ed\u30fc\u30ab\u30ebPC\u3067\u52d5\u304b\u305d\u3046 #ai #llm #ollama #langchain #deepseek\",\"datePublished\":\"2025-05-12T23:00:00+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/author\\\/higuchi\\\/77298\"},\"wordCount\":146,\"image\":{\"@id\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/author\\\/higuchi\\\/77298#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/cms_x3GWkuX\\\/wp-content\\\/uploads\\\/2025\\\/05\\\/ollama-deepseek.gif\",\"articleSection\":[\"AI\",\"d-higuchi\",\"LLM\",\"Python\"],\"inLanguage\":\"ja\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/author\\\/higuchi\\\/77298\",\"url\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/author\\\/higuchi\\\/77298\",\"name\":\"Ollama\u3068LangChain\u3067DeepSeek\u3092\u30ed\u30fc\u30ab\u30ebPC\u3067\u52d5\u304b\u305d\u3046 #ai #llm #ollama #langchain #deepseek - 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\\\/77298#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/author\\\/higuchi\\\/77298#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/cms_x3GWkuX\\\/wp-content\\\/uploads\\\/2025\\\/05\\\/ollama-deepseek.gif\",\"datePublished\":\"2025-05-12T23:00:00+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/#\\\/schema\\\/person\\\/16f1373831fb6fd17387f16ae1195206\"},\"description\":\"AI, d-higuchi, LLM, Python |\u306f\u3058\u3081\u306b \u4ee5\u524d\u306e\u8a18\u4e8b\u300c\u304a\u3046\u3061\u3067ChatGPT\u3084\u3063\u3066\u307f\u305f\u3044\uff01\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/author\\\/higuchi\\\/77298#breadcrumb\"},\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/author\\\/higuchi\\\/77298\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/author\\\/higuchi\\\/77298#primaryimage\",\"url\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/cms_x3GWkuX\\\/wp-content\\\/uploads\\\/2025\\\/05\\\/ollama-deepseek.gif\",\"contentUrl\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/cms_x3GWkuX\\\/wp-content\\\/uploads\\\/2025\\\/05\\\/ollama-deepseek.gif\",\"width\":1296,\"height\":818},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/author\\\/higuchi\\\/77298#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\":\"Ollama\u3068LangChain\u3067DeepSeek\u3092\u30ed\u30fc\u30ab\u30ebPC\u3067\u52d5\u304b\u305d\u3046 #ai #llm #ollama #langchain #deepseek\"}]},{\"@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":"Ollama\u3068LangChain\u3067DeepSeek\u3092\u30ed\u30fc\u30ab\u30ebPC\u3067\u52d5\u304b\u305d\u3046 #ai #llm #ollama #langchain #deepseek - Tech Blog\uff5c\u30af\u30ea\u30a8\u30fc\u30b7\u30e7\u30f3\u30e9\u30a4\u30f3","description":"AI, d-higuchi, LLM, Python |\u306f\u3058\u3081\u306b \u4ee5\u524d\u306e\u8a18\u4e8b\u300c\u304a\u3046\u3061\u3067ChatGPT\u3084\u3063\u3066\u307f\u305f\u3044\uff01","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\/77298","og_locale":"ja_JP","og_type":"article","og_title":"Ollama\u3068LangChain\u3067DeepSeek\u3092\u30ed\u30fc\u30ab\u30ebPC\u3067\u52d5\u304b\u305d\u3046 #ai #llm #ollama #langchain #deepseek - Tech Blog\uff5c\u30af\u30ea\u30a8\u30fc\u30b7\u30e7\u30f3\u30e9\u30a4\u30f3","og_description":"AI, d-higuchi, LLM, Python |\u306f\u3058\u3081\u306b \u4ee5\u524d\u306e\u8a18\u4e8b\u300c\u304a\u3046\u3061\u3067ChatGPT\u3084\u3063\u3066\u307f\u305f\u3044\uff01","og_url":"https:\/\/www.creationline.com\/tech-blog\/author\/higuchi\/77298","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":"2025-05-12T23:00:00+00:00","og_image":[{"width":1024,"height":646,"url":"https:\/\/www.creationline.com\/tech-blog\/cms_x3GWkuX\/wp-content\/uploads\/2025\/05\/ollama-deepseek-1024x646.gif","type":"image\/gif"}],"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":"6\u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.creationline.com\/tech-blog\/author\/higuchi\/77298#article","isPartOf":{"@id":"https:\/\/www.creationline.com\/tech-blog\/author\/higuchi\/77298"},"author":{"name":"Daisuke Higuchi","@id":"https:\/\/www.creationline.com\/tech-blog\/#\/schema\/person\/16f1373831fb6fd17387f16ae1195206"},"headline":"Ollama\u3068LangChain\u3067DeepSeek\u3092\u30ed\u30fc\u30ab\u30ebPC\u3067\u52d5\u304b\u305d\u3046 #ai #llm #ollama #langchain #deepseek","datePublished":"2025-05-12T23:00:00+00:00","mainEntityOfPage":{"@id":"https:\/\/www.creationline.com\/tech-blog\/author\/higuchi\/77298"},"wordCount":146,"image":{"@id":"https:\/\/www.creationline.com\/tech-blog\/author\/higuchi\/77298#primaryimage"},"thumbnailUrl":"https:\/\/www.creationline.com\/tech-blog\/cms_x3GWkuX\/wp-content\/uploads\/2025\/05\/ollama-deepseek.gif","articleSection":["AI","d-higuchi","LLM","Python"],"inLanguage":"ja"},{"@type":"WebPage","@id":"https:\/\/www.creationline.com\/tech-blog\/author\/higuchi\/77298","url":"https:\/\/www.creationline.com\/tech-blog\/author\/higuchi\/77298","name":"Ollama\u3068LangChain\u3067DeepSeek\u3092\u30ed\u30fc\u30ab\u30ebPC\u3067\u52d5\u304b\u305d\u3046 #ai #llm #ollama #langchain #deepseek - 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\/77298#primaryimage"},"image":{"@id":"https:\/\/www.creationline.com\/tech-blog\/author\/higuchi\/77298#primaryimage"},"thumbnailUrl":"https:\/\/www.creationline.com\/tech-blog\/cms_x3GWkuX\/wp-content\/uploads\/2025\/05\/ollama-deepseek.gif","datePublished":"2025-05-12T23:00:00+00:00","author":{"@id":"https:\/\/www.creationline.com\/tech-blog\/#\/schema\/person\/16f1373831fb6fd17387f16ae1195206"},"description":"AI, d-higuchi, LLM, Python |\u306f\u3058\u3081\u306b \u4ee5\u524d\u306e\u8a18\u4e8b\u300c\u304a\u3046\u3061\u3067ChatGPT\u3084\u3063\u3066\u307f\u305f\u3044\uff01","breadcrumb":{"@id":"https:\/\/www.creationline.com\/tech-blog\/author\/higuchi\/77298#breadcrumb"},"inLanguage":"ja","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.creationline.com\/tech-blog\/author\/higuchi\/77298"]}]},{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.creationline.com\/tech-blog\/author\/higuchi\/77298#primaryimage","url":"https:\/\/www.creationline.com\/tech-blog\/cms_x3GWkuX\/wp-content\/uploads\/2025\/05\/ollama-deepseek.gif","contentUrl":"https:\/\/www.creationline.com\/tech-blog\/cms_x3GWkuX\/wp-content\/uploads\/2025\/05\/ollama-deepseek.gif","width":1296,"height":818},{"@type":"BreadcrumbList","@id":"https:\/\/www.creationline.com\/tech-blog\/author\/higuchi\/77298#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":"Ollama\u3068LangChain\u3067DeepSeek\u3092\u30ed\u30fc\u30ab\u30ebPC\u3067\u52d5\u304b\u305d\u3046 #ai #llm #ollama #langchain #deepseek"}]},{"@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\/77298","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=77298"}],"version-history":[{"count":2,"href":"https:\/\/www.creationline.com\/tech-blog\/wp-json\/wp\/v2\/posts\/77298\/revisions"}],"predecessor-version":[{"id":77411,"href":"https:\/\/www.creationline.com\/tech-blog\/wp-json\/wp\/v2\/posts\/77298\/revisions\/77411"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.creationline.com\/tech-blog\/wp-json\/wp\/v2\/media\/77300"}],"wp:attachment":[{"href":"https:\/\/www.creationline.com\/tech-blog\/wp-json\/wp\/v2\/media?parent=77298"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.creationline.com\/tech-blog\/wp-json\/wp\/v2\/categories?post=77298"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.creationline.com\/tech-blog\/wp-json\/wp\/v2\/tags?post=77298"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}