summaryrefslogtreecommitdiffstats
path: root/g4f/models.py
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--g4f/models.py27
1 files changed, 19 insertions, 8 deletions
diff --git a/g4f/models.py b/g4f/models.py
index 9a4539c5..264cd40e 100644
--- a/g4f/models.py
+++ b/g4f/models.py
@@ -1,7 +1,6 @@
from __future__ import annotations
from dataclasses import dataclass
-from .typing import Union
-from .Provider import BaseProvider, RetryProvider
+from .Provider import RetryProvider, ProviderType
from .Provider import (
Chatgpt4Online,
ChatgptDemoAi,
@@ -36,7 +35,7 @@ from .Provider import (
class Model:
name: str
base_provider: str
- best_provider: Union[type[BaseProvider], RetryProvider] = None
+ best_provider: ProviderType = None
@staticmethod
def __all__() -> list[str]:
@@ -101,28 +100,39 @@ gpt_4_turbo = Model(
llama2_7b = Model(
name = "meta-llama/Llama-2-7b-chat-hf",
base_provider = 'huggingface',
- best_provider = RetryProvider([Llama2, DeepInfra]))
+ best_provider = RetryProvider([Llama2, DeepInfra])
+)
llama2_13b = Model(
name = "meta-llama/Llama-2-13b-chat-hf",
base_provider = 'huggingface',
- best_provider = RetryProvider([Llama2, DeepInfra]))
+ best_provider = RetryProvider([Llama2, DeepInfra])
+)
llama2_70b = Model(
name = "meta-llama/Llama-2-70b-chat-hf",
base_provider = "huggingface",
- best_provider = RetryProvider([Llama2, DeepInfra, HuggingChat]))
+ best_provider = RetryProvider([Llama2, DeepInfra, HuggingChat])
+)
# Mistal
mixtral_8x7b = Model(
name = "mistralai/Mixtral-8x7B-Instruct-v0.1",
base_provider = "huggingface",
- best_provider = HuggingChat)
+ best_provider = RetryProvider([DeepInfra, HuggingChat])
+)
mistral_7b = Model(
name = "mistralai/Mistral-7B-Instruct-v0.1",
base_provider = "huggingface",
- best_provider = HuggingChat)
+ best_provider = RetryProvider([DeepInfra, HuggingChat])
+)
+
+openchat_35 = Model(
+ name = "openchat/openchat_3.5",
+ base_provider = "huggingface",
+ best_provider = RetryProvider([DeepInfra, HuggingChat])
+)
# Bard
palm = Model(
@@ -313,6 +323,7 @@ class ModelUtils:
# Mistral
'mixtral-8x7b': mixtral_8x7b,
'mistral-7b': mistral_7b,
+ 'openchat_3.5': openchat_35,
# Bard
'palm2' : palm,