summaryrefslogtreecommitdiffstats
path: root/g4f/gui/server
diff options
context:
space:
mode:
authorabc <98614666+xtekky@users.noreply.github.com>2023-10-10 16:48:56 +0200
committerabc <98614666+xtekky@users.noreply.github.com>2023-10-10 16:48:56 +0200
commit8964d15dc36338e994285552e2b49435428ca50b (patch)
tree2f00422465fa11367df09a71c9fa7f19a1383aa2 /g4f/gui/server
parent~ (diff)
downloadgpt4free-8964d15dc36338e994285552e2b49435428ca50b.tar
gpt4free-8964d15dc36338e994285552e2b49435428ca50b.tar.gz
gpt4free-8964d15dc36338e994285552e2b49435428ca50b.tar.bz2
gpt4free-8964d15dc36338e994285552e2b49435428ca50b.tar.lz
gpt4free-8964d15dc36338e994285552e2b49435428ca50b.tar.xz
gpt4free-8964d15dc36338e994285552e2b49435428ca50b.tar.zst
gpt4free-8964d15dc36338e994285552e2b49435428ca50b.zip
Diffstat (limited to '')
-rw-r--r--g4f/gui/server/backend.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/g4f/gui/server/backend.py b/g4f/gui/server/backend.py
index a76ca12b..7b5e9f0d 100644
--- a/g4f/gui/server/backend.py
+++ b/g4f/gui/server/backend.py
@@ -33,7 +33,7 @@ class Backend_Api:
conversation = request.json['meta']['content']['conversation']
prompt = request.json['meta']['content']['parts'][0]
model = request.json['model']
- provider = request.json.get('provider').split("g4f.Provider.")[1]
+ provider = request.json.get('provider').split('g4f.Provider.')[1]
messages = special_instructions[jailbreak] + conversation + search(internet_access, prompt) + [prompt]
@@ -52,6 +52,7 @@ class Backend_Api:
except Exception as e:
return {
+ 'code' : 'G4F_ERROR',
'_action': '_ask',
'success': False,
- "error": f"an error occured {str(e)}"}, 400 \ No newline at end of file
+ 'error' : f'an error occured {str(e)}'}, 400 \ No newline at end of file