返回提交历史
Modified
you/__init__.py
+3
-2
XFEstudio/gpt4free
Trim remaining characters
2213246d
代码差异
1 个文件
+3
-2
@@ -64,7 +64,8 @@ class Completion:
64
64
text = response.text.split('}]}\n\nevent: youChatToken\ndata: {"youChatToken": "')[-1]
65
65
text = text.replace('"}\n\nevent: youChatToken\ndata: {"youChatToken": "', '')
66
66
text = text.replace('event: done\ndata: I\'m Mr. Meeseeks. Look at me.\n\n', '')
67
67
text = text[:-4] # trims '"}', along with the last two remaining newlines
68
68
69
extra = {
69
70
'youChatSerpResults' : loads(youChatSerpResults),
70
71
#'slots' : loads(slots)
@@ -74,4 +75,4 @@ class Completion:
74
75
'response': text,
75
76
'links' : loads(thirdPartySearchResults)['search']["third_party_search_results"] if includelinks else None,
76
77
'extra' : extra if detailed else None,
77
}
78
}