summaryrefslogtreecommitdiffstats
path: root/g4f/models.py
diff options
context:
space:
mode:
authorHeiner Lohaus <heiner@lohaus.eu>2023-09-21 20:10:59 +0200
committerHeiner Lohaus <heiner@lohaus.eu>2023-09-21 20:10:59 +0200
commite9f96ced9c534f313fd2d3b82b2464cd8424281a (patch)
tree5cf9db5b89d61f5e6c582d6e1129d7269669ed97 /g4f/models.py
parentFix create_event_loop function (diff)
downloadgpt4free-e9f96ced9c534f313fd2d3b82b2464cd8424281a.tar
gpt4free-e9f96ced9c534f313fd2d3b82b2464cd8424281a.tar.gz
gpt4free-e9f96ced9c534f313fd2d3b82b2464cd8424281a.tar.bz2
gpt4free-e9f96ced9c534f313fd2d3b82b2464cd8424281a.tar.lz
gpt4free-e9f96ced9c534f313fd2d3b82b2464cd8424281a.tar.xz
gpt4free-e9f96ced9c534f313fd2d3b82b2464cd8424281a.tar.zst
gpt4free-e9f96ced9c534f313fd2d3b82b2464cd8424281a.zip
Diffstat (limited to 'g4f/models.py')
-rw-r--r--g4f/models.py29
1 files changed, 22 insertions, 7 deletions
diff --git a/g4f/models.py b/g4f/models.py
index 1066e1aa..f1b0ec31 100644
--- a/g4f/models.py
+++ b/g4f/models.py
@@ -1,17 +1,23 @@
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(unsafe_hash=True)
@@ -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(