mirror of
https://gitea.com/PublicAffairs/openai-github-copilot.git
synced 2025-07-23 12:23:08 +02:00
Update docs
This commit is contained in:
12
README.md
12
README.md
@@ -13,7 +13,8 @@
|
||||
Even if you don't meet the eligibility criteria, the paid subscription
|
||||
([_Individual_](https://docs.github.com/en/copilot/copilot-individual/about-github-copilot-individual))
|
||||
is more affordable than [OpenAI's offering](https://chat.openai.com/#pricing).
|
||||
It costs only $10 and still provides access to [GPT-4](https://openai.com/gpt-4).
|
||||
It costs only $10 and still provides access to the latest generative models from
|
||||
[OpenAI](https://openai.com/news/), [Anthropic](https://www.anthropic.com/) and [Google](https://ai.google/get-started/our-models/).
|
||||
|
||||
> [!NOTE]
|
||||
> If the above options are not suitable for you - consider trying completely
|
||||
@@ -122,11 +123,11 @@ Alternatively, it could be in some config file (check the relevant documentation
|
||||
|
||||
For some command-line tools, you may need to set an environment variable, _e.g._:
|
||||
```sh
|
||||
set OPENAI_BASE_URL=https://copilot.YOURSUBDOMAIN.workers.dev/v1
|
||||
OPENAI_BASE_URL="https://copilot.YOURSUBDOMAIN.workers.dev/v1"
|
||||
```
|
||||
_..or_:
|
||||
```sh
|
||||
set OPENAI_API_BASE=https://copilot.YOURSUBDOMAIN.workers.dev/v1
|
||||
OPENAI_API_BASE="https://copilot.YOURSUBDOMAIN.workers.dev/v1"
|
||||
```
|
||||
|
||||
### API key
|
||||
@@ -142,15 +143,16 @@ Alternatively, it might be located in some config file
|
||||
|
||||
For some command-line tools, you may need to set an environment variable, _e.g._:
|
||||
```sh
|
||||
set OPENAI_API_KEY=ghu_...
|
||||
OPENAI_API_KEY=ghu_...
|
||||
```
|
||||
|
||||
### Models
|
||||
|
||||
The list of available models can be accessed through the standard `/v1/models` endpoint
|
||||
and may vary depending on the provided API key.
|
||||
Some models may need to be activated in the [settings](https://github.com/settings/copilot).
|
||||
|
||||
Examples: `gpt-3.5-turbo`, `gpt-4`, `gpt-4-0125-preview`, `gpt-4-o-preview`.
|
||||
Examples: `gpt-4.1`, `o4-mini`, `claude-3.7-sonnet-thought`, `gemini-2.5-pro`.
|
||||
|
||||
|
||||
## Tech notes
|
||||
|
@@ -58,8 +58,8 @@ const handleOPTIONS = async () => {
|
||||
});
|
||||
};
|
||||
|
||||
const chatVersion = "0.17.1";
|
||||
const vscodeVersion = "1.91.1";
|
||||
const chatVersion = "0.26.5";
|
||||
const vscodeVersion = "1.99.3";
|
||||
const apiVersion = "2023-07-07";
|
||||
const getToken = async (authKey) => {
|
||||
if (authKey.startsWith("sk-")) { // dumb attempt to hide real auth key from malicious web services
|
||||
@@ -165,7 +165,6 @@ const clean = (str) => {
|
||||
console.error(e);
|
||||
return str;
|
||||
}
|
||||
//json.model = "gpt-4"; // stub
|
||||
json.object = "chat.completion";
|
||||
delete json.prompt_filter_results;
|
||||
for (const item of json.choices) {
|
||||
@@ -187,7 +186,6 @@ const cleanLine = (str) => {
|
||||
return str;
|
||||
}
|
||||
if (json.choices.length === 0) { return; } // json.prompt_filter_results
|
||||
//json.model = "gpt-4"; // stub
|
||||
json.object = "chat.completion.chunk";
|
||||
for (const item of json.choices) {
|
||||
delete item.content_filter_offsets;
|
||||
|
Reference in New Issue
Block a user