{"id":49467,"date":"2025-07-30T18:32:12","date_gmt":"2025-07-30T10:32:12","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/49467.html"},"modified":"2025-07-30T18:32:12","modified_gmt":"2025-07-30T10:32:12","slug":"ai-%e5%91%8a%e5%88%ab%e8%bf%87%e6%97%b6%e4%bf%a1%e6%81%af-%e7%94%a8rag%e5%92%8c%e4%b8%80%e4%bb%bdpdf-%e4%b8%ballm%e6%89%93%e9%80%a0%e4%b8%80%e4%b8%aa%e9%9a%8f%e9%9c%80%e6%9b%b4%e6%96%b0%e7%9a%84","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/49467.html","title":{"rendered":"AI: \u544a\u522b\u8fc7\u65f6\u4fe1\u606f, \u7528RAG\u548c\u4e00\u4efdPDF \u4e3aLLM\u6253\u9020\u4e00\u4e2a\u968f\u9700\u66f4\u65b0\u7684\u201c\u5916\u8111\u201d"},"content":{"rendered":"<p>\u563f&#xff0c;\u5404\u4f4d\u6280\u672f\u540c\u5b66&#xff01;\u4eca\u5929&#xff0c;\u6211\u4eec\u6765\u804a\u4e00\u4e2a\u5927\u5bb6\u5728\u4f7f\u7528\u5927\u8bed\u8a00\u6a21\u578b&#xff08;LLM&#xff09;\u65f6\u90fd\u4f1a\u9047\u5230\u7684\u75db\u70b9&#xff1a;\u77e5\u8bc6\u8fc7\u65f6\u3002<\/p>\n<p>\u65e0\u8bba\u662f\u50cf\u6211\u4e00\u6837&#xff0c;\u7528 Gemini Pro \u5b66\u4e60\u65e5\u65b0\u6708\u5f02\u7684\u4ee5\u592a\u574a&#xff0c;\u8fd8\u662f\u5e0c\u671b\u5b83\u80fd\u7cbe\u786e\u638c\u63e1\u67d0\u4e2a\u7279\u5b9a\u5de5\u5177\u7684\u6700\u65b0\u7528\u6cd5&#xff0c;\u6211\u4eec\u90fd\u53ef\u80fd\u88ab\u5b83\u201c\u8bb0\u5fc6\u201d\u91cc\u7684\u65e7\u77e5\u8bc6\u6240\u56f0\u6270\u3002\u6bd4\u5982&#xff0c;\u6211\u8ba9\u5b83\u751f\u6210 PlantUML \u56fe\u65f6&#xff0c;\u5b83\u5076\u5c14\u4f1a\u201c\u7a7f\u8d8a\u201d\u56de\u8fc7\u53bb&#xff0c;\u4f7f\u7528\u4e00\u4e9b\u5df2\u7ecf\u88ab\u5e9f\u5f03\u7684\u65e7\u8bed\u6cd5&#xff0c;\u8fd9\u65e0\u7591\u589e\u52a0\u4e86\u6211\u4eec\u7684\u5b66\u4e60\u548c\u5f00\u53d1\u6210\u672c\u3002<\/p>\n<p>\u4e3a\u4e86\u89e3\u51b3\u8fd9\u4e2a\u95ee\u9898&#xff0c;\u6211\u52a8\u624b\u5f00\u53d1\u4e86\u4e00\u4e2a\u5c0f\u9879\u76ee&#xff1a;\u4e00\u4e2a\u57fa\u4e8e**\u68c0\u7d22\u589e\u5f3a\u751f\u6210&#xff08;RAG&#xff09;**\u7684\u667a\u80fd\u95ee\u7b54\u7cfb\u7edf\u3002\u5b83\u80fd\u8bfb\u53d6\u6700\u65b0\u7684\u5b98\u65b9\u6587\u6863&#xff08;\u6bd4\u5982 PlantUML \u7684\u8bed\u8a00\u53c2\u8003\u6307\u5357&#xff09;&#xff0c;\u5e76\u8ba9 Gemini \u6a21\u578b\u5728\u56de\u7b54\u95ee\u9898\u524d&#xff0c;\u5148\u67e5\u9605\u8fd9\u4e9b\u6700\u65b0\u8d44\u6599\u3002\u4eca\u5929&#xff0c;\u6211\u5c31\u548c\u5927\u5bb6\u5206\u4eab\u8fd9\u4e2a\u9879\u76ee\u7684\u6280\u672f\u5b9e\u73b0&#xff0c;\u5e0c\u671b\u80fd\u7ed9\u5927\u5bb6\u5e26\u6765\u4e00\u4e9b\u542f\u53d1\u3002<br \/>\n<img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/07\/20250730103207-6889f4a7e49cd.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<h4>\u9879\u76ee\u6838\u5fc3\u7406\u5ff5&#xff1a;RAG\u5982\u4f55\u89e3\u51b3\u95ee\u9898&#xff1f;<\/h4>\n<p>\u5728\u6211\u4eec\u6df1\u5165\u4ee3\u7801\u4e4b\u524d&#xff0c;\u5148\u82b1\u4e00\u5206\u949f\u7406\u89e3\u4e00\u4e0b RAG \u7684\u5de5\u4f5c\u539f\u7406\u3002<\/p>\n<p>\u60f3\u8c61\u4e00\u4e0b&#xff0c;\u6211\u4eec\u8ba9\u4e00\u4f4d\u975e\u5e38\u806a\u660e\u7684\u5b9e\u4e60\u751f&#xff08;LLM&#xff09;\u5199\u4e00\u4efd\u62a5\u544a&#xff0c;\u4f46\u4ed6\u5bf9\u67d0\u4e2a\u7279\u5b9a\u9886\u57df\u7684\u6700\u65b0\u8fdb\u5c55\u4e0d\u592a\u4e86\u89e3\u3002\u6211\u4eec\u4f1a\u600e\u4e48\u505a&#xff1f;\u6211\u4eec\u4e0d\u4f1a\u8ba9\u4ed6\u51ed\u7a7a\u60f3\u8c61&#xff0c;\u800c\u662f\u4f1a\u628a\u6700\u65b0\u7684\u884c\u4e1a\u62a5\u544a\u3001\u7814\u7a76\u8bba\u6587&#xff08;\u5916\u90e8\u77e5\u8bc6\u5e93&#xff09;\u4e22\u7ed9\u4ed6&#xff0c;\u8bf4&#xff1a;\u201c\u770b&#xff0c;\u6839\u636e\u8fd9\u4e9b\u8d44\u6599\u6765\u5199\u3002\u201d<\/p>\n<p>RAG \u5c31\u662f\u8fd9\u4e2a\u8fc7\u7a0b\u7684\u81ea\u52a8\u5316\u7248\u672c\u3002\u5b83\u901a\u8fc7\u4e00\u4e2a\u201c\u68c0\u7d22\u201d\u6b65\u9aa4&#xff0c;\u4ece\u6211\u4eec\u7684\u77e5\u8bc6\u5e93&#xff08;PDF\u3001\u6587\u6863\u3001\u7f51\u7ad9\u7b49&#xff09;\u4e2d\u627e\u5230\u4e0e\u7528\u6237\u95ee\u9898\u6700\u76f8\u5173\u7684\u4fe1\u606f&#xff0c;\u7136\u540e\u5c06\u8fd9\u4e9b\u4fe1\u606f\u8fde\u540c\u539f\u59cb\u95ee\u9898\u4e00\u8d77\u6253\u5305&#xff0c;\u4ea4\u7ed9 LLM&#xff0c;\u8ba9\u5b83\u57fa\u4e8e\u8fd9\u4e9b\u201c\u65b0\u9c9c\u51fa\u7089\u201d\u7684\u6750\u6599\u6765\u201c\u751f\u6210\u201d\u7b54\u6848\u3002<\/p>\n<p>\u8fd9\u4e2a\u6d41\u7a0b\u53ef\u4ee5\u7528\u4e0b\u9762\u7684 PlantUML \u56fe\u6e05\u6670\u5730\u8868\u793a&#xff1a;<br \/>\n<img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/07\/20250730103210-6889f4aa967a5.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<h4>\u6280\u672f\u5b9e\u73b0\u6df1\u5ea6\u89e3\u6790<\/h4>\n<p>\u73b0\u5728&#xff0c;\u8ba9\u6211\u4eec\u6df1\u5165 main.py \u6587\u4ef6&#xff0c;\u770b\u770b\u8fd9\u4e2a RAG \u7cfb\u7edf\u662f\u5982\u4f55\u4e00\u6b65\u6b65\u6784\u5efa\u8d77\u6765\u7684\u3002<\/p>\n<h5>\u7b2c\u4e00\u6b65&#xff1a;\u77e5\u8bc6\u5e93\u7684\u5efa\u7acb\u4e0e\u201c\u4fdd\u9c9c\u201d<\/h5>\n<p>\u4e07\u4e08\u9ad8\u697c\u5e73\u5730\u8d77&#xff0c;\u6211\u4eec\u7684\u7b2c\u4e00\u6b65\u662f\u5efa\u7acb\u4e00\u4e2a\u53ef\u9760\u7684\u77e5\u8bc6\u5e93\u3002\u5728\u8fd9\u4e2a\u9879\u76ee\u4e2d&#xff0c;\u77e5\u8bc6\u6765\u6e90\u4e8e\u4e00\u4efdPDF\u6587\u6863\u3002\u4f46\u6211\u4eec\u505a\u4e86\u4e00\u4e2a\u975e\u5e38\u5b9e\u7528\u7684\u4f18\u5316&#xff1a;\u81ea\u52a8\u68c0\u6d4b\u6587\u6863\u66f4\u65b0\u3002<\/p>\n<p>\u4ee3\u7801\u901a\u8fc7 get_pdf_hash \u51fd\u6570\u8ba1\u7b97 PDF \u6587\u4ef6\u7684 SHA256 \u54c8\u5e0c\u503c\u3002<\/p>\n<p><span class=\"token keyword\">def<\/span> <span class=\"token function\">get_pdf_hash<\/span><span class=\"token punctuation\">(<\/span>file_path<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">:<\/span><br \/>\n    <span class=\"token triple-quoted-string string\">&#034;&#034;&#034;\u8ba1\u7b97\u6587\u4ef6\u7684 SHA256 \u54c8\u5e0c\u503c&#034;&#034;&#034;<\/span><br \/>\n    sha256_hash <span class=\"token operator\">&#061;<\/span> hashlib<span class=\"token punctuation\">.<\/span>sha256<span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><br \/>\n    <span class=\"token keyword\">with<\/span> <span class=\"token builtin\">open<\/span><span class=\"token punctuation\">(<\/span>file_path<span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#034;rb&#034;<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token keyword\">as<\/span> f<span class=\"token punctuation\">:<\/span><br \/>\n        <span class=\"token keyword\">for<\/span> byte_block <span class=\"token keyword\">in<\/span> <span class=\"token builtin\">iter<\/span><span class=\"token punctuation\">(<\/span><span class=\"token keyword\">lambda<\/span><span class=\"token punctuation\">:<\/span> f<span class=\"token punctuation\">.<\/span>read<span class=\"token punctuation\">(<\/span><span class=\"token number\">4096<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">b&#034;&#034;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">:<\/span><br \/>\n            sha256_hash<span class=\"token punctuation\">.<\/span>update<span class=\"token punctuation\">(<\/span>byte_block<span class=\"token punctuation\">)<\/span><br \/>\n    <span class=\"token keyword\">return<\/span> sha256_hash<span class=\"token punctuation\">.<\/span>hexdigest<span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><\/p>\n<p>\u5728 load_or_create_vectorstore \u51fd\u6570\u4e2d&#xff0c;\u7cfb\u7edf\u542f\u52a8\u65f6\u4f1a\u68c0\u67e5\u6301\u4e45\u5316\u76ee\u5f55 chroma_db \u4e2d\u5b58\u50a8\u7684\u65e7\u54c8\u5e0c\u503c\u4e0e\u5f53\u524d PDF \u6587\u4ef6\u7684\u54c8\u5e0c\u503c\u662f\u5426\u4e00\u81f4\u3002<\/p>\n<ul>\n<li>\u5982\u679c\u4e00\u81f4&#xff1a;\u592a\u68d2\u4e86&#xff01;\u8bf4\u660e\u6587\u6863\u6ca1\u53d8&#xff0c;\u76f4\u63a5\u4ece\u78c1\u76d8\u52a0\u8f7d\u5df2\u7ecf\u5904\u7406\u597d\u7684\u5411\u91cf\u6570\u636e\u5e93&#xff0c;\u79d2\u7ea7\u542f\u52a8\u3002<\/li>\n<li>\u5982\u679c\u4e0d\u4e00\u81f4\u6216\u9996\u6b21\u8fd0\u884c&#xff1a;\u8bf4\u660e\u77e5\u8bc6\u9700\u8981\u66f4\u65b0&#xff01;\u7cfb\u7edf\u4f1a\u81ea\u52a8\u5220\u9664\u65e7\u7684\u6570\u636e\u5e93&#xff0c;\u7136\u540e\u4f7f\u7528 PyPDFLoader \u52a0\u8f7d\u65b0\u7684 PDF&#xff0c;\u5e76\u7528 RecursiveCharacterTextSplitter \u5c06\u5176\u5206\u5272\u6210\u66f4\u5c0f\u7684\u3001\u6613\u4e8e\u68c0\u7d22\u7684\u6587\u672c\u5757\u3002<\/li>\n<\/ul>\n<p>\u8fd9\u4e2a\u8bbe\u8ba1\u975e\u5e38\u5173\u952e&#xff0c;\u5b83\u786e\u4fdd\u4e86\u6211\u4eec\u7684\u201c\u5916\u8111\u201d\u6c38\u8fdc\u5b58\u50a8\u7684\u662f\u6700\u65b0\u4fe1\u606f&#xff0c;\u540c\u65f6\u907f\u514d\u4e86\u6bcf\u6b21\u8fd0\u884c\u90fd\u91cd\u590d\u5904\u7406\u6587\u6863\u7684\u6602\u8d35\u5f00\u9500\u3002<\/p>\n<h5>\u7b2c\u4e8c\u6b65&#xff1a;\u5c06\u77e5\u8bc6\u5411\u91cf\u5316 (Embedding)<\/h5>\n<p>\u8ba1\u7b97\u673a\u4e0d\u7406\u89e3\u6587\u5b57&#xff0c;\u53ea\u7406\u89e3\u6570\u5b57\u3002\u4e3a\u4e86\u8ba9\u673a\u5668\u80fd\u591f\u201c\u7406\u89e3\u201d\u5e76\u6bd4\u8f83\u6587\u672c\u7247\u6bb5\u7684\u76f8\u4f3c\u5ea6&#xff0c;\u6211\u4eec\u9700\u8981\u5c06\u5b83\u4eec\u8f6c\u6362\u6210\u5411\u91cf&#xff0c;\u8fd9\u4e2a\u8fc7\u7a0b\u53eb\u505a\u5d4c\u5165&#xff08;Embedding&#xff09;\u3002<\/p>\n<p>\u6211\u4eec\u4f7f\u7528\u4e86 HuggingFace \u7684 sentence-transformers\/paraphrase-multilingual-MiniLM-L12-v2 \u6a21\u578b\u3002\u8fd9\u4e2a\u6a21\u578b\u80fd\u5c06\u6587\u672c\u5757\u8f6c\u6362\u6210\u4e00\u4e2a\u5305\u542b\u51e0\u767e\u4e2a\u6570\u5b57\u7684\u5411\u91cf&#xff0c;\u795e\u5947\u7684\u662f&#xff0c;\u8bed\u4e49\u4e0a\u76f8\u4f3c\u7684\u6587\u672c\u5757&#xff0c;\u5176\u5bf9\u5e94\u7684\u5411\u91cf\u5728\u591a\u7ef4\u7a7a\u95f4\u4e2d\u7684\u8ddd\u79bb\u4e5f\u66f4\u8fd1\u3002<\/p>\n<p><span class=\"token keyword\">def<\/span> <span class=\"token function\">setup_embeddings<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">:<\/span><br \/>\n    <span class=\"token triple-quoted-string string\">&#034;&#034;&#034;\u521d\u59cb\u5316\u5e76\u8fd4\u56de\u5d4c\u5165\u6a21\u578b&#034;&#034;&#034;<\/span><br \/>\n    <span class=\"token keyword\">print<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;\u6b63\u5728\u521d\u59cb\u5316\u5d4c\u5165\u6a21\u578b&#8230;&#034;<\/span><span class=\"token punctuation\">)<\/span><br \/>\n    embeddings <span class=\"token operator\">&#061;<\/span> HuggingFaceEmbeddings<span class=\"token punctuation\">(<\/span><br \/>\n        model_name<span class=\"token operator\">&#061;<\/span>EMBEDDING_MODEL_NAME<span class=\"token punctuation\">,<\/span><br \/>\n        model_kwargs<span class=\"token operator\">&#061;<\/span><span class=\"token punctuation\">{<\/span><span class=\"token string\">&#039;device&#039;<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token string\">&#039;cpu&#039;<\/span><span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">,<\/span><br \/>\n        encode_kwargs<span class=\"token operator\">&#061;<\/span><span class=\"token punctuation\">{<\/span><span class=\"token string\">&#039;normalize_embeddings&#039;<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token boolean\">False<\/span><span class=\"token punctuation\">}<\/span><br \/>\n    <span class=\"token punctuation\">)<\/span><br \/>\n    <span class=\"token keyword\">return<\/span> embeddings<\/p>\n<p>\u6240\u6709\u4ece PDF \u4e2d\u5206\u5272\u51fa\u6765\u7684\u6587\u672c\u5757\u90fd\u4f1a\u7ecf\u8fc7\u8fd9\u4e2a\u6a21\u578b\u5904\u7406&#xff0c;\u7136\u540e\u8fde\u540c\u5b83\u4eec\u7684\u5411\u91cf\u8868\u793a\u4e00\u8d77\u5b58\u5165 Chroma \u5411\u91cf\u6570\u636e\u5e93\u4e2d\u3002<\/p>\n<h5>\u7b2c\u4e09\u6b65&#xff1a;\u642d\u5efa\u68c0\u7d22\u4e0e\u751f\u6210\u7684\u6838\u5fc3\u94fe<\/h5>\n<p>\u73b0\u5728&#xff0c;\u6211\u4eec\u6709\u4e86\u5b58\u50a8\u77e5\u8bc6\u7684\u6570\u636e\u5e93\u548c\u8d1f\u8d23\u56de\u7b54\u95ee\u9898\u7684 LLM&#xff0c;\u662f\u65f6\u5019\u628a\u5b83\u4eec\u201c\u94fe\u63a5\u201d\u8d77\u6765\u4e86\u3002\u8fd9\u91cc\u6211\u4eec\u501f\u52a9\u4e86 LangChain \u6846\u67b6\u7684 RetrievalQA \u94fe\u3002<\/p>\n<p><span class=\"token keyword\">def<\/span> <span class=\"token function\">create_qa_chain<\/span><span class=\"token punctuation\">(<\/span>llm<span class=\"token punctuation\">,<\/span> vectorstore<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">:<\/span><br \/>\n    <span class=\"token triple-quoted-string string\">&#034;&#034;&#034;\u57fa\u4e8eLLM\u548c\u5411\u91cf\u6570\u636e\u5e93\u521b\u5efa\u5e76\u8fd4\u56de\u95ee\u7b54\u94fe&#034;&#034;&#034;<\/span><br \/>\n    retriever <span class=\"token operator\">&#061;<\/span> vectorstore<span class=\"token punctuation\">.<\/span>as_retriever<span class=\"token punctuation\">(<\/span>search_kwargs<span class=\"token operator\">&#061;<\/span><span class=\"token punctuation\">{<\/span><span class=\"token string\">&#034;k&#034;<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token number\">2<\/span><span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">)<\/span><\/p>\n<p>    qa_chain <span class=\"token operator\">&#061;<\/span> RetrievalQA<span class=\"token punctuation\">.<\/span>from_chain_type<span class=\"token punctuation\">(<\/span><br \/>\n        llm<span class=\"token operator\">&#061;<\/span>llm<span class=\"token punctuation\">,<\/span><br \/>\n        chain_type<span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;stuff&#034;<\/span><span class=\"token punctuation\">,<\/span><br \/>\n        retriever<span class=\"token operator\">&#061;<\/span>retriever<span class=\"token punctuation\">,<\/span><br \/>\n        return_source_documents<span class=\"token operator\">&#061;<\/span><span class=\"token boolean\">True<\/span><br \/>\n    <span class=\"token punctuation\">)<\/span><br \/>\n    <span class=\"token keyword\">return<\/span> qa_chain<\/p>\n<p>\u8fd9\u4e2a\u94fe\u6761\u7684\u5de5\u4f5c\u6d41\u7a0b\u5982\u4e0b&#xff1a;<\/p>\n<li>\u8bbe\u7f6e\u68c0\u7d22\u5668(Retriever)&#xff1a;vectorstore.as_retriever(search_kwargs&#061;{&#034;k&#034;: 2}) \u8fd9\u884c\u4ee3\u7801\u521b\u5efa\u4e86\u4e00\u4e2a\u68c0\u7d22\u5668&#xff0c;\u5f53\u7528\u6237\u63d0\u95ee\u65f6&#xff0c;\u5b83\u4f1a\u53bb Chroma \u6570\u636e\u5e93\u4e2d\u68c0\u7d22\u51fa\u6700\u76f8\u4f3c\u7684 k&#061;2 \u4e2a\u6587\u6863\u7247\u6bb5\u3002<\/li>\n<li>\u9009\u62e9\u94fe\u7c7b\u578b(Chain Type)&#xff1a;chain_type&#061;&#034;stuff&#034; \u662f\u4e00\u79cd\u7b80\u5355\u76f4\u63a5\u7684\u7b56\u7565\u3002\u5b83\u4f1a\u628a\u68c0\u7d22\u5230\u7684\u6240\u6709\u6587\u6863\u7247\u6bb5&#xff08;stuff them&#xff09;\u4e00\u80a1\u8111\u5730\u585e\u8fdb\u4e00\u4e2a\u63d0\u793a\u8bcd\u6a21\u677f\u4e2d&#xff0c;\u548c\u7528\u6237\u7684\u539f\u59cb\u95ee\u9898\u4e00\u8d77\u53d1\u9001\u7ed9 LLM\u3002<\/li>\n<li>\u8fd4\u56de\u6e90\u6587\u6863&#xff1a;return_source_documents&#061;True \u662f\u4e00\u4e2a\u975e\u5e38\u6709\u7528\u7684\u8c03\u8bd5\u548c\u9a8c\u8bc1\u5de5\u5177\u3002\u5b83\u8ba9 LLM \u5728\u7ed9\u51fa\u7b54\u6848\u7684\u540c\u65f6&#xff0c;\u4e5f\u544a\u8bc9\u6211\u4eec\u5b83\u53c2\u8003\u4e86\u54ea\u4e9b\u539f\u6587\u7247\u6bb5\u3002\u8fd9\u5927\u5927\u589e\u5f3a\u4e86\u7ed3\u679c\u7684\u900f\u660e\u5ea6\u548c\u53ef\u4fe1\u5ea6\u3002<\/li>\n<h4>\u5b9e\u8df5\u4e0e\u6548\u679c<\/h4>\n<p>\u4e00\u5207\u51c6\u5907\u5c31\u7eea\u540e&#xff0c;main \u51fd\u6570\u5c06\u6240\u6709\u90e8\u5206\u4e32\u8054\u8d77\u6765&#xff0c;\u5e76\u7528\u4e00\u4e2a\u5177\u4f53\u95ee\u9898\u6765\u6d4b\u8bd5\u7cfb\u7edf&#xff1a;<\/p>\n<p><span class=\"token keyword\">def<\/span> <span class=\"token function\">main<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">:<\/span><br \/>\n    <span class=\"token triple-quoted-string string\">&#034;&#034;&#034;\u4e3b\u6267\u884c\u51fd\u6570&#xff0c;\u7f16\u6392\u6574\u4e2aRAG\u6d41\u7a0b&#034;&#034;&#034;<\/span><br \/>\n    embeddings <span class=\"token operator\">&#061;<\/span> setup_embeddings<span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><br \/>\n    vectorstore <span class=\"token operator\">&#061;<\/span> load_or_create_vectorstore<span class=\"token punctuation\">(<\/span>PDF_FILE_PATH<span class=\"token punctuation\">,<\/span> PERSIST_DIRECTORY<span class=\"token punctuation\">,<\/span> embeddings<span class=\"token punctuation\">)<\/span><br \/>\n    llm <span class=\"token operator\">&#061;<\/span> setup_llm<span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><br \/>\n    qa_chain <span class=\"token operator\">&#061;<\/span> create_qa_chain<span class=\"token punctuation\">(<\/span>llm<span class=\"token punctuation\">,<\/span> vectorstore<span class=\"token punctuation\">)<\/span><\/p>\n<p>    query <span class=\"token operator\">&#061;<\/span> <span class=\"token string\">&#034;\u5982\u4f55\u7ed8\u5236 JSON \u6570\u636e\u56fe&#xff1f;&#034;<\/span><br \/>\n    ask_question<span class=\"token punctuation\">(<\/span>qa_chain<span class=\"token punctuation\">,<\/span> query<span class=\"token punctuation\">)<\/span><\/p>\n<p>\u5f53\u8fd0\u884c\u8fd9\u4e2a\u811a\u672c\u65f6&#xff0c;\u5b83\u4f1a&#xff1a;<\/p>\n<li>\u521d\u59cb\u5316\u6a21\u578b\u548c\u5411\u91cf\u6570\u636e\u5e93\u3002<\/li>\n<li>\u63a5\u6536\u95ee\u9898 \u5982\u4f55\u7ed8\u5236 JSON \u6570\u636e\u56fe&#xff1f;\u3002<\/li>\n<li>\u5728\u6570\u636e\u5e93\u4e2d\u627e\u5230\u5173\u4e8e JSON \u6570\u636e\u53ef\u89c6\u5316\u7684\u76f8\u5173\u7247\u6bb5\u3002<\/li>\n<li>\u5c06\u8fd9\u4e9b\u7247\u6bb5\u548c\u95ee\u9898\u4e00\u8d77\u53d1\u7ed9 Gemini\u3002<\/li>\n<li>Gemini \u57fa\u4e8e\u6700\u65b0\u7684 PlantUML \u8bed\u6cd5&#xff08;\u6765\u81eaPDF&#xff09;\u751f\u6210\u7b54\u6848&#xff0c;\u5e76\u9644\u4e0a\u53c2\u8003\u6765\u6e90\u3002<\/li>\n<p>\u8fd9\u6837&#xff0c;\u6211\u4eec\u5c31\u5f97\u5230\u4e86\u4e00\u4e2a\u65e2\u6709 Gemini \u5f3a\u5927\u63a8\u7406\u80fd\u529b&#xff0c;\u53c8\u6709\u6700\u65b0\u3001\u6700\u51c6\u786e\u9886\u57df\u77e5\u8bc6\u7684 AI \u52a9\u624b\u3002<\/p>\n<h4>\u5b9e\u7528\u5efa\u8bae\u4e0e\u672a\u6765\u5c55\u671b<\/h4>\n<p>\u8fd9\u4e2a\u9879\u76ee\u867d\u7136\u7b80\u5355&#xff0c;\u4f46\u6269\u5c55\u6027\u5f88\u5f3a&#xff1a;<\/p>\n<li>\u66f4\u6362\u77e5\u8bc6\u6e90&#xff1a;\u6211\u4eec\u53ef\u4ee5\u8f7b\u6613\u5730\u5c06 PDF_FILE_PATH \u6362\u6210\u4efb\u4f55\u6211\u4eec\u60f3\u8981\u7684 PDF \u6587\u6863&#xff0c;\u6bd4\u5982\u4ee5\u592a\u574a\u7684\u767d\u76ae\u4e66\u3001\u67d0\u4e2a\u5f00\u6e90\u5e93\u7684API\u6587\u6863&#xff0c;\u751a\u81f3\u662f\u6211\u4eec\u7684\u5b66\u4e60\u7b14\u8bb0\u3002<\/li>\n<li>\u652f\u6301\u66f4\u591a\u683c\u5f0f&#xff1a;\u901a\u8fc7\u4f7f\u7528 LangChain \u63d0\u4f9b\u7684\u5176\u4ed6 DocumentLoader&#xff0c;\u6211\u4eec\u53ef\u4ee5\u8ba9\u7cfb\u7edf\u8bfb\u53d6 .txt, .md \u6587\u4ef6&#xff0c;\u751a\u81f3\u76f4\u63a5\u722c\u53d6\u7f51\u7ad9\u5185\u5bb9\u3002<\/li>\n<li>\u90e8\u7f72\u4e3a\u670d\u52a1&#xff1a;\u4f7f\u7528 FastAPI \u6216 Flask \u5c06\u8fd9\u4e2a\u95ee\u7b54\u7cfb\u7edf\u5305\u88c5\u6210\u4e00\u4e2a API \u670d\u52a1&#xff0c;\u8ba9\u5176\u4ed6\u4eba\u4e5f\u80fd\u65b9\u4fbf\u5730\u4f7f\u7528\u3002<\/li>\n<li>\u4f18\u5316\u68c0\u7d22&#xff1a;\u5bf9\u4e8e\u975e\u5e38\u5927\u7684\u6587\u6863&#xff0c;\u53ef\u4ee5\u63a2\u7d22\u66f4\u9ad8\u7ea7\u7684\u68c0\u7d22\u7b56\u7565&#xff0c;\u5982 Parent Document Retriever&#xff0c;\u4ee5\u83b7\u5f97\u66f4\u76f8\u5173\u7684\u4e0a\u4e0b\u6587\u3002<\/li>\n<h4>\u7ed3\u8bba<\/h4>\n<p>\u901a\u8fc7 RAG&#xff0c;\u6211\u4eec\u4e3a\u5927\u8bed\u8a00\u6a21\u578b\u5b89\u88c5\u4e86\u4e00\u4e2a\u53ef\u968f\u65f6\u66f4\u65b0\u3001\u53ef\u5b9a\u5236\u7684\u201c\u5916\u8111\u201d\u3002\u8fd9\u4e2a\u65b9\u6cd5\u4e0d\u4ec5\u6709\u6548\u89e3\u51b3\u4e86 LLM \u77e5\u8bc6\u6ede\u540e\u7684\u95ee\u9898&#xff0c;\u8fd8\u901a\u8fc7\u5f15\u5165\u53ef\u9a8c\u8bc1\u7684\u4fe1\u6e90&#xff0c;\u5927\u5927\u63d0\u9ad8\u4e86\u751f\u6210\u5185\u5bb9\u7684\u53ef\u4fe1\u5ea6\u3002\u6700\u68d2\u7684\u662f&#xff0c;\u5b9e\u73b0\u8fd9\u4e00\u5207\u7684\u6280\u672f\u95e8\u69db\u5e76\u4e0d\u9ad8\u3002<\/p>\n<p>\u5e0c\u671b\u8fd9\u7bc7\u6587\u7ae0\u80fd\u6fc0\u52b1\u5927\u5bb6\u52a8\u624b\u5c1d\u8bd5&#xff0c;\u4e3a\u81ea\u5df1\u7684\u5b66\u4e60\u548c\u5de5\u4f5c\u573a\u666f\u6253\u9020\u4e00\u4e2a\u4e13\u5c5e\u7684\u3001\u6c38\u8fdc\u4e0d\u4f1a\u201c\u8fc7\u65f6\u201d\u7684AI\u4f19\u4f34\u3002<br \/>\nhttps:\/\/github.com\/xilu0\/plantuml-agent\/blob\/main\/main.py<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb406\u6b21\uff0c\u70b9\u8d5e10\u6b21\uff0c\u6536\u85cf9\u6b21\u3002\u901a\u8fc7 RAG\uff0c\u6211\u4eec\u4e3a\u5927\u8bed\u8a00\u6a21\u578b\u5b89\u88c5\u4e86\u4e00\u4e2a\u53ef\u968f\u65f6\u66f4\u65b0\u3001\u53ef\u5b9a\u5236\u7684\u201c\u5916\u8111\u201d\u3002\u8fd9\u4e2a\u65b9\u6cd5\u4e0d\u4ec5\u6709\u6548\u89e3\u51b3\u4e86 LLM \u77e5\u8bc6\u6ede\u540e\u7684\u95ee\u9898\uff0c\u8fd8\u901a\u8fc7\u5f15\u5165\u53ef\u9a8c\u8bc1\u7684\u4fe1\u6e90\uff0c\u5927\u5927\u63d0\u9ad8\u4e86\u751f\u6210\u5185\u5bb9\u7684\u53ef\u4fe1\u5ea6\u3002\u6700\u68d2\u7684\u662f\uff0c\u5b9e\u73b0\u8fd9\u4e00\u5207\u7684\u6280\u672f\u95e8\u69db\u5e76\u4e0d\u9ad8\u3002<\/p>\n","protected":false},"author":2,"featured_media":49465,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[66,50],"topic":[],"class_list":["post-49467","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-ai","tag-50"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>AI: \u544a\u522b\u8fc7\u65f6\u4fe1\u606f, \u7528RAG\u548c\u4e00\u4efdPDF \u4e3aLLM\u6253\u9020\u4e00\u4e2a\u968f\u9700\u66f4\u65b0\u7684\u201c\u5916\u8111\u201d - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\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.wsisp.com\/helps\/49467.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"AI: \u544a\u522b\u8fc7\u65f6\u4fe1\u606f, \u7528RAG\u548c\u4e00\u4efdPDF \u4e3aLLM\u6253\u9020\u4e00\u4e2a\u968f\u9700\u66f4\u65b0\u7684\u201c\u5916\u8111\u201d - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb406\u6b21\uff0c\u70b9\u8d5e10\u6b21\uff0c\u6536\u85cf9\u6b21\u3002\u901a\u8fc7 RAG\uff0c\u6211\u4eec\u4e3a\u5927\u8bed\u8a00\u6a21\u578b\u5b89\u88c5\u4e86\u4e00\u4e2a\u53ef\u968f\u65f6\u66f4\u65b0\u3001\u53ef\u5b9a\u5236\u7684\u201c\u5916\u8111\u201d\u3002\u8fd9\u4e2a\u65b9\u6cd5\u4e0d\u4ec5\u6709\u6548\u89e3\u51b3\u4e86 LLM \u77e5\u8bc6\u6ede\u540e\u7684\u95ee\u9898\uff0c\u8fd8\u901a\u8fc7\u5f15\u5165\u53ef\u9a8c\u8bc1\u7684\u4fe1\u6e90\uff0c\u5927\u5927\u63d0\u9ad8\u4e86\u751f\u6210\u5185\u5bb9\u7684\u53ef\u4fe1\u5ea6\u3002\u6700\u68d2\u7684\u662f\uff0c\u5b9e\u73b0\u8fd9\u4e00\u5207\u7684\u6280\u672f\u95e8\u69db\u5e76\u4e0d\u9ad8\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/49467.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-07-30T10:32:12+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/07\/20250730103207-6889f4a7e49cd.png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/49467.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/49467.html\",\"name\":\"AI: \u544a\u522b\u8fc7\u65f6\u4fe1\u606f, \u7528RAG\u548c\u4e00\u4efdPDF \u4e3aLLM\u6253\u9020\u4e00\u4e2a\u968f\u9700\u66f4\u65b0\u7684\u201c\u5916\u8111\u201d - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-07-30T10:32:12+00:00\",\"dateModified\":\"2025-07-30T10:32:12+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/49467.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/49467.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/49467.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"AI: \u544a\u522b\u8fc7\u65f6\u4fe1\u606f, \u7528RAG\u548c\u4e00\u4efdPDF \u4e3aLLM\u6253\u9020\u4e00\u4e2a\u968f\u9700\u66f4\u65b0\u7684\u201c\u5916\u8111\u201d\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"AI: \u544a\u522b\u8fc7\u65f6\u4fe1\u606f, \u7528RAG\u548c\u4e00\u4efdPDF \u4e3aLLM\u6253\u9020\u4e00\u4e2a\u968f\u9700\u66f4\u65b0\u7684\u201c\u5916\u8111\u201d - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","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.wsisp.com\/helps\/49467.html","og_locale":"zh_CN","og_type":"article","og_title":"AI: \u544a\u522b\u8fc7\u65f6\u4fe1\u606f, \u7528RAG\u548c\u4e00\u4efdPDF \u4e3aLLM\u6253\u9020\u4e00\u4e2a\u968f\u9700\u66f4\u65b0\u7684\u201c\u5916\u8111\u201d - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb406\u6b21\uff0c\u70b9\u8d5e10\u6b21\uff0c\u6536\u85cf9\u6b21\u3002\u901a\u8fc7 RAG\uff0c\u6211\u4eec\u4e3a\u5927\u8bed\u8a00\u6a21\u578b\u5b89\u88c5\u4e86\u4e00\u4e2a\u53ef\u968f\u65f6\u66f4\u65b0\u3001\u53ef\u5b9a\u5236\u7684\u201c\u5916\u8111\u201d\u3002\u8fd9\u4e2a\u65b9\u6cd5\u4e0d\u4ec5\u6709\u6548\u89e3\u51b3\u4e86 LLM \u77e5\u8bc6\u6ede\u540e\u7684\u95ee\u9898\uff0c\u8fd8\u901a\u8fc7\u5f15\u5165\u53ef\u9a8c\u8bc1\u7684\u4fe1\u6e90\uff0c\u5927\u5927\u63d0\u9ad8\u4e86\u751f\u6210\u5185\u5bb9\u7684\u53ef\u4fe1\u5ea6\u3002\u6700\u68d2\u7684\u662f\uff0c\u5b9e\u73b0\u8fd9\u4e00\u5207\u7684\u6280\u672f\u95e8\u69db\u5e76\u4e0d\u9ad8\u3002","og_url":"https:\/\/www.wsisp.com\/helps\/49467.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-07-30T10:32:12+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/07\/20250730103207-6889f4a7e49cd.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"2 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/49467.html","url":"https:\/\/www.wsisp.com\/helps\/49467.html","name":"AI: \u544a\u522b\u8fc7\u65f6\u4fe1\u606f, \u7528RAG\u548c\u4e00\u4efdPDF \u4e3aLLM\u6253\u9020\u4e00\u4e2a\u968f\u9700\u66f4\u65b0\u7684\u201c\u5916\u8111\u201d - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-07-30T10:32:12+00:00","dateModified":"2025-07-30T10:32:12+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/49467.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/49467.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/49467.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"AI: \u544a\u522b\u8fc7\u65f6\u4fe1\u606f, \u7528RAG\u548c\u4e00\u4efdPDF \u4e3aLLM\u6253\u9020\u4e00\u4e2a\u968f\u9700\u66f4\u65b0\u7684\u201c\u5916\u8111\u201d"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/49467","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=49467"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/49467\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/49465"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=49467"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=49467"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=49467"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=49467"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}