From d3f401c54d78b371eeea214a81772332563b1e6f Mon Sep 17 00:00:00 2001 From: RockChinQ <1010553892@qq.com> Date: Sun, 17 Dec 2023 22:36:30 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E9=80=9A=E8=BF=87=20one-api=20?= =?UTF-8?q?=E6=94=AF=E6=8C=81google=20gemini?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/openai/modelmgr.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/openai/modelmgr.py b/pkg/openai/modelmgr.py index 6e7947bb..699e79dc 100644 --- a/pkg/openai/modelmgr.py +++ b/pkg/openai/modelmgr.py @@ -49,6 +49,7 @@ CHAT_COMPLETION_MODELS = { "qwen-plus-v1", "ERNIE-Bot", "ERNIE-Bot-turbo", + "gemini-pro", } EDIT_MODELS = { @@ -90,6 +91,7 @@ def count_chat_completion_tokens(messages: list, model: str) -> int: "qwen-plus-v1", "ERNIE-Bot", "ERNIE-Bot-turbo", + "gemini-pro", }: tokens_per_message = 3 tokens_per_name = 1