Fix issue with get_cookies from nodriver in OpenaiChat

This commit is contained in:
Heiner Lohaus 2024-12-18 02:28:26 +01:00
parent bbb858249b
commit af677717ee
7 changed files with 66 additions and 29 deletions

View file

@ -181,7 +181,7 @@ class Api:
def handle_provider(self, provider_handler, model):
if isinstance(provider_handler, IterListProvider) and provider_handler.last_provider is not None:
provider_handler = provider_handler.last_provider
if hasattr(provider_handler, "last_model") and provider_handler.last_model is not None:
if not model and hasattr(provider_handler, "last_model") and provider_handler.last_model is not None:
model = provider_handler.last_model
return self._format_json("provider", {**provider_handler.get_dict(), "model": model})