rename chatgpt microservice (#30)

* rename chagpt microservice

* add deprecated models
This commit is contained in:
Dmitry Afanasyev 2023-10-09 00:22:26 +03:00 committed by GitHub
parent 6a97c29023
commit f6f3865fb6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
34 changed files with 14 additions and 4 deletions

View File

@ -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",
}

View File

@ -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))

View File

Before

Width:  |  Height:  |  Size: 239 KiB

After

Width:  |  Height:  |  Size: 239 KiB

View File

Before

Width:  |  Height:  |  Size: 8.7 KiB

After

Width:  |  Height:  |  Size: 8.7 KiB

View File

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

View File

Before

Width:  |  Height:  |  Size: 7.8 KiB

After

Width:  |  Height:  |  Size: 7.8 KiB

View File

Before

Width:  |  Height:  |  Size: 499 B

After

Width:  |  Height:  |  Size: 499 B

View File

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View File

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

View File

@ -105,7 +105,7 @@ ban-relative-imports = true
nested-classes-whitelist = ["Config", "Meta"]
pytest-parametrize-names-type = "csv"
exclude = [
"chat_gpt_microservice/*",
"chatgpt_microservice/*",
".cache/*",
".pytest_cache/*",
"*/__pycache__/*",
@ -163,7 +163,7 @@ warn_unused_configs = true
warn_unreachable = true
warn_no_return = true
exclude = [
"chat_gpt_microservice",
"chatgpt_microservice/*",
"bot_microservice/infra/database/migrations/versions/*"
]
plugins = [