mirror of
https://github.com/xtekky/gpt4free.git
synced 2025-12-06 02:30:41 -08:00
small fixes & new pypi version
This commit is contained in:
parent
f272de67d8
commit
d53fc931a3
5 changed files with 115 additions and 5 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -35,6 +35,7 @@ dist/
|
||||||
*.egg-info
|
*.egg-info
|
||||||
build
|
build
|
||||||
test.py
|
test.py
|
||||||
|
update.py
|
||||||
|
|
||||||
# Emacs crap
|
# Emacs crap
|
||||||
*~
|
*~
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -6,7 +6,7 @@ logging = False
|
||||||
|
|
||||||
class ChatCompletion:
|
class ChatCompletion:
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def create(model: models.Model | str, messages: list, provider: Provider.Provider = None, stream: bool = False, auth: str = False, **kwargs):
|
def create(model: models.Model or str, messages: list, provider: Provider.Provider = None, stream: bool = False, auth: str = False, **kwargs):
|
||||||
kwargs['auth'] = auth
|
kwargs['auth'] = auth
|
||||||
if provider and provider.working == False:
|
if provider and provider.working == False:
|
||||||
return f'{provider.__name__} is not working'
|
return f'{provider.__name__} is not working'
|
||||||
|
|
|
||||||
|
|
@ -7,13 +7,12 @@ from dataclasses import dataclass
|
||||||
class Model:
|
class Model:
|
||||||
name: str
|
name: str
|
||||||
base_provider: str
|
base_provider: str
|
||||||
best_provider: ModuleType | None
|
best_provider: ModuleType or None
|
||||||
|
|
||||||
|
|
||||||
gpt_35_turbo = Model(
|
gpt_35_turbo = Model(
|
||||||
name="gpt-3.5-turbo",
|
name="gpt-3.5-turbo",
|
||||||
base_provider="openai",
|
base_provider="openai",
|
||||||
best_provider=Provider.Forefront,
|
best_provider=Provider.GetGpt,
|
||||||
)
|
)
|
||||||
|
|
||||||
gpt_4 = Model(
|
gpt_4 = Model(
|
||||||
|
|
|
||||||
2
setup.py
2
setup.py
|
|
@ -10,7 +10,7 @@ with codecs.open(os.path.join(here, "README.md"), encoding="utf-8") as fh:
|
||||||
with open('requirements.txt') as f:
|
with open('requirements.txt') as f:
|
||||||
required = f.read().splitlines()
|
required = f.read().splitlines()
|
||||||
|
|
||||||
VERSION = '0.0.1.4'
|
VERSION = '0.0.1.9'
|
||||||
DESCRIPTION = 'The official gpt4free repository | various collection of powerful language models'
|
DESCRIPTION = 'The official gpt4free repository | various collection of powerful language models'
|
||||||
|
|
||||||
# Setting up
|
# Setting up
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue