部分修改5
This commit is contained in:
@ -55,7 +55,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 2,
|
||||
"execution_count": 1,
|
||||
"id": "51b15e5c-9b92-4d40-a149-b56335d330d9",
|
||||
"metadata": {
|
||||
"tags": []
|
||||
@ -70,7 +70,9 @@
|
||||
"from dotenv import load_dotenv, find_dotenv\n",
|
||||
"_ = load_dotenv(find_dotenv()) # read local .env file\n",
|
||||
"\n",
|
||||
"openai.api_key = os.environ['OPENAI_API_KEY']"
|
||||
"openai.api_key = os.environ['OPENAI_API_KEY']\n",
|
||||
"os.environ['HTTPS_PROXY'] = 'http://127.0.0.1:7890'\n",
|
||||
"os.environ[\"HTTP_PROXY\"] = 'http://127.0.0.1:7890'"
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -84,7 +86,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 3,
|
||||
"execution_count": 9,
|
||||
"id": "fe368042",
|
||||
"metadata": {
|
||||
"tags": []
|
||||
@ -108,7 +110,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 4,
|
||||
"execution_count": 3,
|
||||
"id": "a0189dc5",
|
||||
"metadata": {
|
||||
"tags": []
|
||||
@ -120,7 +122,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 5,
|
||||
"execution_count": 10,
|
||||
"id": "2be10170",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
@ -133,7 +135,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 6,
|
||||
"execution_count": 11,
|
||||
"id": "3659e0f7",
|
||||
"metadata": {
|
||||
"tags": []
|
||||
@ -143,7 +145,7 @@
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"209\n"
|
||||
"0\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
@ -1647,7 +1649,7 @@
|
||||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.9.16"
|
||||
"version": "3.10.11"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
|
||||
@ -1 +0,0 @@
|
||||
{"cells": [{"cell_type": "markdown", "id": "bc0c33a4", "metadata": {}, "source": ["# \u7b2c\u516b\u7ae0\u3001\u603b\u7ed3", "\n"]}, {"cell_type": "markdown", "id": "9d273d1f", "metadata": {}, "source": ["\u8fd9\u6b21\u8bfe\u7a0b\u7684\u5185\u5bb9\u5305\u62ec\uff1a\n", "1. \u4f7f\u7528 LangChain \u7684 80 \u591a\u79cd\u6587\u6863\u88c5\u8f7d\u5668\u4ece\u5404\u79cd\u6587\u6863\u6e90\u4e2d\u52a0\u8f7d\u6570\u636e\u3002\n", "2. \u5c06\u8fd9\u4e9b\u6587\u6863\u5206\u5272\u6210\u5757\uff0c\u5e76\u8ba8\u8bba\u4e86\u5176\u4e2d\u7684\u4e00\u4e9b\u5fae\u5999\u4e4b\u5904\u3002\n", "3. \u4e3a\u8fd9\u4e9b\u5757\u521b\u5efa\u4e86 Embedding\uff0c\u5e76\u5c06\u5b83\u4eec\u653e\u5165\u5411\u91cf\u5b58\u50a8\u5668\u4e2d\uff0c\u5e76\u8f7b\u677e\u5b9e\u73b0\u8bed\u4e49\u641c\u7d22\u3002\n", "4. \u8ba8\u8bba\u4e86\u8bed\u4e49\u641c\u7d22\u7684\u4e00\u4e9b\u7f3a\u70b9\uff0c\u4ee5\u53ca\u5728\u67d0\u4e9b\u8fb9\u7f18\u60c5\u51b5\u4e2d\u53ef\u80fd\u4f1a\u53d1\u751f\u7684\u641c\u7d22\u5931\u8d25\u3002\n", "5. \u4ecb\u7ecd\u4e86\u8bb8\u591a\u65b0\u7684\u9ad8\u7ea7\u4e14\u6709\u8da3\u7684\u68c0\u7d22\u7b97\u6cd5\uff0c\u7528\u4e8e\u514b\u670d\u90a3\u4e9b\u8fb9\u7f18\u60c5\u51b5\u3002\n", "6. \u4e0e LLMs \u76f8\u7ed3\u5408\uff0c\u5c06\u68c0\u7d22\u5230\u7684\u6587\u6863\uff0c\u548c\u7528\u6237\u95ee\u9898\u4f20\u9012\u7ed9 LLM\uff0c\u751f\u6210\u5bf9\u539f\u59cb\u95ee\u9898\u7684\u7b54\u6848\u3002\n", "7. \u5bf9\u5bf9\u8bdd\u5185\u5bb9\u8fdb\u884c\u4e86\u8865\u5168\uff0c\u521b\u5efa\u4e86\u4e00\u4e2a\u5b8c\u5168\u529f\u80fd\u7684\u3001\u7aef\u5230\u7aef\u7684\u804a\u5929\u673a\u5668\u4eba\u3002\n", "\n", "**\ud83d\udcaa\ud83c\udffb \u51fa\u53d1 \u53bb\u63a2\u7d22\u65b0\u4e16\u754c\u5427**\n", "\n", "\u5e0c\u671b\u60a8\u4eec\u5728\u5b66\u4e60\u8fc7\u7a0b\u4e2d\u53d7\u76ca\u532a\u6d45\u3002\n", "\n", "\u4e5f\u611f\u8c22\u5f00\u6e90\u793e\u533a\u4e3a\u8fd9\u4e2a\u8bfe\u7a0b\u505a\u51fa\u8d21\u732e\uff0c\u5982\u679c\u60a8\u5728 LangChain \u4e0a\u53d1\u73b0\u4e86\u65b0\u7684\u529f\u80fd\u548c\u6280\u5de7\uff0c\u5e0c\u671b\u60a8\u5206\u4eab\u5230 Twitter \u6216\u8005 github \u4e0a\u3002\n", "\n", "\u8fd9\u662f\u4e00\u4e2a\u5feb\u901f\u53d1\u5c55\u7684\u9886\u57df\uff0c\u975e\u5e38\u4ee4\u4eba\u6fc0\u52a8\u3002\u671f\u5f85\u770b\u5230\u60a8\u4eec\u5c06\u6240\u5b66\u5e94\u7528\u5230\u5b9e\u9645\u4e2d\u7684\u6837\u5b50\u3002"]}], "metadata": {"kernelspec": {"display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3"}, "language_info": {"codemirror_mode": {"name": "ipython", "version": 3}, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.9.12"}, "toc": {"base_numbering": 1, "nav_menu": {}, "number_sections": false, "sideBar": true, "skip_h1_title": false, "title_cell": "Table of Contents", "title_sidebar": "Contents", "toc_cell": false, "toc_position": {}, "toc_section_display": true, "toc_window_display": true}}, "nbformat": 4, "nbformat_minor": 5}
|
||||
18
content/LangChain Chat with Your Data/8.总结 summary.md
Normal file
18
content/LangChain Chat with Your Data/8.总结 summary.md
Normal file
@ -0,0 +1,18 @@
|
||||
# 第八章、总结
|
||||
|
||||
这次课程的内容包括:
|
||||
1. 使用 LangChain 的 80 多种文档装载器从各种文档源中加载数据。
|
||||
2. 将这些文档分割成块,并讨论了其中的一些微妙之处。
|
||||
3. 为这些块创建了 Embedding,并将它们放入向量存储器中,并轻松实现语义搜索。
|
||||
4. 讨论了语义搜索的一些缺点,以及在某些边缘情况中可能会发生的搜索失败。
|
||||
5. 介绍了许多新的高级且有趣的检索算法,用于克服那些边缘情况。
|
||||
6. 与 LLMs 相结合,将检索到的文档,和用户问题传递给 LLM,生成对原始问题的答案。
|
||||
7. 对对话内容进行了补全,创建了一个完全功能的、端到端的聊天机器人。
|
||||
|
||||
**💪🏻 出发 去探索新世界吧**
|
||||
|
||||
希望您们在学习过程中受益匪浅。
|
||||
|
||||
也感谢开源社区为这个课程做出贡献,如果您在 LangChain 上发现了新的功能和技巧,希望您分享到 Twitter 或者 github 上。
|
||||
|
||||
这是一个快速发展的领域,非常令人激动。期待看到您们将所学应用到实际中的样子。
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user