22from ...typing import sha256 , Dict , get_type_hints
33import json
44
5- url = "https://chat.coffeecat.ai "
5+ url = "https://caffcat.com "
66model = ['gpt-3.5-turbo' , 'gpt-3.5-turbo-16k' ]
77supports_stream = True
88needs_auth = False
1111
1212def _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 ():
0 commit comments