Copilot 非官方插件

请问我怎么引入 copilot.vim 里 Copilot 相关的二进制会比较好?能直接塞进项目仓库吗?会影响在 MELPA 上发布吗?

说起来 FSF 怎么看待 copilot 输出的 GPL 代码的?

上面 FSF funded paper 里面 On the Nature of AI Code Copilots 的节选

In the fields of machine learning and data science, it is typically not considered copyright infringement for a model to return an input as an output.

Strictly speaking in a legalistic sense however, all that is required for a copyright violation is for the unauthorised reproduction of the work in a manner that does not fall into the concepts of ‘fair use’ or ‘fair dealing

GitHub Copilot on the other is not the product of such mere academic interest, but rather was designed from the top down with the inten- tion of being a commercial product. This commercial nature almost certainly infringes the copyright of the various instances of training data, if this factor alone is considered.

结论

Further given that the verbatim return of inputs does not fall under fair use, nor does it obtain the authorisation of the copyright holders to use their code in such a manner and are as such in violation of both copyleft and proprietary software licenses.

2 个赞

感觉强调这么一句

designed from the top down with the intention of being a commercial product

是想把 GPL 代码作为数据集的路也堵上。

这方面的代码审查可不容易。。估计未来几年还有很多口水仗要打。大公司没准要直接禁用 copilot 了。

争议焦点在 Copilot 本身:

  1. 隐私
  2. 版权
  3. 比复制粘贴更方便,写代码更加不过脑,好赖不分成习惯,更加无视 1 和 2
1 个赞

mepla 分发没有问题吧?

同意,事情都具有两面性,对于新手不理解代码本身就会有很大弊端。这也会大大降低编码的门槛,长远看对这个职业和行业会产生更大冲击,优劣还不好评判。

我从来没想过我们为知识产权坚持更高的标准。长江后浪推前浪!

最后就是代码付费…(E Language)

之前Tabnine也是闭源,但是没有关于GPL代码等的争议,Tabnine没有用GPL的代码训练?

瞎猜一下模型用 GPL 训练估计是有的。输出结果是基于当前项目分析得到的,不像 Copilot 一样直接返回 GPL 代码。

1 个赞

你们有和 company 一起用的吗?这个的结果如果和 company 的结果一起出来就这样了

我重新绑定了一下company-active-map的return,优先选择copilot。 不过感觉也不是很好的解决方案 :joy:

(define-key  company-active-map [return] (lambda ()
                                              (interactive)
                                              (or (copilot-accept-completion)
                                                  (company-complete-selection))))

确实有这个问题,copilot 产生多行补全的同时触发 company 补全会有这个现象。 但感觉没有好的解决方法,互相覆盖肯定不大好,copilot 的 inline preview 也不好挪位置。我能想到的一个方案就是让 company 的补全信息在光标上方显示,company 肯定是支持在光标上方显示 tooltip 的(但是可能不大好配置)。

用基于 child frame 的 company-box 作为补全前端可以解决 overlay 冲突的问题

首先vim版copilot只支持neovim不支持vim.其次tpope写的那个插件根本不能很好的和neovim的补全插件很好的兼容(不管是nvim-cmp也好还是coq还是其他的)。coc的用户用coc-copilot,cmp的用户用cmp-copilot-lua,tpope的那个插件目前来看就是github花大钱请了个外包,但是社区影响力一般。

所以倒也不必羡慕github重视vim啥的,真正要用的时候,轮子都是自己造的

偏个题,copilot 能补全汇编语言吗?先不说比较小众的那些,x86 或者 arm 能补全吗?

我猜啥都能补全,只是效果可能不大好

之前还有人用 Copilot 写中文诗来着。 我之前用 Copilot 补全 OCaml,结果它老是补全 Haskell 代码(虽然语法不对,但语义还挺对)。

奇怪,为啥我的copilot突然没发补全了,copilot-diagnostic显示启动成功了,但是不显示补全了

奇怪。。。你检查一下 *copilot-log* buffer 看看?


[Warning] Copilot agent output buffer reset.
[Warning] Before reset:"ApplicationInsights:CorrelationIdManager [
  Error: read ECONNRESET
      at TLSWrap.onStreamRead (node:internal/stream_base_commons:217:20) {
    errno: -54,
    code: 'ECONNRESET',
    syscall: 'read'
  }
]
"

