{"id":20305,"date":"2025-02-06T00:28:49","date_gmt":"2025-02-05T16:28:49","guid":{"rendered":"https:\/\/www.aisharenet.com\/?p=20305"},"modified":"2025-07-14T09:46:15","modified_gmt":"2025-07-14T01:46:15","slug":"airweave","status":"publish","type":"post","link":"https:\/\/www.kdjingpai.com\/ja\/airweave\/","title":{"rendered":"Airweave\uff1a\u8ba9\u5e94\u7528\u7a0b\u5e8f\u5feb\u901f\u96c6\u6210\u77e5\u8bc6\u5e93\uff0c\u5b9e\u73b0\u667a\u80fd\u641c\u7d22"},"content":{"rendered":"<p>Airweave \u662f\u4e00\u4e2a\u5f00\u6e90\u5de5\u5177\uff0c\u65e8\u5728\u901a\u8fc7\u540c\u6b65\u7528\u6237\u7684\u5e94\u7528\u6570\u636e\u3001API\u3001\u6570\u636e\u5e93\u548c\u7f51\u7ad9\u5230\u56fe\u8c31\u548c\u5411\u91cf\u6570\u636e\u5e93\uff0c\u4f7f\u4efb\u4f55\u5e94\u7528\u7a0b\u5e8f\u53d8\u5f97\u53ef\u641c\u7d22\u3002Airweave \u7b80\u5316\u4e86\u6570\u636e\u53ef\u641c\u7d22\u5316\u7684\u8fc7\u7a0b\uff0c\u65e0\u8bba\u662f\u7ed3\u6784\u5316\u6570\u636e\u8fd8\u662f\u975e\u7ed3\u6784\u5316\u6570\u636e\uff0c\u90fd\u53ef\u4ee5\u901a\u8fc7 Airweave \u8fdb\u884c\u5904\u7406\u3001\u5b58\u50a8\u548c\u68c0\u7d22\u3002\u5176\u6838\u5fc3\u529f\u80fd\u5305\u62ec\u6570\u636e\u540c\u6b65\u3001\u96c6\u6210\u591a\u79cd\u6570\u636e\u6e90\u3001\u652f\u6301\u591a\u79cd\u5411\u91cf\u6570\u636e\u5e93\u7b49\u3002Airweave \u7684\u8bbe\u8ba1\u76ee\u6807\u662f\u63d0\u4f9b\u4e00\u4e2a\u7b80\u5355\u3001\u53ef\u6269\u5c55\u4e14\u900f\u660e\u7684\u89e3\u51b3\u65b9\u6848\uff0c\u5e2e\u52a9\u7528\u6237\u8f7b\u677e\u5b9e\u73b0\u6570\u636e\u7684\u8bed\u4e49\u641c\u7d22\u3002<\/p>\n<p><img decoding=\"async\" title=\"Airweave\uff1a\u8ba9\u5e94\u7528\u7a0b\u5e8f\u5feb\u901f\u96c6\u6210\u77e5\u8bc6\u5e93\uff0c\u5b9e\u73b0\u667a\u80fd\u641c\u7d22-1\" src=\"https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2025\/02\/6af5546d2fde0f5.jpg\" alt=\"Airweave\uff1a\u8ba9\u5e94\u7528\u7a0b\u5e8f\u5feb\u901f\u96c6\u6210\u77e5\u8bc6\u5e93\uff0c\u5b9e\u73b0\u667a\u80fd\u641c\u7d22-1\" \/><\/p>\n<p>&nbsp;<\/p>\n<h2>\u529f\u80fd\u5217\u8868<\/h2>\n<ul>\n<li>\u6570\u636e\u540c\u6b65\uff1a\u652f\u6301\u5c06\u7528\u6237\u7684\u5e94\u7528\u6570\u636e\u3001API\u3001\u6570\u636e\u5e93\u548c\u7f51\u7ad9\u6570\u636e\u540c\u6b65\u5230\u56fe\u8c31\u548c\u5411\u91cf\u6570\u636e\u5e93\u3002<\/li>\n<li>\u591a\u6570\u636e\u6e90\u96c6\u6210\uff1a\u652f\u6301\u8d85\u8fc720\u79cd\u6570\u636e\u6e90\u7684\u96c6\u6210\uff0c\u6301\u7eed\u589e\u52a0\u4e2d\u3002<\/li>\n<li>\u5411\u91cf\u6570\u636e\u5e93\u652f\u6301\uff1a\u9ed8\u8ba4\u4f7f\u7528 Weaviate \u5b9e\u4f8b\uff0c\u7528\u6237\u4e5f\u53ef\u4ee5\u914d\u7f6e\u81ea\u5df1\u7684\u5411\u91cf\u6570\u636e\u5e93\u3002<\/li>\n<li>\u65e0\u4ee3\u7801\u914d\u7f6e\uff1a\u7528\u6237\u65e0\u9700\u7f16\u5199\u4ee3\u7801\u5373\u53ef\u901a\u8fc7\u51e0\u6b21\u70b9\u51fb\u5b8c\u6210\u5e94\u7528\u7a0b\u5e8f\u7684\u53ef\u641c\u7d22\u5316\u3002<\/li>\n<li>\u5f02\u6b65\u5904\u7406\uff1a\u652f\u6301\u5927\u89c4\u6a21\u6570\u636e\u540c\u6b65\u7684\u5f02\u6b65\u5904\u7406\u3002<\/li>\n<li>\u5f00\u6e90\u6838\u5fc3\uff1a\u6838\u5fc3\u529f\u80fd\u5f00\u6e90\uff0c\u672a\u6765\u5c06\u63d0\u4f9b\u66f4\u591a\u9ad8\u7ea7\u5546\u4e1a\u529f\u80fd\u3002<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h2>\u4f7f\u7528\u5e2e\u52a9<\/h2>\n<h3>\u5b89\u88c5\u6d41\u7a0b<\/h3>\n<ol>\n<li>\u514b\u9686\u4ed3\u5e93\uff1a<\/li>\n<\/ol>\n<pre><code>   git clone https:\/\/github.com\/airweave-ai\/airweave.git\r\ncd airweave\r\n<\/code><\/pre>\n<ol start=\"2\">\n<li>\u6784\u5efa\u5e76\u8fd0\u884c\uff1a<\/li>\n<\/ol>\n<pre><code>   chmod +x start.sh\r\n.\/start.sh\r\n<\/code><\/pre>\n<p>\u8fd0\u884c\u4e0a\u8ff0\u547d\u4ee4\u540e\uff0cAirweave \u5c06\u5728\u672c\u5730\u542f\u52a8\u3002<\/p>\n<h3>\u4f7f\u7528\u6d41\u7a0b<\/h3>\n<h4>\u524d\u7aef\u4f7f\u7528<\/h4>\n<ol>\n<li>\u8bbf\u95ee <a href=\"https:\/\/www.kdjingpai.com\/react\/\">React<\/a> UI\uff1a \u6253\u5f00\u6d4f\u89c8\u5668\uff0c\u8bbf\u95ee <code>http:\/\/localhost:8080<\/code>\u3002<\/li>\n<li>\u6dfb\u52a0\u65b0\u6570\u636e\u6e90\uff1a \u5bfc\u822a\u5230 &#8220;Sources&#8221; \u9875\u9762\uff0c\u6dfb\u52a0\u65b0\u7684\u6570\u636e\u6e90\u3002<\/li>\n<li>\u914d\u7f6e\u540c\u6b65\u8ba1\u5212\uff1a \u5728 &#8220;Schedules&#8221; \u9875\u9762\u8bbe\u7f6e\u6216\u67e5\u770b\u540c\u6b65\u8ba1\u5212\u3002<\/li>\n<li>\u76d1\u63a7\u540c\u6b65\u4efb\u52a1\uff1a \u5728 &#8220;Jobs&#8221; \u9875\u9762\u76d1\u63a7\u540c\u6b65\u4efb\u52a1\u7684\u72b6\u6001\u3002<\/li>\n<\/ol>\n<h4>API \u4f7f\u7528<\/h4>\n<ol>\n<li>\u8bbf\u95ee Swagger \u6587\u6863\uff1a \u6253\u5f00\u6d4f\u89c8\u5668\uff0c\u8bbf\u95ee <code>http:\/\/localhost:8001\/docs<\/code> \u67e5\u770b API \u6587\u6863\u3002<\/li>\n<li>\u83b7\u53d6\u6240\u6709\u6570\u636e\u6e90\uff1a<\/li>\n<\/ol>\n<pre><code>   GET \/sources\r\n<\/code><\/pre>\n<ol start=\"3\">\n<li>\u8fde\u63a5\u6570\u636e\u6e90\uff1a<\/li>\n<\/ol>\n<pre><code>   POST \/connections\/{short_name}\r\n<\/code><\/pre>\n<h3>\u9ad8\u7ea7\u914d\u7f6e<\/h3>\n<ul>\n<li>\u914d\u7f6e\u81ea\u5b9a\u4e49\u5411\u91cf\u6570\u636e\u5e93\uff1a \u7528\u6237\u53ef\u4ee5\u5728\u5e94\u7528\u7a0b\u5e8f UI \u6216\u901a\u8fc7 API \u914d\u7f6e\u81ea\u5df1\u7684\u5411\u91cf\u6570\u636e\u5e93\u3002<\/li>\n<li>\u5f02\u6b65\u5ba2\u6237\u7aef\uff1a Airweave \u63d0\u4f9b\u5f02\u6b65\u5ba2\u6237\u7aef\uff0c\u652f\u6301\u975e\u963b\u585e\u8c03\u7528 API\u3002<\/li>\n<\/ul>\n<pre><code>  import asyncio\r\nfrom airweave import AsyncAirweaveSDK\r\nclient = AsyncAirweaveSDK(api_key=\"YOUR_API_KEY\", base_url=\"https:\/\/yourhost.com\/path\/to\/api\")\r\nasync def main():\r\nawait client.api_keys.create_api_key()\r\nasyncio.run(main())\r\n<\/code><\/pre>\n<h3>\u5f02\u5e38\u5904\u7406<\/h3>\n<p>\u5f53 API \u8fd4\u56de\u975e\u6210\u529f\u72b6\u6001\u7801\uff084xx \u6216 5xx \u54cd\u5e94\uff09\u65f6\uff0c\u5c06\u629b\u51fa ApiError \u5f02\u5e38\u3002<\/p>\n<pre><code>from airweave.core.api_error import ApiError\r\ntry:\r\nclient.api_keys.create_api_key()\r\nexcept ApiError as e:\r\nprint(e.status_code)\r\nprint(e.body)\r\n<\/code><\/pre>\n<h3>\u81ea\u52a8\u91cd\u8bd5<\/h3>\n<p>SDK \u914d\u7f6e\u4e86\u81ea\u52a8\u91cd\u8bd5\u673a\u5236\uff0c\u9ed8\u8ba4\u91cd\u8bd5\u6b21\u6570\u4e3a2\u6b21\u3002\u7528\u6237\u53ef\u4ee5\u901a\u8fc7 <code>max_retries<\/code> \u9009\u9879\u914d\u7f6e\u91cd\u8bd5\u884c\u4e3a\u3002<\/p>\n<pre><code>client.api_keys.create_api_key(..., request_options={\"max_retries\": 1})\r\n<\/code><\/pre>\n<h3>\u8d85\u65f6\u8bbe\u7f6e<\/h3>\n<p>SDK \u9ed8\u8ba4\u8d85\u65f6\u65f6\u95f4\u4e3a60\u79d2\uff0c\u7528\u6237\u53ef\u4ee5\u5728\u5ba2\u6237\u7aef\u6216\u8bf7\u6c42\u7ea7\u522b\u914d\u7f6e\u8d85\u65f6\u3002<\/p>\n<pre><code>client = AirweaveSDK(..., timeout=20.0)\r\nclient.api_keys.create_api_key(..., request_options={\"timeout_in_seconds\": 1})\r\n<\/code><\/pre>\n<h3>\u81ea\u5b9a\u4e49\u5ba2\u6237\u7aef<\/h3>\n<p>\u7528\u6237\u53ef\u4ee5\u8986\u76d6 httpx \u5ba2\u6237\u7aef\u4ee5\u652f\u6301\u4ee3\u7406\u548c\u4f20\u8f93\u7b49\u81ea\u5b9a\u4e49\u9700\u6c42\u3002<\/p>\n<pre><code>import httpx\r\nfrom airweave import AirweaveSDK\r\nclient = AirweaveSDK(\r\n...,\r\nhttpx_client=httpx.Client(proxies=\"http:\/\/my.test.proxy.example.com\", transport=httpx.HTTPTransport(local_address=\"0.0.0.0\")),\r\n)<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Airweave \u662f\u4e00\u4e2a\u5f00\u6e90\u5de5\u5177\uff0c\u65e8\u5728\u901a\u8fc7\u540c\u6b65\u7528\u6237\u7684\u5e94\u7528\u6570\u636e\u3001API\u3001\u6570\u636e\u5e93\u548c\u7f51\u7ad9\u5230\u56fe\u8c31\u548c\u5411\u91cf\u6570\u636e\u5e93\uff0c\u4f7f\u4efb\u4f55\u5e94\u7528\u7a0b\u5e8f\u53d8\u5f97\u53ef\u641c\u7d22\u3002Airweave \u7b80\u5316\u4e86\u6570\u636e\u53ef\u641c\u7d22\u5316\u7684\u8fc7\u7a0b\uff0c\u65e0\u8bba\u662f\u7ed3\u6784\u5316\u6570\u636e\u8fd8\u662f\u975e\u7ed3\u6784\u5316\u6570\u636e\uff0c\u90fd\u53ef\u4ee5\u901a\u8fc7 Airweave \u8fdb\u884c&#8230;<\/p>\n","protected":false},"author":1,"featured_media":61779,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[425,20,455],"tags":[230,243],"class_list":["post-20305","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ai-professional","category-tool","category-knowledge-base","tag-aikaiyuanxiangmu","tag-aizhishikuyukefu"],"_links":{"self":[{"href":"https:\/\/www.kdjingpai.com\/ja\/wp-json\/wp\/v2\/posts\/20305","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.kdjingpai.com\/ja\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.kdjingpai.com\/ja\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.kdjingpai.com\/ja\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.kdjingpai.com\/ja\/wp-json\/wp\/v2\/comments?post=20305"}],"version-history":[{"count":0,"href":"https:\/\/www.kdjingpai.com\/ja\/wp-json\/wp\/v2\/posts\/20305\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.kdjingpai.com\/ja\/wp-json\/wp\/v2\/media\/61779"}],"wp:attachment":[{"href":"https:\/\/www.kdjingpai.com\/ja\/wp-json\/wp\/v2\/media?parent=20305"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.kdjingpai.com\/ja\/wp-json\/wp\/v2\/categories?post=20305"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.kdjingpai.com\/ja\/wp-json\/wp\/v2\/tags?post=20305"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}