{"id":55369,"date":"2025-02-19T13:01:43","date_gmt":"2025-02-19T05:01:43","guid":{"rendered":"https:\/\/fwq.ai\/blog\/55369\/"},"modified":"2025-02-19T13:01:43","modified_gmt":"2025-02-19T05:01:43","slug":"langchain-chatchat-%e9%83%a8%e7%bd%b2%e6%95%99%e7%a8%8b%ef%bc%81%e5%85%8d%e8%b4%b9%e5%bc%80%e6%ba%90%e5%8f%af%e5%95%86%e7%94%a8%ef%bc%8c%e5%ae%8c%e5%85%a8%e6%9c%ac%e5%9c%b0%e5%8c%96%e6%8e%a8%e7%90%86","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/55369\/","title":{"rendered":"Langchain-Chatchat \u90e8\u7f72\u6559\u7a0b\uff01\u514d\u8d39\u5f00\u6e90\u53ef\u5546\u7528\uff0c\u5b8c\u5168\u672c\u5730\u5316\u63a8\u7406\u7684\u77e5\u8bc6\u5e93\u589e\u5f3a\u65b9\u6848"},"content":{"rendered":"<p><img decoding=\"async\" class=\"aligncenter\" src=\"https:\/\/www.aisharenet.com\/wp-content\/uploads\/2024\/03\/8627caf2636b50d.png\" title=\"Langchain-Chatchat \u90e8\u7f72\u6559\u7a0b\uff01\u514d\u8d39\u5f00\u6e90\u53ef\u5546\u7528\uff0c\u5b8c\u5168\u672c\u5730\u5316\u63a8\u7406\u7684\u77e5\u8bc6\u5e93\u589e\u5f3a\u65b9\u6848\u63d2\u56fe\" alt=\"Langchain-Chatchat \u90e8\u7f72\u6559\u7a0b\uff01\u514d\u8d39\u5f00\u6e90\u53ef\u5546\u7528\uff0c\u5b8c\u5168\u672c\u5730\u5316\u63a8\u7406\u7684\u77e5\u8bc6\u5e93\u589e\u5f3a\u65b9\u6848\u63d2\u56fe\" \/><\/p>\n<p>&nbsp;<\/p>\n<p> <\/p>\n<p><img decoding=\"async\" class=\"aligncenter\" src=\"https:\/\/www.aisharenet.com\/wp-content\/uploads\/2024\/03\/56990b3eae3fdbe.png\" title=\"Langchain-Chatchat \u90e8\u7f72\u6559\u7a0b\uff01\u514d\u8d39\u5f00\u6e90\u53ef\u5546\u7528\uff0c\u5b8c\u5168\u672c\u5730\u5316\u63a8\u7406\u7684\u77e5\u8bc6\u5e93\u589e\u5f3a\u65b9\u6848\u63d2\u56fe1\" alt=\"Langchain-Chatchat \u90e8\u7f72\u6559\u7a0b\uff01\u514d\u8d39\u5f00\u6e90\u53ef\u5546\u7528\uff0c\u5b8c\u5168\u672c\u5730\u5316\u63a8\u7406\u7684\u77e5\u8bc6\u5e93\u589e\u5f3a\u65b9\u6848\u63d2\u56fe1\" \/><\/p>\n<p>Langchain Chatchat \u662f\u4e00\u4e2a\u53ef\u4ee5\u5b9e\u73b0\uff1a\u5b8c\u5168\u672c\u5730\u5316\u63a8\u7406\u7684\u77e5\u8bc6\u5e93\u589e\u5f3a\u65b9\u6848, \u91cd\u70b9\u89e3\u51b3\u6570\u636e\u5b89\u5168\u4fdd\u62a4\uff0c\u79c1\u57df\u5316\u90e8\u7f72\u7684\u4f01\u4e1a\u75db\u70b9\u3002 \u5f00\u6e90\u65b9\u6848\u91c7\u7528Apache License\uff0c\u53ef\u4ee5\u514d\u8d39\u5546\u7528\uff0c\u65e0\u9700\u4ed8\u8d39\u3002<\/p>\n<p>\u652f\u6301\u5e02\u9762\u4e0a\u4e3b\u6d41\u7684\u672c\u5730\u5927\u8bed\u8a00\u6a21\u578b\u548cEmbedding\u6a21\u578b\uff0c\u652f\u6301\u5f00\u6e90\u7684\u672c\u5730\u5411\u91cf\u6570\u636e\u5e93\u3002<\/p>\n<p>&nbsp;<\/p>\n<h2>1. \u73af\u5883\u914d\u7f6e<\/h2>\n<p>\u9996\u5148\uff0c\u786e\u4fdd\u4f60\u7684\u673a\u5668\u5b89\u88c5\u4e86 Python 3.8 \u2013 3.11 (\u5f3a\u70c8\u63a8\u8350\u4f7f\u7528 Python3.11)\u3002\u4e0d\u8981\u4f7f\u7528\u6700\u65b0\u7248\uff01<\/p>\n<blockquote>\n<p>$ python &#8211;version<\/p>\n<\/blockquote>\n<p>\u6f14\u793a\u73af\u5883\u4e3a Windows 11 \u7cfb\u7edf \u3001RTX 4090 24GB\u3001i7-12700<\/p>\n<p>&nbsp;<\/p>\n<p>\u5b89\u88c5CUDA Toolkit\uff0c\u5efa\u8bae\u5b89\u88c5 CUDA 12.1\u7248\u672c\uff0c\u56e0\u4e3a\u5f00\u53d1\u8005\u5c31\u662f\u7528\u7684\u8fd9\u4e2a\u7248\u672c\uff0c\u70b9\u51fb\u524d\u5f80\u3010\u3011\uff1b<\/p>\n<p>\u9700\u8981\u6ce8\u610f\u7684\u662f\uff0c\u5982\u679c\u4f60\u4e0d\u5728\u6d77\u5916\uff0c\u9700\u8981\u81ea\u884c\u5168\u5c40\u79d1\u5b66\u4e0a\u7f51\uff0c\u5426\u5219\u65e0\u6cd5\u6b63\u5e38\u5b89\u88c5\u3002<\/p>\n<p>&nbsp;<\/p>\n<h2>2. \u6b63\u5f0f\u5b89\u88c5<\/h2>\n<p>\u62c9\u53d6\u4ed3\u5e93\u9879\u76ee\u6587\u4ef6\uff1a<\/p>\n<p>&nbsp;<\/p>\n<blockquote>\n<p># \u62c9\u53d6\u4ed3\u5e93<br \/> $ git clone https:\/\/github.com\/chatchat-space\/Langchain-Chatchat.git<\/p>\n<p># \u8fdb\u5165\u76ee\u5f55<br \/> $ cd Langchain-Chatchat<\/p>\n<p># \u5b89\u88c5\u5168\u90e8\u4f9d\u8d56<br \/> $ pip install -r requirements.txt<br \/> $ pip install -r requirements_api.txt<br \/> $ pip install -r requirements_webui.txt<\/p>\n<p># \u9ed8\u8ba4\u4f9d\u8d56\u5305\u62ec\u57fa\u672c\u8fd0\u884c\u73af\u5883\uff08FAISS\u5411\u91cf\u5e93\uff09\u3002\u5982\u679c\u8981\u4f7f\u7528 milvus\/pg_vector \u7b49\u5411\u91cf\u5e93\uff0c\u8bf7\u5c06 requirements.txt \u4e2d\u76f8\u5e94\u4f9d\u8d56\u53d6\u6d88\u6ce8\u91ca\u518d\u5b89\u88c5\u3002<\/p>\n<\/blockquote>\n<p>&nbsp;<\/p>\n<h2>3.\u4e0b\u8f7d\u6a21\u578b<\/h2>\n<p>&nbsp;<\/p>\n<blockquote>\n<p>git lfs install<\/p>\n<\/blockquote>\n<p>&nbsp;<\/p>\n<blockquote>\n<p> git clone https:\/\/huggingface.co\/THUDM\/chatglm3-6b<br \/> git clone https:\/\/huggingface.co\/BAAI\/bge-large-zh<\/p>\n<\/blockquote>\n<p><strong>\u521d\u59cb\u5316\u914d\u7f6e<\/strong><\/p>\n<blockquote>\n<p>python copy_config_example.py<br \/> python init_database.py &#8211;recreate-vs<\/p>\n<\/blockquote>\n<p>&nbsp;<\/p>\n<h2>4.\u542f\u52a8<\/h2>\n<p>&nbsp;<\/p>\n<blockquote>\n<p>python startup.py -a<\/p>\n<\/blockquote>\n<p>\u7b2c\u4e00\u6b21\u542f\u52a8\u7684\u65f6\u5019\u9700\u8981\u8f93\u5165\u4e00\u4e2a\u90ae\u7bb1\uff0c\u5c31\u53ef\u4ee5\u6253\u5f00 webUI \u53ef\u89c6\u5316\u754c\u9762\u8fdb\u884c\u4f7f\u7528\uff01<\/p>\n<p>&nbsp;<\/p>\n<p>GPU\u786c\u4ef6\u63a8\u8350\u53c2\u6570<\/p>\n<blockquote>\n<p>7B\u7684\u6a21\u578b\uff0c\u663e\u5b5814GB+\uff0c\u63a8\u8350 NVIDIA RTX4080 16G\u53ca\u4ee5\u4e0a<br \/> 14B\u7ea7\u6a21\u578b\uff0c\u663e\u5b5830GB+\uff0c\u63a8\u8350 NVIDIA Tesla V100 32G\u53ca\u4ee5\u4e0a<br \/> 39B\u7ea7\u6a21\u578b\uff0c\u663e\u5b5869GB+\uff0c\u63a8\u8350 NVIDIA A100 80G\u53ca\u4ee5\u4e0a<br \/> 72B\u7ea7\u6a21\u578b\uff0c\u663e\u5b58145GB+\uff0c\u9700\u8981\u4e13\u4e1a\u7ea7\u663e\u5361\u6216\u8005\u591a\u5361\u53e0\u52a0<\/p>\n<\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; Langchain Chatchat \u662f\u4e00\u4e2a\u53ef\u4ee5\u5b9e\u73b0\uff1a\u5b8c\u5168\u672c\u5730\u5316\u63a8\u7406\u7684\u77e5\u8bc6\u5e93\u589e\u5f3a\u65b9\u6848, \u91cd\u70b9\u89e3\u51b3\u6570\u636e\u5b89\u5168\u4fdd\u62a4\uff0c\u79c1\u57df\u5316\u90e8\u7f72\u7684\u4f01\u4e1a\u75db\u70b9\u3002 \u5f00\u6e90\u65b9\u6848\u91c7\u7528Apache License\uff0c\u53ef\u4ee5\u514d\u8d39\u5546\u7528\uff0c\u65e0\u9700\u4ed8\u8d39\u3002 \u652f\u6301\u5e02\u9762\u4e0a\u4e3b\u6d41\u7684\u672c\u5730\u5927\u8bed\u8a00\u6a21\u578b\u548cEmbedding\u6a21\u578b\uff0c\u652f\u6301\u5f00\u6e90\u7684\u672c\u5730\u5411\u91cf\u6570\u636e\u5e93\u3002 &nbsp; 1. \u73af\u5883\u914d\u7f6e \u9996\u5148\uff0c\u786e\u4fdd\u4f60\u7684\u673a\u5668\u5b89\u88c5\u4e86 Python 3.8 \u2013 3.11 (\u5f3a\u70c8\u63a8\u8350\u4f7f\u7528 Python3.11)\u3002\u4e0d\u8981\u4f7f\u7528\u6700\u65b0\u7248\uff01 $ python &#8211;version \u6f14\u793a\u73af\u5883\u4e3a Windows 11 \u7cfb\u7edf \u3001RTX 4090 24GB\u3001i7-12700 &nbsp; \u5b89\u88c5CUDA Toolkit\uff0c\u5efa\u8bae\u5b89\u88c5 CUDA 12.1\u7248\u672c\uff0c\u56e0\u4e3a\u5f00\u53d1\u8005\u5c31\u662f\u7528\u7684\u8fd9\u4e2a\u7248\u672c\uff0c\u70b9\u51fb\u524d\u5f80\u3010\u3011\uff1b \u9700\u8981\u6ce8\u610f\u7684\u662f\uff0c\u5982\u679c\u4f60\u4e0d\u5728\u6d77\u5916\uff0c\u9700\u8981\u81ea\u884c\u5168\u5c40\u79d1\u5b66\u4e0a\u7f51\uff0c\u5426\u5219\u65e0\u6cd5\u6b63\u5e38\u5b89\u88c5\u3002 &nbsp; 2. \u6b63\u5f0f\u5b89\u88c5 \u62c9\u53d6\u4ed3\u5e93\u9879\u76ee\u6587\u4ef6\uff1a &nbsp; # \u62c9\u53d6\u4ed3\u5e93 $ git clone https:\/\/github.com\/chatchat-space\/Langchain-Chatchat.git # \u8fdb\u5165\u76ee\u5f55 $ cd Langchain-Chatchat # \u5b89\u88c5\u5168\u90e8\u4f9d\u8d56 $ pip install [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13],"tags":[],"class_list":["post-55369","post","type-post","status-publish","format-standard","hentry","category-ai"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/55369","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=55369"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/55369\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=55369"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=55369"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=55369"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}