返回提交历史
Modified
README.md
+1
-1
Modified
g4f/__init__.py
+1
-1
Modified
g4f/gui/client/js/chat.v2.js
+12
-6
Modified
g4f/gui/server/backend.py
+0
-1
Modified
g4f/models.py
+2
-2
Modified
setup.py
+1
-1
XFEstudio/gpt4free
~ | g4f `v-0.1.6.8`
some quick fixes
5b52d5a2
代码差异
6 个文件
+17
-12
@@ -2,7 +2,7 @@
2
2
3
3
By using this repository or any code related to it, you agree to the [legal notice](./LEGAL_NOTICE.md). The author is not responsible for any copies, forks, reuploads made by other users, or anything else related to gpt4free. This is the author's only account and repository. To prevent impersonation or irresponsible actions, please comply with the GNU GPL license this Repository uses.
4
4
5
- latest pypi version: [`0.1.6.7`](https://pypi.org/project/g4f/0.1.6.7)
5
- latest pypi version: [`0.1.6.8`](https://pypi.org/project/g4f/0.1.6.8)
6
6
```sh
7
7
pip install -U g4f
8
8
```
@@ -5,7 +5,7 @@ from .Provider import BaseProvider, RetryProvider
5
5
from .typing import Messages, CreateResult, Union, List
6
6
from .debug import logging
7
7
8
version = '0.1.6.7'
8
version = '0.1.6.8'
9
9
version_check = True
10
10
11
11
def check_pypi_version() -> None:
@@ -597,15 +597,21 @@ observer.observe(message_input, { attributes: true });
597
597
598
598
599
599
const load_models = async () => {
600
response = await fetch('/backend-api/v2/models')
601
models = await response.json()
600
models = localStorage.getItem('_models')
602
601
603
var MODELS_SELECT = document.getElementById('model');
602
if (models === null) {
603
response = await fetch('/backend-api/v2/models')
604
models = await response.json()
605
localStorage.setItem('_models', JSON.stringify(models))
606
607
} else {
608
models = JSON.parse(models)
609
}
604
610
605
for (model of models) {
611
let MODELS_SELECT = document.getElementById('model');
606
612
607
// Create new option elements
608
var model_info = document.createElement('option');
613
for (model of models) {
614
let model_info = document.createElement('option');
609
615
model_info.value = model
610
616
model_info.text = model
611
617
@@ -27,7 +27,6 @@ class Backend_Api:
27
27
28
28
def models(self):
29
29
models = g4f._all_models
30
models.remove('oasst-sft-4-pythia-12b-epoch-3.5')
31
30
32
31
return models
33
32
@@ -168,12 +168,12 @@ code_davinci_002 = Model(
168
168
gpt_35_turbo_16k = Model(
169
169
name = 'gpt-3.5-turbo-16k',
170
170
base_provider = 'openai',
171
best_provider = gpt_35_turbo.best_provider)
171
best_provider = gpt_35_long.best_provider)
172
172
173
173
gpt_35_turbo_16k_0613 = Model(
174
174
name = 'gpt-3.5-turbo-16k-0613',
175
175
base_provider = 'openai',
176
best_provider = gpt_35_turbo.best_provider
176
best_provider = gpt_35_long.best_provider
177
177
)
178
178
179
179
gpt_35_turbo_0613 = Model(
@@ -11,7 +11,7 @@ with codecs.open(os.path.join(here, "README.md"), encoding="utf-8") as fh:
11
11
with open("requirements.txt") as f:
12
12
required = f.read().splitlines()
13
13
14
VERSION = "0.1.6.7"
14
VERSION = "0.1.6.8"
15
15
DESCRIPTION = (
16
16
"The official gpt4free repository | various collection of powerful language models"
17
17
)