Merge branch 'main' into transitions

This commit is contained in:
AndzejsP 2023-05-26 13:22:50 +03:00
commit 58ff42f016
22 changed files with 53 additions and 29 deletions

View File

@ -12,4 +12,4 @@
# License
This project is licensed under the Apache 2.0 License. See the [LICENSE](https://github.com/nomic-ai/GPT4All-ui/blob/main/LICENSE) file for details.
This project is licensed under the Apache 2.0 License. See the [LICENSE](https://github.com/ParisNeo/GPT4All-ui/blob/main/LICENSE) file for details.

View File

@ -20,7 +20,7 @@ from tqdm import tqdm
import traceback
__author__ = "parisneo"
__github__ = "https://github.com/nomic-ai/gpt4all-ui"
__github__ = "https://github.com/ParisNeo/gpt4all-ui"
__copyright__ = "Copyright 2023, "
__license__ = "Apache 2.0"

View File

@ -14,7 +14,7 @@ import yaml
import sys
__author__ = "parisneo"
__github__ = "https://github.com/nomic-ai/gpt4all-ui"
__github__ = "https://github.com/ParisNeo/gpt4all-ui"
__copyright__ = "Copyright 2023, "
__license__ = "Apache 2.0"

View File

@ -12,7 +12,7 @@
import yaml
__author__ = "parisneo"
__github__ = "https://github.com/nomic-ai/gpt4all-ui"
__github__ = "https://github.com/ParisNeo/gpt4all-ui"
__copyright__ = "Copyright 2023, "
__license__ = "Apache 2.0"

View File

@ -2,7 +2,7 @@
import sqlite3
__author__ = "parisneo"
__github__ = "https://github.com/nomic-ai/gpt4all-ui"
__github__ = "https://github.com/ParisNeo/gpt4all-ui"
__copyright__ = "Copyright 2023, "
__license__ = "Apache 2.0"

View File

@ -6,7 +6,7 @@
from config import load_config, save_config
__author__ = "parisneo"
__github__ = "https://github.com/nomic-ai/gpt4all-ui"
__github__ = "https://github.com/ParisNeo/gpt4all-ui"
__copyright__ = "Copyright 2023, "
__license__ = "Apache 2.0"

34
app.py
View File

@ -10,7 +10,7 @@
######
__author__ = "parisneo"
__github__ = "https://github.com/nomic-ai/gpt4all-ui"
__github__ = "https://github.com/ParisNeo/gpt4all-ui"
__copyright__ = "Copyright 2023, "
__license__ = "Apache 2.0"
@ -840,7 +840,32 @@ class Gpt4AllWebUI(GPT4AllAPI):
def extensions(self):
return render_template("extensions.html")
def sync_cfg(default_config, config):
"""Syncs a configuration with the default configuration
Args:
default_config (_type_): _description_
config (_type_): _description_
Returns:
_type_: _description_
"""
added_entries = []
removed_entries = []
# Ensure all fields from default_config exist in config
for key, value in default_config.items():
if key not in config:
config[key] = value
added_entries.append(key)
# Remove fields from config that don't exist in default_config
for key in list(config.keys()):
if key not in default_config:
del config[key]
removed_entries.append(key)
return config, added_entries, removed_entries
if __name__ == "__main__":
parser = argparse.ArgumentParser(description="Start the chatbot Flask app.")
@ -924,13 +949,12 @@ if __name__ == "__main__":
config_file_path = f"configs/{args.config}.yaml"
config = load_config(config_file_path)
if "version" not in config or int(config["version"])<int(default_config["version"]):
#Upgrade old configuration files to new format
print("Configuration file is very old. Replacing with default configuration")
for key, value in default_config.items():
if key not in config:
config[key] = value
config["version"]=int(default_config["version"])
config, added, removed =sync_cfg(default_config, config)
print(f"Added entries : {added}, removed entries:{removed}")
save_config(config, config_file_path)
# Override values in config with command-line arguments

View File

@ -20,7 +20,7 @@ from api.config import load_config
import re
__author__ = "parisneo"
__github__ = "https://github.com/nomic-ai/gpt4all-ui"
__github__ = "https://github.com/ParisNeo/gpt4all-ui"
__copyright__ = "Copyright 2023, "
__license__ = "Apache 2.0"

View File

@ -19,7 +19,7 @@ import yaml
from ctransformers import AutoModelForCausalLM
__author__ = "parisneo"
__github__ = "https://github.com/nomic-ai/gpt4all-ui"
__github__ = "https://github.com/ParisNeo/gpt4all-ui"
__copyright__ = "Copyright 2023, "
__license__ = "Apache 2.0"

View File

@ -9,7 +9,7 @@
# This binding is a wrapper to gpt4all's official binding
# Follow him on his github project : https://github.com/nomic-ai/gpt4all
# Follow him on his github project : https://github.com/ParisNeo/gpt4all
######
from pathlib import Path
@ -19,7 +19,7 @@ from api.binding import LLMBinding
import yaml
__author__ = "parisneo"
__github__ = "https://github.com/nomic-ai/gpt4all-ui"
__github__ = "https://github.com/ParisNeo/gpt4all-ui"
__copyright__ = "Copyright 2023, "
__license__ = "Apache 2.0"

View File

@ -18,7 +18,7 @@ from pygptj.model import Model
from api.binding import LLMBinding
__author__ = "parisneo"
__github__ = "https://github.com/nomic-ai/gpt4all-ui"
__github__ = "https://github.com/ParisNeo/gpt4all-ui"
__copyright__ = "Copyright 2023, "
__license__ = "Apache 2.0"

View File

@ -19,7 +19,7 @@ from api.binding import LLMBinding
import yaml
__author__ = "parisneo"
__github__ = "https://github.com/nomic-ai/gpt4all-ui"
__github__ = "https://github.com/ParisNeo/gpt4all-ui"
__copyright__ = "Copyright 2023, "
__license__ = "Apache 2.0"

View File

@ -19,7 +19,7 @@ import yaml
import random
__author__ = "parisneo"
__github__ = "https://github.com/nomic-ai/gpt4all-ui"
__github__ = "https://github.com/ParisNeo/gpt4all-ui"
__copyright__ = "Copyright 2023, "
__license__ = "Apache 2.0"

View File

@ -20,7 +20,7 @@ import yaml
import re
__author__ = "parisneo"
__github__ = "https://github.com/nomic-ai/gpt4all-ui"
__github__ = "https://github.com/ParisNeo/gpt4all-ui"
__copyright__ = "Copyright 2023, "
__license__ = "Apache 2.0"

View File

@ -18,7 +18,7 @@ from api.binding import LLMBinding
import yaml
__author__ = "parisneo"
__github__ = "https://github.com/nomic-ai/gpt4all-ui"
__github__ = "https://github.com/ParisNeo/gpt4all-ui"
__copyright__ = "Copyright 2023, "
__license__ = "Apache 2.0"

View File

@ -1,4 +1,4 @@
version: 4
version: 5
user_name: user
config: default
ctx_size: 2048

View File

@ -19,7 +19,7 @@
2. Open Terminal/PowerShell and navigate to a folder you want to clone this repository.
```bash
git clone https://github.com/nomic-ai/gpt4all-ui.git
git clone https://github.com/ParisNeo/gpt4all-ui.git
```
4. Install/run application by double clicking on `webui.bat` file from Windows explorer as normal user.
@ -87,7 +87,7 @@ sudo pacman -S curl git python3
2. Clone repository:
```bash
git clone https://github.com/nomic-ai/gpt4all-ui.git
git clone https://github.com/ParisNeo/gpt4all-ui.git
```
```bash
cd gpt4all-ui
@ -116,7 +116,7 @@ brew install git python3
3. Clone repository:
```bash
git clone https://github.com/nomic-ai/gpt4all-ui.git
git clone https://github.com/ParisNeo/gpt4all-ui.git
```
```bash
cd gpt4all-ui

View File

@ -23,7 +23,7 @@ setuptools.setup(
description="A web ui for running chat models with different bindings. Supports multiple personalities and extensions.",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/nomic-ai/gpt4all-ui",
url="https://github.com/ParisNeo/gpt4all-ui",
packages=setuptools.find_packages(),
install_requires=requirements,
extras_require={"dev": requirements_dev},

View File

@ -44,7 +44,7 @@
<ul class="list-disc list-inside mb-4">
<li>@ParisNeo : Creator of the project and Lead developer</li>
<li>@AndriyMulyar : CEO of Nomic-ai who offered to link the project as their official ui for GPT4All</li>
<li><a href="https://github.com/nomic-ai/gpt4all-ui/graphs/contributors" target="_blank" class="text-blue-900 dark:text-blue-600">A number of very talented open-source developers without whom this project wouldn't be as awesome as it is.</a></li>
<li><a href="https://github.com/ParisNeo/gpt4all-ui/graphs/contributors" target="_blank" class="text-blue-900 dark:text-blue-600">A number of very talented open-source developers without whom this project wouldn't be as awesome as it is.</a></li>
<li> We also appreciate the support of the users of this tool who have helped us in various ways.</li>
</ul>

File diff suppressed because one or more lines are too long

View File

@ -2,7 +2,7 @@
<div class="sticky bottom-0 p-6 bg-bg-light-tone dark:bg-bg-dark-tone shadow-inner ">
<!-- <hr class="container flex flex-col sm:flex-row item-center py-0 h-0 border-bg-dark dark:border-bg-light"> -->
<div class="flex justify-center flex-row items-center gap-2 p-1 ">
Visit <a class=" hover:text-primary duration-150" href="https://github.com/nomic-ai/gpt4all-ui"
Visit <a class=" hover:text-primary duration-150" href="https://github.com/ParisNeo/gpt4all-ui"
target="_blank">github repository</a> to learn more
</div>

View File

@ -11,7 +11,7 @@
</RouterLink>
<!-- GITHUB AND THEME BUTTONS -->
<div class="flex gap-3 flex-1 items-center justify-end">
<a href="https://github.com/nomic-ai/gpt4all-ui" target="_blank">
<a href="https://github.com/ParisNeo/gpt4all-ui" target="_blank">
<div class="text-2xl hover:text-primary duration-150" title="Visit repository page">
<i data-feather="github"></i>