From 9a043a1f479aaeaf29d44741ca1096df9b5cc2f7 Mon Sep 17 00:00:00 2001 From: wj-Mcat <1435130236@qq.com> Date: Tue, 20 Aug 2024 17:22:37 +0800 Subject: [PATCH 1/2] add ernie-func-8k model --- erniebot/src/erniebot/resources/chat_completion.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/erniebot/src/erniebot/resources/chat_completion.py b/erniebot/src/erniebot/resources/chat_completion.py index b5070ccc..4b861721 100644 --- a/erniebot/src/erniebot/resources/chat_completion.py +++ b/erniebot/src/erniebot/resources/chat_completion.py @@ -97,6 +97,12 @@ class ChatCompletion(EBResource, CreatableWithStreaming): "ernie-char-8k": { "model_id": "ernie-char-8k", }, + "ernie-func-8k": { + "model_id": "ernie-func-8k" + }, + "ernie-function-8k": { + "model_id": "ernie-func-8k" + } }, }, APIType.AISTUDIO: { @@ -129,6 +135,12 @@ class ChatCompletion(EBResource, CreatableWithStreaming): "ernie-char-8k": { "model_id": "ernie-char-8k", }, + "ernie-func-8k": { + "model_id": "ernie-func-8k" + }, + "ernie-function-8k": { + "model_id": "ernie-func-8k" + } }, }, APIType.CUSTOM: { From 4f45fd633fb25b1ece5007d74a9744fbdbd634d4 Mon Sep 17 00:00:00 2001 From: wj-Mcat <1435130236@qq.com> Date: Tue, 20 Aug 2024 17:46:58 +0800 Subject: [PATCH 2/2] fix linting --- .../src/erniebot/resources/chat_completion.py | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/erniebot/src/erniebot/resources/chat_completion.py b/erniebot/src/erniebot/resources/chat_completion.py index 4b861721..e4092ff7 100644 --- a/erniebot/src/erniebot/resources/chat_completion.py +++ b/erniebot/src/erniebot/resources/chat_completion.py @@ -97,12 +97,8 @@ class ChatCompletion(EBResource, CreatableWithStreaming): "ernie-char-8k": { "model_id": "ernie-char-8k", }, - "ernie-func-8k": { - "model_id": "ernie-func-8k" - }, - "ernie-function-8k": { - "model_id": "ernie-func-8k" - } + "ernie-func-8k": {"model_id": "ernie-func-8k"}, + "ernie-function-8k": {"model_id": "ernie-func-8k"}, }, }, APIType.AISTUDIO: { @@ -135,12 +131,8 @@ class ChatCompletion(EBResource, CreatableWithStreaming): "ernie-char-8k": { "model_id": "ernie-char-8k", }, - "ernie-func-8k": { - "model_id": "ernie-func-8k" - }, - "ernie-function-8k": { - "model_id": "ernie-func-8k" - } + "ernie-func-8k": {"model_id": "ernie-func-8k"}, + "ernie-function-8k": {"model_id": "ernie-func-8k"}, }, }, APIType.CUSTOM: {