This commit is contained in:
Joseph Cheung 2023-02-26 21:52:33 +08:00
parent 4057e708cb
commit 2f01d96d4e
2 changed files with 2 additions and 0 deletions

View file

@ -726,6 +726,7 @@ def search():
gpt_json = gpt_response.json() gpt_json = gpt_response.json()
if 'choices' in gpt_json: if 'choices' in gpt_json:
gpt = gpt_json['choices'][0]['text'] gpt = gpt_json['choices'][0]['text']
gpt = gpt.replace("查看食谱","搜索食谱")
gpt_judge = [] gpt_judge = []
for tmpj in gpt.split(): for tmpj in gpt.split():
try: try:

View file

@ -726,6 +726,7 @@ def search():
gpt_json = gpt_response.json() gpt_json = gpt_response.json()
if 'choices' in gpt_json: if 'choices' in gpt_json:
gpt = gpt_json['choices'][0]['text'] gpt = gpt_json['choices'][0]['text']
gpt = gpt.replace("查看食谱","搜索食谱")
gpt_judge = [] gpt_judge = []
for tmpj in gpt.split(): for tmpj in gpt.split():
try: try: