返回提交历史
Modified
g4f/Provider/ChatifyAI.py
+0
-4
XFEstudio/gpt4free
Updated(g4f/Provider/ChatifyAI.py)
aef70502
代码差异
1 个文件
+0
-4
@@ -65,19 +65,15 @@ class ChatifyAI(AsyncGeneratorProvider, ProviderModelMixin):
65
65
response.raise_for_status()
66
66
response_text = await response.text()
67
67
68
# Фільтруємо та форматуємо відповідь
69
68
filtered_response = cls.filter_response(response_text)
70
69
yield filtered_response
71
70
72
71
@staticmethod
73
72
def filter_response(response_text: str) -> str:
74
# Розділяємо рядок на частини
75
73
parts = response_text.split('"')
76
74
77
# Вибираємо лише текстові частини (кожна друга частина)
78
75
text_parts = parts[1::2]
79
76
80
# Об'єднуємо текстові частини
81
77
clean_text = ''.join(text_parts)
82
78
83
79
return clean_text