Make work on linux

main
parent b71688f0b0
commit 2721323250

2
.gitignore vendored

@ -1,3 +1,5 @@
# Server builds
server/rpgpt
# sensitive
API_KEY.bat

@ -1,3 +1,4 @@
#!/user/bin/env bash
#!/usr/bin/env bash
systemctl stop rpgpt
cp rpgpt.service /etc/systemd/system/
echo "Installed. 'systemctl start rpgpt' to run it"

@ -14,7 +14,6 @@ var c *gogpt.Client
func index(w http.ResponseWriter, req *http.Request) {
//time.Sleep(4 * time.Second)
(w).Header().Set("Access-Control-Allow-Origin", "*")
req.Body = http.MaxBytesReader(w, req.Body, 1024 * 1024) // no sending huge files to crash the server
promptBytes, err := io.ReadAll(req.Body)
if err != nil {

@ -9,10 +9,9 @@ User=root
Group=root
WorkingDirectory=/root/rpgpt/server
ExecStart=/usr/bin/go run .
EnvironmentFile=/root/.high_security
Restart=on-failure
RestartSec=10
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=appgoservice
[Install]

Loading…
Cancel
Save