~ | g4f v-0.1.6.8

some quick fixes
This commit is contained in:
abc 2023-10-19 19:37:56 +01:00
parent 32c55a2fc2
commit 5b52d5a2ee
6 changed files with 17 additions and 12 deletions

View File

@ -2,7 +2,7 @@
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.
- latest pypi version: [`0.1.6.7`](https://pypi.org/project/g4f/0.1.6.7)
- latest pypi version: [`0.1.6.8`](https://pypi.org/project/g4f/0.1.6.8)
```sh
pip install -U g4f
```

View File

@ -5,7 +5,7 @@ from .Provider import BaseProvider, RetryProvider
from .typing import Messages, CreateResult, Union, List
from .debug import logging
version = '0.1.6.7'
version = '0.1.6.8'
version_check = True
def check_pypi_version() -> None:

View File

@ -597,15 +597,21 @@ observer.observe(message_input, { attributes: true });
const load_models = async () => {
models = localStorage.getItem('_models')
if (models === null) {
response = await fetch('/backend-api/v2/models')
models = await response.json()
localStorage.setItem('_models', JSON.stringify(models))
var MODELS_SELECT = document.getElementById('model');
} else {
models = JSON.parse(models)
}
let MODELS_SELECT = document.getElementById('model');
for (model of models) {
// Create new option elements
var model_info = document.createElement('option');
let model_info = document.createElement('option');
model_info.value = model
model_info.text = model

View File

@ -27,7 +27,6 @@ class Backend_Api:
def models(self):
models = g4f._all_models
models.remove('oasst-sft-4-pythia-12b-epoch-3.5')
return models

View File

@ -168,12 +168,12 @@ code_davinci_002 = Model(
gpt_35_turbo_16k = Model(
name = 'gpt-3.5-turbo-16k',
base_provider = 'openai',
best_provider = gpt_35_turbo.best_provider)
best_provider = gpt_35_long.best_provider)
gpt_35_turbo_16k_0613 = Model(
name = 'gpt-3.5-turbo-16k-0613',
base_provider = 'openai',
best_provider = gpt_35_turbo.best_provider
best_provider = gpt_35_long.best_provider
)
gpt_35_turbo_0613 = Model(

View File

@ -11,7 +11,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.1.6.7"
VERSION = "0.1.6.8"
DESCRIPTION = (
"The official gpt4free repository | various collection of powerful language models"
)