{"id":21096,"date":"2025-02-14T16:31:47","date_gmt":"2025-02-14T08:31:47","guid":{"rendered":"https:\/\/www.aisharenet.com\/?p=21096"},"modified":"2025-02-14T16:31:47","modified_gmt":"2025-02-14T08:31:47","slug":"finrobot","status":"publish","type":"post","link":"https:\/\/www.kdjingpai.com\/de\/finrobot\/","title":{"rendered":"FinRobot\uff1a\u63d0\u5347\u91d1\u878d\u6570\u636e\u5206\u6790\u6548\u7387\u548c\u6295\u8d44\u7814\u7a76\u7684\u7684\u667a\u80fd\u4f53"},"content":{"rendered":"<p>FinRobot\u662f\u7531AI4Finance Foundation\u5f00\u53d1\u7684\u5f00\u6e90AI\u667a\u80fd\u5e73\u53f0\uff0c\u4e13\u4e3a\u91d1\u878d\u5206\u6790\u8bbe\u8ba1\u3002\u5b83\u4e0d\u4ec5\u6db5\u76d6\u4e86\u4f20\u7edf\u7684\u8bed\u8a00\u6a21\u578b\uff0c\u8fd8\u878d\u5165\u4e86\u591a\u79cdAI\u6280\u672f\uff0c\u65e8\u5728\u4e3a\u91d1\u878d\u884c\u4e1a\u63d0\u4f9b\u5168\u9762\u7684\u89e3\u51b3\u65b9\u6848\u3002FinRobot\u7684\u8bbe\u8ba1\u521d\u8877\u662f\u901a\u8fc7\u5148\u8fdb\u7684\u4eba\u5de5\u667a\u80fd\u6280\u672f\uff0c\u7b80\u5316\u5e76\u4f18\u5316\u91d1\u878d\u5206\u6790\u6d41\u7a0b\uff0c\u63d0\u5347\u5206\u6790\u7cbe\u5ea6\u548c\u6548\u7387\u3002\u5176\u6838\u5fc3\u529f\u80fd\u5305\u62ec\u5e02\u573a\u8d8b\u52bf\u89e3\u8bfb\u3001\u7ecf\u6d4e\u9884\u6d4b\u548c\u6295\u8d44\u7b56\u7565\u63d0\u4f9b\u7b49\uff0c\u9002\u7528\u4e8e\u5404\u7c7b\u91d1\u878d\u673a\u6784\u548c\u4e2a\u4eba\u6295\u8d44\u8005\u3002<\/p>\n<p><img decoding=\"async\" title=\"FinRobot\uff1a\u63d0\u5347\u91d1\u878d\u6570\u636e\u5206\u6790\u6548\u7387\u548c\u6295\u8d44\u7814\u7a76\u7684\u7684\u667a\u80fd\u4f53-1\" src=\"https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2025\/02\/f54113739d81c56.jpg\" alt=\"FinRobot\uff1a\u63d0\u5347\u91d1\u878d\u6570\u636e\u5206\u6790\u6548\u7387\u548c\u6295\u8d44\u7814\u7a76\u7684\u7684\u667a\u80fd\u4f53-1\" \/><\/p>\n<p>&nbsp;<\/p>\n<h2>\u529f\u80fd\u5217\u8868<\/h2>\n<ul>\n<li><strong>\u5e02\u573a\u8d8b\u52bf\u5206\u6790<\/strong>\uff1a\u5b9e\u65f6\u76d1\u63a7\u548c\u5206\u6790\u5e02\u573a\u52a8\u6001\uff0c\u63d0\u4f9b\u8d8b\u52bf\u9884\u6d4b\u548c\u6295\u8d44\u5efa\u8bae\u3002<\/li>\n<li><strong>\u7ecf\u6d4e\u9884\u6d4b<\/strong>\uff1a\u5229\u7528\u5927\u6570\u636e\u548cAI\u7b97\u6cd5\uff0c\u5bf9\u5b8f\u89c2\u7ecf\u6d4e\u6307\u6807\u8fdb\u884c\u9884\u6d4b\u3002<\/li>\n<li><strong>\u6295\u8d44\u7b56\u7565\u63d0\u4f9b<\/strong>\uff1a\u57fa\u4e8e\u5386\u53f2\u6570\u636e\u548c\u5e02\u573a\u5206\u6790\uff0c\u751f\u6210\u4e2a\u6027\u5316\u7684\u6295\u8d44\u7b56\u7565\u3002<\/li>\n<li><strong>\u591a\u6a21\u6001\u6570\u636e\u5904\u7406<\/strong>\uff1a\u6574\u5408\u5e02\u573a\u6570\u636e\u3001\u65b0\u95fb\u548c\u7ecf\u6d4e\u6307\u6807\uff0c\u8fdb\u884c\u591a\u7ef4\u5ea6\u5206\u6790\u3002<\/li>\n<li><strong>\u5f00\u6e90\u4ee3\u7801\u5e93<\/strong>\uff1a\u63d0\u4f9b\u4e30\u5bcc\u7684\u5f00\u6e90\u4ee3\u7801\u5e93\uff0c\u652f\u6301\u4e8c\u6b21\u5f00\u53d1\u548c\u529f\u80fd\u6269\u5c55\u3002<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h2>FinRobot \u7684\u67b6\u6784\u8bbe\u8ba1<\/h2>\n<h3>1. FinRobot \u751f\u6001\u7cfb\u7edf<\/h3>\n<p>FinRobot \u91c7\u7528\u56db\u5c42\u67b6\u6784\uff0c\u6bcf\u4e00\u5c42\u9488\u5bf9\u91d1\u878d AI \u4efb\u52a1\u8fdb\u884c\u4e86\u4f18\u5316\u3002<\/p>\n<ul>\n<li><strong>\u91d1\u878d AI \u4ee3\u7406\u5c42<\/strong>\uff1a\u5305\u542b\u5e02\u573a\u9884\u6d4b\u4ee3\u7406\u3001\u6587\u6863\u5206\u6790\u4ee3\u7406\u3001\u4ea4\u6613\u7b56\u7565\u4ee3\u7406\u7b49\uff0c\u652f\u6301\u91d1\u878d\u94fe\u5f0f\u601d\u7ef4\uff08CoT\uff09\u63d0\u793a\u3002<\/li>\n<li><strong>\u91d1\u878d LLM \u7b97\u6cd5\u5c42<\/strong>\uff1a\u652f\u6301\u91d1\u878d\u9886\u57df\u7279\u5b9a\u7684 LLM \u8c03\u4f18\uff0c\u63d0\u5347\u91d1\u878d\u5206\u6790\u7684\u4e13\u4e1a\u6027\u3002<\/li>\n<li><strong>LLMOps &amp; DataOps \u5c42<\/strong>\uff1a\u63d0\u4f9b\u591a\u6e90\u6570\u636e\u6574\u5408\uff0c\u5e76\u652f\u6301\u591a\u79cd LLM \u6a21\u578b\u7684\u52a8\u6001\u9002\u914d\u3002<\/li>\n<li><strong>\u591a\u6e90 LLM \u57fa\u7840\u6a21\u578b\u5c42<\/strong>\uff1a\u652f\u6301 Plug-and-Play \u5f0f\u7684 LLM \u6a21\u578b\u8c03\u7528\uff0c\u7075\u6d3b\u9002\u914d\u4e0d\u540c\u4efb\u52a1\u3002<\/li>\n<\/ul>\n<h3>2. AI \u4ee3\u7406\u5de5\u4f5c\u6d41\u7a0b<\/h3>\n<p>FinRobot \u4ee3\u7406\u7684\u5de5\u4f5c\u6d41\u7a0b\u5305\u542b\u4e09\u4e2a\u6838\u5fc3\u90e8\u5206\uff1a<\/p>\n<ul>\n<li><strong>\u611f\u77e5\uff08Perception\uff09<\/strong>\uff1a\u83b7\u53d6\u5e02\u573a\u6570\u636e\u3001\u65b0\u95fb\u3001\u7ecf\u6d4e\u6307\u6807\uff0c\u8fdb\u884c\u591a\u6a21\u6001\u89e3\u6790\u3002<\/li>\n<li><strong>\u601d\u8003\uff08Brain\uff09<\/strong>\uff1a\u4f7f\u7528 LLM \u7ed3\u5408\u91d1\u878d\u94fe\u5f0f\u601d\u7ef4\u65b9\u6cd5\uff0c\u751f\u6210\u4ea4\u6613\u51b3\u7b56\u3002<\/li>\n<li><strong>\u884c\u52a8\uff08Action\uff09<\/strong>\uff1a\u6267\u884c\u4ea4\u6613\u3001\u8c03\u6574\u6295\u8d44\u7ec4\u5408\u3001\u751f\u6210\u62a5\u544a\u6216\u53d1\u9001\u9884\u8b66\u3002<\/li>\n<\/ul>\n<h3>3. \u667a\u80fd\u8c03\u5ea6\u7cfb\u7edf<\/h3>\n<p><img decoding=\"async\" title=\"FinRobot\uff1a\u63d0\u5347\u91d1\u878d\u6570\u636e\u5206\u6790\u6548\u7387\u548c\u6295\u8d44\u7814\u7a76\u7684\u7684\u667a\u80fd\u4f53-1\" src=\"https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2025\/02\/44a5589ca283132.jpg\" alt=\"FinRobot\uff1a\u63d0\u5347\u91d1\u878d\u6570\u636e\u5206\u6790\u6548\u7387\u548c\u6295\u8d44\u7814\u7a76\u7684\u7684\u667a\u80fd\u4f53-1\" \/><\/p>\n<p>FinRobot \u91c7\u7528\u00a0<strong>Smart Scheduler<\/strong>\u00a0\u8c03\u5ea6\u7cfb\u7edf\uff0c\u786e\u4fdd\u4efb\u52a1\u80fd\u591f\u5206\u914d\u7ed9\u6700\u5408\u9002\u7684 AI \u4ee3\u7406\u3002<\/p>\n<ul>\n<li><strong>Director Agent<\/strong>\uff1a\u6839\u636e\u4efb\u52a1\u7279\u6027\u5206\u914d\u4ee3\u7406\u3002<\/li>\n<li><strong>Agent Registration<\/strong>\uff1a\u7ba1\u7406\u4ee3\u7406\u6ce8\u518c\uff0c\u8ddf\u8e2a\u5176\u72b6\u6001\u3002<\/li>\n<li><strong>Agent Adaptor<\/strong>\uff1a\u8c03\u6574\u4ee3\u7406\u529f\u80fd\uff0c\u63d0\u9ad8\u4efb\u52a1\u9002\u914d\u6027\u3002<\/li>\n<li><strong>Task Manager<\/strong>\uff1a\u5b58\u50a8\u548c\u7ba1\u7406 AI \u4ee3\u7406\u7684\u4efb\u52a1\u6267\u884c\u60c5\u51b5\u3002<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h2>\u4f7f\u7528\u5e2e\u52a9<\/h2>\n<h3>\u5b89\u88c5\u6b65\u9aa4<\/h3>\n<h4>\uff081\uff09\u521b\u5efa Python \u73af\u5883<\/h4>\n<pre>conda create --name finrobot python=3.10\r\nconda activate finrobot<\/pre>\n<h4>\uff082\uff09\u514b\u9686\u4ee3\u7801\u5e93<\/h4>\n<pre>git clone https:\/\/github.com\/AI4Finance-Foundation\/FinRobot.git\r\ncd FinRobot<\/pre>\n<h4>\uff083\uff09\u5b89\u88c5\u4f9d\u8d56<\/h4>\n<pre>pip install -U finrobot \u00a0# \u6216\u8005\u4ece\u6e90\u7801\u5b89\u88c5\r\npip install -e .<\/pre>\n<h4>\uff084\uff09\u914d\u7f6e API Key<\/h4>\n<pre># \u4fee\u6539 OAI_CONFIG_LIST_sample \u6587\u4ef6\r\nmv OAI_CONFIG_LIST_sample OAI_CONFIG_LIST\r\nvi OAI_CONFIG_LIST # \u6dfb\u52a0 OpenAI API Key\r\n\r\n# \u4fee\u6539 config_api_keys_sample \u6587\u4ef6\r\nmv config_api_keys_sample config_api_keys\r\nvi config_api_keys # \u6dfb\u52a0 Finnhub\u3001SEC-API\u3001FinancialModelingPrep API Key<\/pre>\n<h3>2. \u793a\u4f8b\u5e94\u7528<\/h3>\n<h4>\uff081\uff09\u5e02\u573a\u9884\u6d4b\u4ee3\u7406\uff1a\u9884\u6d4b\u80a1\u7968\u4ef7\u683c\u53d8\u52a8<\/h4>\n<pre>import <a href=\"https:\/\/www.kdjingpai.com\/autogen-2\/\">autogen<\/a>\r\nfrom finrobot.utils import get_current_date, register_keys_from_json\r\nfrom finrobot.agents.workflow import SingleAssistant\r\n\r\n# \u8bfb\u53d6 OpenAI API \u914d\u7f6e\r\nllm_config = {\r\n\"config_list\": autogen.config_list_from_json(\"..\/OAI_CONFIG_LIST\"),\r\n\"timeout\": 120,\r\n\"temperature\": 0,\r\n}\r\n\r\n# \u6ce8\u518c API \u5bc6\u94a5\r\nregister_keys_from_json(\"..\/config_api_keys\")\r\n\r\n# \u8fd0\u884c\u9884\u6d4b\r\ncompany = \"NVDA\"\r\nassistant = SingleAssistant(\"Market_Analyst\", llm_config, human_input_mode=\"NEVER\")\r\nassistant.chat(f\"\u5206\u6790 {company} \u8fd1\u671f\u5e02\u573a\u52a8\u6001\uff0c\u5e76\u9884\u6d4b\u672a\u6765\u4e00\u5468\u80a1\u4ef7\u8d70\u52bf\u3002\")<\/pre>\n<p><strong>\u7ed3\u679c<\/strong><\/p>\n<p><img decoding=\"async\" title=\"FinRobot\uff1a\u63d0\u5347\u91d1\u878d\u6570\u636e\u5206\u6790\u6548\u7387\u548c\u6295\u8d44\u7814\u7a76\u7684\u7684\u667a\u80fd\u4f53-1\" src=\"https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2025\/02\/d7d65aa7c212cf8.png\" alt=\"FinRobot\uff1a\u63d0\u5347\u91d1\u878d\u6570\u636e\u5206\u6790\u6548\u7387\u548c\u6295\u8d44\u7814\u7a76\u7684\u7684\u667a\u80fd\u4f53-1\" \/><\/p>\n<h4>\uff082\uff09\u91d1\u878d\u5206\u6790\u4ee3\u7406\uff1a\u81ea\u52a8\u751f\u6210\u8d22\u52a1\u62a5\u544a<\/h4>\n<pre>import os\r\nimport autogen\r\nfrom finrobot.utils import register_keys_from_json\r\nfrom finrobot.agents.workflow import SingleAssistantShadow\r\n# \u914d\u7f6e LLM \u53c2\u6570\r\nllm_config = {\r\n\"config_list\": autogen.config_list_from_json(\"..\/OAI_CONFIG_LIST\"),\r\n\"timeout\": 120,\r\n\"temperature\": 0.5,\r\n}\r\n# \u6ce8\u518c API \u5bc6\u94a5\r\nregister_keys_from_json(\"..\/config_api_keys\")\r\n# \u521b\u5efa\u5de5\u4f5c\u76ee\u5f55\r\nwork_dir = os.path.join(\"..\", \"report\")\r\nos.makedirs(work_dir, exist_ok=True)\r\n# \u521d\u59cb\u5316\u667a\u80fd\u52a9\u624b\r\nassistant = SingleAssistantShadow(\"Expert_Investor\", llm_config, human_input_mode=\"TERMINATE\")\r\n# \u8bbe\u5b9a\u516c\u53f8\u548c\u5e74\u4efd\r\ncompany = \"Microsoft\"\r\nfyear = \"2023\"\r\n# \u751f\u6210\u62a5\u544a\u8bf7\u6c42\r\nmessage = f\"\u8bf7\u57fa\u4e8e {company} {fyear} \u5e74\u7684\u8d22\u52a1\u6570\u636e\u64b0\u5199\u5e74\u5ea6\u5206\u6790\u62a5\u544a\uff0c\u5e76\u5bfc\u51fa PDF\u3002\"\r\n# \u8fd0\u884c\u52a9\u624b\u5e76\u5904\u7406\u5f02\u5e38\r\ntry:\r\nassistant.chat(message, use_cache=True, max_turns=50, summary_method=\"last_msg\")\r\nprint(f\"\u62a5\u544a\u5df2\u6210\u529f\u751f\u6210\u5e76\u4fdd\u5b58\u81f3 {work_dir}\")\r\nexcept Exception as e:\r\nprint(f\"\u751f\u6210\u62a5\u544a\u65f6\u51fa\u9519: {e}\")\r\n<\/pre>\n<p><strong>\u7ed3\u679c<\/strong><\/p>\n<p><img decoding=\"async\" title=\"FinRobot\uff1a\u63d0\u5347\u91d1\u878d\u6570\u636e\u5206\u6790\u6548\u7387\u548c\u6295\u8d44\u7814\u7a76\u7684\u7684\u667a\u80fd\u4f53-1\" src=\"https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2025\/02\/57e72818d541336.png\" alt=\"FinRobot\uff1a\u63d0\u5347\u91d1\u878d\u6570\u636e\u5206\u6790\u6548\u7387\u548c\u6295\u8d44\u7814\u7a76\u7684\u7684\u667a\u80fd\u4f53-1\" \/><\/p>\n<p><strong>\u91d1\u878d\u6301\u4ed3\u5206\u6790\uff08Financial CoT\uff09\uff1a<\/strong><\/p>\n<ol>\n<li>\u6536\u96c6\u521d\u6b65\u6570\u636e\uff1a10-K \u62a5\u544a\u3001\u5e02\u573a\u6570\u636e\u3001\u8d22\u52a1\u6bd4\u7387<\/li>\n<li>\u5206\u6790\u8d22\u52a1\u62a5\u8868\uff1a\u8d44\u4ea7\u8d1f\u503a\u8868\u3001\u5229\u6da6\u8868\u3001\u73b0\u91d1\u6d41\u91cf\u8868<\/li>\n<li>\u516c\u53f8\u6982\u8ff0\u4e0e\u4e1a\u7ee9\uff1a\u516c\u53f8\u63cf\u8ff0\u3001\u4e1a\u52a1\u4eae\u70b9\u3001\u5206\u90e8\u5206\u6790<\/li>\n<li>\u98ce\u9669\u8bc4\u4f30\uff1a\u8bc4\u4f30\u98ce\u9669<\/li>\n<li>\u8d22\u52a1\u4e1a\u7ee9\u53ef\u89c6\u5316\uff1a\u7ed8\u5236\u5e02\u76c8\u7387\uff08PE ratio\uff09\u548c\u6bcf\u80a1\u6536\u76ca\uff08EPS\uff09\u56fe\u8868<\/li>\n<li>\u7efc\u5408\u7814\u7a76\u7ed3\u679c\u5f62\u6210\u6bb5\u843d\uff1a\u5c06\u6240\u6709\u90e8\u5206\u6574\u5408\u4e3a\u8fde\u8d2f\u7684\u603b\u7ed3<\/li>\n<li>\u751f\u6210 PDF \u62a5\u544a\uff1a\u4f7f\u7528\u5de5\u5177\u81ea\u52a8\u751f\u6210 PDF \u6587\u4ef6<\/li>\n<li>\u8d28\u91cf\u4fdd\u8bc1\uff1a\u68c0\u67e5\u5b57\u6570<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>FinRobot\u662f\u7531AI4Finance Foundation\u5f00\u53d1\u7684\u5f00\u6e90AI\u667a\u80fd\u5e73\u53f0\uff0c\u4e13\u4e3a\u91d1\u878d\u5206\u6790\u8bbe\u8ba1\u3002\u5b83\u4e0d\u4ec5\u6db5\u76d6\u4e86\u4f20\u7edf\u7684\u8bed\u8a00\u6a21\u578b\uff0c\u8fd8\u878d\u5165\u4e86\u591a\u79cdAI\u6280\u672f\uff0c\u65e8\u5728\u4e3a\u91d1\u878d\u884c\u4e1a\u63d0\u4f9b\u5168\u9762\u7684\u89e3\u51b3\u65b9\u6848\u3002FinRobot\u7684\u8bbe\u8ba1\u521d\u8877\u662f\u901a\u8fc7\u5148\u8fdb\u7684\u4eba\u5de5\u667a\u80fd\u6280\u672f\uff0c&#8230;<\/p>\n","protected":false},"author":1,"featured_media":61833,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[20],"tags":[230,377],"class_list":["post-21096","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tool","tag-aikaiyuanxiangmu","tag-aijinrongshujufenxi"],"_links":{"self":[{"href":"https:\/\/www.kdjingpai.com\/de\/wp-json\/wp\/v2\/posts\/21096","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=21096"}],"version-history":[{"count":0,"href":"https:\/\/www.kdjingpai.com\/de\/wp-json\/wp\/v2\/posts\/21096\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.kdjingpai.com\/de\/wp-json\/wp\/v2\/media\/61833"}],"wp:attachment":[{"href":"https:\/\/www.kdjingpai.com\/de\/wp-json\/wp\/v2\/media?parent=21096"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.kdjingpai.com\/de\/wp-json\/wp\/v2\/categories?post=21096"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.kdjingpai.com\/de\/wp-json\/wp\/v2\/tags?post=21096"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}