Cameron Murphy Reikes 2 years ago
commit af77cf7952

2
.gitignore vendored

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

@ -1,3 +1,4 @@
#!/user/bin/env bash #!/usr/bin/env bash
systemctl stop rpgpt
cp rpgpt.service /etc/systemd/system/ 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) { func index(w http.ResponseWriter, req *http.Request) {
//time.Sleep(4 * time.Second) //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 req.Body = http.MaxBytesReader(w, req.Body, 1024 * 1024) // no sending huge files to crash the server
promptBytes, err := io.ReadAll(req.Body) promptBytes, err := io.ReadAll(req.Body)
if err != nil { if err != nil {

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

Loading…
Cancel
Save