mirror of
https://github.com/searxng/searxng
synced 2024-01-01 19:24:07 +01:00
Update chatgpt.py
This commit is contained in:
parent
5bec84c177
commit
c24913c3f7
1 changed files with 3 additions and 1 deletions
|
@ -1,3 +1,5 @@
|
|||
import os
|
||||
|
||||
from searxng.utils import searxng_useragent
|
||||
import requests
|
||||
|
||||
|
@ -9,7 +11,7 @@ language_support = False
|
|||
|
||||
# ChatGPT API settings
|
||||
base_url = 'https://api.openai.com/v1/engines/davinci-codex/completions'
|
||||
chatgpt_api_key_var = 'chatgpt_api_key_var'
|
||||
chatgpt_api_key_var = os.environ.get('CHATGPT_API_KEY_VAR')
|
||||
headers = {
|
||||
'Content-Type': 'application/json',
|
||||
'Authorization': f'Bearer {chatgpt_api_key_var}'
|
||||
|
|
Loading…
Add table
Reference in a new issue