返回提交历史
Modified
README.md
+1
-1
Modified
g4f/__init__.py
+15
-1
Modified
setup.py
+1
-1
XFEstudio/gpt4free
~ | g4f v-0.1.4.0 (new version checking system
26e1fc4a
代码差异
3 个文件
+17
-3
@@ -4,7 +4,7 @@ By using this repository or any code related to it, you agree to the [legal noti
4
4
5
5
### New
6
6
- official website: *https://g4f.ai*
7
- latest pypi version: ([0.1.3.9](https://pypi.org/project/g4f/0.1.3.9)):
7
- latest pypi version: ([0.1.4.0](https://pypi.org/project/g4f/0.1.4.0)):
8
8
9
9
```sh
10
10
pip install -U g4f
@@ -2,9 +2,23 @@ from __future__ import annotations
2
2
from g4f import models
3
3
from .Provider import BaseProvider, AsyncProvider
4
4
from .typing import Any, CreateResult, Union
5
from requests import get
5
6
6
7
logging = False
7
version = '0.1.3.9'
8
version = '0.1.4.0'
9
10
def check_pypi_version():
11
try:
12
response = get(f"https://pypi.org/pypi/g4f/json").json()
13
latest_version = response["info"]["version"]
14
15
if version != latest_version:
16
print(f'New pypi version: {latest_version} (current: {version}) | pip install -U g4f')
17
18
except Exception as e:
19
print(f'Failed to check g4f pypi version: {e}')
20
21
check_pypi_version()
8
22
9
23
def get_model_and_provider(model: Union[models.Model, str], provider: type[BaseProvider], stream: bool):
10
24
if isinstance(model, str):
@@ -14,7 +14,7 @@ with open("requirements.txt") as f:
14
14
with open("interference/requirements.txt") as f:
15
15
api_required = f.read().splitlines()
16
16
17
VERSION = '0.1.3.9'
17
VERSION = '0.1.4.0'
18
18
DESCRIPTION = (
19
19
"The official gpt4free repository | various collection of powerful language models"
20
20
)