mirror of
https://github.com/xtekky/gpt4free.git
synced 2024-11-27 05:25:33 +03:00
~ | g4f v-0.1.4.0 (new version checking system
This commit is contained in:
parent
32d5536450
commit
26e1fc4a7d
@ -4,7 +4,7 @@ By using this repository or any code related to it, you agree to the [legal noti
|
||||
|
||||
### New
|
||||
- official website: *https://g4f.ai*
|
||||
- latest pypi version: ([0.1.3.9](https://pypi.org/project/g4f/0.1.3.9)):
|
||||
- latest pypi version: ([0.1.4.0](https://pypi.org/project/g4f/0.1.4.0)):
|
||||
|
||||
```sh
|
||||
pip install -U g4f
|
||||
|
@ -2,9 +2,23 @@ from __future__ import annotations
|
||||
from g4f import models
|
||||
from .Provider import BaseProvider, AsyncProvider
|
||||
from .typing import Any, CreateResult, Union
|
||||
from requests import get
|
||||
|
||||
logging = False
|
||||
version = '0.1.3.9'
|
||||
version = '0.1.4.0'
|
||||
|
||||
def check_pypi_version():
|
||||
try:
|
||||
response = get(f"https://pypi.org/pypi/g4f/json").json()
|
||||
latest_version = response["info"]["version"]
|
||||
|
||||
if version != latest_version:
|
||||
print(f'New pypi version: {latest_version} (current: {version}) | pip install -U g4f')
|
||||
|
||||
except Exception as e:
|
||||
print(f'Failed to check g4f pypi version: {e}')
|
||||
|
||||
check_pypi_version()
|
||||
|
||||
def get_model_and_provider(model: Union[models.Model, str], provider: type[BaseProvider], stream: bool):
|
||||
if isinstance(model, str):
|
||||
|
2
setup.py
2
setup.py
@ -14,7 +14,7 @@ with open("requirements.txt") as f:
|
||||
with open("interference/requirements.txt") as f:
|
||||
api_required = f.read().splitlines()
|
||||
|
||||
VERSION = '0.1.3.9'
|
||||
VERSION = '0.1.4.0'
|
||||
DESCRIPTION = (
|
||||
"The official gpt4free repository | various collection of powerful language models"
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user