mirror of
https://gitea.com/PublicAffairs/openai-github-copilot.git
synced 2025-07-23 12:23:08 +02:00
Completions response now contains model and system_fingerprint props
This commit is contained in:
@@ -152,7 +152,6 @@ Copilot provides following endpoints:
|
||||
- `/v1/chat/completions`
|
||||
- `tools` and other related properties are ignored.
|
||||
- Output is post-processed in order to remove differences from OpenAI's.
|
||||
The `model` property always appears as "gpt-4".
|
||||
- `/v1/embeddings`
|
||||
- [`input`](https://platform.openai.com/docs/api-reference/embeddings/create#embeddings-create-input):
|
||||
supports array of strings only
|
||||
|
@@ -189,8 +189,7 @@ const clean = (str) => {
|
||||
console.error(e);
|
||||
return str;
|
||||
}
|
||||
json.model = "gpt-4"; // stub
|
||||
//json.system_fingerprint = null;
|
||||
//json.model = "gpt-4"; // stub
|
||||
json.object = "chat.completion";
|
||||
delete json.prompt_filter_results;
|
||||
for (const item of json.choices) {
|
||||
@@ -212,8 +211,7 @@ const cleanLine = (str) => {
|
||||
return str;
|
||||
}
|
||||
if (json.choices.length === 0) { return; } // json.prompt_filter_results
|
||||
json.model = "gpt-4"; // stub
|
||||
//json.system_fingerprint = null;
|
||||
//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