Skip to content

Commit 7ae41b1

Browse files
committed
8 Sep 2023
Simplified AI chatbot installation.
1 parent 728238e commit 7ae41b1

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

ai chatbot/README.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,11 @@ https://code-boxx.com/core-boxx-ai-chatbot/
77
* [Microsoft C++ Build Tools](https://visualstudio.microsoft.com/downloads/?q=build+tools)
88

99
## INSTALLATION
10-
This is a "summarized guide". Check out the [official Core Boxx AI ChatBot](https://code-boxx.com/core-boxx-ai-chatbot/) page if you need more details.
11-
1210
* Copy/unzip this module into your existing Core Boxx project folder.
13-
* Choose a model from [Hugging Face](https://huggingface.co/models?pipeline_tag=text-generation&sort=trending). Edit `chatbot/settings.py`, paste the URL suffix into `model_name`.
14-
* Put your documents into `chatbot/docs`.
11+
* Put documents you want the AI to "learn" into `chatbot/docs`.
1512
* Run setup - *BE WARNED, GIGABYTES WORTH OF DOWNLOAD!*
16-
* Windows - Run `chatbot/0-setup.bat` for "CPU only", and `chatbot/0-setup.bat GPU` for "GPU accelerated".
17-
* Linux - Run `chatbot/0-setup.sh` for "CPU only", and `chatbot/0-setup.sh GPU` for "GPU accelerated".
13+
* Windows - Run `chatbot/0-setup.bat` for "CPU only", and `chatbot/0-setup.bat GPU` if you have an Nvidia graphics card.
14+
* Linux - Run `chatbot/0-setup.sh` for "CPU only", and `chatbot/0-setup.sh GPU` if you have an Nvidia graphics card.
1815
* Access `http://your-site.com/ai/` for the demo.
1916

2017
## LICENSE

ai chatbot/chatbot/0-setup.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
php 0-setup.php
1+
php 0-setup.php %1
22
virtualenv venv
33
call venv\Scripts\activate
44
pip install langchain transformers optimum auto-gptq chromadb sentence_transformers Flask pyjwt

ai chatbot/chatbot/0-setup.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212

1313
// (D) COPY HOST SETTINGS FROM CORE-CONFIG.PHP TO SETTINGS.PY
1414
$replace = [
15+
"model_name" => isset($argv[1]) && $argv[1]=="GPU"
16+
? '"TheBloke/Wizard-Vicuna-7B-Uncensored-GPTQ"'
17+
: '"TheBloke/Wizard-Vicuna-7B-Uncensored-GGML"',
1518
"http_allow" => "[\"http://".HOST_NAME."\", \"https://".HOST_NAME."\"]",
1619
"http_host" => "\"".HOST_NAME."\"",
1720
"jwt_algo" => "\"".JWT_ALGO."\"",

ai chatbot/chatbot/0-setup.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
php 0-setup.php
1+
php 0-setup.php $1
22
virtualenv venv
33
source "venv/bin/activate"
44
pip install langchain transformers optimum auto-gptq chromadb sentence_transformers Flask pyjwt

core/lib/LIB-Session.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ class Session extends Core {
66
"path" => "/",
77
"httponly" => true,
88
"expires" => 0,
9-
"samesite" => "Lax",
10-
// "secure" => true
9+
// "secure" => true,
10+
"samesite" => "Lax"
1111
];
1212

1313
// (B) CONSTRUCTOR - AUTO VALIDATE JWT COOKIE & RESTORE SESSION DATA

0 commit comments

Comments
 (0)