mirror of
https://github.com/xtekky/gpt4free.git
synced 2025-12-06 02:30:41 -08:00
Fix missing cookies in Copilot
This commit is contained in:
parent
dc98d0cb37
commit
c50f2f47ff
2 changed files with 1 additions and 3 deletions
|
|
@ -57,7 +57,7 @@ class Copilot(AsyncAuthedProvider, ProviderModelMixin):
|
|||
conversation_url = f"{url}/c/api/conversations"
|
||||
|
||||
_access_token: str = None
|
||||
_cookies: dict = None
|
||||
_cookies: dict = {}
|
||||
|
||||
@classmethod
|
||||
async def on_auth_async(cls, **kwargs) -> AsyncIterator:
|
||||
|
|
|
|||
|
|
@ -69,7 +69,6 @@ class IterListProvider(BaseRetryProvider):
|
|||
api_key = AuthManager.load_api_key(provider)
|
||||
if api_key:
|
||||
extra_body["api_key"] = api_key
|
||||
debug.log(f"Using API key for provider: {provider.__name__}")
|
||||
try:
|
||||
response = provider.create_function(alias, messages, stream=stream, **extra_body)
|
||||
for chunk in response:
|
||||
|
|
@ -119,7 +118,6 @@ class IterListProvider(BaseRetryProvider):
|
|||
if not api_key:
|
||||
api_key = AuthManager.load_api_key(provider)
|
||||
if api_key:
|
||||
debug.log(f"Using API key for provider: {provider.__name__}")
|
||||
extra_body["api_key"] = api_key
|
||||
if conversation is not None and hasattr(conversation, provider.__name__):
|
||||
extra_body["conversation"] = JsonConversation(**getattr(conversation, provider.__name__))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue