small fixes & new pypi version

This commit is contained in:
abc 2023-08-14 01:02:01 +02:00
parent f272de67d8
commit d53fc931a3
5 changed files with 115 additions and 5 deletions

1
.gitignore vendored
View File

@ -35,6 +35,7 @@ dist/
*.egg-info
build
test.py
update.py
# Emacs crap
*~

File diff suppressed because one or more lines are too long

View File

@ -6,7 +6,7 @@ logging = False
class ChatCompletion:
@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
if provider and provider.working == False:
return f'{provider.__name__} is not working'

View File

@ -7,13 +7,12 @@ from dataclasses import dataclass
class Model:
name: str
base_provider: str
best_provider: ModuleType | None
best_provider: ModuleType or None
gpt_35_turbo = Model(
name="gpt-3.5-turbo",
base_provider="openai",
best_provider=Provider.Forefront,
best_provider=Provider.GetGpt,
)
gpt_4 = Model(

View File

@ -10,7 +10,7 @@ with codecs.open(os.path.join(here, "README.md"), encoding="utf-8") as fh:
with open('requirements.txt') as f:
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'
# Setting up