diff options
author | Tekky <98614666+xtekky@users.noreply.github.com> | 2023-09-22 21:40:59 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-22 21:40:59 +0200 |
commit | ba287e89b55118965ff0e151e54636b1f50d3b38 (patch) | |
tree | dc69218fecae4971c90ae391ff6919c032b93540 /g4f/models.py | |
parent | ~ | gpt-3.5-turbo-0613 (diff) | |
parent | Add RetryProvider (diff) | |
download | gpt4free-ba287e89b55118965ff0e151e54636b1f50d3b38.tar gpt4free-ba287e89b55118965ff0e151e54636b1f50d3b38.tar.gz gpt4free-ba287e89b55118965ff0e151e54636b1f50d3b38.tar.bz2 gpt4free-ba287e89b55118965ff0e151e54636b1f50d3b38.tar.lz gpt4free-ba287e89b55118965ff0e151e54636b1f50d3b38.tar.xz gpt4free-ba287e89b55118965ff0e151e54636b1f50d3b38.tar.zst gpt4free-ba287e89b55118965ff0e151e54636b1f50d3b38.zip |
Diffstat (limited to 'g4f/models.py')
-rw-r--r-- | g4f/models.py | 31 |
1 files changed, 23 insertions, 8 deletions
diff --git a/g4f/models.py b/g4f/models.py index 22311910..9889f0d5 100644 --- a/g4f/models.py +++ b/g4f/models.py @@ -1,20 +1,26 @@ from __future__ import annotations from dataclasses import dataclass from .typing import Union -from .Provider import BaseProvider +from .Provider import BaseProvider, RetryProvider from .Provider import ( ChatgptLogin, - CodeLinkAva, ChatgptAi, ChatBase, Vercel, DeepAi, Aivvm, Bard, - H2o + H2o, + GptGo, + Bing, + PerplexityAi, + Wewordle, + Yqcloud, + AItianhu, + Aichat, ) -@dataclass +@dataclass(unsafe_hash=True) class Model: name: str base_provider: str @@ -24,15 +30,24 @@ class Model: # Works for Liaobots, H2o, OpenaiChat, Yqcloud, You default = Model( name = "", - base_provider = "huggingface") + base_provider = "", + best_provider = RetryProvider([ + Bing, # Not fully GPT 3 or 4 + PerplexityAi, # Adds references to sources + Wewordle, # Responds with markdown + Yqcloud, # Answers short questions in chinese + ChatBase, # Don't want to answer creatively + DeepAi, ChatgptLogin, ChatgptAi, Aivvm, GptGo, AItianhu, Aichat, + ]) +) # GPT-3.5 / GPT-4 gpt_35_turbo = Model( name = 'gpt-3.5-turbo', base_provider = 'openai', - best_provider = [ - DeepAi, CodeLinkAva, ChatgptLogin, ChatgptAi, ChatBase, Aivvm - ] + best_provider = RetryProvider([ + DeepAi, ChatgptLogin, ChatgptAi, Aivvm, GptGo, AItianhu, Aichat, + ]) ) gpt_4 = Model( |