Merge pull request #135 from TSOA2/main

Trim remaining characters
This commit is contained in:
t.me/xtekky 2023-04-26 08:54:52 +01:00 committed by GitHub
commit 71f507ee94
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -64,6 +64,7 @@ class Completion:
text = response.text.split('}]}\n\nevent: youChatToken\ndata: {"youChatToken": "')[-1]
text = text.replace('"}\n\nevent: youChatToken\ndata: {"youChatToken": "', '')
text = text.replace('event: done\ndata: I\'m Mr. Meeseeks. Look at me.\n\n', '')
text = text[:-4] # trims '"}', along with the last two remaining newlines
extra = {
'youChatSerpResults' : loads(youChatSerpResults),