From 822b2a78e70ed32a041fabd44515eacbd12e4490 Mon Sep 17 00:00:00 2001 From: "David L. Qiu" Date: Tue, 5 Dec 2023 17:35:28 -0800 Subject: [PATCH] specify no concurrency in GPT4All models --- packages/jupyter-ai-magics/jupyter_ai_magics/providers.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/jupyter-ai-magics/jupyter_ai_magics/providers.py b/packages/jupyter-ai-magics/jupyter_ai_magics/providers.py index 8155c2f2b..653c00126 100644 --- a/packages/jupyter-ai-magics/jupyter_ai_magics/providers.py +++ b/packages/jupyter-ai-magics/jupyter_ai_magics/providers.py @@ -362,6 +362,11 @@ def __init__(self, **kwargs): async def _acall(self, *args, **kwargs) -> Coroutine[Any, Any, str]: return await self._call_in_executor(*args, **kwargs) + @property + def allows_concurrency(self): + # At present, GPT4All providers fail with concurrent messages. See #481. + return False + HUGGINGFACE_HUB_VALID_TASKS = ( "text2text-generation",