mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-26 22:05:29 +00:00
core[patch]: concrete prompt value test (#26128)
This commit is contained in:
28
libs/core/tests/unit_tests/test_prompt_values.py
Normal file
28
libs/core/tests/unit_tests/test_prompt_values.py
Normal file
@@ -0,0 +1,28 @@
|
||||
import pytest
|
||||
|
||||
from langchain_core.messages import (
|
||||
AIMessage,
|
||||
AIMessageChunk,
|
||||
HumanMessage,
|
||||
HumanMessageChunk,
|
||||
SystemMessage,
|
||||
SystemMessageChunk,
|
||||
ToolMessage,
|
||||
ToolMessageChunk,
|
||||
)
|
||||
from langchain_core.prompt_values import ChatPromptValueConcrete
|
||||
|
||||
|
||||
@pytest.mark.xfail(reason="Broken union type.")
|
||||
def test_chat_prompt_value_concrete() -> None:
|
||||
messages: list = [
|
||||
AIMessage("foo"),
|
||||
HumanMessage("foo"),
|
||||
SystemMessage("foo"),
|
||||
ToolMessage("foo", tool_call_id="foo"),
|
||||
AIMessageChunk(content="foo"),
|
||||
HumanMessageChunk(content="foo"),
|
||||
SystemMessageChunk(content="foo"),
|
||||
ToolMessageChunk(content="foo", tool_call_id="foo"),
|
||||
]
|
||||
assert ChatPromptValueConcrete(messages=messages).messages == messages
|
Reference in New Issue
Block a user