SqlChat - NL to SQL: differenze tra le versioni
Da Webmobili Wiki.
| Riga 37: | Riga 37: | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
npm install pnpm | npm install pnpm | ||
</syntaxhighlight> | |||
=== Apache config === | |||
Creare un virtualhost che faccia da ''reverse proxy'' per node. | |||
<syntaxhighlight lang="bash"> | |||
# | |||
# sqlchat.dbdemo47.com | |||
# | |||
<VirtualHost *:80> | |||
ServerName sqlchat.dbdemo47.com | |||
Redirect / https://%{SERVER_NAME}%{REQUEST_URI} | |||
</VirtualHost> | |||
<VirtualHost *:443> | |||
# Basic Auth | |||
<Location /> | |||
AuthName "Dialog prompt" | |||
AuthType Basic | |||
AuthUserFile /var/www/auth/.htpasswd | |||
Require valid-user | |||
</Location> | |||
ServerAdmin info@designbest.com | |||
ServerName sqlchat.dbdemo47.com | |||
ProxyPass / http://localhost:3000/ | |||
ProxyPassReverse / http://localhost:3000/ | |||
</VirtualHost> | |||
</syntaxhighlight> | </syntaxhighlight> | ||
Versione delle 18:03, 14 gen 2025
https://github.com/sqlchat/sqlchat
Si propone di fare query con linguaggio naturale, leggendo la struttura del database.
Non fa altro che cercare di interpretare e generare un SQL corrispondente.
Installazione in produzione
Node.js
Configurare l'ambiente per Node.js
# Scarica l'ultima versione di nvm
curl -o- https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash
source ~/.bashrc
# Installa Node.js 22
nvm install 22
nvm use 22
# Verificare con
node --version
# Verifica i rilasci ufficiali
nvm ls-remote
# eventualmente installare la versione voluta con
nvm install [version_number]
Aggiornare npm , Node Package Manager
npm install npm@latest -g
Installare pnpm, Performant Node Package Manager
npm install pnpm
Apache config
Creare un virtualhost che faccia da reverse proxy per node.
#
# sqlchat.dbdemo47.com
#
<VirtualHost *:80>
ServerName sqlchat.dbdemo47.com
Redirect / https://%{SERVER_NAME}%{REQUEST_URI}
</VirtualHost>
<VirtualHost *:443>
# Basic Auth
<Location />
AuthName "Dialog prompt"
AuthType Basic
AuthUserFile /var/www/auth/.htpasswd
Require valid-user
</Location>
ServerAdmin info@designbest.com
ServerName sqlchat.dbdemo47.com
ProxyPass / http://localhost:3000/
ProxyPassReverse / http://localhost:3000/
</VirtualHost>