Skip to content

Commit

Permalink
~ | g4f v-0.1.6.8
Browse files Browse the repository at this point in the history
some quick fixes
  • Loading branch information
xtekky committed Oct 19, 2023
1 parent 32c55a2 commit 5b52d5a
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 12 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
Expand Down
2 changes: 1 addition & 1 deletion g4f/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
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:
Expand Down
18 changes: 12 additions & 6 deletions g4f/gui/client/js/chat.v2.js
Original file line number Diff line number Diff line change
Expand Up @@ -597,15 +597,21 @@ observer.observe(message_input, { attributes: true });


const load_models = async () => {
response = await fetch('/backend-api/v2/models')
models = await response.json()
models = localStorage.getItem('_models')

var MODELS_SELECT = document.getElementById('model');
if (models === null) {
response = await fetch('/backend-api/v2/models')
models = await response.json()
localStorage.setItem('_models', JSON.stringify(models))

} else {
models = JSON.parse(models)
}

for (model of models) {
let MODELS_SELECT = document.getElementById('model');

// Create new option elements
var model_info = document.createElement('option');
for (model of models) {
let model_info = document.createElement('option');
model_info.value = model
model_info.text = model

Expand Down
1 change: 0 additions & 1 deletion g4f/gui/server/backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ def __init__(self, app) -> None:

def models(self):
models = g4f._all_models
models.remove('oasst-sft-4-pythia-12b-epoch-3.5')

return models

Expand Down
4 changes: 2 additions & 2 deletions g4f/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,12 +168,12 @@ def __all__() -> list[str]:
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(
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
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"
)
Expand Down

0 comments on commit 5b52d5a

Please sign in to comment.