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