From b1acf8d93102cd2105a3ca78387098bcd9026d7c Mon Sep 17 00:00:00 2001 From: Mason Daugherty Date: Wed, 8 Oct 2025 14:50:44 -0400 Subject: [PATCH] chore: fix dropdown default open admonition in refs (#33354) --- libs/langchain/langchain_classic/chat_models/base.py | 3 +-- libs/langchain/langchain_classic/embeddings/base.py | 3 +-- libs/langchain_v1/langchain/chat_models/base.py | 9 ++++----- libs/langchain_v1/langchain/embeddings/base.py | 3 +-- libs/partners/ollama/langchain_ollama/chat_models.py | 3 +-- 5 files changed, 8 insertions(+), 13 deletions(-) diff --git a/libs/langchain/langchain_classic/chat_models/base.py b/libs/langchain/langchain_classic/chat_models/base.py index 2bc4e3171a3..d0ffb2002f1 100644 --- a/libs/langchain/langchain_classic/chat_models/base.py +++ b/libs/langchain/langchain_classic/chat_models/base.py @@ -168,8 +168,7 @@ def init_chat_model( ValueError: If model_provider cannot be inferred or isn't supported. ImportError: If the model provider integration package is not installed. - ??? note "Init non-configurable model" - :open: + ???+ note "Init non-configurable model" .. code-block:: python diff --git a/libs/langchain/langchain_classic/embeddings/base.py b/libs/langchain/langchain_classic/embeddings/base.py index a8a62ac084d..887a3c33efe 100644 --- a/libs/langchain/langchain_classic/embeddings/base.py +++ b/libs/langchain/langchain_classic/embeddings/base.py @@ -155,8 +155,7 @@ def init_embeddings( ValueError: If the model provider is not supported or cannot be determined ImportError: If the required provider package is not installed - ??? note "Example Usage" - :open: + ???+ note "Example Usage" .. code-block:: python diff --git a/libs/langchain_v1/langchain/chat_models/base.py b/libs/langchain_v1/langchain/chat_models/base.py index 91ce6b668aa..618ebd681c4 100644 --- a/libs/langchain_v1/langchain/chat_models/base.py +++ b/libs/langchain_v1/langchain/chat_models/base.py @@ -32,7 +32,7 @@ def init_chat_model( model: str, *, model_provider: str | None = None, - configurable_fields: Literal[None] = None, + configurable_fields: None = None, config_prefix: str | None = None, **kwargs: Any, ) -> BaseChatModel: ... @@ -40,10 +40,10 @@ def init_chat_model( @overload def init_chat_model( - model: Literal[None] = None, + model: None = None, *, model_provider: str | None = None, - configurable_fields: Literal[None] = None, + configurable_fields: None = None, config_prefix: str | None = None, **kwargs: Any, ) -> _ConfigurableModel: ... @@ -163,8 +163,7 @@ def init_chat_model( ValueError: If model_provider cannot be inferred or isn't supported. ImportError: If the model provider integration package is not installed. - ??? note "Init non-configurable model" - :open: + ???+ note "Init non-configurable model" .. code-block:: python diff --git a/libs/langchain_v1/langchain/embeddings/base.py b/libs/langchain_v1/langchain/embeddings/base.py index 05559f7cd32..598b721d153 100644 --- a/libs/langchain_v1/langchain/embeddings/base.py +++ b/libs/langchain_v1/langchain/embeddings/base.py @@ -151,8 +151,7 @@ def init_embeddings( ValueError: If the model provider is not supported or cannot be determined ImportError: If the required provider package is not installed - ??? note "Example Usage" - :open: + ???+ note "Example Usage" .. code-block:: python diff --git a/libs/partners/ollama/langchain_ollama/chat_models.py b/libs/partners/ollama/langchain_ollama/chat_models.py index 491ea132e5a..3baf00942ea 100644 --- a/libs/partners/ollama/langchain_ollama/chat_models.py +++ b/libs/partners/ollama/langchain_ollama/chat_models.py @@ -257,8 +257,7 @@ def _is_pydantic_class(obj: Any) -> bool: class ChatOllama(BaseChatModel): r"""Ollama chat model integration. - ??? note "Setup" - :open: + ???+ note "Setup" Install ``langchain-ollama`` and download any models you want to use from ollama.