mirror of
https://github.com/Balshgit/gpt_chat_bot.git
synced 2026-02-03 11:40:39 +03:00
rename chatgpt microservice (#30)
* rename chagpt microservice * add deprecated models
This commit is contained in:
@@ -59,4 +59,14 @@ class ChatGptModelsEnum(StrEnum):
|
||||
|
||||
@classmethod
|
||||
def values(cls) -> set[str]:
|
||||
return set(map(str, set(ChatGptModelsEnum)))
|
||||
return set(map(str, filter(lambda m: m not in ChatGptModelsEnum._deprecated(), cls)))
|
||||
|
||||
@staticmethod
|
||||
def _deprecated() -> set[str]:
|
||||
return {
|
||||
"gpt-3.5-turbo-Aichat",
|
||||
"gpt-3.5-turbo-stream-ChatForAi",
|
||||
"gpt-3.5-turbo-stream-AItianhuSpace",
|
||||
"gpt-3.5-turbo-AItianhu",
|
||||
"gpt-3.5-turbo-acytoo",
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ def upgrade() -> None:
|
||||
if models:
|
||||
return None
|
||||
models = []
|
||||
for model in ChatGptModelsEnum:
|
||||
for model in ChatGptModelsEnum.values():
|
||||
priority = 0 if model != "gpt-3.5-turbo-stream-FreeGpt" else 1
|
||||
fields = {"model": model, "priority": priority}
|
||||
models.append(ChatGpt(**fields))
|
||||
|
||||
Reference in New Issue
Block a user