langchain-ai
langchain
BlogDocsChangelog

fix(core): support (message class, template) tuples in ChatPromptTemplate.from_messages

#33989
Comparing
hyattc1:fix-message-class-tuple
(
8013ea6
) with
master
(
52b1516
)
CodSpeed Performance Gauge
-5%
Untouched
13
Skipped
21

Benchmarks

Skipped (21)

Passed

test_async_callbacks_in_sync
libs/core/tests/benchmarks/test_async_callbacks.py
CodSpeed Performance Gauge
+1%
24.3 ms*24 ms
test_import_time[InMemoryRateLimiter]
libs/core/tests/benchmarks/test_imports.py
CodSpeed Performance Gauge
-3%
172.7 ms*178.3 ms
test_import_time[Document]
libs/core/tests/benchmarks/test_imports.py
CodSpeed Performance Gauge
-4%
184.8 ms*192.2 ms
test_import_time[HumanMessage]
libs/core/tests/benchmarks/test_imports.py
CodSpeed Performance Gauge
-5%
262.2 ms*274.6 ms
test_import_time[CallbackManager]
libs/core/tests/benchmarks/test_imports.py
CodSpeed Performance Gauge
-5%
446.1 ms*470.2 ms
test_import_time[PydanticOutputParser]
libs/core/tests/benchmarks/test_imports.py
CodSpeed Performance Gauge
-5%
519.2 ms*548.1 ms
test_import_time[tool]
libs/core/tests/benchmarks/test_imports.py
CodSpeed Performance Gauge
-6%
504.8 ms*536.1 ms
test_import_time[ChatPromptTemplate]
libs/core/tests/benchmarks/test_imports.py
CodSpeed Performance Gauge
-6%
580.5 ms*617.6 ms
test_import_time[RunnableLambda]
libs/core/tests/benchmarks/test_imports.py
CodSpeed Performance Gauge
-6%
477.5 ms*509.1 ms
test_import_time[BaseChatModel]
libs/core/tests/benchmarks/test_imports.py
CodSpeed Performance Gauge
-7%
510.7 ms*546.4 ms
test_import_time[LangChainTracer]
libs/core/tests/benchmarks/test_imports.py
CodSpeed Performance Gauge
-7%
425.9 ms*456.9 ms
test_import_time[InMemoryVectorStore]
libs/core/tests/benchmarks/test_imports.py
CodSpeed Performance Gauge
-7%
592.4 ms*638 ms
test_import_time[Runnable]
libs/core/tests/benchmarks/test_imports.py
CodSpeed Performance Gauge
-8%
472.9 ms*511.9 ms

Commits

Click on a commit to change the comparison range
Base
master
52b1516
+0.36%
support (message class, template) tuples in ChatPromptTemplate.from_messages Adds missing conversion logic so BaseMessage subclasses work when provided as (message class, template) tuples. Includes tests for HumanMessage, AIMessage, and SystemMessage.
47d47c8
4 days ago
by hyattc1
-5.5%
fix(core): support message-class tuple conversion in ChatPromptTemplate
8013ea6
4 days ago
by hyattc1
© 2025 CodSpeed Technology
Home Terms Privacy Docs