From a754f4288499c0511db30084cbfd1defa6831658 Mon Sep 17 00:00:00 2001 From: Joseph Cheung Date: Thu, 2 Mar 2023 18:47:48 +0800 Subject: [PATCH] Delete testcpt3.py --- searx/testcpt3.py | 24 ------------------------ 1 file changed, 24 deletions(-) delete mode 100644 searx/testcpt3.py diff --git a/searx/testcpt3.py b/searx/testcpt3.py deleted file mode 100644 index 6e16f7ca1..000000000 --- a/searx/testcpt3.py +++ /dev/null @@ -1,24 +0,0 @@ -import requests, os, json -gpt = "" -prompt = "你好" -gpt_url = "https://api.openai.com/v1/chat/completions" -gpt_headers = { - "Authorization": "Bearer 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", - "Content-Type": "application/json", -} -gpt_data = { - "model": "gpt-3.5-turbo", - "messages": [{"role":"user","content":prompt}], - "max_tokens": 256, - "temperature": 0.9, - "top_p": 1, - "frequency_penalty": 0, - "presence_penalty": 0, - "stream": False - -} -gpt_response = requests.post(gpt_url, headers=gpt_headers, data=json.dumps(gpt_data)) -if prompt and prompt !='' : - gpt_response = requests.post(gpt_url, headers=gpt_headers, data=json.dumps(gpt_data)) - gpt_json = gpt_response.json() -print(gpt_json) \ No newline at end of file