summaryrefslogtreecommitdiffstats
path: root/g4f/Provider/ChatifyAI.py
diff options
context:
space:
mode:
authorkqlio67 <kqlio67@users.noreply.github.com>2024-10-12 20:34:04 +0200
committerkqlio67 <kqlio67@users.noreply.github.com>2024-10-12 20:34:04 +0200
commit3119b8e37e73c958157ce8277bd7801202ab6962 (patch)
tree48c44c500d637a3843ebb49c976346f529b3225b /g4f/Provider/ChatifyAI.py
parentfeat(/Provider/AmigoChat.py): add retry mechanism for API requests (diff)
downloadgpt4free-3119b8e37e73c958157ce8277bd7801202ab6962.tar
gpt4free-3119b8e37e73c958157ce8277bd7801202ab6962.tar.gz
gpt4free-3119b8e37e73c958157ce8277bd7801202ab6962.tar.bz2
gpt4free-3119b8e37e73c958157ce8277bd7801202ab6962.tar.lz
gpt4free-3119b8e37e73c958157ce8277bd7801202ab6962.tar.xz
gpt4free-3119b8e37e73c958157ce8277bd7801202ab6962.tar.zst
gpt4free-3119b8e37e73c958157ce8277bd7801202ab6962.zip
Diffstat (limited to 'g4f/Provider/ChatifyAI.py')
-rw-r--r--g4f/Provider/ChatifyAI.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/g4f/Provider/ChatifyAI.py b/g4f/Provider/ChatifyAI.py
index c5b4a104..a999afac 100644
--- a/g4f/Provider/ChatifyAI.py
+++ b/g4f/Provider/ChatifyAI.py
@@ -17,10 +17,18 @@ class ChatifyAI(AsyncGeneratorProvider, ProviderModelMixin):
default_model = 'llama-3.1'
models = [default_model]
+ model_aliases = {
+ "llama-3.1-8b": "llama-3.1",
+ }
@classmethod
def get_model(cls, model: str) -> str:
- return cls.default_model
+ if model in cls.models:
+ return model
+ elif model in cls.model_aliases:
+ return cls.model_aliases.get(model, cls.default_model)
+ else:
+ return cls.default_model
@classmethod
async def create_async_generator(