This commit is contained in:
Joseph Cheung 2023-02-19 20:07:45 +08:00
parent 4916c9f9ef
commit 56e95b78f5
2 changed files with 5 additions and 3 deletions

View file

@ -14,6 +14,8 @@ ENV INSTANCE_NAME=searxng \
BASE_URL= \ BASE_URL= \
MORTY_KEY= \ MORTY_KEY= \
MORTY_URL= \ MORTY_URL= \
GPTKEY= \
GPTORG= \
SEARXNG_SETTINGS_PATH=/etc/searxng/settings.yml \ SEARXNG_SETTINGS_PATH=/etc/searxng/settings.yml \
UWSGI_SETTINGS_PATH=/etc/searxng/uwsgi.ini UWSGI_SETTINGS_PATH=/etc/searxng/uwsgi.ini

View file

@ -716,9 +716,9 @@ def search():
gpt = "" gpt = ""
gpt_url = "https://api.openai.com/v1/engines/text-davinci-003/completions" gpt_url = "https://api.openai.com/v1/engines/text-davinci-003/completions"
gpt_headers = { gpt_headers = {
"Authorization": "Bearer "+os.environ['gptkey'], "Authorization": "Bearer "+os.environ['GPTKEY'],
"Content-Type": "application/json", "Content-Type": "application/json",
"OpenAI-Organization": os.environ['gptorg'] "OpenAI-Organization": os.environ['GPTORG']
} }
gpt_data = { gpt_data = {
"prompt": prompt, "prompt": prompt,