diff --git a/.github/workflows/issueMySite.yml b/.github/workflows/issueMySite.yml index 26f81fc9f..98fd653fc 100644 --- a/.github/workflows/issueMySite.yml +++ b/.github/workflows/issueMySite.yml @@ -18,7 +18,7 @@ jobs: with: python-version: "3.11.5" - run: python3 -m pip install -r requirements.txt - - run: PLUGIN="./plugins_full.yml" DASHSCOPE_API_KEY=${{ secrets.DASHSCOPE_API_KEY }} mkdocs gh-deploy --force -b publishment + - run: PLUGIN="./plugins_full.yml" OPENAI_API_KEY=${{ secrets.OPENAI_API_KEY }} DASHSCOPE_API_KEY=${{ secrets.DASHSCOPE_API_KEY }} mkdocs gh-deploy --force -b publishment deployment-cloudfare-pages: needs: build runs-on: ubuntu-latest diff --git a/_ai_summary_cache2.json b/_ai_summary_cache2.json new file mode 100644 index 000000000..158679ee5 --- /dev/null +++ b/_ai_summary_cache2.json @@ -0,0 +1 @@ +{"\u6bd5\u4e1a.\u65c5\u884c": {"content_md5": "f4988544bda6b645f151592611b1a414", "ai_summary": "\u672c\u6587\u4f5c\u8005\u4e8e2023\u5e746\u670819\u65e5\u81f327\u65e5\u4e0e\u670b\u53cb\u524d\u5f80\u65e5\u672c\u8fdb\u884c\u6bd5\u4e1a\u65c5\u884c\u3002\u65c5\u884c\u671f\u95f4\uff0c\u4ed6\u4eec\u6d89\u8db3\u591a\u4e2a\u57ce\u5e02\uff0c\u5305\u62ec\u5927\u962a\u3001\u5948\u826f\u3001\u4eac\u90fd\u548c\u4e1c\u4eac\uff0c\u4f53\u9a8c\u4e86\u65e5\u672c\u7684\u6587\u5316\u3001\u7f8e\u98df\u53ca\u666f\u70b9\u3002\u65c5\u884c\u5f00\u9500\u63a7\u5236\u5728\u4e07\u5143\u4ee5\u5185\uff0c\u4e3b\u8981\u8d39\u7528\u5305\u62ec\u4f4f\u5bbf\u3001\u4ea4\u901a\u548c\u9910\u996e\u3002\u4f5c\u8005\u7279\u522b\u63d0\u5230\u4e86\u7b7e\u8bc1\u529e\u7406\u8fc7\u7a0b\u3001\u4ea4\u901a\u5efa\u8bae\uff08\u5982\u4f7f\u7528\u4ea4\u901aIC\u5361\uff09\u4ee5\u53ca\u65c5\u884c\u8fc7\u7a0b\u4e2d\u7684\u6d88\u8d39\u63d0\u793a\u3002\u6b64\u5916\uff0c\u4f5c\u8005\u8be6\u7ec6\u63cf\u8ff0\u4e86\u5404\u7c7b\u7f8e\u98df\u4f53\u9a8c\uff0c\u5e76\u8d34\u51fa\u4e86\u591a\u5f20\u666f\u70b9\u53ca\u6d3b\u52a8\u7684\u7167\u7247\u3002\u6574\u4f53\u800c\u8a00\uff0c\u65c5\u884c\u975e\u5e38\u5145\u5b9e\u4e0e\u6109\u5feb\uff0c\u4e5f\u7ed9\u8bfb\u8005\u63d0\u4f9b\u4e86\u5b9e\u7528\u7684\u65e5\u672c\u65c5\u884c\u653b\u7565\u548c\u7ecf\u5386\u5206\u4eab\u3002"}, "\u4e94\u4e00\u66b4\u8d70\u5e7f\u4e1c": {"content_md5": "84aede98ca446560c9cc99d565996026", "ai_summary": "\u4e94\u4e00\u5047\u671f\uff0c\u6211\u4e8e2024\u5e745\u67082\u65e5\u81f37\u65e5\u5728\u4e2d\u56fd\u5e7f\u4e1c\u548c\u9999\u6e2f\u8fdb\u884c\u4e86\u4e00\u573a\u6240\u8c13\u7684\u201c\u66b4\u8d70\u201d\u4e4b\u65c5\u3002\u53bb\u5e74\u5728\u4e0a\u6d77\u7ecf\u5386\u8fc7\u9ad8\u5bc6\u5ea6\u7684\u4eba\u7fa4\u540e\uff0c\u6b64\u6b21\u5e7f\u4e1c\u4e4b\u884c\u663e\u5f97\u66f4\u4e3a\u60ec\u610f\u3002\u5e7f\u4e1c\u7684\u597d\u5929\u6c14\u3001\u4e30\u5bcc\u7684\u65c5\u6e38\u8d44\u6e90\u53ca\u670b\u53cb\u7684\u70ed\u60c5\u966a\u4f34\uff0c\u4f7f\u5f97\u8fd9\u6b21\u65c5\u884c\u5341\u5206\u6109\u5feb\u3002\n\n\u6211\u4eec\u9996\u5148\u4f53\u9a8c\u4e86\u7eff\u76ae\u706b\u8f66\u7684\u591c\u884c\u65c5\u7a0b\uff0c\u5c3d\u7ba1\u6761\u4ef6\u8f83\u4e3a\u8270\u82d9\uff0c\u4f46\u4e0b\u94fa\u7684\u9009\u62e9\u4ee5\u53ca\u9002\u5f53\u7684\u51c6\u5907\uff08\u5982\u5145\u7535\u5b9d\u548c\u8033\u585e\uff09\u4f7f\u5f97\u8fc7\u7a0b\u8f83\u4e3a\u8212\u9002\u3002\u5728\u5e7f\u5dde\u3001\u9999\u6e2f\u548c\u6df1\u5733\u4e09\u5730\uff0c\u7f8e\u98df\u548c\u7f8e\u666f\u63a5\u8fde\u4e0d\u65ad\u3002\u5e7f\u5dde\u7684\u5386\u53f2\u6c1b\u56f4\u3001\u9999\u6e2f\u7684\u7e41\u534e\u4e0e\u6df1\u5733\u7684\u73b0\u4ee3\u5316\u4ee4\u4eba\u5370\u8c61\u6df1\u523b\u3002\u6b64\u5916\uff0c\u670b\u53cb\u7684\u966a\u4f34\u4f7f\u5f97\u6bcf\u4e00\u7ad9\u90fd\u589e\u6dfb\u4e86\u4e0d\u5c11\u4e50\u8da3\u3002\n\n\u5728\u6df1\u5733\uff0c\u6211\u4eec\u4f53\u9a8c\u4e86\u57ce\u5e02\u7684\u751f\u6d3b\u6c14\u606f\uff0c\u54c1\u5c1d\u4e86\u5730\u9053\u7684\u7f8e\u98df\uff0c\u5e76\u4eab\u53d7\u4e86\u4e30\u5bcc\u7684\u6587\u5316\u751f\u6d3b\u3002\u5c3d\u7ba1\u5929\u6c14\u708e\u70ed\uff0c\u4f46\u9ad8\u6548\u7684\u57ce\u5e02\u5efa\u8bbe\u4e0e\u5145\u6ee1\u6d3b\u529b\u7684\u6c14\u6c1b\u8ba9\u4eba\u611f\u89c9\u975e\u5e38\u8212\u9002\u3002\n\n\u6574\u4f53\u4e0a\uff0c\u8fd9\u6b21\u201c\u66b4\u8d70\u5e7f\u4e1c\u201d\u4e0d\u4ec5\u8ba9\u6211\u9886\u7565\u4e86\u5357\u65b9\u57ce\u5e02\u7684\u72ec\u7279\u9b45\u529b\uff0c\u8fd8\u8ba9\u6211\u6df1\u523b\u4f53\u9a8c\u5230\u4e0e\u597d\u53cb\u540c\u884c\u7684\u4e50\u8da3\uff0c\u662f\u4e00\u6b21\u96be\u5fd8\u7684\u4f53\u9a8c\u3002"}, "\u51ac\u304c\u4e00\u756a\u5acc\u3044": {"content_md5": "fdb276d87d161c28fd3c2ae8aa2e403f", "ai_summary": "\u7528\u6237\u8868\u8fbe\u4e86\u5bf9\u51ac\u5929\u7684\u5f3a\u70c8\u4e0d\u559c\u6b22\uff0c\u5c24\u5176\u662f\u6c5f\u6d59\u6caa\u5730\u533a\u7684\u51ac\u5929\uff0c\u56e0\u4e3a\u5176\u5bd2\u51b7\u4e14\u7f3a\u4e4f\u4f9b\u6696\u8bbe\u65bd\u3002\u4ed6\u63d0\u5230\u4e86\u4e0e\u51ac\u5929\u76f8\u5173\u7684\u79cd\u79cd\u4e0d\u4fbf\u5982\u7a7f\u7740\u7b28\u91cd\u3001\u6237\u5916\u6d3b\u52a8\u53d7\u9650\u7b49\u3002\u6b64\u5916\uff0c\u4ed6\u8fd8\u63d0\u5230\u867d\u7136\u8001\u820d\u66fe\u8d5e\u7f8e\u6d4e\u5357\u7684\u51ac\u5929\uff0c\u4f46\u4ed6\u4e2a\u4eba\u7684\u4f53\u9a8c\u4e0e\u6b64\u76f8\u53bb\u751a\u8fdc\u3002\u51ac\u5b63\u7684\u793e\u4ea4\u6d3b\u52a8\u4e3b\u8981\u96c6\u4e2d\u5728\u8fc7\u5e74\u65f6\u671f\uff0c\u53ef\u968f\u7740\u5e74\u9f84\u589e\u957f\uff0c\u8fc7\u5e74\u7684\u4e50\u8da3\u9010\u6e10\u51cf\u5c11\u3002\u4ed6\u8fd8\u63d0\u5230\u4e1c\u5317\u7684\u51ac\u5929\u4f3c\u4e4e\u66f4\u6709\u8da3\uff0c\u6709\u6ed1\u51b0\u548c\u7279\u8272\u98df\u7269\uff0c\u5bf9\u4e0e\u6b64\u5bf9\u6bd4\u4f7f\u4ed6\u5bf9\u81ea\u5df1\u6240\u5728\u5730\u7684\u51ac\u5929\u66f4\u4e3a\u5931\u671b\u3002\u6700\u540e\uff0c\u4ed6\u8868\u8fbe\u4e86\u5bf9\u51ac\u5929\u7ed3\u675f\u7684\u5f3a\u70c8\u671f\u5f85\u3002"}, "mkdocs\u63d2\u4ef6\u5f00\u53d1": {"content_md5": "c21745f59af6dae5a8740e46a4c0aa64", "ai_summary": "\u6587\u7ae0\u8ba8\u8bba\u4e86\u4f5c\u8005\u4e3amkdocs\u5f00\u53d1\u7684\u4e00\u4e2a\u63d2\u4ef6\uff0c\u540d\u4e3a[mkdocs-ai-summary]\uff0c\u8be5\u63d2\u4ef6\u6dfb\u52a0\u4e86AI\u6458\u8981\u529f\u80fd\uff0c\u76ee\u524d\u652f\u6301\u963f\u91cc\u7684\u901a\u4e49\u5343\u95ee\u548cChatGPT\u6a21\u578b\u3002\u4f5c\u8005\u8868\u793a\u63d2\u4ef6\u4ee3\u7801\u91cf\u4e0d\u5927\uff0c\u6c34\u5e73\u6709\u9650\uff0c\u5e76\u6b22\u8fce\u793e\u533a\u8d21\u732e\uff0c\u5e0c\u671b\u672a\u6765\u589e\u52a0\u66f4\u591aAI\u6a21\u578b\u7684\u652f\u6301\u3002\u8fd9\u4e2a\u529f\u80fd\u4e3a\u4f7f\u7528mkdocs\u7684\u7528\u6237\u63d0\u4f9b\u4e86\u4e00\u4e2a\u76f4\u89c2\u7684\u6458\u8981\u5de5\u5177\uff0c\u589e\u5f3a\u4e86\u5185\u5bb9\u5c55\u793a\u7684\u6548\u7387\u548c\u5438\u5f15\u529b\u3002"}, "\u5185\u7f6e\u7c7b": {"content_md5": "14d67f3833ee46e01143fa8c28f176c4", "ai_summary": "\u6b64\u6587\u7ae0\u8be6\u7ec6\u4ecb\u7ecd\u4e86Python\u8bed\u8a00\u4e2d\u7684\u57fa\u7840\u6982\u5ff5\u4ee5\u53ca\u5982\u4f55\u5229\u7528\u5185\u7f6e\u7684\u5e2e\u52a9\u529f\u80fd\u6765\u5b66\u4e60Python\u3002\u9996\u5148\uff0c\u4f7f\u7528`help()`\u51fd\u6570\u53ef\u4ee5\u4ea4\u4e92\u5f0f\u5730\u67e5\u8be2Python\u4e2d\u7684\u6a21\u5757\u3001\u5173\u952e\u8bcd\u6216\u8005\u4e3b\u9898\uff0c\u800c`dir()`\u51fd\u6570\u7528\u4e8e\u5c55\u793a\u5f53\u524d\u547d\u540d\u7a7a\u95f4\u4e2d\u7684\u53d8\u91cf\u6216\u8005\u4e00\u4e2a\u5bf9\u8c61\u7684\u6240\u6709\u5c5e\u6027\u3002\u63a5\u7740\uff0c\u6587\u7ae0\u4ece\u7c7b\u7684\u89d2\u5ea6\u6df1\u5165\u8bb2\u89e3\u4e86Python\u7684\u903b\u8f91\u7ed3\u6784\uff0c\u5f3a\u8c03\u51fd\u6570\u3001\u6a21\u5757\u3001\u53d8\u91cf\u7b49\u51e0\u4e4e\u6240\u6709\u5143\u7d20\u5728Python\u4e2d\u90fd\u662f\u4ee5\u5bf9\u8c61\u7684\u5f62\u5f0f\u5b58\u5728\u3002\u5185\u7f6e\u6570\u636e\u7c7b\u578b\u5982\u5b57\u7b26\u4e32\u3001\u5217\u8868\u3001\u5b57\u5178\u7b49\u90fd\u88ab\u8be6\u7ec6\u8bb2\u89e3\uff0c\u5305\u62ec\u5b83\u4eec\u7684\u521b\u5efa\u3001\u64cd\u4f5c\u65b9\u6cd5\u4ee5\u53ca\u5e38\u89c1\u7528\u6cd5\u3002\u6b64\u5916\uff0c\u901a\u8fc7\u5b57\u7b26\u4e32\u7684\u5b9e\u4f8b\u5c55\u793a\u4e86\u5982\u4f55\u4f7f\u7528\u5b57\u7b26\u4e32\u5b57\u9762\u503c\u548c\u8f6c\u4e49\u5e8f\u5217\u3002\u6587\u7ae0\u8fd8\u63a2\u8ba8\u4e86\u5217\u8868\u63a8\u5bfc\u5f0f\u7684\u8bed\u6cd5\uff0c\u89e3\u91ca\u4e86\u5982\u4f55\u7528\u66f4\u7d27\u51d1\u7684\u4ee3\u7801\u5b8c\u6210\u5217\u8868\u521d\u59cb\u5316\u3002\u6700\u540e\uff0c\u5e38\u7528\u7684\u5185\u7f6e\u51fd\u6570\u5982`print`\u548c`len`\u4e5f\u88ab\u8bf4\u660e\uff0c\u5f3a\u8c03\u4e86\u5b66\u4e60\u8fd9\u4e9b\u51fd\u6570\u7684\u53c2\u6570\u548c\u529f\u80fd\u5bf9\u4e8e\u6709\u6548\u4f7f\u7528Python\u81f3\u5173\u91cd\u8981\u3002\u6574\u4f53\u800c\u8a00\uff0c\u6587\u7ae0\u6df1\u5165\u6d45\u51fa\u5730\u89e3\u91ca\u4e86Python\u7f16\u7a0b\u7684\u6838\u5fc3\u7406\u5ff5\u548c\u64cd\u4f5c\uff0c\u975e\u5e38\u9002\u5408\u521d\u5b66\u8005\u7cfb\u7edf\u5730\u5b66\u4e60\u4e0e\u53c2\u8003\u3002"}, "\u5185\u7f6e\u5173\u952e\u5b57": {"content_md5": "538b7f572314ad5f9faea3aabe7c4f02", "ai_summary": "\u672c\u6587\u6df1\u5165\u8bb2\u89e3\u4e86Python\u4e2d\u5173\u952e\u7684\u8bed\u6cd5\u5143\u7d20\u4e0e\u6982\u5ff5\uff0c\u9996\u5148\u4ecb\u7ecd\u4e86\u4ee3\u7801\u7f29\u8fdb\u7684\u91cd\u8981\u6027\u548c\u65b9\u6cd5\uff0c\u63a8\u8350\u4f7f\u7528\u56db\u4e2a\u7a7a\u683c\u8fdb\u884c\u7f29\u8fdb\u3002\u63a5\u7740\uff0c\u8be6\u7ec6\u8ba8\u8bba\u4e86\u5982\u4f55\u5b9a\u4e49\u548c\u8c03\u7528\u81ea\u5b9a\u4e49\u51fd\u6570\u4e0e\u533f\u540d\u51fd\u6570\uff0c\u4ee5\u53ca\u51fd\u6570\u7684\u53c2\u6570\u4f20\u9012\u65b9\u5f0f\u3002\u6587\u7ae0\u8fdb\u4e00\u6b65\u89e3\u91ca\u4e86\u7c7b\u7684\u521b\u5efa\u3001\u521d\u59cb\u5316\u3001\u7ee7\u627f\u4ee5\u53ca\u7c7b\u7684\u5185\u90e8\u7ed3\u6784\uff0c\u5f3a\u8c03\u4e86`__new__`\u548c`__init__`\u65b9\u6cd5\u7684\u4f5c\u7528\u548c\u533a\u522b\uff0c\u4ee5\u53ca\u7c7b\u7684\u79c1\u5bc6\u6027\u548c\u72ec\u7acb\u547d\u540d\u7a7a\u95f4\u3002\u6d89\u53ca\u4e86`if`\u548c`match`\u6761\u4ef6\u8bed\u53e5\u7684\u4f7f\u7528\uff0c\u4ee5\u53ca`for`\u548c`while`\u5faa\u73af\u7684\u7ed3\u6784\u548c\u63a7\u5236\u65b9\u6cd5\uff0c\u5305\u62ec`continue`, `break`\u548c`pass`\u7684\u5e94\u7528\u3002\u6700\u540e\uff0c\u8be6\u8ff0\u4e86\u5982\u4f55\u901a\u8fc7`try`\u548c`except`\u5904\u7406\u7a0b\u5e8f\u4e2d\u7684\u5f02\u5e38\uff0c\u81ea\u5b9a\u4e49\u5f02\u5e38\u7684\u521b\u5efa\u548c\u89e6\u53d1\uff0c\u4ee5\u53ca`assert`\u8bed\u53e5\u7684\u7528\u9014\u3002\u8fd9\u4e9b\u5185\u5bb9\u4e0d\u4ec5\u662fPython\u7f16\u7a0b\u7684\u57fa\u7840\uff0c\u4e5f\u662f\u65e5\u5e38\u4f7f\u7528\u4e2d\u5e38\u89c1\u7684\u5b9e\u7528\u6280\u5de7\u3002"}, "\u9762\u5411\u5bf9\u8c61\u7f16\u7a0b": {"content_md5": "01cb620afb279ba70ee8608e23a93745", "ai_summary": "\u9762\u5411\u5bf9\u8c61\u7f16\u7a0b\uff08OOP\uff09\u5728Python\u4e2d\u5177\u6709\u975e\u5e38\u9ad8\u7684\u7075\u6d3b\u6027\u548c\u4e30\u5bcc\u529f\u80fd\uff0c\u5141\u8bb8\u7528\u6237\u81ea\u5b9a\u4e49\u591a\u79cd\u64cd\u4f5c\u884c\u4e3a\u5982\u8fed\u4ee3\u3001\u8f93\u51fa\u3001\u8fd0\u7b97\u7b26\u91cd\u8f7d\u7b49\u3002\u5176\u4e2d\u5305\u62ec\u901a\u8fc7\u5143\u7c7b\u6765\u63a7\u5236\u7c7b\u7684\u5b9a\u4e49\u8fc7\u7a0b\uff0c\u8feb\u4f7f\u65b9\u6cd5\u547d\u540d\u4f7f\u7528\u5c0f\u5199\u7b49\u3002Python\u5bf9\u8bed\u6cd5\u91cd\u8f7d\u81ea\u7531\u5ea6\u6781\u9ad8\uff0c\u8fd9\u4e5f\u8ba9\u5404\u79cd\u5e93\u53ef\u4ee5\u5b9e\u73b0\u591a\u6837\u7684\u884c\u4e3a\u3002\n\nPython\u4e2d\u7684\u7c7b\u662f\u5bf9\u8c61\u7684\u62bd\u8c61\uff0c\u7c7b\u7684\u4f7f\u7528\u4e3b\u8981\u4f9d\u8d56\u4e8e`class`\u5173\u952e\u5b57\uff0c\u652f\u6301\u5c5e\u6027\u548c\u65b9\u6cd5\u8bbf\u95ee\u3001\u7c7b\u7684\u7ee7\u627f\u4ee5\u53ca\u5b9e\u4f8b\u7684\u521b\u5efa\u7b49\u529f\u80fd\u3002\u7c7b\u63d0\u4f9b\u4e86\u4ee3\u7801\u590d\u7528\u548c\u7b80\u5316\u7684\u4f18\u52bf\uff0c\u540c\u65f6OOP\u8fd8\u652f\u6301\u5c01\u88c5\u3001\u7ee7\u627f\u548c\u591a\u6001\u7b49\u7279\u6027\u3002\u7c7b\u4e2d\u7684\u9b54\u6cd5\u65b9\u6cd5\u4f7f\u5f97\u7528\u6237\u80fd\u591f\u63a7\u5236\u51e0\u4e4e\u6240\u6709Python\u7279\u5b9a\u7684\u884c\u4e3a\u3002\n\n\u6b64\u5916\uff0cPython\u4e2d\u7684\u7c7b\u53ef\u4ee5\u901a\u8fc7\u88c5\u9970\u5668\u8fdb\u4e00\u6b65\u589e\u5f3a\u65b9\u6cd5\u7684\u529f\u80fd\uff0c\u4f8b\u5982`@staticmethod`\u3001`@classmethod`\u548c`@property`\u7b49\u3002\u901a\u8fc7\u8fd9\u4e9b\u5de5\u5177\u548c\u6280\u672f\uff0cPython\u7684\u9762\u5411\u5bf9\u8c61\u7f16\u7a0b\u63d0\u4f9b\u4e86\u5f3a\u5927\u800c\u7075\u6d3b\u7684\u7f16\u7a0b\u8303\u5f0f\uff0c\u9002\u7528\u4e8e\u5f00\u53d1\u5404\u79cd\u89c4\u6a21\u7684\u5e94\u7528\u7a0b\u5e8f\u3002"}, "\u51fd\u6570\u5f0f\u7f16\u7a0b": {"content_md5": "e3aeb69f4fcd5e6c50e24c4a33a5e853", "ai_summary": "\u51fd\u6570\u5f0f\u7f16\u7a0b\u662f\u7f16\u7a0b\u8303\u578b\u4e4b\u4e00\uff0c\u4e3b\u8981\u5c06\u95ee\u9898\u5206\u89e3\u4e3a\u4e00\u7cfb\u5217\u51fd\u6570\uff0c\u4fa7\u91cd\u4e8e\u65e0\u72b6\u6001\u548c\u4e0d\u53ef\u53d8\u6570\u636e\u3002\u4e0e\u8fc7\u7a0b\u5f0f\u7f16\u7a0b\u3001\u58f0\u660e\u5f0f\u7f16\u7a0b\u548c\u9762\u5411\u5bf9\u8c61\u7f16\u7a0b\u76f8\u533a\u522b\u3002\u5728Python\u4e2d\uff0c\u51fd\u6570\u5f0f\u7f16\u7a0b\u5305\u62ec\u591a\u79cd\u9ad8\u7ea7\u529f\u80fd\uff0c\u5982\u9012\u5f52\u3001\u8fed\u4ee3\u5668\u3001\u751f\u6210\u5668\u3001\u88c5\u9970\u5668\u7b49\u3002\n\n\u5177\u4f53\u5730\uff0c\u5728Python\u4e2d\uff0c\u51fd\u6570\u53ef\u4ee5\u901a\u8fc7\u4f7f\u7528\u9ed8\u8ba4\u503c\u5b9a\u4e49\u5f62\u53c2\u548c\u5b9e\u53c2\uff0c\u652f\u6301\u4f4d\u7f6e\u5b9e\u53c2\u548c\u5173\u952e\u5b57\u5b9e\u53c2\uff0c\u5e76\u4e14\u652f\u6301\u5f62\u53c2\u6253\u5305\u548c\u5b9e\u53c2\u89e3\u5305\u3002\u8fed\u4ee3\u5668\u5141\u8bb8\u6309\u9700\u8ba1\u7b97\uff0c\u8282\u7ea6\u8d44\u6e90\u3002\u751f\u6210\u5668\u5219\u8fdb\u4e00\u6b65\u7b80\u5316\u8fed\u4ee3\u5668\u7684\u521b\u5efa\uff0c\u4f7f\u5f97\u51fd\u6570\u80fd\u591f\u5728\u9700\u8981\u65f6\u624d\u6267\u884c\u8ba1\u7b97\u3002\n\n\u88c5\u9970\u5668\u63d0\u4f9b\u4e00\u79cd\u6269\u5c55\u51fd\u6570\u529f\u80fd\u7684\u65b9\u6cd5\uff0c\u4e0d\u9700\u8981\u4fee\u6539\u51fd\u6570\u672c\u8eab\u7684\u4ee3\u7801\uff0c\u53ef\u7528\u4e8e\u65e5\u5fd7\u8bb0\u5f55\u3001\u72b6\u6001\u9a8c\u8bc1\u7b49\u591a\u79cd\u5e94\u7528\u573a\u666f\u3002Python\u7684`functools`\u5e93\u8fd8\u63d0\u4f9b\u4e86\u591a\u4e2a\u5185\u7f6e\u88c5\u9970\u5668\u4ee5\u652f\u6301\u8bf8\u5982\u7f13\u5b58\u548c\u4fdd\u7559\u51fd\u6570\u5143\u6570\u636e\u7b49\u529f\u80fd\u3002\n\n\u901a\u8fc7\u4ee5\u4e0a\u7279\u6027\uff0c\u51fd\u6570\u5f0f\u7f16\u7a0b\u5728Python\u4e2d\u53ef\u4ee5\u9ad8\u6548\u5730\u5904\u7406\u6570\u636e\uff0c\u589e\u52a0\u4ee3\u7801\u7684\u6a21\u5757\u5316\u548c\u53ef\u91cd\u7528\u6027\uff0c\u540c\u65f6\u4fdd\u6301\u4ee3\u7801\u7684\u7b80\u6d01\u6027\u548c\u53ef\u7ef4\u62a4\u6027\u3002"}, "re": {"content_md5": "eded0f54965dbd422a06ef23b4b86755", "ai_summary": "Python\u7684`re`\u6a21\u5757\u63d0\u4f9b\u4e86\u4e00\u4e2a\u5f3a\u5927\u7684\u6b63\u5219\u8868\u8fbe\u5f0f\u5f15\u64ce\uff0c\u7528\u4e8e\u6267\u884c\u4e0e\u5b57\u7b26\u4e32\u5339\u914d\u76f8\u5173\u7684\u591a\u79cd\u64cd\u4f5c\u3002\u6b63\u5219\u8868\u8fbe\u5f0f\uff08Regex\uff09\u662f\u4e00\u79cd\u8868\u793a\u5b57\u7b26\u4e32\u7684\u6a21\u5f0f\u7684\u65b9\u5f0f\uff0c\u5e7f\u6cdb\u7528\u4e8e\u641c\u7d22\u3001\u66ff\u6362\u4ee5\u53ca\u6570\u636e\u63d0\u53d6\u7b49\u64cd\u4f5c\u3002\u5728Python\u4e2d\uff0c`re`\u6a21\u5757\u652f\u6301\u5982\u6570\u5b57\u3001\u5b57\u6bcd\u548c\u7279\u6b8a\u5b57\u7b26\u7684\u7279\u5b9a\u6a21\u5f0f\u5339\u914d\uff0c\u5e76\u53ef\u5728\u5b57\u7b26\u4e32\u4e2d\u5e94\u7528\u8fd9\u4e9b\u6a21\u5f0f\u6765\u8fdb\u884c\u641c\u7d22\u6216\u6570\u636e\u63d0\u53d6\u7b49\u4efb\u52a1\u3002\n\n`re`\u7684\u4e3b\u8981\u529f\u80fd\u5305\u62ec\uff1a\n- \u641c\u7d22 (`search`)\n- \u5339\u914d (`match`, `fullmatch`)\n- \u66ff\u6362 (`sub`, `subn`)\n- \u5206\u5272 (`split`)\n- \u67e5\u627e (`findall`, `finditer`)\n- \u7f16\u8bd1\u6b63\u5219\u8868\u8fbe\u5f0f (`compile`)\n- \u6e05\u9664\u7f13\u5b58 (`purge`)\n- \u53d6\u6d88\u8f6c\u4e49 (`escape`)\n\n\u6b63\u5219\u8868\u8fbe\u5f0f\u7684\u5199\u6cd5\u5305\u62ec\u591a\u79cd\u5143\u5b57\u7b26\uff0c\u5982`\\d`\u8868\u793a\u6570\u5b57\uff0c`\\w`\u8868\u793a\u5b57\u6bcd\u548c\u6570\u5b57\uff0c\u4ee5\u53ca\u591a\u79cd\u64cd\u4f5c\u7b26\u5982`*`\uff08\u5339\u914d0\u6b21\u6216\u591a\u6b21\uff09\u548c`+`\uff08\u5339\u914d1\u6b21\u6216\u591a\u6b21\uff09\u3002\u6b64\u5916\uff0c`re`\u6a21\u5757\u8fd8\u63d0\u4f9b\u591a\u79cd\u6a21\u5f0f\u6807\u5fd7\u4ee5\u9002\u5e94\u4e0d\u540c\u7684\u5339\u914d\u9700\u6c42\uff0c\u5982\u5ffd\u7565\u5927\u5c0f\u5199\uff08`IGNORECASE`\uff09\u6216\u591a\u884c\u5339\u914d\uff08`MULTILINE`\uff09\u3002\n\n\u901a\u8fc7\u5728\u7ebf\u5de5\u5177\u5982regex101.com\uff0c\u7528\u6237\u53ef\u4ee5\u65b9\u4fbf\u5730\u6d4b\u8bd5\u548c\u8c03\u6574\u6b63\u5219\u8868\u8fbe\u5f0f\uff0c\u786e\u4fdd\u5176\u6b63\u786e\u6027\u548c\u6548\u7387\u3002\u6b64\u5916\uff0c\u7406\u89e3\u6b63\u5219\u8868\u8fbe\u5f0f\u7684\u590d\u6742\u6027\u5e76\u901a\u8fc7\u5b9e\u4f8b\u8fdb\u884c\u5b66\u4e60\u53ef\u4ee5\u66f4\u597d\u5730\u638c\u63e1\u5176\u5f3a\u5927\u529f\u80fd\uff0c\u5229\u7528\u5b83\u8fdb\u884c\u6709\u6548\u7684\u6587\u672c\u5904\u7406\u548c\u6570\u636e\u5206\u6790\u3002"}, "time": {"content_md5": "bb4f89beb98a03562485c94a4ea65406", "ai_summary": "Python\u4e2d\u5e38\u7528\u7684\u65f6\u95f4\u76f8\u5173\u6807\u51c6\u5e93\u5305\u62ectime\u3001datetime\u548ccalendar\uff0c\u5404\u81ea\u63d0\u4f9b\u4e0d\u540c\u5c42\u6b21\u7684\u63a5\u53e3\u4e0e\u529f\u80fd\u3002time\u5e93\u8f83\u5e95\u5c42\uff0c\u4e3b\u8981\u7531C\u7f16\u5199\uff0c\u63d0\u4f9b\u57fa\u7840\u65f6\u95f4\u5904\u7406\u529f\u80fd\u3002\u5b83\u5b9a\u4e49\u201c\u79d2\u201d\u4f5c\u4e3a\u56fd\u9645\u5355\u4f4d\u5236\u4e2d\u65f6\u95f4\u7684\u57fa\u672c\u5355\u4f4d\uff0c\u6b64\u5916\u4ecb\u7ecd\u4e86\u65f6\u95f4\u6233\uff08\u81ea1972\u5e741\u67081\u65e5\u96f6\u65f6\u8d77\u7684\u79d2\u6570\uff09\u548c\u5404\u79cd\u65f6\u95f4\u8868\u793a\u6cd5\uff08\u65f6\u95f4\u6233\u3001\u5b57\u7b26\u4e32\u3001\u7ed3\u6784\u5316\u6570\u636e\u7b49\uff09\u3002time\u6a21\u5757\u5141\u8bb8\u65f6\u95f4\u7c7b\u578b\u7684\u8f6c\u5316\uff0c\u5982\u65f6\u95f4\u6233\u8f6c\u6362\u6210\u5143\u7ec4\uff0c\u5143\u7ec4\u8f6c\u6362\u6210\u5b57\u7b26\u4e32\u7b49\uff0c\u5e76\u652f\u6301\u4e0e\u65f6\u533a\u76f8\u5173\u7684\u64cd\u4f5c\u3002\n\ndatetime\u5e93\u5219\u63d0\u4f9b\u66f4\u9ad8\u7ea7\u7684\u65e5\u671f\u4e0e\u65f6\u95f4\u5904\u7406\uff0c\u652f\u6301\u65e5\u671f\u65f6\u95f4\u7684\u6570\u5b66\u8fd0\u7b97\u5e76\u6613\u4e8e\u683c\u5f0f\u5316\u8f93\u51fa\u548c\u5904\u7406\u3002\u63d0\u4f9b\u7684\u7c7b\u5305\u62ecdatetime\u3001date\u3001time\u53catimedelta\u7b49\uff0c\u5176\u4e2ddatetime\u7c7b\u662f\u96c6\u6210\u4e86\u5177\u4f53\u65f6\u95f4\u7684date\u7c7b\u3002datetime\u652f\u6301\u521b\u5efa\u7279\u5b9a\u65e5\u671f\u3001\u6267\u884c\u65e5\u671f\u65f6\u95f4\u8fd0\u7b97\u7b49\u529f\u80fd\u3002\n\ncalendar\u5e93\u5219\u662f\u4e00\u4e2a\u751f\u6210\u6708\u5386\u7684\u5de5\u5177\u5e93\uff0c\u63d0\u4f9b\u65b9\u4fbf\u67e5\u770b\u6708\u5386\u7684\u529f\u80fd\u3002\u6574\u4f53\u800c\u8a00\uff0c\u8fd9\u4e9b\u5e93\u4e3aPython\u4e2d\u7684\u65f6\u95f4\u65e5\u671f\u5904\u7406\u63d0\u4f9b\u4e86\u5168\u9762\u7684\u652f\u6301\u548c\u4e30\u5bcc\u7684\u529f\u80fd\uff0c\u9002\u7528\u4e8e\u591a\u79cd\u9700\u6c42\u573a\u666f\u3002"}} \ No newline at end of file diff --git a/docs/Note/mkdocs/plugin_dev.md b/docs/Note/mkdocs/plugin_dev.md index c212cebc7..2720a9b15 100644 --- a/docs/Note/mkdocs/plugin_dev.md +++ b/docs/Note/mkdocs/plugin_dev.md @@ -9,7 +9,7 @@ include: 很多博客网站系统都有了AI摘要的功能,但我看mkdocs好像还没有。于是我自己写了一个:[mkdocs-ai-summary](../../../Project/mkdocs-ai-summary),效果就是本文开头的那样,我觉得还是很酷的。 -大火可以来用用看,暂时只支持阿里的通义千问,后续会增加对其他的AI模型的支持(其实我也很想率先支持ChatGPT,但我手头没有可用的api key😭,只能后面再说了)。 +大火可以来用用看,暂时只支持阿里的通义千问和ChatGPT,后续会增加对其他的AI模型的支持。 代码不多,水平有限,大家多多包涵~ diff --git a/docs/Project/mkdocs-ai-summary.md b/docs/Project/mkdocs-ai-summary.md index 328f9cea3..f7299fa04 100644 --- a/docs/Project/mkdocs-ai-summary.md +++ b/docs/Project/mkdocs-ai-summary.md @@ -17,4 +17,4 @@ tags: [![PyPI - Version](https://img.shields.io/pypi/v/mkdocs-ai-summary)](https://pypi.org/project/mkdocs-ai-summary/) ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/mkdocs-ai-summary) - 已完成基础功能,支持使用通义千问的api生成文章摘要。 \ No newline at end of file + 已完成基础功能,支持使用ChatGPT和通义千问的api生成文章摘要。 \ No newline at end of file diff --git a/plugins_full.yml b/plugins_full.yml index 71aaffa34..7505f4321 100644 --- a/plugins_full.yml +++ b/plugins_full.yml @@ -1,5 +1,11 @@ plugins: - - ai-summary + - ai-summary: + api: "chatgpt" + model: "gpt-4-turbo" + ignore_code: true + cache: true + cache_dir: "./" + prompt: "请帮我把下面的内容总结为200字以内的摘要:" - i18n: docs_structure: suffix languages: diff --git a/requirements.txt b/requirements.txt index 81d79337a..afebf0392 100644 --- a/requirements.txt +++ b/requirements.txt @@ -7,5 +7,5 @@ mkdocs-minify-plugin==0.6.2 mkdocs-rss-plugin==1.7.0 mkdocs-static-i18n==1.2.3 mkdocs-video==1.5.0 -mkdocs-ai-summary[tongyi]==0.1.1 +mkdocs-ai-summary[chatgpt]==0.2.1 # mkdocs-jupyter==0.22.0 \ No newline at end of file