Update api/utils.py
Browse files- api/utils.py +2 -2
api/utils.py
CHANGED
@@ -105,7 +105,7 @@ async def process_streaming_response(request: ChatRequest):
|
|
105 |
content = line + "\n"
|
106 |
if "https://www.blackbox.ai" in content:
|
107 |
validate.getHid(True)
|
108 |
-
content = "
|
109 |
yield f"data: {json.dumps(create_chat_completion_data(content, request.model, timestamp))}\n\n"
|
110 |
break
|
111 |
if content.startswith("$@$v=undefined-rv1$@$"):
|
@@ -164,7 +164,7 @@ async def process_non_streaming_response(request: ChatRequest):
|
|
164 |
full_response += chunk
|
165 |
if "https://www.blackbox.ai" in full_response:
|
166 |
validate.getHid(True)
|
167 |
-
full_response = "
|
168 |
if full_response.startswith("$@$v=undefined-rv1$@$"):
|
169 |
full_response = full_response[21:]
|
170 |
return {
|
|
|
105 |
content = line + "\n"
|
106 |
if "https://www.blackbox.ai" in content:
|
107 |
validate.getHid(True)
|
108 |
+
content = "Hid has been refreshed; feel free to restart the conversation.\n"
|
109 |
yield f"data: {json.dumps(create_chat_completion_data(content, request.model, timestamp))}\n\n"
|
110 |
break
|
111 |
if content.startswith("$@$v=undefined-rv1$@$"):
|
|
|
164 |
full_response += chunk
|
165 |
if "https://www.blackbox.ai" in full_response:
|
166 |
validate.getHid(True)
|
167 |
+
full_response = "Hid has been refreshed; feel free to restart the conversation."
|
168 |
if full_response.startswith("$@$v=undefined-rv1$@$"):
|
169 |
full_response = full_response[21:]
|
170 |
return {
|