{"id":3919,"date":"2024-03-03T21:03:49","date_gmt":"2024-03-04T05:33:49","guid":{"rendered":"https:\/\/10ccc.cc\/?p=3919"},"modified":"2026-01-02T19:43:53","modified_gmt":"2026-01-02T11:43:53","slug":"mac%e7%89%88-windows-copilot-%e5%9f%ba%e4%ba%8echatglm-%e6%97%a0%e9%9c%80%e8%81%94%e7%bd%91-%e5%8f%af%e4%bb%8e%e4%b8%8d%e5%90%8capp%e5%86%85%e5%bf%ab%e9%80%9f%e5%90%af%e5%8a%a8","status":"publish","type":"post","link":"https:\/\/10ccc.cc\/?p=3919","title":{"rendered":"Mac\u7248 Windows Copilot \u57fa\u4e8echatglm \u65e0\u9700\u8054\u7f51, \u53ef\u4ece\u4e0d\u540cApp\u5185\u5feb\u901f\u542f\u52a8"},"content":{"rendered":"<div class=\"markdown-heading\" dir=\"auto\">\n<h1>Brief<\/h1>\n<blockquote><p>copilot for mac, a pale imitation of windows copilot<\/p><\/blockquote>\n<\/div>\n<div class=\"markdown-heading\" dir=\"auto\">\n<p>&nbsp;<\/p>\n<\/div>\n<p dir=\"auto\">\u5728\u5b66\u4e60pyqt\u7684\u8fc7\u7a0b\u4e2d\uff0c\u7ecf\u5e38\u5411gpt\u63d0\u95ee\uff0c\u52a0\u5feb\u5b66\u4e60\u8fdb\u5ea6\u3002\u4f46\u6bcf\u6b21\u9047\u5230\u95ee\u9898\u540e\u3010\u590d\u5236--&gt;\u6253\u5f00\u6d4f\u89c8\u5668--&gt;\u5207\u6362\u6807\u7b7e--&gt;\u586b\u5165\u8f93\u5165\u6846\u5e76\u63d0\u95ee\u3011\u7684\u8fc7\u7a0b\u91cd\u590d\u591a\u6b21\uff0c\u603b\u4f1a\u611f\u5230\u538c\u70e6\u3002\u4e3a\u4e86\u8ba9\u81ea\u5df1\u80fd\u591f\u5728\u5de5\u4f5c\/\u5b66\u4e60\u8fc7\u7a0b\u4e2d\u66f4\u52a0\u4e13\u6ce8\u4e8e\u5185\u5bb9\uff0c\u800c\u81ea\u5df1\u53c8\u7a0d\u5fae\u61c2\u4e00\u4e9b\u7f16\u7a0b.... \u4e8e\u662f\uff0c\u4fbf\u6709\u4e86\u672c\u9879\u76ee\u3002<\/p>\n<blockquote>\n<p dir=\"auto\">\u672c\u9879\u76ee\u5728\u8f83\u65e9\u65f6 (\u672c\u6587\u53d1\u5e03\u524d\u4e00\u4e2a\u591a\u6708) \u5df2\u7ecf\u5b8c\u6210\uff0c\u7ecf\u8fc7\u8fd9\u6bb5\u65f6\u95f4\u7684\u4f7f\u7528\uff0c\u5df2\u7ecf\u57fa\u672c\u6ee1\u8db3\u81ea\u5df1\u7684\u8981\u6c42\u3002\u5e76\u4e14\uff0c\u5728\u8fd9\u8fc7\u7a0b\u4e2d\u4e5f\u5df2\u7ecf\u5c06\u80fd\u591f\u53d1\u73b0\u5e76\u89e3\u51b3\u7684\u95ee\u9898\u5904\u7406\u5b8c\u6210<\/p>\n<p dir=\"auto\">\u4ed3\u5e93\uff1ahttps:\/\/github.com\/craii\/mac_companion_for_M_Chip_mac\u00a0 \u00a0||\u00a0 https:\/\/github.com\/craii\/mac_companion<\/p>\n<\/blockquote>\n<h1 dir=\"auto\">\u57fa\u672c\u8981\u6c42<\/h1>\n<ol>\n<li><strong>\u3010\u65ad\u7f51\u8fd0\u884c\u3011<\/strong>\uff1a\u56e0\u4e3a\u4e4b\u524d\u88abopenAI \u5c01\u4e86\u8d26\u53f7\uff0c\u56e0\u6b64\u6709\u4e86\u88ab\u8feb\u5bb3\u5984\u60f3\u75c7\uff0c\u603b\u662f\u62c5\u5fc3\u88ab\u3010\u5361\u8116\u5b50\u3011\uff0c\u56e0\u6b64\u8fd9\u4e5f\u5c31\u6709\u4e86\u6a21\u578b\u5fc5\u987b\u80fd\u591f\u65ad\u7f51\u8fd0\u884c\u7684\u6267\u5ff5\uff1b<\/li>\n<li><strong>\u3010\u6027\u80fd\u3011<\/strong>\uff1a\u5185\u5b58\u548ccpu\u5360\u7528\u4e0d\u80fd\u592a\u9ad8\uff0c\u5982\u679c\u5149\u662f\u8fd0\u884c\u6a21\u578b\u5c31\u8d62\u628a\u673a\u5668\u6027\u80fd\u5403\u5b8c\uff0c\u65e0\u6cd5\u8fd0\u884c\u5e73\u65f6\u5de5\u4f5c\u9700\u8981\u7528\u5230\u8f6f\u4ef6\uff0c\u90a3\u662f\u5b8c\u5168\u6ca1\u6709\u610f\u4e49\u7684\uff0c\u56e0\u6b64\uff0c\u7a0b\u5e8f\u9a7b\u7559\u540e\u53f0\u65f6\uff0c\u80af\u5b9a\u4e0d\u80fd\u628a\u7535\u8111\u5361\u6b7b\uff1b\u540c\u65f6\uff0c\u5728\u63a8\u7406\u65f6\u4e5f\u8981\u8db3\u591f\u5feb\uff1b<\/li>\n<li>\u3010\u5feb\u6377\u3011\uff1a\u65e0\u9700\u590d\u5236\u3001\u7c98\u8d34\uff0c\u6700\u597d\u80fd\u9009\u4e2d\u6587\u5b57\uff0c\u7136\u540e\u76f4\u63a5\u5c06\u8fd9\u4e9b\u6587\u5b57\u4f5c\u4e3aprompt\uff0c\u53d1\u7ed9\u6a21\u578b\u5904\u7406\uff0c\u5e76\u5f97\u5230\u7ed3\u679c\uff1b<\/li>\n<li>\u3010\u5bf9\u8bdd\u9875\u9762\u3011\uff1a\u5982\u679c\u9047\u5230\u9700\u8981\u8ffd\u95ee\u6216\u63d0\u4f9b\u66f4\u957f\u7684\u4e0a\u4e0b\u6587\u624d\u80fd\u5f97\u5230\u66f4\u597d\u7ed3\u679c\u7684\u573a\u666f\uff0c\u53ef\u4ee5\u6709\u7c7b\u4f3cchatgpt\u7684\u5bf9\u8bdd\u9875\u9762\uff0c\u83b7\u5f97\u66f4\u597d\u7684\u4ea4\u4e92\u4f53\u9a8c\uff1b<\/li>\n<\/ol>\n<p dir=\"auto\">mac_companion\u5e38\u9a7b\u540e\u53f0\uff0c\u5e76\u5728mac \u9876\u90e8\u83dc\u5355\u680f\u8bbe\u7f6e\u5feb\u6377\u5165\u53e3\u3002\u53ef\u4ee5\u8ba9\u6211\u5728\u7edd\u5927\u591a\u6570 app \u4e2d\uff0c\u53ef\u901a\u8fc7\u9f20\u6807\u53f3\u952e\u7684\u670d\u52a1\u83dc\u5355\uff0c\u5feb\u901f\u5c06\u9009\u4e2d\u7684\u6587\u5b57\u4f5c\u4e3a prompt \u63d0\u4ea4\u7ed9 Chatglm \u5e76\u5f97\u5230\u7b54\u590d\uff0c\u5f53\u7136\u5982\u679c\u4f60\u4e0d\u60f3\u4f7f\u7528chatglm\u4e5f\u53ef\u4ee5\u5728\u4fee\u6539\u5c11\u91cf\u4ee3\u7801\u7684\u60c5\u51b5\u4e0b\uff0c\u66ff\u6362\u4e3a\u5176\u4ed6\u652f\u6301 openai-like api\u7684\u6a21\u578b\uff0c\u6216\u8005\u76f4\u63a5\u6539\u4e3a\u8c03\u7528openai\u7684api\u3002<br \/>\n<strong>\u672c\u9879\u76ee\u6709\u4e24\u4e2a\u7248\u672c<\/strong>\uff1a<\/p>\n<p>&nbsp;<\/p>\n<h1>\u6210\u679c\u5c55\u793a<\/h1>\n<ul>\n<li>\u5728\u5404\u4e2aApp\u4e2d\u76f4\u63a5\u83b7\u53d6\u6587\u5b57\u4f5c\u4e3aprompt, \u7701\u53bb\u590d\u5236\u7c98\u8d34\u7684\u91cd\u590d\u64cd\u4f5c\uff1a<br \/>\n<iframe loading=\"lazy\" src=\"\/\/player.bilibili.com\/player.html?aid=1550390683&amp;bvid=BV1Gy421h7mq&amp;cid=1434468796&amp;p=1\" width=\"640\" height=\"360\" frameborder=\"no\" scrolling=\"no\" allowfullscreen=\"allowfullscreen\"> <\/iframe><\/li>\n<li>\u8fd0\u884c\u5bf9\u8bdd\u9875\u9762\uff1a<br \/>\n<video controls=\"controls\" width=\"640\" height=\"360\"><source src=\"https:\/\/10ccc.cc\/wp-content\/uploads\/2024\/03\/liaotianyemian.mp4\" type=\"video\/mp4\" \/>Your browser does not support the video tag.<\/video><\/li>\n<li>\u529f\u80fd\u622a\u56fe<div id='gallery-1' class='gallery galleryid-3919 gallery-columns-3 gallery-size-thumbnail'><figure class='gallery-item'>\n\t\t\t<div class='gallery-icon landscape'>\n\t\t\t\t<a href='https:\/\/10ccc.cc\/wp-content\/uploads\/2024\/03\/Snipaste_2024-03-04_11-37-18.png' title=\"\" data-rl_title=\"\" class=\"rl-gallery-link\" data-rl_caption=\"\" data-rel=\"lightbox-gallery-1\"><img loading=\"lazy\" decoding=\"async\" width=\"150\" height=\"150\" src=\"https:\/\/10ccc.cc\/wp-content\/uploads\/2024\/03\/Snipaste_2024-03-04_11-37-18-150x150.png\" class=\"attachment-thumbnail size-thumbnail\" alt=\"\" \/><\/a>\n\t\t\t<\/div><\/figure><figure class='gallery-item'>\n\t\t\t<div class='gallery-icon portrait'>\n\t\t\t\t<a href='https:\/\/10ccc.cc\/wp-content\/uploads\/2024\/03\/Snipaste_2024-03-04_11-36-59.png' title=\"\" data-rl_title=\"\" class=\"rl-gallery-link\" data-rl_caption=\"\" data-rel=\"lightbox-gallery-1\"><img loading=\"lazy\" decoding=\"async\" width=\"150\" height=\"150\" src=\"https:\/\/10ccc.cc\/wp-content\/uploads\/2024\/03\/Snipaste_2024-03-04_11-36-59-150x150.png\" class=\"attachment-thumbnail size-thumbnail\" alt=\"\" \/><\/a>\n\t\t\t<\/div><\/figure><figure class='gallery-item'>\n\t\t\t<div class='gallery-icon portrait'>\n\t\t\t\t<a href='https:\/\/10ccc.cc\/wp-content\/uploads\/2024\/03\/Snipaste_2024-03-04_11-36-53.png' title=\"\" data-rl_title=\"\" class=\"rl-gallery-link\" data-rl_caption=\"\" data-rel=\"lightbox-gallery-1\"><img loading=\"lazy\" decoding=\"async\" width=\"150\" height=\"150\" src=\"https:\/\/10ccc.cc\/wp-content\/uploads\/2024\/03\/Snipaste_2024-03-04_11-36-53-150x150.png\" class=\"attachment-thumbnail size-thumbnail\" alt=\"\" \/><\/a>\n\t\t\t<\/div><\/figure>\n\t\t<\/div>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h1>\u4e1a\u52a1\u6d41\u7a0b<\/h1>\n<p>\u6211\u4eec\u7684\u5b9e\u73b0\u903b\u8f91\u6bd4\u8f83\u7b80\u5355\uff0c\u5927\u81f4\u5c31\u662f\uff1acopilot\u542f\u52a8\u540e\uff0c\u4f1a\u542f\u52a8\u4e00\u4e2a\u76d1\u542c\u670d\u52a1\uff1b\u5f53\u76d1\u542c\u5230\u82f9\u679c\u7684automator\u811a\u672c\u53d1\u9001\u8fc7\u6765\u7684\u9009\u4e2d\u6587\u672c\u540e\uff0c\u5c06\u5176\u53d1\u9001\u7ed9\u672c\u5730\u6a21\u578b\u5904\u7406\uff0c\u7136\u540e\u5728\u5c06\u6a21\u578b\u7684\u56de\u7b54\u8fdb\u884c\u5c55\u793a\u51fa\u6765 (\u8be6\u89c1\u4e0b\u56fe) \u3002<\/p>\n<p>\u53ef\u89c1\uff0c\u901a\u8fc7\u6b64\u6d41\u7a0b\uff0c\u53ef\u4ee5\u7701\u7565\u590d\u5236\u3001\u7c98\u8d34\u7684\u8fc7\u7a0b\uff0c\u4fbf\u6377\u6027\u5f97\u5230\u4e86\u8f83\u597d\u7684\u4fdd\u8bc1\u3002\u800c\u4e14\uff0c\u611f\u8c22 <a href=\"https:\/\/github.com\/THUDM\" target=\"_blank\"  rel=\"nofollow\" >THUDM<\/a>\u00a0 \u7684\u6770\u4f5c\uff1a chatglm\uff0c \u4ee5\u53ca\u00a0 <a href=\"https:\/\/github.com\/li-plus\" target=\"_blank\"  rel=\"nofollow\" >li-plus<\/a> \u63d0\u4f9b\u7684cpp\u52a0\u901f\uff0c\u8ba9\u5728mac\u4e0a\u672c\u5730\u4f4e\u6210\u672c\u8fd0\u884cchatglm\u6a21\u578b\u6210\u4e3a\u4e86\u53ef\u80fd, \u5e76\u4e14\u4e5f\u63d0\u4f9b\u4e86\u4e0d\u9519\u7684webUI\u3002<\/p>\n<figure id=\"attachment_3923\" aria-describedby=\"caption-attachment-3923\" style=\"width: 800px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/10ccc.cc\/?attachment_id=3923\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-3923\" src=\"https:\/\/10ccc.cc\/wp-content\/uploads\/2024\/03\/mac_companion.drawio-1017x1024.png\" alt=\"mac companion \u4e1a\u52a1\u6d41\u7a0b\" width=\"800\" height=\"805\" srcset=\"https:\/\/10ccc.cc\/wp-content\/uploads\/2024\/03\/mac_companion.drawio-1017x1024.png 1017w, https:\/\/10ccc.cc\/wp-content\/uploads\/2024\/03\/mac_companion.drawio-298x300.png 298w, https:\/\/10ccc.cc\/wp-content\/uploads\/2024\/03\/mac_companion.drawio-150x150.png 150w, https:\/\/10ccc.cc\/wp-content\/uploads\/2024\/03\/mac_companion.drawio-768x773.png 768w, https:\/\/10ccc.cc\/wp-content\/uploads\/2024\/03\/mac_companion.drawio.png 1332w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><\/a><figcaption id=\"caption-attachment-3923\" class=\"wp-caption-text\">mac companion \u4e1a\u52a1\u6d41\u7a0b<\/figcaption><\/figure>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<h1>\u5982\u4f55\u4f7f\u7528<\/h1>\n<p dir=\"auto\">\u9879\u76ee\u6e90\u7801\u5df2\u4e0a\u4f20\u81f3 github: <a href=\"https:\/\/github.com\/craii\/mac_companion\" target=\"_blank\"  rel=\"nofollow\" >https:\/\/github.com\/craii\/mac_companion<\/a><\/p>\n<p dir=\"auto\">mac_companion\u5e38\u9a7b mac \u9876\u90e8\u83dc\u5355\u680f\u3002\u53ef\u4ee5\u8ba9\u6211\u5728\u7edd\u5927\u591a\u6570 app \u4e2d\uff0c\u53ef\u901a\u8fc7\u9f20\u6807\u53f3\u952e\u7684\u670d\u52a1\u83dc\u5355\uff0c\u5feb\u901f\u5c06\u9009\u4e2d\u7684\u6587\u5b57\u4f5c\u4e3a prompt \u63d0\u4ea4\u7ed9 Chatglm \u5e76\u5f97\u5230\u7b54\u590d\uff0c\u5f53\u7136\u5982\u679c\u4f60\u4e0d\u60f3\u4f7f\u7528chatglm\u4e5f\u53ef\u4ee5\u5728\u4fee\u6539\u5c11\u91cf\u4ee3\u7801\u7684\u60c5\u51b5\u4e0b\uff0c\u66ff\u6362\u4e3a\u5176\u4ed6\u652f\u6301 openai-like api\u7684\u6a21\u578b\uff0c\u6216\u8005\u76f4\u63a5\u6539\u4e3a\u8c03\u7528openai\u7684api\u3002<br \/>\n<strong>\u672c\u9879\u76ee\u6709\u4e24\u4e2a\u7248\u672c<\/strong>\uff1a<\/p>\n<ul dir=\"auto\">\n<li><strong>mac_companion<\/strong>: \u672c\u4ed3\u5e93\uff0c\u4f60\u53ef\u4ee5\u5728\u53c2\u7167\u4e0b\u8ff0\u5b89\u88c5\u8bf4\u660e\u5b8c\u6210 Setup \u5373\u53ef\u4f7f\u7528\uff1b<\/li>\n<li><strong>mac_companion\u3010\u76f4\u63a5\u8fd0\u884c\u7248\u3011<\/strong>\uff1a\u5982\u679c\u4f60\u7684\u00a0<code>mac \u4f7f\u7528\u7684\u662fM\u7cfb\u5217\u82af\u7247<\/code>\u00a0\uff0c\u53ef\u8f6c\u81f3<a href=\"https:\/\/github.com\/craii\/mac_companion_for_M_Chip_mac\" target=\"_blank\"  rel=\"nofollow\" >\u6b64\u4ed3\u5e93<\/a> \uff0c\u53c2\u7167\u5bf9\u5e94\u6587\u6863\u4e0b\u8f7d\u5b89\u88c5\u5373\u53ef\u3002\u4e5f\u53ef\u4ee5\u76f4\u63a5\u4e0b\u8f7d\u5305\u542b\u6a21\u578b\u548c\u8fd0\u884c\u73af\u5883\u7684\u6574\u5408\u5305(\u4e0b\u8f7d\u540e\u6700\u597d\u7528\u4ed3\u5e93\u6700\u65b0\u4ee3\u7801\u6587\u4ef6\u8986\u76d6\u4e00\u4e0b)\uff1a<\/li>\n<\/ul>\n<blockquote>\n<p dir=\"auto\"><a href=\"https:\/\/pan.quark.cn\/s\/7cb6be5a8d6c\" rel=\"nofollow\" target=\"_blank\" >\u6574\u5408\u5305<\/a> \uff0c \u63d0\u53d6\u7801\uff1afyEe<\/p>\n<\/blockquote>\n<p>\u6574\u5408\u5305\u5df2\u7ecf\u96c6\u6210\u4e86\u672c\u9879\u76ee\u7684\u865a\u62df\u73af\u5883\u3001chatglm \u6240\u9700\u7684\u865a\u62df\u73af\u5883 \u4ee5\u53ca chatglm \u6a21\u578b\u3002\u4e0b\u8f7d\u5b8c\u6210\u540e\u53ea\u9700\u8981\u5207\u6362\u5230\u89e3\u538b\u76ee\u5f55\u4e0b\uff0c\u8fd0\u884c ```python run.py``` \u5373\u53ef\u8fd0\u884c\uff08\u6211\u5df2\u5728\u4e24\u53f0m-chip\u7684mac\u4e0a\u6d4b\u8bd5\u53ef\u884c\uff09\u3002 ```INTEL\u82af\u7247``` \u7684mac\u672a\u7ecf\u6d4b\u8bd5\uff0c\u4f46\u5e94\u8be5\u662f\u4e0d\u80fd\u8fd0\u884c\u7684\uff0c\u56e0\u4e3a\u672c\u9879\u76ee\u4f7f\u7528\u7684 chatglm \u5728\u8fdb\u884ccpp\u7f16\u8bd1\u65f6\u91c7\u7528\u7684\u53c2\u6570\u4e2d\u6307\u5b9a\u4e86arm\u5e73\u53f0\u3002<\/p>\n<p>&nbsp;<\/p>\n<h2>Setup<\/h2>\n<div class=\"markdown-heading\" dir=\"auto\">\n<h3 class=\"heading-element\" dir=\"auto\" tabindex=\"-1\"><strong>\u6240\u9700Python\u7248\u672c\uff1a<\/strong><\/h3>\n<p>&nbsp;<\/p>\n<\/div>\n<ul dir=\"auto\">\n<li><strong>mac_companion<\/strong>: 3.11.5;<\/li>\n<li><strong>chatglm-6b<\/strong>: 3.8.18;<\/li>\n<\/ul>\n<div class=\"markdown-heading\" dir=\"auto\">\n<h2 dir=\"auto\" tabindex=\"-1\"><\/h2>\n<h2 class=\"heading-element\" dir=\"auto\" tabindex=\"-1\">Step 1<\/h2>\n<\/div>\n<p dir=\"auto\"><strong>\u4e0b\u8f7d\u672c\u4ed3\u5e93<\/strong><\/p>\n<p dir=\"auto\"><div class=\"dm-code-snippet dark no-background no-background-mobile dm-normal-version\" style=\"background-color:#abb8c3;\" snippet-height=\"\">\n\t\t\t<div class=\"control-language\">\n                <div class=\"dm-buttons\">\n                    <div class=\"dm-buttons-left\">\n                        <div class=\"dm-button-snippet red-button\"><\/div>\n                        <div class=\"dm-button-snippet orange-button\"><\/div>\n                        <div class=\"dm-button-snippet green-button\"><\/div>\n                    <\/div>\n                    <div class=\"dm-buttons-right\">\n                        <a id=\"dm-copy-raw-code\">\n                        <span class=\"dm-copy-text\">Copy Code<\/span>\n                        <span class=\"dm-copy-confirmed\" style=\"display:none\">Copied<\/span>\n                        <span class=\"dm-error-message\" style=\"display:none\">Use a different Browser<\/span><\/a>\n                    <\/div>\n                <\/div>\n                <pre class=\"no-line-numbers\"><code id=\"dm-code-raw\" class=\"no-wrap language-shell\"><\/p>\n<pre class=\"dm-pre-admin-side\">git clone https:\/\/github.com\/craii\/mac_companion.git &amp;&amp; cd mac_companion<\/pre>\n<p dir=\"auto\"><\/code><\/pre>\n\t\t\t<\/div>\n        <\/div><\/p>\n<div class=\"markdown-heading\" dir=\"auto\">\n<h2 dir=\"auto\" tabindex=\"-1\"><\/h2>\n<h2 class=\"heading-element\" dir=\"auto\" tabindex=\"-1\">Step 2<\/h2>\n<\/div>\n<p dir=\"auto\"><strong>\u521b\u5efa\u865a\u62df\u73af\u5883<\/strong><br \/>\n<div class=\"dm-code-snippet dark no-background no-background-mobile dm-normal-version\" style=\"background-color:#abb8c3;\" snippet-height=\"\">\n\t\t\t<div class=\"control-language\">\n                <div class=\"dm-buttons\">\n                    <div class=\"dm-buttons-left\">\n                        <div class=\"dm-button-snippet red-button\"><\/div>\n                        <div class=\"dm-button-snippet orange-button\"><\/div>\n                        <div class=\"dm-button-snippet green-button\"><\/div>\n                    <\/div>\n                    <div class=\"dm-buttons-right\">\n                        <a id=\"dm-copy-raw-code\">\n                        <span class=\"dm-copy-text\">Copy Code<\/span>\n                        <span class=\"dm-copy-confirmed\" style=\"display:none\">Copied<\/span>\n                        <span class=\"dm-error-message\" style=\"display:none\">Use a different Browser<\/span><\/a>\n                    <\/div>\n                <\/div>\n                <pre class=\"no-line-numbers\"><code id=\"dm-code-raw\" class=\"no-wrap language-shell\"><\/p>\n<pre class=\"dm-pre-admin-side\">python -m venv venv\r\nsource .\/venv\/bin\/activate\r\npip install -r requirements.txt<\/pre>\n<p dir=\"auto\"><\/code><\/pre>\n\t\t\t<\/div>\n        <\/div><\/p>\n<blockquote>\n<p dir=\"auto\">\u6ce8\u610f\u6b64\u65f6\u521b\u5efa\u4e86\u865a\u62df\u73af\u5883 venv\u4e4b\u540e\uff0c\u9700\u8981\u8bb0\u5f55 venv \u4e2d\u7684 python_executable \u8def\u5f84\uff0c \u5047\u8bbe\u4f60\u8fd0\u884c Step 1\u7684\u547d\u4ee4\u65f6\uff0c\u662f\u5c06 documents \u8def\u5f84\u4e0b\uff0c \u5219 python_executable \u8def\u5f84\u4e3a\uff1a\/documents\/mac_companion\/venv\/bin\/python<\/p>\n<\/blockquote>\n<p>&nbsp;<\/p>\n<div class=\"markdown-heading\" dir=\"auto\">\n<h2 class=\"heading-element\" dir=\"auto\" tabindex=\"-1\">Step 3<\/h2>\n<p>&nbsp;<\/p>\n<\/div>\n<p dir=\"auto\"><strong>\u5b89\u88c5 chatglm<\/strong>:<\/p>\n<ul dir=\"auto\">\n<li>\u5982\u679c\u4f60\u503e\u5411\u4e8e\u4f7f\u7528\u5b8c\u5168\u7248\u7684 chatglm\uff1a\u8bf7\u53c2\u7167\u00a0<a href=\"https:\/\/github.com\/THUDM\/ChatGLM3\" target=\"_blank\"  rel=\"nofollow\" >https:\/\/github.com\/THUDM\/ChatGLM3<\/a>\u00a0\uff1b<\/li>\n<li>\u5982\u679c\u4f60\u503e\u5411\u4e8e\u4f7f\u7528\u91cf\u5316\u52a0\u901f\u540e\u7684 chatglm\uff1a\u8bf7\u53c2\u7167\u00a0<a href=\"https:\/\/github.com\/li-plus\/chatglm.cpp?tab=readme-ov-file\" target=\"_blank\"  rel=\"nofollow\" >https:\/\/github.com\/li-plus\/chatglm.cpp?tab=readme-ov-file<\/a><\/li>\n<\/ul>\n<p>\u5b89\u88c5\u5b8c\u6210\u540e\u8bf7\u52a1\u5fc5\u5148\u9a8c\u8bc1\u5176\u662f\u5426\u88ab\u6b63\u786e\u5b89\u88c5\uff0c\u5e76\u4e14\u80fd\u591f\u542f\u52a8\u00a0<strong>OpenAI_API<\/strong>\u00a0\uff0c\u5982\u679c\u6b63\u5e38\u542f\u52a8\uff0c\u90a3\u4e48\u4f60\u5e94\u8be5\u80fd\u591f\u5728\u7ec8\u7aef\u770b\u5230\u7c7b\u4f3c\u4e0b\u56fe\u7684\u6587\u5b57\uff1a<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3927\" src=\"https:\/\/10ccc.cc\/wp-content\/uploads\/2024\/03\/Snipaste_2024-03-04_11-54-06.png\" alt=\"\" width=\"578\" height=\"192\" srcset=\"https:\/\/10ccc.cc\/wp-content\/uploads\/2024\/03\/Snipaste_2024-03-04_11-54-06.png 578w, https:\/\/10ccc.cc\/wp-content\/uploads\/2024\/03\/Snipaste_2024-03-04_11-54-06-300x100.png 300w\" sizes=\"auto, (max-width: 578px) 100vw, 578px\" \/><\/p>\n<p dir=\"auto\">\u6ce8\u610f\uff1a<\/p>\n<ul dir=\"auto\">\n<li>\u8bb0\u5f55\u4e0a\u56fe\u4e2d\u5730\u5740 <strong>127.0.0.1:8001<\/strong> \u4e2d\u7684\u7aef\u53e3\u53f7\uff1a<strong>8001<\/strong> \uff1b<\/li>\n<li>\u8bb0\u5f55\u542f\u52a8\u00a0<strong>OpenAI_API\u00a0<\/strong>\u670d\u52a1\u65f6\u4f7f\u8f93\u5165\u7684\u547d\u4ee4\uff1a\u672c\u9879\u76ee\u4f7f\u7528\u7684\u662f\u91cf\u5316\u52a0\u901f\u540e\u7684 <strong>chatglm<\/strong>\uff0c \u542f\u52a8\u547d\u4ee4\u4e3a\uff1a<br \/>\n<div class=\"dm-code-snippet dark no-background no-background-mobile dm-normal-version\" style=\"background-color:#abb8c3;\" snippet-height=\"\">\n\t\t\t<div class=\"control-language\">\n                <div class=\"dm-buttons\">\n                    <div class=\"dm-buttons-left\">\n                        <div class=\"dm-button-snippet red-button\"><\/div>\n                        <div class=\"dm-button-snippet orange-button\"><\/div>\n                        <div class=\"dm-button-snippet green-button\"><\/div>\n                    <\/div>\n                    <div class=\"dm-buttons-right\">\n                        <a id=\"dm-copy-raw-code\">\n                        <span class=\"dm-copy-text\">Copy Code<\/span>\n                        <span class=\"dm-copy-confirmed\" style=\"display:none\">Copied<\/span>\n                        <span class=\"dm-error-message\" style=\"display:none\">Use a different Browser<\/span><\/a>\n                    <\/div>\n                <\/div>\n                <pre class=\"no-line-numbers\"><code id=\"dm-code-raw\" class=\"no-wrap language-shell\"><\/p>\n<pre class=\"dm-pre-admin-side\">cd \/Users\/YOURNAME\/Documents\/chatglm.cpp-chatglm3\/chatglm_cpp &amp;&amp; MODEL=..\/chatglm3-ggml.bin \/Users\/YOURNAME\/anaconda3\/envs\/chatglmcpp\/bin\/uvicorn chatglm_cpp.openai_api:app --host 127.0.0.1 --port 8001<\/pre>\n<p><\/code><\/pre>\n\t\t\t<\/div>\n        <\/div><\/li>\n<\/ul>\n<div class=\"markdown-heading\" dir=\"auto\">\n<h2 dir=\"auto\" tabindex=\"-1\"><\/h2>\n<h2 class=\"heading-element\" dir=\"auto\" tabindex=\"-1\">Step 4<\/h2>\n<p>&nbsp;<\/p>\n<\/div>\n<p dir=\"auto\">\u4fee\u6539\u672c\u9879\u76ee\u4e2d\u7684<strong>\u00a0config.py<\/strong>\u00a0\u6587\u4ef6:<\/p>\n<ul dir=\"auto\">\n<li>\u4fee\u6539\u00a0<strong>port\u00a0<\/strong>\u7684\u503c\u4e3a\uff1a\u4f60\u770b\u5230\u7684\u7aef\u53e3\u53f7 (\u5982\u4ee5\u4e0a\u56fe\u4e3a\u4f8b\uff0c\u5219\u5c06\u5176\u4fee\u6539\u4e3a8001)\uff1b<\/li>\n<li>\u4fee\u6539 <strong>airserver_command <\/strong>\uff1a<strong>cd \/Users\/YOURNAME\/Documents\/chatglm.cpp-chatglm3\/chatglm_cpp &amp;&amp; MODEL=..\/chatglm3-ggml.bin \/Users\/YOURNAME\/anaconda3\/envs\/chatglmcpp\/bin\/uvicorn chatglm_cpp.openai_api:app --host 127.0.0.1 --port 8001<\/strong><br \/>\n\uff08\u6839\u636e\u4f60\u7684\u5b9e\u9645\u60c5\u51b5\u4fee\u6539\uff09<\/li>\n<li>\u4fee\u6539\u00a0<strong>python_executable\u00a0<\/strong>\u7684\u503c\u4e3a\uff1a<strong>\/documents\/mac_companion\/venv\/bin\/python<\/strong>(\u53c2\u8003Step 2)<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p dir=\"auto\">\u4fee\u6539\u540e\u7684\u00a0<strong>config.py<\/strong>\u00a0\u53ef\u80fd\u5982\u4e0b\uff1a<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-3928\" src=\"https:\/\/10ccc.cc\/wp-content\/uploads\/2024\/03\/Snipaste_2024-03-04_11-56-03-1024x214.png\" alt=\"\" width=\"1024\" height=\"214\" srcset=\"https:\/\/10ccc.cc\/wp-content\/uploads\/2024\/03\/Snipaste_2024-03-04_11-56-03-1024x214.png 1024w, https:\/\/10ccc.cc\/wp-content\/uploads\/2024\/03\/Snipaste_2024-03-04_11-56-03-300x63.png 300w, https:\/\/10ccc.cc\/wp-content\/uploads\/2024\/03\/Snipaste_2024-03-04_11-56-03-768x161.png 768w, https:\/\/10ccc.cc\/wp-content\/uploads\/2024\/03\/Snipaste_2024-03-04_11-56-03.png 1318w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/p>\n<p>&nbsp;<\/p>\n<div class=\"markdown-heading\" dir=\"auto\">\n<h2 class=\"heading-element\" dir=\"auto\" tabindex=\"-1\">Step 5<\/h2>\n<p>&nbsp;<\/p>\n<\/div>\n<ol dir=\"auto\">\n<li>\u53cc\u51fb\u00a0<strong>copilot.workflow<\/strong>\u00a0\uff0c\u4f1a\u81ea\u52a8\u5b89\u88c5\u00a0<strong>copilot.workflow<\/strong>\uff0c\u7136\u540e\u5728\u6253\u5f00\u7684\u9875\u9762\u91cc\uff0c\u5c06\u4e0b\u56fe\u4e2d\u00a0<strong>\u7ea2\u6846<\/strong>\u00a0\u548c\u00a0<strong>\u7bee\u6846<\/strong>\u90e8\u5206\u4e3a\u00a0<strong>mac_companion<\/strong>\u00a0\u7684\u9879\u76ee\u8def\u5f84\uff1b<\/li>\n<\/ol>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-3929\" src=\"https:\/\/10ccc.cc\/wp-content\/uploads\/2024\/03\/Snipaste_2024-03-04_11-57-14-1024x634.png\" alt=\"\" width=\"1024\" height=\"634\" srcset=\"https:\/\/10ccc.cc\/wp-content\/uploads\/2024\/03\/Snipaste_2024-03-04_11-57-14-1024x634.png 1024w, https:\/\/10ccc.cc\/wp-content\/uploads\/2024\/03\/Snipaste_2024-03-04_11-57-14-300x186.png 300w, https:\/\/10ccc.cc\/wp-content\/uploads\/2024\/03\/Snipaste_2024-03-04_11-57-14-768x475.png 768w, https:\/\/10ccc.cc\/wp-content\/uploads\/2024\/03\/Snipaste_2024-03-04_11-57-14-1536x951.png 1536w, https:\/\/10ccc.cc\/wp-content\/uploads\/2024\/03\/Snipaste_2024-03-04_11-57-14-2048x1267.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/p>\n<blockquote><p>\u53cc\u51fb\u540e\uff0c copilot.workflow \u5982\u679c\u6ca1\u6709\u81ea\u52a8\u6253\u5f00\uff0c\u5219\u5728 \u542f\u52a8\u53f0 \u4e2d\u627e\u5230 \u81ea\u52a8\u64cd\u4f5c \u5e76\u7528\u5176\u6253\u5f00copilot.workflow\uff0c \u6309\u7167\u8981\u6c42\u4fee\u6539<\/p><\/blockquote>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3930\" src=\"https:\/\/10ccc.cc\/wp-content\/uploads\/2024\/03\/Snipaste_2024-03-04_11-58-48.png\" alt=\"\" width=\"165\" height=\"139\" \/><\/p>\n<div class=\"markdown-heading\" dir=\"auto\">\n<h2 class=\"heading-element\" dir=\"auto\" tabindex=\"-1\">Step 6<\/h2>\n<p>&nbsp;<\/p>\n<\/div>\n<p dir=\"auto\">\u56de\u5230\u00a0<strong>mac_companion<\/strong>\u00a0\u6587\u4ef6\u5939\uff0c \u8fd0\u884c\u00a0<strong>python App.py<\/strong><\/p>\n<h2 class=\"heading-element\" dir=\"auto\" tabindex=\"-1\"><strong>mac_companion\u3010\u76f4\u63a5\u8fd0\u884c\u7248\u3011<\/strong><\/h2>\n<p>\u5982\u679c\u4f60\u4f7f mac_companion\u3010\u76f4\u63a5\u8fd0\u884c\u7248\u3011\uff0c\u5728\u672c\u6587\u672b\u5c3e\u4e0b\u8f7d\u5e76\u89e3\u538b\u540e\uff0c\u6309\u7167\u4e0b\u65b9\u89c6\u9891\uff0c\u590d\u5236run.py\u7684\u3010\u7edd\u5bf9\u8def\u5f84\u3011\u540e\uff0c\u5728\u7ec8\u7aef\u8f93\u5165 <strong>python \/Users\/yourname\/Documents\/pythonscripts\/mac_companion_PORTABLE\/run.py<\/strong>\u00a0 \u5373\u53ef\u8fd0\u884c\uff08\u6b64\u5904\u5047\u8bberun.py\u7684\u8def\u5f84\u4e3a\/Users\/yourname\/Documents\/pythonscripts\/mac_companion_PORTABLE\/run.py\uff09\u3002<\/p>\n<p><video controls=\"controls\" width=\"640\" height=\"360\"><span data-mce-type=\"bookmark\" style=\"display: inline-block; width: 0px; overflow: hidden; line-height: 0;\" class=\"mce_SELRES_start\">\ufeff<\/span><source src=\"https:\/\/10ccc.cc\/wp-content\/uploads\/2024\/03\/zhijieyunxing.mp4\" type=\"video\/mp4\" \/><span data-mce-type=\"bookmark\" style=\"display: inline-block; width: 0px; overflow: hidden; line-height: 0;\" class=\"mce_SELRES_end\">\ufeff<\/span><br \/>\nYour browser does not support the video tag.<\/video><\/p>\n<h1><\/h1>\n<h1>To-Do List:<\/h1>\n<ol>\n<li>\u5728chat\u548csetting\u9875\u9762\u4e4b\u5916\uff0c\u8865\u5145history\u9875\u9762\uff0c\u53ef\u67e5\u8be2\u6bcf\u6b21\u5bf9\u8bdd\u5185\u5bb9\u5e76\u5bfc\u51fa\uff1b<\/li>\n<li>\u5728\u4efb\u4e00app\u5185\u6307\u5b9a\u4f4d\u7f6e\u63d2\u5165\u6a21\u578b\u56de\u7b54\u5185\u5bb9\uff1b<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>\u3010\u4ec5\u9002\u7528\u4e8eM-chip\u7684mac\u3011<\/p>\n<p>\u6211\u7528\u5938\u514b\u7f51\u76d8\u5206\u4eab\u4e86\u300c\u3010latest\u3011mac_companion_PORTABLE.zip\u300d\uff0c\u70b9\u51fb\u94fe\u63a5\u5373\u53ef\u4fdd\u5b58\u3002\u6253\u5f00\u300c\u5938\u514bAPP\u300d\uff0c\u65e0\u9700\u4e0b\u8f7d\u5728\u7ebf\u64ad\u653e\u89c6\u9891\uff0c\u7545\u4eab\u539f\u753b5\u500d\u901f\uff0c\u652f\u6301\u7535\u89c6\u6295\u5c4f\u3002<\/p>\n<p>\u94fe\u63a5\uff1ahttps:\/\/pan.quark.cn\/s\/7cb6be5a8d6c<\/p>\n<p>\u63d0\u53d6\u7801\uff1afyEe<\/p>\n<p>mac\u9ed8\u8ba4\u662f2.7\uff0c\u56e0\u6b64\u5bf9run.py\u505a\u4e86\u5bf9\u5e94\u4fee\u6539\uff0c\u53ef\u76f4\u63a5\u8fd0\u884c<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Brief copilot for mac, a pale imitation of windows copilot &nbsp; &#8230;<\/p>\n","protected":false},"author":1,"featured_media":3932,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"emotion":"","emotion_color":"","title_style":"","license":"","footnotes":""},"categories":[84,82],"tags":[81,92,91,93,90],"class_list":["post-3919","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-funny","category-82","tag-ai","tag-chatglm","tag-mac","tag-workflow","tag-90"],"_links":{"self":[{"href":"https:\/\/10ccc.cc\/index.php?rest_route=\/wp\/v2\/posts\/3919","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/10ccc.cc\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/10ccc.cc\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/10ccc.cc\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/10ccc.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3919"}],"version-history":[{"count":6,"href":"https:\/\/10ccc.cc\/index.php?rest_route=\/wp\/v2\/posts\/3919\/revisions"}],"predecessor-version":[{"id":4502,"href":"https:\/\/10ccc.cc\/index.php?rest_route=\/wp\/v2\/posts\/3919\/revisions\/4502"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/10ccc.cc\/index.php?rest_route=\/wp\/v2\/media\/3932"}],"wp:attachment":[{"href":"https:\/\/10ccc.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3919"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/10ccc.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3919"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/10ccc.cc\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3919"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}