{"id":14780,"date":"2024-12-04T18:34:52","date_gmt":"2024-12-04T10:34:52","guid":{"rendered":"https:\/\/www.aisharenet.com\/?p=14780"},"modified":"2024-12-04T18:43:10","modified_gmt":"2024-12-04T10:43:10","slug":"laminar","status":"publish","type":"post","link":"https:\/\/www.kdjingpai.com\/en\/laminar\/","title":{"rendered":"Laminar\uff1a\u5f00\u6e90AI\u4ea7\u54c1\u5de5\u7a0b\u5316\u5e73\u53f0\uff0c\u8f7b\u677e\u5b9e\u73b0\u6570\u636e\u53ef\u89c6\u5316\u8ffd\u8e2a\u4e0e\u8bc4\u4f30"},"content":{"rendered":"<p>Laminar\u662f\u4e00\u4e2a\u5f00\u6e90\u7684AI\u5de5\u7a0b\u4f18\u5316\u5e73\u53f0\uff0c\u4e13\u6ce8\u4e8e\u4ece\u7b2c\u4e00\u539f\u7406\u51fa\u53d1\u8fdb\u884cAI\u5de5\u7a0b\u3002\u5b83\u5e2e\u52a9\u7528\u6237\u6536\u96c6\u3001\u7406\u89e3\u548c\u4f7f\u7528\u6570\u636e\uff0c\u4ee5\u63d0\u9ad8LLM\uff08\u5927\u578b\u8bed\u8a00\u6a21\u578b\uff09\u5e94\u7528\u7684\u8d28\u91cf\u3002Laminar\u63d0\u4f9b\u4e86\u5168\u9762\u7684\u53ef\u89c2\u6d4b\u6027\u3001\u6587\u672c\u5206\u6790\u3001\u8bc4\u4f30\u548c\u63d0\u793a\u94fe\u7ba1\u7406\u529f\u80fd\uff0c\u652f\u6301\u7528\u6237\u6784\u5efa\u548c\u4f18\u5316\u590d\u6742\u7684AI\u4ea7\u54c1\u3002\u65e0\u8bba\u662f\u6570\u636e\u8ffd\u8e2a\u3001\u5728\u7ebf\u8bc4\u4f30\u8fd8\u662f\u6570\u636e\u96c6\u6784\u5efa\uff0cLaminar\u90fd\u80fd\u63d0\u4f9b\u5f3a\u5927\u7684\u652f\u6301\uff0c\u5e2e\u52a9\u7528\u6237\u5b9e\u73b0\u9ad8\u6548\u7684AI\u5f00\u53d1\u548c\u90e8\u7f72\u3002<\/p>\n<p>\u5176\u73b0\u4ee3\u5316\u7684\u5f00\u6e90\u6280\u672f\u6808\u5305\u62ec Rust\u3001RabbitMQ\u3001Postgres\u3001Clickhouse \u7b49\uff0c\u786e\u4fdd\u9ad8\u6027\u80fd\u548c\u4f4e\u5f00\u9500\u3002\u7528\u6237\u53ef\u4ee5\u901a\u8fc7 Docker Compose \u5feb\u901f\u90e8\u7f72\uff0c\u6216\u4f7f\u7528\u6258\u7ba1\u5e73\u53f0\u4eab\u53d7\u5b8c\u6574\u529f\u80fd\u3002<\/p>\n<div style=\"width: 3022px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" title=\"Laminar\uff1a\u5f00\u6e90AI\u4ea7\u54c1\u5de5\u7a0b\u5e73\u53f0\uff0c\u8f7b\u677e\u5b9e\u73b0\u6570\u636e\u53ef\u89c6\u5316\u8ffd\u8e2a\u4e0e\u8bc4\u4f30-1\" src=\"https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2024\/12\/b80448d2744f4fe.jpg\" alt=\"Laminar\uff1a\u5f00\u6e90AI\u4ea7\u54c1\u5de5\u7a0b\u5e73\u53f0\uff0c\u8f7b\u677e\u5b9e\u73b0\u6570\u636e\u53ef\u89c6\u5316\u8ffd\u8e2a\u4e0e\u8bc4\u4f30-1\" width=\"3012\" height=\"1710\" \/><p class=\"wp-caption-text\">DEMO\uff1ahttps:\/\/www.lmnr.ai\/<\/p><\/div>\n<p>&nbsp;<\/p>\n<h2><img decoding=\"async\" title=\"Laminar\uff1a\u5f00\u6e90AI\u4ea7\u54c1\u5de5\u7a0b\u5e73\u53f0\uff0c\u8f7b\u677e\u5b9e\u73b0\u6570\u636e\u53ef\u89c6\u5316\u8ffd\u8e2a\u4e0e\u8bc4\u4f30-1\" src=\"https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2024\/12\/9243c32941da60d.jpg\" alt=\"Laminar\uff1a\u5f00\u6e90AI\u4ea7\u54c1\u5de5\u7a0b\u5e73\u53f0\uff0c\u8f7b\u677e\u5b9e\u73b0\u6570\u636e\u53ef\u89c6\u5316\u8ffd\u8e2a\u4e0e\u8bc4\u4f30-1\" \/><\/h2>\n<p>&nbsp;<\/p>\n<p><img decoding=\"async\" title=\"Laminar\uff1a\u5f00\u6e90AI\u4ea7\u54c1\u5de5\u7a0b\u5e73\u53f0\uff0c\u8f7b\u677e\u5b9e\u73b0\u6570\u636e\u53ef\u89c6\u5316\u8ffd\u8e2a\u4e0e\u8bc4\u4f30-1\" src=\"https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2024\/12\/99f62c209257e57.jpg\" alt=\"Laminar\uff1a\u5f00\u6e90AI\u4ea7\u54c1\u5de5\u7a0b\u5e73\u53f0\uff0c\u8f7b\u677e\u5b9e\u73b0\u6570\u636e\u53ef\u89c6\u5316\u8ffd\u8e2a\u4e0e\u8bc4\u4f30-1\" \/><\/p>\n<p>&nbsp;<\/p>\n<h2>\u529f\u80fd\u5217\u8868<\/h2>\n<ul>\n<li><strong>\u6570\u636e\u8ffd\u8e2a<\/strong>\uff1a\u8bb0\u5f55LLM\u5e94\u7528\u7684\u6bcf\u4e00\u6b65\u6267\u884c\u8fc7\u7a0b\uff0c\u6536\u96c6\u5b9d\u8d35\u6570\u636e\uff0c\u7528\u4e8e\u66f4\u597d\u7684\u8bc4\u4f30\u548c\u5fae\u8c03\u3002<\/li>\n<li><strong>\u5728\u7ebf\u8bc4\u4f30<\/strong>\uff1a\u8bbe\u7f6eLLM\u4f5c\u4e3a\u8bc4\u5224\u8005\u6216\u4f7f\u7528Python\u811a\u672c\u8bc4\u4f30\u5668\uff0c\u5bf9\u6bcf\u4e2a\u63a5\u6536\u5230\u7684\u8de8\u5ea6\u8fdb\u884c\u8bc4\u4f30\u3002<\/li>\n<li><strong>\u6570\u636e\u96c6\u6784\u5efa<\/strong>\uff1a\u4ece\u8ffd\u8e2a\u6570\u636e\u4e2d\u6784\u5efa\u6570\u636e\u96c6\uff0c\u7528\u4e8e\u8bc4\u4f30\u3001\u5fae\u8c03\u548c\u63d0\u793a\u5de5\u7a0b\u3002<\/li>\n<li><strong>\u63d0\u793a\u94fe\u7ba1\u7406<\/strong>\uff1a\u652f\u6301\u6784\u5efa\u548c\u6258\u7ba1\u590d\u6742\u7684\u63d0\u793a\u94fe\uff0c\u5305\u62ec\u4ee3\u7406\u6df7\u5408\u6216\u81ea\u53cd\u601d\u7684LLM\u7ba1\u9053\u3002<\/li>\n<li><strong>\u5f00\u6e90\u548c\u81ea\u6258\u7ba1<\/strong>\uff1a\u5b8c\u5168\u5f00\u6e90\uff0c\u6613\u4e8e\u81ea\u6258\u7ba1\uff0c\u53ea\u9700\u51e0\u4e2a\u547d\u4ee4\u5373\u53ef\u5f00\u59cb\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\u9686GitHub\u4ed3\u5e93\uff1a\n<pre><code>git clone https:\/\/github.com\/lmnr-ai\/lmnr\r\n<\/code><\/pre>\n<\/li>\n<li>\u8fdb\u5165\u9879\u76ee\u76ee\u5f55\uff1a\n<pre><code>cd lmnr\r\n<\/code><\/pre>\n<\/li>\n<li>\u4f7f\u7528Docker Compose\u542f\u52a8\uff1a\n<pre><code>docker compose up -d\r\n<\/code><\/pre>\n<\/li>\n<\/ol>\n<h3>\u529f\u80fd\u64cd\u4f5c\u6307\u5357<\/h3>\n<h4>\u6570\u636e\u8ffd\u8e2a<\/h4>\n<ul>\n<li><strong>\u521d\u59cb\u5316<\/strong>\uff1a\u5728\u4ee3\u7801\u4e2d\u5bfc\u5165Laminar\u5e76\u521d\u59cb\u5316\u9879\u76eeAPI\u5bc6\u94a5\u3002\n<pre><code>from lmnr import Laminar, observe\r\nLaminar.initialize(project_api_key=\"...\")\r\n<\/code><\/pre>\n<\/li>\n<li><strong>\u6ce8\u91ca\u51fd\u6570<\/strong>\uff1a\u4f7f\u7528<code>@observe<\/code>\u6ce8\u91ca\u9700\u8981\u8ffd\u8e2a\u7684\u51fd\u6570\u3002\n<pre><code>@observe()\r\ndef my_function():\r\n...\r\n<\/code><\/pre>\n<\/li>\n<\/ul>\n<h4>\u5728\u7ebf\u8bc4\u4f30<\/h4>\n<ul>\n<li><strong>\u8bbe\u7f6e\u8bc4\u4f30\u5668<\/strong>\uff1a\u53ef\u4ee5\u8bbe\u7f6eLLM\u4f5c\u4e3a\u8bc4\u5224\u8005\u6216\u4f7f\u7528Python\u811a\u672c\u8bc4\u4f30\u5668\uff0c\u5bf9\u6bcf\u4e2a\u63a5\u6536\u5230\u7684\u8de8\u5ea6\u8fdb\u884c\u8bc4\u4f30\u548c\u6807\u8bb0\u3002\n<pre><code># \u793a\u4f8b\u4ee3\u7801\r\nevaluator = LLMJudge()\r\nevaluator.evaluate(span)\r\n<\/code><\/pre>\n<\/li>\n<\/ul>\n<h4>\u6570\u636e\u96c6\u6784\u5efa<\/h4>\n<ul>\n<li><strong>\u521b\u5efa\u6570\u636e\u96c6<\/strong>\uff1a\u4ece\u8ffd\u8e2a\u6570\u636e\u4e2d\u6784\u5efa\u6570\u636e\u96c6\uff0c\u7528\u4e8e\u540e\u7eed\u7684\u8bc4\u4f30\u548c\u5fae\u8c03\u3002\n<pre><code>dataset = create_dataset_from_traces(traces)\r\n<\/code><\/pre>\n<\/li>\n<\/ul>\n<h4>\u63d0\u793a\u94fe\u7ba1\u7406<\/h4>\n<ul>\n<li><strong>\u6784\u5efa\u63d0\u793a\u94fe<\/strong>\uff1a\u652f\u6301\u6784\u5efa\u590d\u6742\u7684\u63d0\u793a\u94fe\uff0c\u5305\u62ec\u4ee3\u7406\u6df7\u5408\u6216\u81ea\u53cd\u601d\u7684LLM\u7ba1\u9053\u3002\n<pre><code>chain = PromptChain()\r\nchain.add_prompt(prompt)\r\n<\/code><\/pre>\n<\/li>\n<\/ul>\n<h3>\u81ea\u6258\u7ba1<\/h3>\n<ul>\n<li><strong>\u81ea\u6258\u7ba1\u6b65\u9aa4<\/strong>\uff1a\u53ea\u9700\u51e0\u4e2a\u547d\u4ee4\u5373\u53ef\u5f00\u59cb\u81ea\u6258\u7ba1\uff0c\u786e\u4fdd\u73af\u5883\u4e2d\u5df2\u5b89\u88c5Docker\u548cDocker Compose\u3002\n<pre><code>git clone https:\/\/github.com\/lmnr-ai\/lmnr\r\ncd lmnr\r\ndocker compose up -d\r\n<\/code><\/pre>\n<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Laminar\u662f\u4e00\u4e2a\u5f00\u6e90\u7684AI\u5de5\u7a0b\u4f18\u5316\u5e73\u53f0\uff0c\u4e13\u6ce8\u4e8e\u4ece\u7b2c\u4e00\u539f\u7406\u51fa\u53d1\u8fdb\u884cAI\u5de5\u7a0b\u3002\u5b83\u5e2e\u52a9\u7528\u6237\u6536\u96c6\u3001\u7406\u89e3\u548c\u4f7f\u7528\u6570\u636e\uff0c\u4ee5\u63d0\u9ad8LLM\uff08\u5927\u578b\u8bed\u8a00\u6a21\u578b\uff09\u5e94\u7528\u7684\u8d28\u91cf\u3002Laminar\u63d0\u4f9b\u4e86\u5168\u9762\u7684\u53ef\u89c2\u6d4b\u6027\u3001\u6587\u672c\u5206\u6790\u3001\u8bc4\u4f30\u548c\u63d0\u793a\u94fe\u7ba1\u7406\u529f\u80fd\uff0c\u652f\u6301\u7528\u6237\u6784\u5efa\u548c\u4f18\u5316\u590d\u6742&#8230;<\/p>\n","protected":false},"author":1,"featured_media":61364,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[20,46],"tags":[230],"class_list":["post-14780","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tool","category-news","tag-aikaiyuanxiangmu"],"_links":{"self":[{"href":"https:\/\/www.kdjingpai.com\/en\/wp-json\/wp\/v2\/posts\/14780","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.kdjingpai.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.kdjingpai.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.kdjingpai.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.kdjingpai.com\/en\/wp-json\/wp\/v2\/comments?post=14780"}],"version-history":[{"count":0,"href":"https:\/\/www.kdjingpai.com\/en\/wp-json\/wp\/v2\/posts\/14780\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.kdjingpai.com\/en\/wp-json\/wp\/v2\/media\/61364"}],"wp:attachment":[{"href":"https:\/\/www.kdjingpai.com\/en\/wp-json\/wp\/v2\/media?parent=14780"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.kdjingpai.com\/en\/wp-json\/wp\/v2\/categories?post=14780"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.kdjingpai.com\/en\/wp-json\/wp\/v2\/tags?post=14780"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}