summaryrefslogtreecommitdiffstats
path: root/g4f/Provider/ChatifyAI.py
diff options
context:
space:
mode:
Diffstat (limited to 'g4f/Provider/ChatifyAI.py')
-rw-r--r--g4f/Provider/ChatifyAI.py4
1 files changed, 0 insertions, 4 deletions
diff --git a/g4f/Provider/ChatifyAI.py b/g4f/Provider/ChatifyAI.py
index a999afac..7e43b065 100644
--- a/g4f/Provider/ChatifyAI.py
+++ b/g4f/Provider/ChatifyAI.py
@@ -65,19 +65,15 @@ class ChatifyAI(AsyncGeneratorProvider, ProviderModelMixin):
response.raise_for_status()
response_text = await response.text()
- # Фільтруємо та форматуємо відповідь
filtered_response = cls.filter_response(response_text)
yield filtered_response
@staticmethod
def filter_response(response_text: str) -> str:
- # Розділяємо рядок на частини
parts = response_text.split('"')
- # Вибираємо лише текстові частини (кожна друга частина)
text_parts = parts[1::2]
- # Об'єднуємо текстові частини
clean_text = ''.join(text_parts)
return clean_text