Github Copilot Chat 变 API 会被封号吗?

突然头脑发热订阅了 Github Copilot,突然发现可以自己创建一个 Copilot Agent 来创建一个 Copilot Extension。在看到 Github 官方给出的例子 blackbeard-extension 的时候发现它例子里面就有调用 Github Chat Completions API 的代码。

messages.unshift({
    role: "system",
    content: `Start every response with the user's name, which is @${user.data.login}`,
  });

  // Use Copilot's LLM to generate a response to the user's messages, with
  // our extra system messages attached.
  const copilotLLMResponse = await fetch(
    "https://api.githubcopilot.com/chat/completions",
    {
      method: "POST",
      headers: {
        authorization: `Bearer ${tokenForUser}`,
        "content-type": "application/json",
      },
      body: JSON.stringify({
        messages,
        stream: true,
      }),
    }
  );

  // Stream the response straight back to the user.
  Readable.from(copilotLLMResponse.body).pipe(res);

这段代码来自官方例子。

我之前在哪里好像看到过说将 Copilot Chat 转 API 来使用就会被封号。但在代码里明显是调用了官方的 Chat API 的。虽说这个是 Agent 行为,但本质上不就是直接调用 Chat API 吗?

所以来论坛问一下。

17 个赞

@bbb 好像真是官方的,3b 来看看 :tieba_087:

2 个赞

不懂不懂 :tieba_087:
@snaily

3 个赞

我只能说如果都不缺api用的话,没必要冒这个险 :tieba_087:

3 个赞

那我还是接着用az吧 :tieba_087:

2 个赞

是这样的。
被封过一次,找客服对线是真的煎熬 :tieba_087:

2 个赞

请问这 Agent 还能写下去吗?

1 个赞

不建议搞,这个项目看起来挺凉的 :tieba_087:

这个 Copilot Extensions 都没人用的吗?

1 个赞

这好像只是个 example,只是官方用的,好像不是给个人用的。


我就是跟着这个文档一步一步来的,这么坑我的吗?服了

1 个赞

可能我搞错了吧,目前没搞太清楚 :tieba_087:

你没搞错,它后面文档又写了一段。

1 个赞

转API包封的。

1 个赞

copilot的时代已经过去了The era of copilot has already passed.

封号预警,嘿嘿( ̄∀ ̄)

1 个赞