-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
47 changed files
with
4,627 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
GPT4ALL_API = http://url-to-gpt4all-ui-backend # http://localhost:9600 | ||
GPT4ALL_API_CHANGE_ORIGIN = 0 # FALSE | ||
GPT4ALL_API_SECURE = 0 # FALSE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/* eslint-env node */ | ||
require('@rushstack/eslint-patch/modern-module-resolution') | ||
|
||
module.exports = { | ||
root: true, | ||
'extends': [ | ||
'plugin:vue/vue3-essential', | ||
'eslint:recommended', | ||
'@vue/eslint-config-prettier/skip-formatting' | ||
], | ||
parserOptions: { | ||
ecmaVersion: 'latest' | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
pnpm-debug.log* | ||
lerna-debug.log* | ||
|
||
node_modules | ||
.DS_Store | ||
dist | ||
dist-ssr | ||
coverage | ||
*.local | ||
|
||
/cypress/videos/ | ||
/cypress/screenshots/ | ||
|
||
# Editor directories and files | ||
.vscode | ||
!.vscode/extensions.json | ||
.idea | ||
*.suo | ||
*.ntvs* | ||
*.njsproj | ||
*.sln | ||
*.sw? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"$schema": "https://json.schemastore.org/prettierrc", | ||
"semi": false, | ||
"tabWidth": 2, | ||
"singleQuote": true, | ||
"printWidth": 100, | ||
"trailingComma": "none" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
# GPT4ALL-UI Web interface VUE3 | ||
|
||
## Todo's | ||
|
||
- Fix discussion list width so that it stays static and dont resize depending on message contents [DONE] | ||
- Add chat input field [DONE] | ||
- Add ability to select multiple discussions to export or delete | ||
- Add modal to ask user if you sure about to delete | ||
- Add toast messages for errors and successes | ||
- Populate settings with settings controls [WIP] | ||
- Make search filter work [DONE] | ||
- Add clear filter button to search input field [DONE] | ||
- Add DB switcher (im thinking in the settings view) | ||
- Make the UI work good on mobile | ||
- Scroll to bottom | ||
- Scroll to top | ||
- Need to fix colors for `<input />` fields | ||
|
||
## Dependencies for development | ||
|
||
You mus have [Node.js](https://nodejs.org/en) installed on your computer. | ||
|
||
``` | ||
git clone repo_URL | ||
cd into-this-repo-dir | ||
npm install | ||
``` | ||
|
||
After that to run development server locally and test the web page at http://localhost:5173/: | ||
|
||
``` | ||
npm run dev | ||
``` | ||
|
||
To connect to GPT4ALL-UI API server you need to enter its URL in the `.env` or make a copy of `.env` file and name it `.env.local`. This .env.local is added to `.gitignore`. | ||
All http requests made to GPT4ALL-UI api has to have /api/ prefix. This prefix gets rewritten in the vite.config.js file. | ||
Make changes to your usecase in the `.env.local` file. | ||
|
||
Once UI id done you can build static files for serving. | ||
``` | ||
npm run build | ||
``` | ||
|
||
This will create /dist/ folder with all the files. Also the build will show you if there are errors or not in your vue code. | ||
> Make sure you test the static files too, because sometimes the builder dont catch all the errors, and if a component is not refernced it might not load in the built version, but it loads fine in development environment | ||
### Overview of used dependencies and development | ||
|
||
- Nodejs | ||
- vue | ||
- feather-icons | ||
- axios | ||
|
||
``` | ||
npm init vue@latest | ||
``` | ||
``` | ||
cd gpt4all-ui-vue | ||
npm install | ||
npm run format | ||
npm install axios dotenv | ||
npm install -D tailwindcss postcss autoprefixer | ||
npx tailwindcss init -p | ||
npm install feather-icons --save | ||
``` | ||
|
||
### Running dev environment and building commands | ||
|
||
To lint: (not very used) | ||
``` | ||
npm run lint | ||
``` | ||
|
||
To run test: | ||
``` | ||
npm run dev | ||
``` | ||
|
||
To build static files | ||
``` | ||
npm run build | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<link rel="icon" href="/favicon.ico"> | ||
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>GPT4All - WEBUI</title> | ||
</head> | ||
<body> | ||
<div id="app"></div> | ||
<script type="module" src="/src/main.js"></script> | ||
</body> | ||
</html> |
Oops, something went wrong.