From 0638cbc17559583894a2564612a5083e1ce63d87 Mon Sep 17 00:00:00 2001 From: hlohaus <983577+hlohaus@users.noreply.github.com> Date: Mon, 3 Feb 2025 20:23:21 +0100 Subject: Improve select custom model in UI Updates for the response of the BackendApi Update of the demo model list Improve web search tool Moved copy_images to /image --- g4f/Provider/needs_auth/DeepSeekAPI.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'g4f/Provider/needs_auth/DeepSeekAPI.py') diff --git a/g4f/Provider/needs_auth/DeepSeekAPI.py b/g4f/Provider/needs_auth/DeepSeekAPI.py index f53be8cc..2c5a8bf7 100644 --- a/g4f/Provider/needs_auth/DeepSeekAPI.py +++ b/g4f/Provider/needs_auth/DeepSeekAPI.py @@ -48,12 +48,13 @@ try: raise MissingAuthError() response.raise_for_status() return response.json() + has_dsk = True except ImportError: - pass + has_dsk = False class DeepSeekAPI(AsyncAuthedProvider): url = "https://chat.deepseek.com" - working = False + working = has_dsk needs_auth = True use_nodriver = True _access_token = None @@ -91,6 +92,7 @@ class DeepSeekAPI(AsyncAuthedProvider): if conversation is None: chat_id = api.create_chat_session() conversation = JsonConversation(chat_id=chat_id) + yield conversation is_thinking = 0 for chunk in api.chat_completion( -- cgit v1.2.3