[INFO] Discard message without id: ((jsonrpc . "2.0") (method . "statusNotification") (params (status . "InProgress") (message . "")))
[INFO] Discard message without id: ((jsonrpc . "2.0") (method . "statusNotification") (params (status . "InProgress") (message . "")))
[Agent] [INFO] [default] [2022-05-13T13:59:29.487Z] [fetchCompletions] engine https://copilot-proxy.githubusercontent.com/v1/engines/copilot-codex
[INFO] Discard message without id: ((jsonrpc . "2.0") (method . "statusNotification") (params (status . "Normal") (message . "")))
[Agent] [INFO] [ghostText] [2022-05-13T13:59:30.174Z] Breaking, no choices
[INFO] Completion: ((error) (completions . []))
[INFO] Discard message without id: ((jsonrpc . "2.0") (method . "statusNotification") (params (status . "InProgress") (message . "")))
[Agent] [INFO] [default] [2022-05-13T13:59:30.252Z] [fetchCompletions] engine https://copilot-proxy.githubusercontent.com/v1/engines/copilot-codex
[INFO] Discard message without id: ((jsonrpc . "2.0") (method . "statusNotification") (params (status . "Normal") (message . "")))
[Agent] [INFO] [ghostText] [2022-05-13T13:59:30.387Z] Breaking, no choices
[INFO] Completion: ((error) (completions . []))
[INFO] Discard message without id: ((jsonrpc . "2.0") (method . "statusNotification") (params (status . "InProgress") (message . "")))
[Agent] [INFO] [default] [2022-05-13T13:59:30.465Z] [fetchCompletions] engine https://copilot-proxy.githubusercontent.com/v1/engines/copilot-codex
[INFO] Discard message without id: ((jsonrpc . "2.0") (method . "statusNotification") (params (status . "Normal") (message . "")))
[Agent] [INFO] [ghostText] [2022-05-13T13:59:30.823Z] Breaking, no choices
[INFO] Completion: ((error) (completions . []))
[INFO] Discard message without id: ((jsonrpc . "2.0") (method . "statusNotification") (params (status . "InProgress") (message . "")))
[Agent] [INFO] [default] [2022-05-13T13:59:30.899Z] [fetchCompletions] engine https://copilot-proxy.githubusercontent.com/v1/engines/copilot-codex
[INFO] Discard message without id: ((jsonrpc . "2.0") (method . "statusNotification") (params (status . "Normal") (message . "")))
[Agent] [INFO] [ghostText] [2022-05-13T13:59:31.061Z] Breaking, no choices
[INFO] Completion: ((error) (completions . []))
[INFO] Discard message without id: ((jsonrpc . "2.0") (method . "statusNotification") (params (status . "InProgress") (message . "")))
[Agent] [INFO] [default] [2022-05-13T13:59:31.139Z] [fetchCompletions] engine https://copilot-proxy.githubusercontent.com/v1/engines/copilot-codex
[INFO] Discard message without id: ((jsonrpc . "2.0") (method . "statusNotification") (params (status . "Normal") (message . "")))
[Agent] [INFO] [ghostText] [2022-05-13T13:59:31.222Z] Breaking, no choices
[INFO] Completion: ((error) (completions . []))
[INFO] Discard message without id: ((jsonrpc . "2.0") (method . "statusNotification") (params (status . "InProgress") (message . "")))
[Agent] [INFO] [default] [2022-05-13T13:59:31.301Z] [fetchCompletions] engine https://copilot-proxy.githubusercontent.com/v1/engines/copilot-codex
[INFO] Discard message without id: ((jsonrpc . "2.0") (method . "statusNotification") (params (status . "Normal") (message . "")))
[Agent] [INFO] [ghostText] [2022-05-13T13:59:31.336Z] Breaking, no choices
[INFO] Completion: ((error) (completions . []))
[INFO] Discard message without id: ((jsonrpc . "2.0") (method . "statusNotification") (params (status . "InProgress") (message . "")))
[INFO] Discard message without id: ((jsonrpc . "2.0") (method . "statusNotification") (params (status . "InProgress") (message . "")))
[Agent] [INFO] [default] [2022-05-13T13:59:31.431Z] [fetchCompletions] engine https://copilot-proxy.githubusercontent.com/v1/engines/copilot-codex
[Agent] [INFO] [default] [2022-05-13T13:59:31.657Z] request.response: [https://copilot-proxy.githubusercontent.com/v1/engines/copilot-codex/completions] took 226 ms
[INFO] Discard message without id: ((jsonrpc . "2.0") (method . "statusNotification") (params (status . "Warning") (message . "")))
[Agent] [ERROR] [fetch] [2022-05-13T13:59:31.658Z] Unhandled status from server:,466,Please upgrade your Copilot extension to continue using this service.

[Agent] [INFO] [ghostText] [2022-05-13T13:59:31.658Z] Breaking, no choices
[INFO] Completion: ((error) (completions . []))