Skip to content

Commit 6fd6122

Browse files
committed
Обновлен провайдер CoffeCat
1 parent f6e1df3 commit 6fd6122

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

g4f/Provider/Providers/CoffeCat.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from ...typing import sha256, Dict, get_type_hints
33
import json
44

5-
url = "https://chat.coffeecat.ai"
5+
url = "https://caffcat.com"
66
model = ['gpt-3.5-turbo', 'gpt-3.5-turbo-16k']
77
supports_stream = True
88
needs_auth = False
@@ -11,14 +11,14 @@
1111

1212
def _create_completion(model: str, messages: list, stream: bool, **kwargs):
1313
headers = {
14-
'authority': 'chat.coffeecat.ai',
14+
'authority': 'caffcat.com',
1515
'accept': 'text/event-stream',
1616
'accept-language': 'en,fr-FR;q=0.9,fr;q=0.8,es-ES;q=0.7,es;q=0.6,en-US;q=0.5,am;q=0.4,de;q=0.3',
1717
'content-type': 'application/json',
1818
'endpoint': '',
19-
'origin': 'https://chat.coffeecat.ai',
19+
'origin': 'https://caffcat.com',
2020
'plugins': '0',
21-
'referer': 'https://chat.coffeecat.ai/',
21+
'referer': 'https://caffcat.com/',
2222
'sec-ch-ua': '"Not.A/Brand";v="8", "Chromium";v="114", "Google Chrome";v="114"',
2323
'sec-ch-ua-mobile': '?0',
2424
'sec-ch-ua-platform': '"macOS"',
@@ -40,7 +40,7 @@ def _create_completion(model: str, messages: list, stream: bool, **kwargs):
4040
'top_p': 1,
4141
}
4242

43-
response = requests.post('https://chat.coffeecat.ai/api/openai/v1/chat/completions',
43+
response = requests.post('https://caffcat.com/api/openai/v1/chat/completions',
4444
headers=headers, json=json_data)
4545

4646
for chunk in response.iter_lines():

modules/models/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ def _get_response(self, stream=False):
109109
return response
110110

111111
def _get_api_url(self):
112-
if "chimera-gpt" in self.model_name or "chimera-llama" in self.model_name:
112+
if "chimera-gpt" in self.model_name or "chimera-llama" in self.model_name or "chimera-claude" in self.model_name:
113113
url = "https://chimeragpt.adventblocks.cc/api/v1/chat/completions"
114114
elif "chimera-text" in self.model_name:
115115
url = "https://chimeragpt.adventblocks.cc/api/v1/completions"

0 commit comments

Comments
 (0)