{"id":18890,"date":"2025-01-20T12:45:50","date_gmt":"2025-01-20T04:45:50","guid":{"rendered":"https:\/\/www.aisharenet.com\/?p=18890"},"modified":"2025-07-17T02:20:55","modified_gmt":"2025-07-16T18:20:55","slug":"undatasio","status":"publish","type":"post","link":"https:\/\/www.kdjingpai.com\/de\/undatasio\/","title":{"rendered":"UnDatas.IO\uff1a\u7cbe\u51c6\u89e3\u6790\u5404\u7c7b\u975e\u7ed3\u6784\u5316\u6570\u636e\u7684API\u670d\u52a1\uff08\u4ed8\u8d39\uff09"},"content":{"rendered":"<p>UnDatas.IO \u662f\u4e00\u4e2a\u4e13\u6ce8\u4e8e\u89e3\u6790\u548c\u5904\u7406\u975e\u7ed3\u6784\u5316\u6570\u636e\u7684\u5e73\u53f0\u3002\u5b83\u5229\u7528\u5148\u8fdb\u7684\u6280\u672f\uff0c\u81ea\u52a8\u8bc6\u522b\u6587\u6863\u5e03\u5c40\uff0c\u5206\u7c7b\u8868\u683c\u3001\u56fe\u50cf\u3001\u516c\u5f0f\u548c\u6587\u672c\uff0c\u6781\u5927\u5730\u7b80\u5316\u4e86\u6570\u636e\u5904\u7406\u6d41\u7a0b\u3002\u8be5\u5e73\u53f0\u4e0d\u4ec5\u80fd\u591f\u8282\u7701\u5927\u91cf\u7684\u6570\u636e\u6574\u7406\u65f6\u95f4\uff0c\u8fd8\u80fd\u5e2e\u52a9\u7528\u6237\u4ece\u6570\u636e\u4e2d\u63d0\u53d6\u6709\u4ef7\u503c\u7684\u89c1\u89e3\uff0c\u505a\u51fa\u66f4\u5177\u6218\u7565\u6027\u7684\u51b3\u7b56\u3002\u65e0\u8bba\u662f\u5b66\u672f\u7814\u7a76\u3001\u5546\u4e1a\u5206\u6790\u8fd8\u662f\u6280\u672f\u5f00\u53d1\uff0cUnDatas.IO \u90fd\u80fd\u63d0\u4f9b\u5f3a\u5927\u7684\u6570\u636e\u652f\u6301\u3002<\/p>\n<p>&nbsp;<\/p>\n<h2>\u529f\u80fd\u5217\u8868<\/h2>\n<ul>\n<li>\u81ea\u52a8\u8bc6\u522b\u6587\u6863\u5e03\u5c40<\/li>\n<li>\u5206\u7c7b\u8868\u683c\u3001\u56fe\u50cf\u3001\u516c\u5f0f\u548c\u6587\u672c<\/li>\n<li>\u6570\u636e\u63d0\u53d6\u548c\u8f6c\u6362<\/li>\n<li>\u652f\u6301\u591a\u79cd\u6570\u636e\u683c\u5f0f<\/li>\n<li>\u4e0e\u5927\u578b\u8bed\u8a00\u6a21\u578b\u96c6\u6210\uff0c\u589e\u5f3a\u6570\u636e\u5904\u7406\u80fd\u529b<\/li>\n<li>\u63d0\u4f9bAPI\u63a5\u53e3\uff0c\u65b9\u4fbf\u5f00\u53d1\u8005\u4f7f\u7528<\/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>\u8bbf\u95ee UnDatas.IO \u5b98\u65b9\u7f51\u7ad9\uff0c\u6ce8\u518c\u5e76\u83b7\u53d6 API \u5bc6\u94a5\u3002<\/li>\n<li>\u5b89\u88c5 UnDatas.IO Python API \u5e93\uff1a<\/li>\n<\/ol>\n<pre><code>   pip install undatasio\r\n<\/code><\/pre>\n<ol start=\"3\">\n<li>\u5b89\u88c5 OpenAI Python SDK\uff1a<\/li>\n<\/ol>\n<pre><code>   pip install openai\r\n<\/code><\/pre>\n<ol start=\"4\">\n<li>\u914d\u7f6e\u73af\u5883\u53d8\u91cf\uff0c\u4fdd\u5b58 API \u5bc6\u94a5\uff1a<\/li>\n<\/ol>\n<pre><code>   import os\r\nos.environ['UNDATASIO_API_KEY'] = 'your_api_key'\r\nos.environ['OPENAI_API_KEY'] = 'your_openai_api_key'\r\n<\/code><\/pre>\n<h3>\u4f7f\u7528\u6d41\u7a0b<\/h3>\n<ol>\n<li>\u5bfc\u5165 UnDatas.IO \u5e93\u5e76\u521d\u59cb\u5316\uff1a<\/li>\n<\/ol>\n<pre><code>   from undatasio.undatasio import UnDatasIO\r\nundatasio_obj = UnDatasIO(os.getenv('UNDATASIO_API_KEY'))\r\n<\/code><\/pre>\n<ol start=\"2\">\n<li>\u4f7f\u7528 <code>get_result_type<\/code> \u65b9\u6cd5\u63d0\u53d6\u6570\u636e\u7c7b\u578b\uff1a<\/li>\n<\/ol>\n<pre><code>   result_type = undatasio_obj.get_result_type('your_document')\r\n<\/code><\/pre>\n<ol start=\"3\">\n<li>\u4f7f\u7528 <code>show_version<\/code> \u65b9\u6cd5\u67e5\u770b\u7248\u672c\u4fe1\u606f\uff1a<\/li>\n<\/ol>\n<pre><code>   version_info = undatasio_obj.show_version()\r\n<\/code><\/pre>\n<h3>\u4e3b\u8981\u529f\u80fd\u64cd\u4f5c<\/h3>\n<ol>\n<li><strong>\u81ea\u52a8\u8bc6\u522b\u6587\u6863\u5e03\u5c40<\/strong>\uff1a\u4e0a\u4f20\u6587\u6863\u540e\uff0c\u5e73\u53f0\u4f1a\u81ea\u52a8\u8bc6\u522b\u6587\u6863\u4e2d\u7684\u8868\u683c\u3001\u56fe\u50cf\u3001\u516c\u5f0f\u548c\u6587\u672c\uff0c\u5e76\u8fdb\u884c\u5206\u7c7b\u3002<\/li>\n<li><strong>\u6570\u636e\u63d0\u53d6\u548c\u8f6c\u6362<\/strong>\uff1a\u901a\u8fc7 API \u63a5\u53e3\uff0c\u53ef\u4ee5\u8f7b\u677e\u63d0\u53d6\u548c\u8f6c\u6362\u6240\u9700\u7684\u6570\u636e\u683c\u5f0f\u3002<\/li>\n<li><strong>\u4e0e\u5927\u578b\u8bed\u8a00\u6a21\u578b\u96c6\u6210<\/strong>\uff1a\u5229\u7528 OpenAI \u7684\u5927\u578b\u8bed\u8a00\u6a21\u578b\uff0c\u589e\u5f3a\u6570\u636e\u5904\u7406\u548c\u5206\u6790\u80fd\u529b\u3002\u4f8b\u5982\uff0c\u53ef\u4ee5\u4f7f\u7528 Qwen-max \u6a21\u578b\u89e3\u51b3\u6570\u5b66\u95ee\u9898\uff1a<\/li>\n<\/ol>\n<pre><code>   from openai import OpenAI\r\nopenai_obj = OpenAI(os.getenv('OPENAI_API_KEY'))\r\nresponse = openai_obj.Completion.create(\r\nmodel=\"qwen2.5-math-72b-instruct\",\r\nprompt=\"Solve the following math problem: ...\",\r\nmax_tokens=100\r\n)\r\nprint(response.choices[0].text)\r\n<\/code><\/pre>\n<h3>\u8be6\u7ec6\u64cd\u4f5c\u6d41\u7a0b<\/h3>\n<ol>\n<li><strong>\u6570\u636e\u4e0a\u4f20<\/strong>\uff1a\u901a\u8fc7\u5e73\u53f0\u7684\u4e0a\u4f20\u63a5\u53e3\uff0c\u5c06\u9700\u8981\u89e3\u6790\u7684\u6587\u6863\u4e0a\u4f20\u81f3 UnDatas.IO\u3002<\/li>\n<li><strong>\u6570\u636e\u5206\u7c7b<\/strong>\uff1a\u5e73\u53f0\u4f1a\u81ea\u52a8\u8bc6\u522b\u6587\u6863\u4e2d\u7684\u4e0d\u540c\u5143\u7d20\uff0c\u5e76\u8fdb\u884c\u5206\u7c7b\u5c55\u793a\u3002<\/li>\n<li><strong>\u6570\u636e\u63d0\u53d6<\/strong>\uff1a\u4f7f\u7528 API \u63a5\u53e3\uff0c\u63d0\u53d6\u6240\u9700\u7684\u6570\u636e\u7c7b\u578b\uff0c\u4f8b\u5982\u8868\u683c\u6570\u636e\u3001\u56fe\u50cf\u6570\u636e\u7b49\u3002<\/li>\n<li><strong>\u6570\u636e\u8f6c\u6362<\/strong>\uff1a\u6839\u636e\u9700\u6c42\uff0c\u5c06\u63d0\u53d6\u7684\u6570\u636e\u8f6c\u6362\u4e3a\u6240\u9700\u7684\u683c\u5f0f\uff0c\u65b9\u4fbf\u540e\u7eed\u5206\u6790\u548c\u5904\u7406\u3002<\/li>\n<li><strong>\u6570\u636e\u5206\u6790<\/strong>\uff1a\u5229\u7528\u5e73\u53f0\u63d0\u4f9b\u7684\u5206\u6790\u5de5\u5177\uff0c\u8fdb\u884c\u6570\u636e\u5206\u6790\uff0c\u63d0\u53d6\u6709\u4ef7\u503c\u7684\u89c1\u89e3\u3002<\/li>\n<li><strong>\u7ed3\u679c\u8f93\u51fa<\/strong>\uff1a\u5c06\u5206\u6790\u7ed3\u679c\u5bfc\u51fa\u4e3a\u62a5\u544a\u6216\u5176\u4ed6\u683c\u5f0f\uff0c\u65b9\u4fbf\u5206\u4eab\u548c\u4f7f\u7528\u3002<\/li>\n<\/ol>\n<p>\u901a\u8fc7\u4ee5\u4e0a\u6b65\u9aa4\uff0c\u7528\u6237\u53ef\u4ee5\u8f7b\u677e\u4e0a\u624b\u4f7f\u7528 UnDatas.IO \u8fdb\u884c\u975e\u7ed3\u6784\u5316\u6570\u636e\u7684\u89e3\u6790\u548c\u5904\u7406\uff0c\u63d0\u5347\u6570\u636e\u5904\u7406\u6548\u7387\uff0c\u8282\u7701\u65f6\u95f4\u548c\u7cbe\u529b\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>UnDatas.IO \u662f\u4e00\u4e2a\u4e13\u6ce8\u4e8e\u89e3\u6790\u548c\u5904\u7406\u975e\u7ed3\u6784\u5316\u6570\u636e\u7684\u5e73\u53f0\u3002\u5b83\u5229\u7528\u5148\u8fdb\u7684\u6280\u672f\uff0c\u81ea\u52a8\u8bc6\u522b\u6587\u6863\u5e03\u5c40\uff0c\u5206\u7c7b\u8868\u683c\u3001\u56fe\u50cf\u3001\u516c\u5f0f\u548c\u6587\u672c\uff0c\u6781\u5927\u5730\u7b80\u5316\u4e86\u6570\u636e\u5904\u7406\u6d41\u7a0b\u3002\u8be5\u5e73\u53f0\u4e0d\u4ec5\u80fd\u591f\u8282\u7701\u5927\u91cf\u7684\u6570\u636e\u6574\u7406\u65f6\u95f4\uff0c\u8fd8\u80fd\u5e2e\u52a9\u7528\u6237\u4ece\u6570\u636e\u4e2d\u63d0\u53d6\u6709\u4ef7\u503c\u7684\u89c1\u89e3\uff0c\u505a\u51fa\u66f4\u5177\u6218&#8230;<\/p>\n","protected":false},"author":1,"featured_media":32603,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[425,20,499],"tags":[208,252],"class_list":["post-18890","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ai-professional","category-tool","category-document-extraction","tag-aikaifangfuwu","tag-markdown"],"_links":{"self":[{"href":"https:\/\/www.kdjingpai.com\/de\/wp-json\/wp\/v2\/posts\/18890","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.kdjingpai.com\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.kdjingpai.com\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.kdjingpai.com\/de\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.kdjingpai.com\/de\/wp-json\/wp\/v2\/comments?post=18890"}],"version-history":[{"count":0,"href":"https:\/\/www.kdjingpai.com\/de\/wp-json\/wp\/v2\/posts\/18890\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.kdjingpai.com\/de\/wp-json\/wp\/v2\/media\/32603"}],"wp:attachment":[{"href":"https:\/\/www.kdjingpai.com\/de\/wp-json\/wp\/v2\/media?parent=18890"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.kdjingpai.com\/de\/wp-json\/wp\/v2\/categories?post=18890"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.kdjingpai.com\/de\/wp-json\/wp\/v2\/tags?post=18890"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}