Compare commits

..

No commits in common. "d3aa46e0fce623517d9903d5550264dddbcb0e62" and "47cc5fae55dc5385eff004ba447e06a91b21af70" have entirely different histories.

3 changed files with 4 additions and 29 deletions

View File

@ -1,23 +0,0 @@
# docker build -t aidgaf .
#for test
# docker run --rm -eSERVERPORT=8087 -eAPIKEY=sk-AaKV.........................HZ4v2ipzFm6 -p8087:8087 -it aidgaf
# curl -X PATCH http://127.0.0.1:8087 -d "{\"message\":{\"command\":\"aidgaf\",\"data\":{\"username\":\"AdamOutler\"}}}"
#for deployment
# docker run --rm \
# -eSERVERPORT=8087 \
# -eHOSTNAME=localhost \
# -eHASHKEY=Password123 \
# -eAPIKEY=sk-AaKV.........................HZ4v2ipzFm6 \
# -p8087:8087 \
# --restart=always \
# aidgaf
FROM alpine:latest
RUN apk add python3 py3-pip \
&& pip3 install openai\
&& mkdir /app
COPY src/aidgaf /app
RUN
CMD aidgaf
ENTRYPOINT ["/usr/bin/python","/app/aidgaf-server/__main__.py"]

View File

@ -15,7 +15,7 @@ openai.organization = "org-hNNV1yHjZp7T3pn5pdZWaKLm"
URL="https://api.openai.com/v1/completions" URL="https://api.openai.com/v1/completions"
DATA = {"model": "text-davinci-003", DATA = {"model": "text-davinci-003",
"prompt": settings.PROMPTS[0], "prompt": PROMPTS[0],
"temperature":1, "temperature":1,
"max_tokens": 200 "max_tokens": 200
} }

View File

@ -1,12 +1,10 @@
import os import os
#The hostname used by this app #The hostname used by this app
HOSTNAME:str = os.getenv('HOSTNAME') #localhost or some name HOSTNAME:str = os.getenv('HOSTNAME') #localhost
#The port to broadcast the server #The port to broadcast the server
SERVERPORT:int = int(os.getenv('SERVERPORT')) #8087 or the port you want to run on. pass in with docker -e command. SERVERPORT:int = int(os.getenv('SERVERPORT')) #8087
#The API key for OpenAI #The API key for OpenAI
APIKEY:str = os.getenv('APIKEY') #secret key from OpenAPI website APIKEY:str = os.getenv('APIKEY') #secret key
if APIKEY is None:
raise Exception("APIKEY Environmental Variable must be set")
#The hash key #The hash key
HASHKEY:str = os.getenv('HASHKEY') #shared secret for hmac of message HASHKEY:str = os.getenv('HASHKEY') #shared secret for hmac of message
#The prompts used for OpenAI. #The prompts used for OpenAI.