From 82f28ca9efc04efc11bb950b299a57e76d4db2bd Mon Sep 17 00:00:00 2001 From: Predrag Gruevski <2348618+obi1kenobi@users.noreply.github.com> Date: Fri, 18 Aug 2023 14:37:10 -0400 Subject: [PATCH] `ChatPromptTemplate` is not an `ABC`, it's instantiated directly. (#9468) Its own `__add__` method constructs `ChatPromptTemplate` objects directly, it cannot be abstract. Found while debugging something else with @nfcampos. --- libs/langchain/langchain/prompts/chat.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/langchain/langchain/prompts/chat.py b/libs/langchain/langchain/prompts/chat.py index b6cd9e0c03610..3c34b9fd97459 100644 --- a/libs/langchain/langchain/prompts/chat.py +++ b/libs/langchain/langchain/prompts/chat.py @@ -337,7 +337,7 @@ def format_messages(self, **kwargs: Any) -> List[BaseMessage]: ] -class ChatPromptTemplate(BaseChatPromptTemplate, ABC): +class ChatPromptTemplate(BaseChatPromptTemplate): """A prompt template for chat models. Use to create flexible templated prompts for chat models.