mirror of https://github.com/xtekky/gpt4free.git
This commit is contained in:
parent
6ba092469a
commit
e465899801
|
@ -3,35 +3,33 @@ from dataclasses import dataclass
|
|||
from .typing import Union
|
||||
from .Provider import BaseProvider, RetryProvider
|
||||
from .Provider import (
|
||||
AItianhuSpace,
|
||||
ChatgptLogin,
|
||||
PerplexityAi,
|
||||
ChatgptDuo,
|
||||
ChatgptAi,
|
||||
ChatBase,
|
||||
Vercel,
|
||||
DeepAi,
|
||||
Aivvm,
|
||||
Bard,
|
||||
H2o,
|
||||
GptGo,
|
||||
Bing,
|
||||
PerplexityAi,
|
||||
AItianhu,
|
||||
Wewordle,
|
||||
Yqcloud,
|
||||
AItianhu,
|
||||
AItianhuSpace,
|
||||
Aichat,
|
||||
Myshell,
|
||||
Vercel,
|
||||
DeepAi,
|
||||
Aichat,
|
||||
Aivvm,
|
||||
GptGo,
|
||||
Bard,
|
||||
Aibn,
|
||||
ChatgptDuo,
|
||||
Bing,
|
||||
H2o,
|
||||
)
|
||||
|
||||
|
||||
@dataclass(unsafe_hash=True)
|
||||
class Model:
|
||||
name: str
|
||||
base_provider: str
|
||||
best_provider: Union[type[BaseProvider], RetryProvider] = None
|
||||
|
||||
|
||||
# Config for HuggingChat, OpenAssistant
|
||||
# Works for Liaobots, H2o, OpenaiChat, Yqcloud, You
|
||||
default = Model(
|
||||
|
@ -61,7 +59,7 @@ gpt_4 = Model(
|
|||
name = 'gpt-4',
|
||||
base_provider = 'openai',
|
||||
best_provider = RetryProvider([
|
||||
Myshell, AItianhuSpace, Aivvm
|
||||
Myshell, AItianhuSpace,
|
||||
])
|
||||
)
|
||||
|
||||
|
@ -151,7 +149,7 @@ code_davinci_002 = Model(
|
|||
gpt_35_turbo_16k = Model(
|
||||
name = 'gpt-3.5-turbo-16k',
|
||||
base_provider = 'openai',
|
||||
best_provider=Aivvm)
|
||||
best_provider = Vercel)
|
||||
|
||||
gpt_35_turbo_16k_0613 = Model(
|
||||
name = 'gpt-3.5-turbo-16k-0613',
|
||||
|
@ -218,10 +216,12 @@ llama7b_v2_chat = Model(
|
|||
|
||||
class ModelUtils:
|
||||
convert: dict[str, Model] = {
|
||||
# gpt-3.5 / gpt-4
|
||||
# gpt-3.5
|
||||
'gpt-3.5-turbo' : gpt_35_turbo,
|
||||
'gpt-3.5-turbo-16k' : gpt_35_turbo_16k,
|
||||
'gpt-3.5-turbo-16k-0613' : gpt_35_turbo_16k_0613,
|
||||
|
||||
# gpt-4
|
||||
'gpt-4' : gpt_4,
|
||||
'gpt-4-0613' : gpt_4_0613,
|
||||
'gpt-4-32k' : gpt_4_32k,
|
||||
|
|
Loading…
Reference in New Issue