diff --git a/libs/core/langchain_core/language_models/chat_models.py b/libs/core/langchain_core/language_models/chat_models.py index 235b5d4b7b..daf6aeb3a7 100644 --- a/libs/core/langchain_core/language_models/chat_models.py +++ b/libs/core/langchain_core/language_models/chat_models.py @@ -224,6 +224,8 @@ class BaseChatModel(BaseLanguageModel[BaseMessage], ABC): run_manager.on_llm_new_token( cast(str, chunk.message.content), chunk=chunk ) + if chunk.message.id is None: + chunk.message.id = f"run-{run_manager.run_id}" chunk.message.response_metadata = _gen_info_and_msg_metadata(chunk) yield chunk.message if generation is None: @@ -294,6 +296,8 @@ class BaseChatModel(BaseLanguageModel[BaseMessage], ABC): await run_manager.on_llm_new_token( cast(str, chunk.message.content), chunk=chunk ) + if chunk.message.id is None: + chunk.message.id = f"run-{run_manager.run_id}" chunk.message.response_metadata = _gen_info_and_msg_metadata(chunk) yield chunk.message if generation is None: @@ -607,6 +611,8 @@ class BaseChatModel(BaseLanguageModel[BaseMessage], ABC): chunks: List[ChatGenerationChunk] = [] for chunk in self._stream(messages, stop=stop, **kwargs): if run_manager: + if chunk.message.id is None: + chunk.message.id = f"run-{run_manager.run_id}" run_manager.on_llm_new_token( cast(str, chunk.message.content), chunk=chunk ) @@ -622,7 +628,9 @@ class BaseChatModel(BaseLanguageModel[BaseMessage], ABC): result = self._generate(messages, stop=stop, **kwargs) # Add response metadata to each generation - for generation in result.generations: + for idx, generation in enumerate(result.generations): + if run_manager and generation.message.id is None: + generation.message.id = f"run-{run_manager.run_id}-{idx}" generation.message.response_metadata = _gen_info_and_msg_metadata( generation ) @@ -684,6 +692,8 @@ class BaseChatModel(BaseLanguageModel[BaseMessage], ABC): chunks: List[ChatGenerationChunk] = [] async for chunk in self._astream(messages, stop=stop, **kwargs): if run_manager: + if chunk.message.id is None: + chunk.message.id = f"run-{run_manager.run_id}" await run_manager.on_llm_new_token( cast(str, chunk.message.content), chunk=chunk ) @@ -699,7 +709,9 @@ class BaseChatModel(BaseLanguageModel[BaseMessage], ABC): result = await self._agenerate(messages, stop=stop, **kwargs) # Add response metadata to each generation - for generation in result.generations: + for idx, generation in enumerate(result.generations): + if run_manager and generation.message.id is None: + generation.message.id = f"run-{run_manager.run_id}-{idx}" generation.message.response_metadata = _gen_info_and_msg_metadata( generation ) diff --git a/libs/core/langchain_core/language_models/fake_chat_models.py b/libs/core/langchain_core/language_models/fake_chat_models.py index 8324787c50..8285d79674 100644 --- a/libs/core/langchain_core/language_models/fake_chat_models.py +++ b/libs/core/langchain_core/language_models/fake_chat_models.py @@ -223,7 +223,9 @@ class GenericFakeChatModel(BaseChatModel): content_chunks = cast(List[str], re.split(r"(\s)", content)) for token in content_chunks: - chunk = ChatGenerationChunk(message=AIMessageChunk(content=token)) + chunk = ChatGenerationChunk( + message=AIMessageChunk(content=token, id=message.id) + ) if run_manager: run_manager.on_llm_new_token(token, chunk=chunk) yield chunk @@ -240,6 +242,7 @@ class GenericFakeChatModel(BaseChatModel): for fvalue_chunk in fvalue_chunks: chunk = ChatGenerationChunk( message=AIMessageChunk( + id=message.id, content="", additional_kwargs={ "function_call": {fkey: fvalue_chunk} @@ -255,6 +258,7 @@ class GenericFakeChatModel(BaseChatModel): else: chunk = ChatGenerationChunk( message=AIMessageChunk( + id=message.id, content="", additional_kwargs={"function_call": {fkey: fvalue}}, ) @@ -268,7 +272,7 @@ class GenericFakeChatModel(BaseChatModel): else: chunk = ChatGenerationChunk( message=AIMessageChunk( - content="", additional_kwargs={key: value} + id=message.id, content="", additional_kwargs={key: value} ) ) if run_manager: diff --git a/libs/core/langchain_core/load/mapping.py b/libs/core/langchain_core/load/mapping.py index 10a3a6413c..5ac56503ea 100644 --- a/libs/core/langchain_core/load/mapping.py +++ b/libs/core/langchain_core/load/mapping.py @@ -971,4 +971,10 @@ _JS_SERIALIZABLE_MAPPING: Dict[Tuple[str, ...], Tuple[str, ...]] = { "tool", "ToolMessageChunk", ), + ("langchain_core", "prompts", "image", "ImagePromptTemplate"): ( + "langchain_core", + "prompts", + "image", + "ImagePromptTemplate", + ), } diff --git a/libs/core/langchain_core/messages/ai.py b/libs/core/langchain_core/messages/ai.py index 3db9858834..22740326e8 100644 --- a/libs/core/langchain_core/messages/ai.py +++ b/libs/core/langchain_core/messages/ai.py @@ -56,6 +56,7 @@ class AIMessageChunk(AIMessage, BaseMessageChunk): response_metadata=merge_dicts( self.response_metadata, other.response_metadata ), + id=self.id, ) return super().__add__(other) diff --git a/libs/core/langchain_core/messages/base.py b/libs/core/langchain_core/messages/base.py index 26d9558e36..60c5722003 100644 --- a/libs/core/langchain_core/messages/base.py +++ b/libs/core/langchain_core/messages/base.py @@ -34,6 +34,8 @@ class BaseMessage(Serializable): name: Optional[str] = None id: Optional[str] = None + """An optional unique identifier for the message. This should ideally be + provided by the provider/model which created the message.""" class Config: extra = Extra.allow diff --git a/libs/core/langchain_core/messages/chat.py b/libs/core/langchain_core/messages/chat.py index fad0d265ea..f8a9add85e 100644 --- a/libs/core/langchain_core/messages/chat.py +++ b/libs/core/langchain_core/messages/chat.py @@ -54,6 +54,7 @@ class ChatMessageChunk(ChatMessage, BaseMessageChunk): response_metadata=merge_dicts( self.response_metadata, other.response_metadata ), + id=self.id, ) elif isinstance(other, BaseMessageChunk): return self.__class__( @@ -65,6 +66,7 @@ class ChatMessageChunk(ChatMessage, BaseMessageChunk): response_metadata=merge_dicts( self.response_metadata, other.response_metadata ), + id=self.id, ) else: return super().__add__(other) diff --git a/libs/core/langchain_core/messages/function.py b/libs/core/langchain_core/messages/function.py index a98242756a..c28f42b939 100644 --- a/libs/core/langchain_core/messages/function.py +++ b/libs/core/langchain_core/messages/function.py @@ -54,6 +54,7 @@ class FunctionMessageChunk(FunctionMessage, BaseMessageChunk): response_metadata=merge_dicts( self.response_metadata, other.response_metadata ), + id=self.id, ) return super().__add__(other) diff --git a/libs/core/langchain_core/messages/tool.py b/libs/core/langchain_core/messages/tool.py index 9891cab771..d91bc196bc 100644 --- a/libs/core/langchain_core/messages/tool.py +++ b/libs/core/langchain_core/messages/tool.py @@ -54,6 +54,7 @@ class ToolMessageChunk(ToolMessage, BaseMessageChunk): response_metadata=merge_dicts( self.response_metadata, other.response_metadata ), + id=self.id, ) return super().__add__(other) diff --git a/libs/core/langchain_core/runnables/graph.py b/libs/core/langchain_core/runnables/graph.py index 5c7a8e9985..84ae717d03 100644 --- a/libs/core/langchain_core/runnables/graph.py +++ b/libs/core/langchain_core/runnables/graph.py @@ -116,7 +116,9 @@ def node_data_str(node: Node) -> str: return data if not data.startswith("Runnable") else data[8:] -def node_data_json(node: Node) -> Dict[str, Union[str, Dict[str, Any]]]: +def node_data_json( + node: Node, *, with_schemas: bool = False +) -> Dict[str, Union[str, Dict[str, Any]]]: from langchain_core.load.serializable import to_json_not_implemented from langchain_core.runnables.base import Runnable, RunnableSerializable @@ -137,10 +139,17 @@ def node_data_json(node: Node) -> Dict[str, Union[str, Dict[str, Any]]]: }, } elif inspect.isclass(node.data) and issubclass(node.data, BaseModel): - return { - "type": "schema", - "data": node.data.schema(), - } + return ( + { + "type": "schema", + "data": node.data.schema(), + } + if with_schemas + else { + "type": "schema", + "data": node_data_str(node), + } + ) else: return { "type": "unknown", @@ -156,7 +165,7 @@ class Graph: edges: List[Edge] = field(default_factory=list) branches: Optional[Dict[str, List[Branch]]] = field(default_factory=dict) - def to_json(self) -> Dict[str, List[Dict[str, Any]]]: + def to_json(self, *, with_schemas: bool = False) -> Dict[str, List[Dict[str, Any]]]: """Convert the graph to a JSON-serializable format.""" stable_node_ids = { node.id: i if is_uuid(node.id) else node.id @@ -165,7 +174,10 @@ class Graph: return { "nodes": [ - {"id": stable_node_ids[node.id], **node_data_json(node)} + { + "id": stable_node_ids[node.id], + **node_data_json(node, with_schemas=with_schemas), + } for node in self.nodes.values() ], "edges": [ diff --git a/libs/core/tests/unit_tests/fake/test_fake_chat_model.py b/libs/core/tests/unit_tests/fake/test_fake_chat_model.py index d2faf94b22..8e3da6ea1f 100644 --- a/libs/core/tests/unit_tests/fake/test_fake_chat_model.py +++ b/libs/core/tests/unit_tests/fake/test_fake_chat_model.py @@ -8,6 +8,7 @@ from langchain_core.language_models import GenericFakeChatModel, ParrotFakeChatM from langchain_core.messages import AIMessage, AIMessageChunk, BaseMessage from langchain_core.messages.human import HumanMessage from langchain_core.outputs import ChatGenerationChunk, GenerationChunk +from tests.unit_tests.stubs import AnyStr def test_generic_fake_chat_model_invoke() -> None: @@ -15,11 +16,11 @@ def test_generic_fake_chat_model_invoke() -> None: infinite_cycle = cycle([AIMessage(content="hello"), AIMessage(content="goodbye")]) model = GenericFakeChatModel(messages=infinite_cycle) response = model.invoke("meow") - assert response == AIMessage(content="hello") + assert response == AIMessage(content="hello", id=AnyStr()) response = model.invoke("kitty") - assert response == AIMessage(content="goodbye") + assert response == AIMessage(content="goodbye", id=AnyStr()) response = model.invoke("meow") - assert response == AIMessage(content="hello") + assert response == AIMessage(content="hello", id=AnyStr()) async def test_generic_fake_chat_model_ainvoke() -> None: @@ -27,11 +28,11 @@ async def test_generic_fake_chat_model_ainvoke() -> None: infinite_cycle = cycle([AIMessage(content="hello"), AIMessage(content="goodbye")]) model = GenericFakeChatModel(messages=infinite_cycle) response = await model.ainvoke("meow") - assert response == AIMessage(content="hello") + assert response == AIMessage(content="hello", id=AnyStr()) response = await model.ainvoke("kitty") - assert response == AIMessage(content="goodbye") + assert response == AIMessage(content="goodbye", id=AnyStr()) response = await model.ainvoke("meow") - assert response == AIMessage(content="hello") + assert response == AIMessage(content="hello", id=AnyStr()) async def test_generic_fake_chat_model_stream() -> None: @@ -44,17 +45,19 @@ async def test_generic_fake_chat_model_stream() -> None: model = GenericFakeChatModel(messages=infinite_cycle) chunks = [chunk async for chunk in model.astream("meow")] assert chunks == [ - AIMessageChunk(content="hello"), - AIMessageChunk(content=" "), - AIMessageChunk(content="goodbye"), + AIMessageChunk(content="hello", id=AnyStr()), + AIMessageChunk(content=" ", id=AnyStr()), + AIMessageChunk(content="goodbye", id=AnyStr()), ] + assert len({chunk.id for chunk in chunks}) == 1 chunks = [chunk for chunk in model.stream("meow")] assert chunks == [ - AIMessageChunk(content="hello"), - AIMessageChunk(content=" "), - AIMessageChunk(content="goodbye"), + AIMessageChunk(content="hello", id=AnyStr()), + AIMessageChunk(content=" ", id=AnyStr()), + AIMessageChunk(content="goodbye", id=AnyStr()), ] + assert len({chunk.id for chunk in chunks}) == 1 # Test streaming of additional kwargs. # Relying on insertion order of the additional kwargs dict @@ -62,9 +65,10 @@ async def test_generic_fake_chat_model_stream() -> None: model = GenericFakeChatModel(messages=cycle([message])) chunks = [chunk async for chunk in model.astream("meow")] assert chunks == [ - AIMessageChunk(content="", additional_kwargs={"foo": 42}), - AIMessageChunk(content="", additional_kwargs={"bar": 24}), + AIMessageChunk(content="", additional_kwargs={"foo": 42}, id=AnyStr()), + AIMessageChunk(content="", additional_kwargs={"bar": 24}, id=AnyStr()), ] + assert len({chunk.id for chunk in chunks}) == 1 message = AIMessage( content="", @@ -81,24 +85,31 @@ async def test_generic_fake_chat_model_stream() -> None: assert chunks == [ AIMessageChunk( - content="", additional_kwargs={"function_call": {"name": "move_file"}} + content="", + additional_kwargs={"function_call": {"name": "move_file"}}, + id=AnyStr(), ), AIMessageChunk( content="", additional_kwargs={ - "function_call": {"arguments": '{\n "source_path": "foo"'} + "function_call": {"arguments": '{\n "source_path": "foo"'}, }, + id=AnyStr(), ), AIMessageChunk( - content="", additional_kwargs={"function_call": {"arguments": ","}} + content="", + additional_kwargs={"function_call": {"arguments": ","}}, + id=AnyStr(), ), AIMessageChunk( content="", additional_kwargs={ - "function_call": {"arguments": '\n "destination_path": "bar"\n}'} + "function_call": {"arguments": '\n "destination_path": "bar"\n}'}, }, + id=AnyStr(), ), ] + assert len({chunk.id for chunk in chunks}) == 1 accumulate_chunks = None for chunk in chunks: @@ -116,6 +127,7 @@ async def test_generic_fake_chat_model_stream() -> None: 'destination_path": "bar"\n}', } }, + id=chunks[0].id, ) @@ -128,10 +140,11 @@ async def test_generic_fake_chat_model_astream_log() -> None: ] final = log_patches[-1] assert final.state["streamed_output"] == [ - AIMessageChunk(content="hello"), - AIMessageChunk(content=" "), - AIMessageChunk(content="goodbye"), + AIMessageChunk(content="hello", id=AnyStr()), + AIMessageChunk(content=" ", id=AnyStr()), + AIMessageChunk(content="goodbye", id=AnyStr()), ] + assert len({chunk.id for chunk in final.state["streamed_output"]}) == 1 async def test_callback_handlers() -> None: @@ -178,16 +191,19 @@ async def test_callback_handlers() -> None: # New model results = list(model.stream("meow", {"callbacks": [MyCustomAsyncHandler(tokens)]})) assert results == [ - AIMessageChunk(content="hello"), - AIMessageChunk(content=" "), - AIMessageChunk(content="goodbye"), + AIMessageChunk(content="hello", id=AnyStr()), + AIMessageChunk(content=" ", id=AnyStr()), + AIMessageChunk(content="goodbye", id=AnyStr()), ] assert tokens == ["hello", " ", "goodbye"] + assert len({chunk.id for chunk in results}) == 1 def test_chat_model_inputs() -> None: fake = ParrotFakeChatModel() - assert fake.invoke("hello") == HumanMessage(content="hello") - assert fake.invoke([("ai", "blah")]) == AIMessage(content="blah") - assert fake.invoke([AIMessage(content="blah")]) == AIMessage(content="blah") + assert fake.invoke("hello") == HumanMessage(content="hello", id=AnyStr()) + assert fake.invoke([("ai", "blah")]) == AIMessage(content="blah", id=AnyStr()) + assert fake.invoke([AIMessage(content="blah")]) == AIMessage( + content="blah", id=AnyStr() + ) diff --git a/libs/core/tests/unit_tests/language_models/chat_models/test_base.py b/libs/core/tests/unit_tests/language_models/chat_models/test_base.py index 2eb87e0f12..f65646f445 100644 --- a/libs/core/tests/unit_tests/language_models/chat_models/test_base.py +++ b/libs/core/tests/unit_tests/language_models/chat_models/test_base.py @@ -21,6 +21,7 @@ from tests.unit_tests.fake.callbacks import ( FakeAsyncCallbackHandler, FakeCallbackHandler, ) +from tests.unit_tests.stubs import AnyStr @pytest.fixture @@ -140,10 +141,10 @@ async def test_astream_fallback_to_ainvoke() -> None: model = ModelWithGenerate() chunks = [chunk for chunk in model.stream("anything")] - assert chunks == [AIMessage(content="hello")] + assert chunks == [AIMessage(content="hello", id=AnyStr())] chunks = [chunk async for chunk in model.astream("anything")] - assert chunks == [AIMessage(content="hello")] + assert chunks == [AIMessage(content="hello", id=AnyStr())] async def test_astream_implementation_fallback_to_stream() -> None: @@ -178,15 +179,17 @@ async def test_astream_implementation_fallback_to_stream() -> None: model = ModelWithSyncStream() chunks = [chunk for chunk in model.stream("anything")] assert chunks == [ - AIMessageChunk(content="a"), - AIMessageChunk(content="b"), + AIMessageChunk(content="a", id=AnyStr()), + AIMessageChunk(content="b", id=AnyStr()), ] + assert len({chunk.id for chunk in chunks}) == 1 assert type(model)._astream == BaseChatModel._astream astream_chunks = [chunk async for chunk in model.astream("anything")] assert astream_chunks == [ - AIMessageChunk(content="a"), - AIMessageChunk(content="b"), + AIMessageChunk(content="a", id=AnyStr()), + AIMessageChunk(content="b", id=AnyStr()), ] + assert len({chunk.id for chunk in astream_chunks}) == 1 async def test_astream_implementation_uses_astream() -> None: @@ -221,6 +224,7 @@ async def test_astream_implementation_uses_astream() -> None: model = ModelWithAsyncStream() chunks = [chunk async for chunk in model.astream("anything")] assert chunks == [ - AIMessageChunk(content="a"), - AIMessageChunk(content="b"), + AIMessageChunk(content="a", id=AnyStr()), + AIMessageChunk(content="b", id=AnyStr()), ] + assert len({chunk.id for chunk in chunks}) == 1 diff --git a/libs/core/tests/unit_tests/runnables/__snapshots__/test_fallbacks.ambr b/libs/core/tests/unit_tests/runnables/__snapshots__/test_fallbacks.ambr index 3df05b800a..b802468d17 100644 --- a/libs/core/tests/unit_tests/runnables/__snapshots__/test_fallbacks.ambr +++ b/libs/core/tests/unit_tests/runnables/__snapshots__/test_fallbacks.ambr @@ -41,24 +41,12 @@ { "id": 0, "type": "schema", - "data": { - "title": "RunnableParallelInput", - "type": "object", - "properties": {} - } + "data": "ParallelInput" }, { "id": 1, "type": "schema", - "data": { - "title": "RunnableParallelOutput", - "type": "object", - "properties": { - "buz": { - "title": "Buz" - } - } - } + "data": "ParallelOutput" }, { "id": 2, @@ -130,16 +118,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "PromptInput", - "type": "object", - "properties": { - "buz": { - "title": "Buz", - "type": "string" - } - } - } + "data": "PromptInput" }, { "id": 1, @@ -157,436 +136,7 @@ { "id": 2, "type": "schema", - "data": { - "title": "PromptTemplateOutput", - "anyOf": [ - { - "$ref": "#/definitions/StringPromptValue" - }, - { - "$ref": "#/definitions/ChatPromptValueConcrete" - } - ], - "definitions": { - "StringPromptValue": { - "title": "StringPromptValue", - "description": "String prompt value.", - "type": "object", - "properties": { - "text": { - "title": "Text", - "type": "string" - }, - "type": { - "title": "Type", - "default": "StringPromptValue", - "enum": [ - "StringPromptValue" - ], - "type": "string" - } - }, - "required": [ - "text" - ] - }, - "AIMessage": { - "title": "AIMessage", - "description": "Message from an AI.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "ai", - "enum": [ - "ai" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "HumanMessage": { - "title": "HumanMessage", - "description": "Message from a human.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "human", - "enum": [ - "human" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "ChatMessage": { - "title": "ChatMessage", - "description": "Message that can be assigned an arbitrary speaker (i.e. role).", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "chat", - "enum": [ - "chat" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "role": { - "title": "Role", - "type": "string" - } - }, - "required": [ - "content", - "role" - ] - }, - "SystemMessage": { - "title": "SystemMessage", - "description": "Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "system", - "enum": [ - "system" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content" - ] - }, - "FunctionMessage": { - "title": "FunctionMessage", - "description": "Message for passing the result of executing a function back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "function", - "enum": [ - "function" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content", - "name" - ] - }, - "ToolMessage": { - "title": "ToolMessage", - "description": "Message for passing the result of executing a tool back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "tool", - "enum": [ - "tool" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "tool_call_id": { - "title": "Tool Call Id", - "type": "string" - } - }, - "required": [ - "content", - "tool_call_id" - ] - }, - "ChatPromptValueConcrete": { - "title": "ChatPromptValueConcrete", - "description": "Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.", - "type": "object", - "properties": { - "messages": { - "title": "Messages", - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - }, - "type": { - "title": "Type", - "default": "ChatPromptValueConcrete", - "enum": [ - "ChatPromptValueConcrete" - ], - "type": "string" - } - }, - "required": [ - "messages" - ] - } - } - } + "data": "PromptTemplateOutput" } ], "edges": [ @@ -618,464 +168,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "FakeListLLMInput", - "anyOf": [ - { - "type": "string" - }, - { - "$ref": "#/definitions/StringPromptValue" - }, - { - "$ref": "#/definitions/ChatPromptValueConcrete" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - } - ], - "definitions": { - "StringPromptValue": { - "title": "StringPromptValue", - "description": "String prompt value.", - "type": "object", - "properties": { - "text": { - "title": "Text", - "type": "string" - }, - "type": { - "title": "Type", - "default": "StringPromptValue", - "enum": [ - "StringPromptValue" - ], - "type": "string" - } - }, - "required": [ - "text" - ] - }, - "AIMessage": { - "title": "AIMessage", - "description": "Message from an AI.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "ai", - "enum": [ - "ai" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "HumanMessage": { - "title": "HumanMessage", - "description": "Message from a human.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "human", - "enum": [ - "human" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "ChatMessage": { - "title": "ChatMessage", - "description": "Message that can be assigned an arbitrary speaker (i.e. role).", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "chat", - "enum": [ - "chat" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "role": { - "title": "Role", - "type": "string" - } - }, - "required": [ - "content", - "role" - ] - }, - "SystemMessage": { - "title": "SystemMessage", - "description": "Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "system", - "enum": [ - "system" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content" - ] - }, - "FunctionMessage": { - "title": "FunctionMessage", - "description": "Message for passing the result of executing a function back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "function", - "enum": [ - "function" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content", - "name" - ] - }, - "ToolMessage": { - "title": "ToolMessage", - "description": "Message for passing the result of executing a tool back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "tool", - "enum": [ - "tool" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "tool_call_id": { - "title": "Tool Call Id", - "type": "string" - } - }, - "required": [ - "content", - "tool_call_id" - ] - }, - "ChatPromptValueConcrete": { - "title": "ChatPromptValueConcrete", - "description": "Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.", - "type": "object", - "properties": { - "messages": { - "title": "Messages", - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - }, - "type": { - "title": "Type", - "default": "ChatPromptValueConcrete", - "enum": [ - "ChatPromptValueConcrete" - ], - "type": "string" - } - }, - "required": [ - "messages" - ] - } - } - } + "data": "FakeListLLMInput" }, { "id": 1, @@ -1093,10 +186,7 @@ { "id": 2, "type": "schema", - "data": { - "title": "FakeListLLMOutput", - "type": "string" - } + "data": "FakeListLLMOutput" } ], "edges": [ @@ -1119,16 +209,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "PromptInput", - "type": "object", - "properties": { - "buz": { - "title": "Buz", - "type": "string" - } - } - } + "data": "PromptInput" }, { "id": 1, @@ -1159,10 +240,7 @@ { "id": 3, "type": "schema", - "data": { - "title": "FakeListLLMOutput", - "type": "string" - } + "data": "FakeListLLMOutput" } ], "edges": [ @@ -1215,16 +293,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "PromptInput", - "type": "object", - "properties": { - "buz": { - "title": "Buz", - "type": "string" - } - } - } + "data": "PromptInput" }, { "id": 1, @@ -1242,436 +311,7 @@ { "id": 2, "type": "schema", - "data": { - "title": "PromptTemplateOutput", - "anyOf": [ - { - "$ref": "#/definitions/StringPromptValue" - }, - { - "$ref": "#/definitions/ChatPromptValueConcrete" - } - ], - "definitions": { - "StringPromptValue": { - "title": "StringPromptValue", - "description": "String prompt value.", - "type": "object", - "properties": { - "text": { - "title": "Text", - "type": "string" - }, - "type": { - "title": "Type", - "default": "StringPromptValue", - "enum": [ - "StringPromptValue" - ], - "type": "string" - } - }, - "required": [ - "text" - ] - }, - "AIMessage": { - "title": "AIMessage", - "description": "Message from an AI.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "ai", - "enum": [ - "ai" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "HumanMessage": { - "title": "HumanMessage", - "description": "Message from a human.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "human", - "enum": [ - "human" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "ChatMessage": { - "title": "ChatMessage", - "description": "Message that can be assigned an arbitrary speaker (i.e. role).", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "chat", - "enum": [ - "chat" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "role": { - "title": "Role", - "type": "string" - } - }, - "required": [ - "content", - "role" - ] - }, - "SystemMessage": { - "title": "SystemMessage", - "description": "Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "system", - "enum": [ - "system" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content" - ] - }, - "FunctionMessage": { - "title": "FunctionMessage", - "description": "Message for passing the result of executing a function back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "function", - "enum": [ - "function" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content", - "name" - ] - }, - "ToolMessage": { - "title": "ToolMessage", - "description": "Message for passing the result of executing a tool back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "tool", - "enum": [ - "tool" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "tool_call_id": { - "title": "Tool Call Id", - "type": "string" - } - }, - "required": [ - "content", - "tool_call_id" - ] - }, - "ChatPromptValueConcrete": { - "title": "ChatPromptValueConcrete", - "description": "Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.", - "type": "object", - "properties": { - "messages": { - "title": "Messages", - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - }, - "type": { - "title": "Type", - "default": "ChatPromptValueConcrete", - "enum": [ - "ChatPromptValueConcrete" - ], - "type": "string" - } - }, - "required": [ - "messages" - ] - } - } - } + "data": "PromptTemplateOutput" } ], "edges": [ @@ -1703,464 +343,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "FakeListLLMInput", - "anyOf": [ - { - "type": "string" - }, - { - "$ref": "#/definitions/StringPromptValue" - }, - { - "$ref": "#/definitions/ChatPromptValueConcrete" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - } - ], - "definitions": { - "StringPromptValue": { - "title": "StringPromptValue", - "description": "String prompt value.", - "type": "object", - "properties": { - "text": { - "title": "Text", - "type": "string" - }, - "type": { - "title": "Type", - "default": "StringPromptValue", - "enum": [ - "StringPromptValue" - ], - "type": "string" - } - }, - "required": [ - "text" - ] - }, - "AIMessage": { - "title": "AIMessage", - "description": "Message from an AI.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "ai", - "enum": [ - "ai" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "HumanMessage": { - "title": "HumanMessage", - "description": "Message from a human.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "human", - "enum": [ - "human" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "ChatMessage": { - "title": "ChatMessage", - "description": "Message that can be assigned an arbitrary speaker (i.e. role).", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "chat", - "enum": [ - "chat" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "role": { - "title": "Role", - "type": "string" - } - }, - "required": [ - "content", - "role" - ] - }, - "SystemMessage": { - "title": "SystemMessage", - "description": "Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "system", - "enum": [ - "system" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content" - ] - }, - "FunctionMessage": { - "title": "FunctionMessage", - "description": "Message for passing the result of executing a function back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "function", - "enum": [ - "function" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content", - "name" - ] - }, - "ToolMessage": { - "title": "ToolMessage", - "description": "Message for passing the result of executing a tool back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "tool", - "enum": [ - "tool" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "tool_call_id": { - "title": "Tool Call Id", - "type": "string" - } - }, - "required": [ - "content", - "tool_call_id" - ] - }, - "ChatPromptValueConcrete": { - "title": "ChatPromptValueConcrete", - "description": "Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.", - "type": "object", - "properties": { - "messages": { - "title": "Messages", - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - }, - "type": { - "title": "Type", - "default": "ChatPromptValueConcrete", - "enum": [ - "ChatPromptValueConcrete" - ], - "type": "string" - } - }, - "required": [ - "messages" - ] - } - } - } + "data": "FakeListLLMInput" }, { "id": 1, @@ -2178,10 +361,7 @@ { "id": 2, "type": "schema", - "data": { - "title": "FakeListLLMOutput", - "type": "string" - } + "data": "FakeListLLMOutput" } ], "edges": [ @@ -2204,16 +384,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "PromptInput", - "type": "object", - "properties": { - "buz": { - "title": "Buz", - "type": "string" - } - } - } + "data": "PromptInput" }, { "id": 1, @@ -2244,10 +415,7 @@ { "id": 3, "type": "schema", - "data": { - "title": "FakeListLLMOutput", - "type": "string" - } + "data": "FakeListLLMOutput" } ], "edges": [ @@ -2286,16 +454,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "PromptInput", - "type": "object", - "properties": { - "buz": { - "title": "Buz", - "type": "string" - } - } - } + "data": "PromptInput" }, { "id": 1, @@ -2313,10 +472,7 @@ { "id": 2, "type": "schema", - "data": { - "title": "FakeListLLMOutput", - "type": "string" - } + "data": "FakeListLLMOutput" } ], "edges": [ @@ -2339,11 +495,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "RunnableParallelInput", - "type": "object", - "properties": {} - } + "data": "ParallelInput" }, { "id": 1, @@ -2374,10 +526,7 @@ { "id": 3, "type": "schema", - "data": { - "title": "FakeListLLMOutput", - "type": "string" - } + "data": "FakeListLLMOutput" } ], "edges": [ @@ -2441,9 +590,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "RunnablePassthroughInput" - } + "data": "PassthroughInput" }, { "id": 1, @@ -2461,9 +608,7 @@ { "id": 2, "type": "schema", - "data": { - "title": "RunnablePassthroughOutput" - } + "data": "PassthroughOutput" } ], "edges": [ @@ -2486,24 +631,12 @@ { "id": 0, "type": "schema", - "data": { - "title": "RunnableParallelInput", - "type": "object", - "properties": {} - } + "data": "ParallelInput" }, { "id": 1, "type": "schema", - "data": { - "title": "RunnableParallelOutput", - "type": "object", - "properties": { - "text": { - "title": "Text" - } - } - } + "data": "ParallelOutput" }, { "id": 2, @@ -2585,10 +718,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "_raise_error_input", - "type": "object" - } + "data": "_raise_error_input" }, { "id": 1, @@ -2606,10 +736,7 @@ { "id": 2, "type": "schema", - "data": { - "title": "_raise_error_output", - "type": "string" - } + "data": "_raise_error_output" } ], "edges": [ @@ -2632,11 +759,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "RunnableParallelInput", - "type": "object", - "properties": {} - } + "data": "ParallelInput" }, { "id": 1, @@ -2667,10 +790,7 @@ { "id": 3, "type": "schema", - "data": { - "title": "_raise_error_output", - "type": "string" - } + "data": "_raise_error_output" } ], "edges": [ @@ -2719,464 +839,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "FakeListLLMInput", - "anyOf": [ - { - "type": "string" - }, - { - "$ref": "#/definitions/StringPromptValue" - }, - { - "$ref": "#/definitions/ChatPromptValueConcrete" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - } - ], - "definitions": { - "StringPromptValue": { - "title": "StringPromptValue", - "description": "String prompt value.", - "type": "object", - "properties": { - "text": { - "title": "Text", - "type": "string" - }, - "type": { - "title": "Type", - "default": "StringPromptValue", - "enum": [ - "StringPromptValue" - ], - "type": "string" - } - }, - "required": [ - "text" - ] - }, - "AIMessage": { - "title": "AIMessage", - "description": "Message from an AI.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "ai", - "enum": [ - "ai" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "HumanMessage": { - "title": "HumanMessage", - "description": "Message from a human.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "human", - "enum": [ - "human" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "ChatMessage": { - "title": "ChatMessage", - "description": "Message that can be assigned an arbitrary speaker (i.e. role).", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "chat", - "enum": [ - "chat" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "role": { - "title": "Role", - "type": "string" - } - }, - "required": [ - "content", - "role" - ] - }, - "SystemMessage": { - "title": "SystemMessage", - "description": "Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "system", - "enum": [ - "system" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content" - ] - }, - "FunctionMessage": { - "title": "FunctionMessage", - "description": "Message for passing the result of executing a function back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "function", - "enum": [ - "function" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content", - "name" - ] - }, - "ToolMessage": { - "title": "ToolMessage", - "description": "Message for passing the result of executing a tool back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "tool", - "enum": [ - "tool" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "tool_call_id": { - "title": "Tool Call Id", - "type": "string" - } - }, - "required": [ - "content", - "tool_call_id" - ] - }, - "ChatPromptValueConcrete": { - "title": "ChatPromptValueConcrete", - "description": "Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.", - "type": "object", - "properties": { - "messages": { - "title": "Messages", - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - }, - "type": { - "title": "Type", - "default": "ChatPromptValueConcrete", - "enum": [ - "ChatPromptValueConcrete" - ], - "type": "string" - } - }, - "required": [ - "messages" - ] - } - } - } + "data": "FakeListLLMInput" }, { "id": 1, @@ -3194,10 +857,7 @@ { "id": 2, "type": "schema", - "data": { - "title": "FakeListLLMOutput", - "type": "string" - } + "data": "FakeListLLMOutput" } ], "edges": [ @@ -3229,464 +889,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "FakeListLLMInput", - "anyOf": [ - { - "type": "string" - }, - { - "$ref": "#/definitions/StringPromptValue" - }, - { - "$ref": "#/definitions/ChatPromptValueConcrete" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - } - ], - "definitions": { - "StringPromptValue": { - "title": "StringPromptValue", - "description": "String prompt value.", - "type": "object", - "properties": { - "text": { - "title": "Text", - "type": "string" - }, - "type": { - "title": "Type", - "default": "StringPromptValue", - "enum": [ - "StringPromptValue" - ], - "type": "string" - } - }, - "required": [ - "text" - ] - }, - "AIMessage": { - "title": "AIMessage", - "description": "Message from an AI.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "ai", - "enum": [ - "ai" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "HumanMessage": { - "title": "HumanMessage", - "description": "Message from a human.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "human", - "enum": [ - "human" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "ChatMessage": { - "title": "ChatMessage", - "description": "Message that can be assigned an arbitrary speaker (i.e. role).", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "chat", - "enum": [ - "chat" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "role": { - "title": "Role", - "type": "string" - } - }, - "required": [ - "content", - "role" - ] - }, - "SystemMessage": { - "title": "SystemMessage", - "description": "Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "system", - "enum": [ - "system" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content" - ] - }, - "FunctionMessage": { - "title": "FunctionMessage", - "description": "Message for passing the result of executing a function back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "function", - "enum": [ - "function" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content", - "name" - ] - }, - "ToolMessage": { - "title": "ToolMessage", - "description": "Message for passing the result of executing a tool back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "tool", - "enum": [ - "tool" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "tool_call_id": { - "title": "Tool Call Id", - "type": "string" - } - }, - "required": [ - "content", - "tool_call_id" - ] - }, - "ChatPromptValueConcrete": { - "title": "ChatPromptValueConcrete", - "description": "Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.", - "type": "object", - "properties": { - "messages": { - "title": "Messages", - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - }, - "type": { - "title": "Type", - "default": "ChatPromptValueConcrete", - "enum": [ - "ChatPromptValueConcrete" - ], - "type": "string" - } - }, - "required": [ - "messages" - ] - } - } - } + "data": "FakeListLLMInput" }, { "id": 1, @@ -3704,10 +907,7 @@ { "id": 2, "type": "schema", - "data": { - "title": "FakeListLLMOutput", - "type": "string" - } + "data": "FakeListLLMOutput" } ], "edges": [ @@ -3742,464 +942,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "FakeListLLMInput", - "anyOf": [ - { - "type": "string" - }, - { - "$ref": "#/definitions/StringPromptValue" - }, - { - "$ref": "#/definitions/ChatPromptValueConcrete" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - } - ], - "definitions": { - "StringPromptValue": { - "title": "StringPromptValue", - "description": "String prompt value.", - "type": "object", - "properties": { - "text": { - "title": "Text", - "type": "string" - }, - "type": { - "title": "Type", - "default": "StringPromptValue", - "enum": [ - "StringPromptValue" - ], - "type": "string" - } - }, - "required": [ - "text" - ] - }, - "AIMessage": { - "title": "AIMessage", - "description": "Message from an AI.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "ai", - "enum": [ - "ai" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "HumanMessage": { - "title": "HumanMessage", - "description": "Message from a human.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "human", - "enum": [ - "human" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "ChatMessage": { - "title": "ChatMessage", - "description": "Message that can be assigned an arbitrary speaker (i.e. role).", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "chat", - "enum": [ - "chat" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "role": { - "title": "Role", - "type": "string" - } - }, - "required": [ - "content", - "role" - ] - }, - "SystemMessage": { - "title": "SystemMessage", - "description": "Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "system", - "enum": [ - "system" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content" - ] - }, - "FunctionMessage": { - "title": "FunctionMessage", - "description": "Message for passing the result of executing a function back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "function", - "enum": [ - "function" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content", - "name" - ] - }, - "ToolMessage": { - "title": "ToolMessage", - "description": "Message for passing the result of executing a tool back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "tool", - "enum": [ - "tool" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "tool_call_id": { - "title": "Tool Call Id", - "type": "string" - } - }, - "required": [ - "content", - "tool_call_id" - ] - }, - "ChatPromptValueConcrete": { - "title": "ChatPromptValueConcrete", - "description": "Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.", - "type": "object", - "properties": { - "messages": { - "title": "Messages", - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - }, - "type": { - "title": "Type", - "default": "ChatPromptValueConcrete", - "enum": [ - "ChatPromptValueConcrete" - ], - "type": "string" - } - }, - "required": [ - "messages" - ] - } - } - } + "data": "FakeListLLMInput" }, { "id": 1, @@ -4217,10 +960,7 @@ { "id": 2, "type": "schema", - "data": { - "title": "FakeListLLMOutput", - "type": "string" - } + "data": "FakeListLLMOutput" } ], "edges": [ @@ -4265,464 +1005,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "FakeListLLMInput", - "anyOf": [ - { - "type": "string" - }, - { - "$ref": "#/definitions/StringPromptValue" - }, - { - "$ref": "#/definitions/ChatPromptValueConcrete" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - } - ], - "definitions": { - "StringPromptValue": { - "title": "StringPromptValue", - "description": "String prompt value.", - "type": "object", - "properties": { - "text": { - "title": "Text", - "type": "string" - }, - "type": { - "title": "Type", - "default": "StringPromptValue", - "enum": [ - "StringPromptValue" - ], - "type": "string" - } - }, - "required": [ - "text" - ] - }, - "AIMessage": { - "title": "AIMessage", - "description": "Message from an AI.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "ai", - "enum": [ - "ai" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "HumanMessage": { - "title": "HumanMessage", - "description": "Message from a human.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "human", - "enum": [ - "human" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "ChatMessage": { - "title": "ChatMessage", - "description": "Message that can be assigned an arbitrary speaker (i.e. role).", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "chat", - "enum": [ - "chat" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "role": { - "title": "Role", - "type": "string" - } - }, - "required": [ - "content", - "role" - ] - }, - "SystemMessage": { - "title": "SystemMessage", - "description": "Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "system", - "enum": [ - "system" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content" - ] - }, - "FunctionMessage": { - "title": "FunctionMessage", - "description": "Message for passing the result of executing a function back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "function", - "enum": [ - "function" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content", - "name" - ] - }, - "ToolMessage": { - "title": "ToolMessage", - "description": "Message for passing the result of executing a tool back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "tool", - "enum": [ - "tool" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "tool_call_id": { - "title": "Tool Call Id", - "type": "string" - } - }, - "required": [ - "content", - "tool_call_id" - ] - }, - "ChatPromptValueConcrete": { - "title": "ChatPromptValueConcrete", - "description": "Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.", - "type": "object", - "properties": { - "messages": { - "title": "Messages", - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - }, - "type": { - "title": "Type", - "default": "ChatPromptValueConcrete", - "enum": [ - "ChatPromptValueConcrete" - ], - "type": "string" - } - }, - "required": [ - "messages" - ] - } - } - } + "data": "FakeListLLMInput" }, { "id": 1, @@ -4740,10 +1023,7 @@ { "id": 2, "type": "schema", - "data": { - "title": "FakeListLLMOutput", - "type": "string" - } + "data": "FakeListLLMOutput" } ], "edges": [ @@ -4775,464 +1055,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "FakeListLLMInput", - "anyOf": [ - { - "type": "string" - }, - { - "$ref": "#/definitions/StringPromptValue" - }, - { - "$ref": "#/definitions/ChatPromptValueConcrete" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - } - ], - "definitions": { - "StringPromptValue": { - "title": "StringPromptValue", - "description": "String prompt value.", - "type": "object", - "properties": { - "text": { - "title": "Text", - "type": "string" - }, - "type": { - "title": "Type", - "default": "StringPromptValue", - "enum": [ - "StringPromptValue" - ], - "type": "string" - } - }, - "required": [ - "text" - ] - }, - "AIMessage": { - "title": "AIMessage", - "description": "Message from an AI.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "ai", - "enum": [ - "ai" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "HumanMessage": { - "title": "HumanMessage", - "description": "Message from a human.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "human", - "enum": [ - "human" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "ChatMessage": { - "title": "ChatMessage", - "description": "Message that can be assigned an arbitrary speaker (i.e. role).", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "chat", - "enum": [ - "chat" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "role": { - "title": "Role", - "type": "string" - } - }, - "required": [ - "content", - "role" - ] - }, - "SystemMessage": { - "title": "SystemMessage", - "description": "Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "system", - "enum": [ - "system" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content" - ] - }, - "FunctionMessage": { - "title": "FunctionMessage", - "description": "Message for passing the result of executing a function back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "function", - "enum": [ - "function" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content", - "name" - ] - }, - "ToolMessage": { - "title": "ToolMessage", - "description": "Message for passing the result of executing a tool back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "tool", - "enum": [ - "tool" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "tool_call_id": { - "title": "Tool Call Id", - "type": "string" - } - }, - "required": [ - "content", - "tool_call_id" - ] - }, - "ChatPromptValueConcrete": { - "title": "ChatPromptValueConcrete", - "description": "Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.", - "type": "object", - "properties": { - "messages": { - "title": "Messages", - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - }, - "type": { - "title": "Type", - "default": "ChatPromptValueConcrete", - "enum": [ - "ChatPromptValueConcrete" - ], - "type": "string" - } - }, - "required": [ - "messages" - ] - } - } - } + "data": "FakeListLLMInput" }, { "id": 1, @@ -5250,10 +1073,7 @@ { "id": 2, "type": "schema", - "data": { - "title": "FakeListLLMOutput", - "type": "string" - } + "data": "FakeListLLMOutput" } ], "edges": [ @@ -5284,464 +1104,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "FakeListLLMInput", - "anyOf": [ - { - "type": "string" - }, - { - "$ref": "#/definitions/StringPromptValue" - }, - { - "$ref": "#/definitions/ChatPromptValueConcrete" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - } - ], - "definitions": { - "StringPromptValue": { - "title": "StringPromptValue", - "description": "String prompt value.", - "type": "object", - "properties": { - "text": { - "title": "Text", - "type": "string" - }, - "type": { - "title": "Type", - "default": "StringPromptValue", - "enum": [ - "StringPromptValue" - ], - "type": "string" - } - }, - "required": [ - "text" - ] - }, - "AIMessage": { - "title": "AIMessage", - "description": "Message from an AI.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "ai", - "enum": [ - "ai" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "HumanMessage": { - "title": "HumanMessage", - "description": "Message from a human.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "human", - "enum": [ - "human" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "ChatMessage": { - "title": "ChatMessage", - "description": "Message that can be assigned an arbitrary speaker (i.e. role).", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "chat", - "enum": [ - "chat" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "role": { - "title": "Role", - "type": "string" - } - }, - "required": [ - "content", - "role" - ] - }, - "SystemMessage": { - "title": "SystemMessage", - "description": "Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "system", - "enum": [ - "system" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content" - ] - }, - "FunctionMessage": { - "title": "FunctionMessage", - "description": "Message for passing the result of executing a function back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "function", - "enum": [ - "function" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content", - "name" - ] - }, - "ToolMessage": { - "title": "ToolMessage", - "description": "Message for passing the result of executing a tool back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "tool", - "enum": [ - "tool" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "tool_call_id": { - "title": "Tool Call Id", - "type": "string" - } - }, - "required": [ - "content", - "tool_call_id" - ] - }, - "ChatPromptValueConcrete": { - "title": "ChatPromptValueConcrete", - "description": "Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.", - "type": "object", - "properties": { - "messages": { - "title": "Messages", - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - }, - "type": { - "title": "Type", - "default": "ChatPromptValueConcrete", - "enum": [ - "ChatPromptValueConcrete" - ], - "type": "string" - } - }, - "required": [ - "messages" - ] - } - } - } + "data": "FakeListLLMInput" }, { "id": 1, @@ -5759,10 +1122,7 @@ { "id": 2, "type": "schema", - "data": { - "title": "FakeListLLMOutput", - "type": "string" - } + "data": "FakeListLLMOutput" } ], "edges": [ @@ -5797,464 +1157,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "FakeListLLMInput", - "anyOf": [ - { - "type": "string" - }, - { - "$ref": "#/definitions/StringPromptValue" - }, - { - "$ref": "#/definitions/ChatPromptValueConcrete" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - } - ], - "definitions": { - "StringPromptValue": { - "title": "StringPromptValue", - "description": "String prompt value.", - "type": "object", - "properties": { - "text": { - "title": "Text", - "type": "string" - }, - "type": { - "title": "Type", - "default": "StringPromptValue", - "enum": [ - "StringPromptValue" - ], - "type": "string" - } - }, - "required": [ - "text" - ] - }, - "AIMessage": { - "title": "AIMessage", - "description": "Message from an AI.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "ai", - "enum": [ - "ai" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "HumanMessage": { - "title": "HumanMessage", - "description": "Message from a human.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "human", - "enum": [ - "human" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "ChatMessage": { - "title": "ChatMessage", - "description": "Message that can be assigned an arbitrary speaker (i.e. role).", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "chat", - "enum": [ - "chat" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "role": { - "title": "Role", - "type": "string" - } - }, - "required": [ - "content", - "role" - ] - }, - "SystemMessage": { - "title": "SystemMessage", - "description": "Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "system", - "enum": [ - "system" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content" - ] - }, - "FunctionMessage": { - "title": "FunctionMessage", - "description": "Message for passing the result of executing a function back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "function", - "enum": [ - "function" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content", - "name" - ] - }, - "ToolMessage": { - "title": "ToolMessage", - "description": "Message for passing the result of executing a tool back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "tool", - "enum": [ - "tool" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "tool_call_id": { - "title": "Tool Call Id", - "type": "string" - } - }, - "required": [ - "content", - "tool_call_id" - ] - }, - "ChatPromptValueConcrete": { - "title": "ChatPromptValueConcrete", - "description": "Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.", - "type": "object", - "properties": { - "messages": { - "title": "Messages", - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - }, - "type": { - "title": "Type", - "default": "ChatPromptValueConcrete", - "enum": [ - "ChatPromptValueConcrete" - ], - "type": "string" - } - }, - "required": [ - "messages" - ] - } - } - } + "data": "FakeListLLMInput" }, { "id": 1, @@ -6272,10 +1175,7 @@ { "id": 2, "type": "schema", - "data": { - "title": "FakeListLLMOutput", - "type": "string" - } + "data": "FakeListLLMOutput" } ], "edges": [ diff --git a/libs/core/tests/unit_tests/runnables/__snapshots__/test_runnable.ambr b/libs/core/tests/unit_tests/runnables/__snapshots__/test_runnable.ambr index b49af50a3e..120e57319f 100644 --- a/libs/core/tests/unit_tests/runnables/__snapshots__/test_runnable.ambr +++ b/libs/core/tests/unit_tests/runnables/__snapshots__/test_runnable.ambr @@ -53,11 +53,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "PromptInput", - "type": "object", - "properties": {} - } + "data": "PromptInput" }, { "id": 1, @@ -75,436 +71,7 @@ { "id": 2, "type": "schema", - "data": { - "title": "PromptTemplateOutput", - "anyOf": [ - { - "$ref": "#/definitions/StringPromptValue" - }, - { - "$ref": "#/definitions/ChatPromptValueConcrete" - } - ], - "definitions": { - "StringPromptValue": { - "title": "StringPromptValue", - "description": "String prompt value.", - "type": "object", - "properties": { - "text": { - "title": "Text", - "type": "string" - }, - "type": { - "title": "Type", - "default": "StringPromptValue", - "enum": [ - "StringPromptValue" - ], - "type": "string" - } - }, - "required": [ - "text" - ] - }, - "AIMessage": { - "title": "AIMessage", - "description": "Message from an AI.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "ai", - "enum": [ - "ai" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "HumanMessage": { - "title": "HumanMessage", - "description": "Message from a human.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "human", - "enum": [ - "human" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "ChatMessage": { - "title": "ChatMessage", - "description": "Message that can be assigned an arbitrary speaker (i.e. role).", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "chat", - "enum": [ - "chat" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "role": { - "title": "Role", - "type": "string" - } - }, - "required": [ - "content", - "role" - ] - }, - "SystemMessage": { - "title": "SystemMessage", - "description": "Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "system", - "enum": [ - "system" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content" - ] - }, - "FunctionMessage": { - "title": "FunctionMessage", - "description": "Message for passing the result of executing a function back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "function", - "enum": [ - "function" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content", - "name" - ] - }, - "ToolMessage": { - "title": "ToolMessage", - "description": "Message for passing the result of executing a tool back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "tool", - "enum": [ - "tool" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "tool_call_id": { - "title": "Tool Call Id", - "type": "string" - } - }, - "required": [ - "content", - "tool_call_id" - ] - }, - "ChatPromptValueConcrete": { - "title": "ChatPromptValueConcrete", - "description": "Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.", - "type": "object", - "properties": { - "messages": { - "title": "Messages", - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - }, - "type": { - "title": "Type", - "default": "ChatPromptValueConcrete", - "enum": [ - "ChatPromptValueConcrete" - ], - "type": "string" - } - }, - "required": [ - "messages" - ] - } - } - } + "data": "PromptTemplateOutput" } ], "edges": [ @@ -554,16 +121,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "PromptInput", - "type": "object", - "properties": { - "question": { - "title": "Question", - "type": "string" - } - } - } + "data": "PromptInput" }, { "id": 1, @@ -581,436 +139,7 @@ { "id": 2, "type": "schema", - "data": { - "title": "PromptTemplateOutput", - "anyOf": [ - { - "$ref": "#/definitions/StringPromptValue" - }, - { - "$ref": "#/definitions/ChatPromptValueConcrete" - } - ], - "definitions": { - "StringPromptValue": { - "title": "StringPromptValue", - "description": "String prompt value.", - "type": "object", - "properties": { - "text": { - "title": "Text", - "type": "string" - }, - "type": { - "title": "Type", - "default": "StringPromptValue", - "enum": [ - "StringPromptValue" - ], - "type": "string" - } - }, - "required": [ - "text" - ] - }, - "AIMessage": { - "title": "AIMessage", - "description": "Message from an AI.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "ai", - "enum": [ - "ai" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "HumanMessage": { - "title": "HumanMessage", - "description": "Message from a human.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "human", - "enum": [ - "human" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "ChatMessage": { - "title": "ChatMessage", - "description": "Message that can be assigned an arbitrary speaker (i.e. role).", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "chat", - "enum": [ - "chat" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "role": { - "title": "Role", - "type": "string" - } - }, - "required": [ - "content", - "role" - ] - }, - "SystemMessage": { - "title": "SystemMessage", - "description": "Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "system", - "enum": [ - "system" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content" - ] - }, - "FunctionMessage": { - "title": "FunctionMessage", - "description": "Message for passing the result of executing a function back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "function", - "enum": [ - "function" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content", - "name" - ] - }, - "ToolMessage": { - "title": "ToolMessage", - "description": "Message for passing the result of executing a tool back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "tool", - "enum": [ - "tool" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "tool_call_id": { - "title": "Tool Call Id", - "type": "string" - } - }, - "required": [ - "content", - "tool_call_id" - ] - }, - "ChatPromptValueConcrete": { - "title": "ChatPromptValueConcrete", - "description": "Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.", - "type": "object", - "properties": { - "messages": { - "title": "Messages", - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - }, - "type": { - "title": "Type", - "default": "ChatPromptValueConcrete", - "enum": [ - "ChatPromptValueConcrete" - ], - "type": "string" - } - }, - "required": [ - "messages" - ] - } - } - } + "data": "PromptTemplateOutput" } ], "edges": [ @@ -1038,16 +167,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "PromptInput", - "type": "object", - "properties": { - "question": { - "title": "Question", - "type": "string" - } - } - } + "data": "PromptInput" }, { "id": 1, @@ -1065,436 +185,7 @@ { "id": 2, "type": "schema", - "data": { - "title": "ChatPromptTemplateOutput", - "anyOf": [ - { - "$ref": "#/definitions/StringPromptValue" - }, - { - "$ref": "#/definitions/ChatPromptValueConcrete" - } - ], - "definitions": { - "StringPromptValue": { - "title": "StringPromptValue", - "description": "String prompt value.", - "type": "object", - "properties": { - "text": { - "title": "Text", - "type": "string" - }, - "type": { - "title": "Type", - "default": "StringPromptValue", - "enum": [ - "StringPromptValue" - ], - "type": "string" - } - }, - "required": [ - "text" - ] - }, - "AIMessage": { - "title": "AIMessage", - "description": "Message from an AI.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "ai", - "enum": [ - "ai" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "HumanMessage": { - "title": "HumanMessage", - "description": "Message from a human.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "human", - "enum": [ - "human" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "ChatMessage": { - "title": "ChatMessage", - "description": "Message that can be assigned an arbitrary speaker (i.e. role).", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "chat", - "enum": [ - "chat" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "role": { - "title": "Role", - "type": "string" - } - }, - "required": [ - "content", - "role" - ] - }, - "SystemMessage": { - "title": "SystemMessage", - "description": "Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "system", - "enum": [ - "system" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content" - ] - }, - "FunctionMessage": { - "title": "FunctionMessage", - "description": "Message for passing the result of executing a function back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "function", - "enum": [ - "function" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content", - "name" - ] - }, - "ToolMessage": { - "title": "ToolMessage", - "description": "Message for passing the result of executing a tool back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "tool", - "enum": [ - "tool" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "tool_call_id": { - "title": "Tool Call Id", - "type": "string" - } - }, - "required": [ - "content", - "tool_call_id" - ] - }, - "ChatPromptValueConcrete": { - "title": "ChatPromptValueConcrete", - "description": "Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.", - "type": "object", - "properties": { - "messages": { - "title": "Messages", - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - }, - "type": { - "title": "Type", - "default": "ChatPromptValueConcrete", - "enum": [ - "ChatPromptValueConcrete" - ], - "type": "string" - } - }, - "required": [ - "messages" - ] - } - } - } + "data": "ChatPromptTemplateOutput" } ], "edges": [ @@ -1526,464 +217,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "FakeListChatModelInput", - "anyOf": [ - { - "type": "string" - }, - { - "$ref": "#/definitions/StringPromptValue" - }, - { - "$ref": "#/definitions/ChatPromptValueConcrete" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - } - ], - "definitions": { - "StringPromptValue": { - "title": "StringPromptValue", - "description": "String prompt value.", - "type": "object", - "properties": { - "text": { - "title": "Text", - "type": "string" - }, - "type": { - "title": "Type", - "default": "StringPromptValue", - "enum": [ - "StringPromptValue" - ], - "type": "string" - } - }, - "required": [ - "text" - ] - }, - "AIMessage": { - "title": "AIMessage", - "description": "Message from an AI.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "ai", - "enum": [ - "ai" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "HumanMessage": { - "title": "HumanMessage", - "description": "Message from a human.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "human", - "enum": [ - "human" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "ChatMessage": { - "title": "ChatMessage", - "description": "Message that can be assigned an arbitrary speaker (i.e. role).", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "chat", - "enum": [ - "chat" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "role": { - "title": "Role", - "type": "string" - } - }, - "required": [ - "content", - "role" - ] - }, - "SystemMessage": { - "title": "SystemMessage", - "description": "Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "system", - "enum": [ - "system" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content" - ] - }, - "FunctionMessage": { - "title": "FunctionMessage", - "description": "Message for passing the result of executing a function back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "function", - "enum": [ - "function" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content", - "name" - ] - }, - "ToolMessage": { - "title": "ToolMessage", - "description": "Message for passing the result of executing a tool back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "tool", - "enum": [ - "tool" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "tool_call_id": { - "title": "Tool Call Id", - "type": "string" - } - }, - "required": [ - "content", - "tool_call_id" - ] - }, - "ChatPromptValueConcrete": { - "title": "ChatPromptValueConcrete", - "description": "Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.", - "type": "object", - "properties": { - "messages": { - "title": "Messages", - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - }, - "type": { - "title": "Type", - "default": "ChatPromptValueConcrete", - "enum": [ - "ChatPromptValueConcrete" - ], - "type": "string" - } - }, - "required": [ - "messages" - ] - } - } - } + "data": "FakeListChatModelInput" }, { "id": 1, @@ -2001,382 +235,7 @@ { "id": 2, "type": "schema", - "data": { - "title": "FakeListChatModelOutput", - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ], - "definitions": { - "AIMessage": { - "title": "AIMessage", - "description": "Message from an AI.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "ai", - "enum": [ - "ai" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "HumanMessage": { - "title": "HumanMessage", - "description": "Message from a human.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "human", - "enum": [ - "human" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "ChatMessage": { - "title": "ChatMessage", - "description": "Message that can be assigned an arbitrary speaker (i.e. role).", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "chat", - "enum": [ - "chat" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "role": { - "title": "Role", - "type": "string" - } - }, - "required": [ - "content", - "role" - ] - }, - "SystemMessage": { - "title": "SystemMessage", - "description": "Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "system", - "enum": [ - "system" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content" - ] - }, - "FunctionMessage": { - "title": "FunctionMessage", - "description": "Message for passing the result of executing a function back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "function", - "enum": [ - "function" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content", - "name" - ] - }, - "ToolMessage": { - "title": "ToolMessage", - "description": "Message for passing the result of executing a tool back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "tool", - "enum": [ - "tool" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "tool_call_id": { - "title": "Tool Call Id", - "type": "string" - } - }, - "required": [ - "content", - "tool_call_id" - ] - } - } - } + "data": "FakeListChatModelOutput" } ], "edges": [ @@ -2408,385 +267,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "CommaSeparatedListOutputParserInput", - "anyOf": [ - { - "type": "string" - }, - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ], - "definitions": { - "AIMessage": { - "title": "AIMessage", - "description": "Message from an AI.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "ai", - "enum": [ - "ai" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "HumanMessage": { - "title": "HumanMessage", - "description": "Message from a human.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "human", - "enum": [ - "human" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "ChatMessage": { - "title": "ChatMessage", - "description": "Message that can be assigned an arbitrary speaker (i.e. role).", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "chat", - "enum": [ - "chat" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "role": { - "title": "Role", - "type": "string" - } - }, - "required": [ - "content", - "role" - ] - }, - "SystemMessage": { - "title": "SystemMessage", - "description": "Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "system", - "enum": [ - "system" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content" - ] - }, - "FunctionMessage": { - "title": "FunctionMessage", - "description": "Message for passing the result of executing a function back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "function", - "enum": [ - "function" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content", - "name" - ] - }, - "ToolMessage": { - "title": "ToolMessage", - "description": "Message for passing the result of executing a tool back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "tool", - "enum": [ - "tool" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "tool_call_id": { - "title": "Tool Call Id", - "type": "string" - } - }, - "required": [ - "content", - "tool_call_id" - ] - } - } - } + "data": "CommaSeparatedListOutputParserInput" }, { "id": 1, @@ -2804,13 +285,7 @@ { "id": 2, "type": "schema", - "data": { - "title": "CommaSeparatedListOutputParserOutput", - "type": "array", - "items": { - "type": "string" - } - } + "data": "CommaSeparatedListOutputParserOutput" } ], "edges": [ @@ -2833,16 +308,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "PromptInput", - "type": "object", - "properties": { - "question": { - "title": "Question", - "type": "string" - } - } - } + "data": "PromptInput" }, { "id": 1, @@ -2886,13 +352,7 @@ { "id": 4, "type": "schema", - "data": { - "title": "CommaSeparatedListOutputParserOutput", - "type": "array", - "items": { - "type": "string" - } - } + "data": "CommaSeparatedListOutputParserOutput" } ], "edges": [ @@ -2983,11 +443,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "PromptInput", - "type": "object", - "properties": {} - } + "data": "PromptInput" }, { "id": 1, @@ -3005,436 +461,7 @@ { "id": 2, "type": "schema", - "data": { - "title": "PromptTemplateOutput", - "anyOf": [ - { - "$ref": "#/definitions/StringPromptValue" - }, - { - "$ref": "#/definitions/ChatPromptValueConcrete" - } - ], - "definitions": { - "StringPromptValue": { - "title": "StringPromptValue", - "description": "String prompt value.", - "type": "object", - "properties": { - "text": { - "title": "Text", - "type": "string" - }, - "type": { - "title": "Type", - "default": "StringPromptValue", - "enum": [ - "StringPromptValue" - ], - "type": "string" - } - }, - "required": [ - "text" - ] - }, - "AIMessage": { - "title": "AIMessage", - "description": "Message from an AI.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "ai", - "enum": [ - "ai" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "HumanMessage": { - "title": "HumanMessage", - "description": "Message from a human.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "human", - "enum": [ - "human" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "ChatMessage": { - "title": "ChatMessage", - "description": "Message that can be assigned an arbitrary speaker (i.e. role).", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "chat", - "enum": [ - "chat" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "role": { - "title": "Role", - "type": "string" - } - }, - "required": [ - "content", - "role" - ] - }, - "SystemMessage": { - "title": "SystemMessage", - "description": "Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "system", - "enum": [ - "system" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content" - ] - }, - "FunctionMessage": { - "title": "FunctionMessage", - "description": "Message for passing the result of executing a function back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "function", - "enum": [ - "function" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content", - "name" - ] - }, - "ToolMessage": { - "title": "ToolMessage", - "description": "Message for passing the result of executing a tool back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "tool", - "enum": [ - "tool" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "tool_call_id": { - "title": "Tool Call Id", - "type": "string" - } - }, - "required": [ - "content", - "tool_call_id" - ] - }, - "ChatPromptValueConcrete": { - "title": "ChatPromptValueConcrete", - "description": "Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.", - "type": "object", - "properties": { - "messages": { - "title": "Messages", - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - }, - "type": { - "title": "Type", - "default": "ChatPromptValueConcrete", - "enum": [ - "ChatPromptValueConcrete" - ], - "type": "string" - } - }, - "required": [ - "messages" - ] - } - } - } + "data": "PromptTemplateOutput" } ], "edges": [ @@ -3484,16 +511,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "PromptInput", - "type": "object", - "properties": { - "question": { - "title": "Question", - "type": "string" - } - } - } + "data": "PromptInput" }, { "id": 1, @@ -3511,436 +529,7 @@ { "id": 2, "type": "schema", - "data": { - "title": "PromptTemplateOutput", - "anyOf": [ - { - "$ref": "#/definitions/StringPromptValue" - }, - { - "$ref": "#/definitions/ChatPromptValueConcrete" - } - ], - "definitions": { - "StringPromptValue": { - "title": "StringPromptValue", - "description": "String prompt value.", - "type": "object", - "properties": { - "text": { - "title": "Text", - "type": "string" - }, - "type": { - "title": "Type", - "default": "StringPromptValue", - "enum": [ - "StringPromptValue" - ], - "type": "string" - } - }, - "required": [ - "text" - ] - }, - "AIMessage": { - "title": "AIMessage", - "description": "Message from an AI.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "ai", - "enum": [ - "ai" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "HumanMessage": { - "title": "HumanMessage", - "description": "Message from a human.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "human", - "enum": [ - "human" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "ChatMessage": { - "title": "ChatMessage", - "description": "Message that can be assigned an arbitrary speaker (i.e. role).", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "chat", - "enum": [ - "chat" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "role": { - "title": "Role", - "type": "string" - } - }, - "required": [ - "content", - "role" - ] - }, - "SystemMessage": { - "title": "SystemMessage", - "description": "Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "system", - "enum": [ - "system" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content" - ] - }, - "FunctionMessage": { - "title": "FunctionMessage", - "description": "Message for passing the result of executing a function back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "function", - "enum": [ - "function" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content", - "name" - ] - }, - "ToolMessage": { - "title": "ToolMessage", - "description": "Message for passing the result of executing a tool back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "tool", - "enum": [ - "tool" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "tool_call_id": { - "title": "Tool Call Id", - "type": "string" - } - }, - "required": [ - "content", - "tool_call_id" - ] - }, - "ChatPromptValueConcrete": { - "title": "ChatPromptValueConcrete", - "description": "Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.", - "type": "object", - "properties": { - "messages": { - "title": "Messages", - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - }, - "type": { - "title": "Type", - "default": "ChatPromptValueConcrete", - "enum": [ - "ChatPromptValueConcrete" - ], - "type": "string" - } - }, - "required": [ - "messages" - ] - } - } - } + "data": "PromptTemplateOutput" } ], "edges": [ @@ -3968,16 +557,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "PromptInput", - "type": "object", - "properties": { - "question": { - "title": "Question", - "type": "string" - } - } - } + "data": "PromptInput" }, { "id": 1, @@ -3995,436 +575,7 @@ { "id": 2, "type": "schema", - "data": { - "title": "ChatPromptTemplateOutput", - "anyOf": [ - { - "$ref": "#/definitions/StringPromptValue" - }, - { - "$ref": "#/definitions/ChatPromptValueConcrete" - } - ], - "definitions": { - "StringPromptValue": { - "title": "StringPromptValue", - "description": "String prompt value.", - "type": "object", - "properties": { - "text": { - "title": "Text", - "type": "string" - }, - "type": { - "title": "Type", - "default": "StringPromptValue", - "enum": [ - "StringPromptValue" - ], - "type": "string" - } - }, - "required": [ - "text" - ] - }, - "AIMessage": { - "title": "AIMessage", - "description": "Message from an AI.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "ai", - "enum": [ - "ai" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "HumanMessage": { - "title": "HumanMessage", - "description": "Message from a human.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "human", - "enum": [ - "human" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "ChatMessage": { - "title": "ChatMessage", - "description": "Message that can be assigned an arbitrary speaker (i.e. role).", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "chat", - "enum": [ - "chat" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "role": { - "title": "Role", - "type": "string" - } - }, - "required": [ - "content", - "role" - ] - }, - "SystemMessage": { - "title": "SystemMessage", - "description": "Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "system", - "enum": [ - "system" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content" - ] - }, - "FunctionMessage": { - "title": "FunctionMessage", - "description": "Message for passing the result of executing a function back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "function", - "enum": [ - "function" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content", - "name" - ] - }, - "ToolMessage": { - "title": "ToolMessage", - "description": "Message for passing the result of executing a tool back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "tool", - "enum": [ - "tool" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "tool_call_id": { - "title": "Tool Call Id", - "type": "string" - } - }, - "required": [ - "content", - "tool_call_id" - ] - }, - "ChatPromptValueConcrete": { - "title": "ChatPromptValueConcrete", - "description": "Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.", - "type": "object", - "properties": { - "messages": { - "title": "Messages", - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - }, - "type": { - "title": "Type", - "default": "ChatPromptValueConcrete", - "enum": [ - "ChatPromptValueConcrete" - ], - "type": "string" - } - }, - "required": [ - "messages" - ] - } - } - } + "data": "ChatPromptTemplateOutput" } ], "edges": [ @@ -4455,464 +606,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "FakeListChatModelInput", - "anyOf": [ - { - "type": "string" - }, - { - "$ref": "#/definitions/StringPromptValue" - }, - { - "$ref": "#/definitions/ChatPromptValueConcrete" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - } - ], - "definitions": { - "StringPromptValue": { - "title": "StringPromptValue", - "description": "String prompt value.", - "type": "object", - "properties": { - "text": { - "title": "Text", - "type": "string" - }, - "type": { - "title": "Type", - "default": "StringPromptValue", - "enum": [ - "StringPromptValue" - ], - "type": "string" - } - }, - "required": [ - "text" - ] - }, - "AIMessage": { - "title": "AIMessage", - "description": "Message from an AI.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "ai", - "enum": [ - "ai" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "HumanMessage": { - "title": "HumanMessage", - "description": "Message from a human.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "human", - "enum": [ - "human" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "ChatMessage": { - "title": "ChatMessage", - "description": "Message that can be assigned an arbitrary speaker (i.e. role).", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "chat", - "enum": [ - "chat" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "role": { - "title": "Role", - "type": "string" - } - }, - "required": [ - "content", - "role" - ] - }, - "SystemMessage": { - "title": "SystemMessage", - "description": "Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "system", - "enum": [ - "system" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content" - ] - }, - "FunctionMessage": { - "title": "FunctionMessage", - "description": "Message for passing the result of executing a function back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "function", - "enum": [ - "function" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content", - "name" - ] - }, - "ToolMessage": { - "title": "ToolMessage", - "description": "Message for passing the result of executing a tool back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "tool", - "enum": [ - "tool" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "tool_call_id": { - "title": "Tool Call Id", - "type": "string" - } - }, - "required": [ - "content", - "tool_call_id" - ] - }, - "ChatPromptValueConcrete": { - "title": "ChatPromptValueConcrete", - "description": "Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.", - "type": "object", - "properties": { - "messages": { - "title": "Messages", - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - }, - "type": { - "title": "Type", - "default": "ChatPromptValueConcrete", - "enum": [ - "ChatPromptValueConcrete" - ], - "type": "string" - } - }, - "required": [ - "messages" - ] - } - } - } + "data": "FakeListChatModelInput" }, { "id": 1, @@ -4930,382 +624,7 @@ { "id": 2, "type": "schema", - "data": { - "title": "FakeListChatModelOutput", - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ], - "definitions": { - "AIMessage": { - "title": "AIMessage", - "description": "Message from an AI.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "ai", - "enum": [ - "ai" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "HumanMessage": { - "title": "HumanMessage", - "description": "Message from a human.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "human", - "enum": [ - "human" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "ChatMessage": { - "title": "ChatMessage", - "description": "Message that can be assigned an arbitrary speaker (i.e. role).", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "chat", - "enum": [ - "chat" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "role": { - "title": "Role", - "type": "string" - } - }, - "required": [ - "content", - "role" - ] - }, - "SystemMessage": { - "title": "SystemMessage", - "description": "Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "system", - "enum": [ - "system" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content" - ] - }, - "FunctionMessage": { - "title": "FunctionMessage", - "description": "Message for passing the result of executing a function back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "function", - "enum": [ - "function" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content", - "name" - ] - }, - "ToolMessage": { - "title": "ToolMessage", - "description": "Message for passing the result of executing a tool back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "tool", - "enum": [ - "tool" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "tool_call_id": { - "title": "Tool Call Id", - "type": "string" - } - }, - "required": [ - "content", - "tool_call_id" - ] - } - } - } + "data": "FakeListChatModelOutput" } ], "edges": [ @@ -5337,385 +656,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "CommaSeparatedListOutputParserInput", - "anyOf": [ - { - "type": "string" - }, - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ], - "definitions": { - "AIMessage": { - "title": "AIMessage", - "description": "Message from an AI.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "ai", - "enum": [ - "ai" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "HumanMessage": { - "title": "HumanMessage", - "description": "Message from a human.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "human", - "enum": [ - "human" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "ChatMessage": { - "title": "ChatMessage", - "description": "Message that can be assigned an arbitrary speaker (i.e. role).", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "chat", - "enum": [ - "chat" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "role": { - "title": "Role", - "type": "string" - } - }, - "required": [ - "content", - "role" - ] - }, - "SystemMessage": { - "title": "SystemMessage", - "description": "Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "system", - "enum": [ - "system" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content" - ] - }, - "FunctionMessage": { - "title": "FunctionMessage", - "description": "Message for passing the result of executing a function back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "function", - "enum": [ - "function" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content", - "name" - ] - }, - "ToolMessage": { - "title": "ToolMessage", - "description": "Message for passing the result of executing a tool back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "tool", - "enum": [ - "tool" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "tool_call_id": { - "title": "Tool Call Id", - "type": "string" - } - }, - "required": [ - "content", - "tool_call_id" - ] - } - } - } + "data": "CommaSeparatedListOutputParserInput" }, { "id": 1, @@ -5733,13 +674,7 @@ { "id": 2, "type": "schema", - "data": { - "title": "CommaSeparatedListOutputParserOutput", - "type": "array", - "items": { - "type": "string" - } - } + "data": "CommaSeparatedListOutputParserOutput" } ], "edges": [ @@ -5762,9 +697,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "RunnableLambdaInput" - } + "data": "LambdaInput" }, { "id": 1, @@ -5821,13 +754,7 @@ { "id": 5, "type": "schema", - "data": { - "title": "CommaSeparatedListOutputParserOutput", - "type": "array", - "items": { - "type": "string" - } - } + "data": "CommaSeparatedListOutputParserOutput" } ], "edges": [ @@ -5910,11 +837,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "PromptInput", - "type": "object", - "properties": {} - } + "data": "PromptInput" }, { "id": 1, @@ -5932,436 +855,7 @@ { "id": 2, "type": "schema", - "data": { - "title": "PromptTemplateOutput", - "anyOf": [ - { - "$ref": "#/definitions/StringPromptValue" - }, - { - "$ref": "#/definitions/ChatPromptValueConcrete" - } - ], - "definitions": { - "StringPromptValue": { - "title": "StringPromptValue", - "description": "String prompt value.", - "type": "object", - "properties": { - "text": { - "title": "Text", - "type": "string" - }, - "type": { - "title": "Type", - "default": "StringPromptValue", - "enum": [ - "StringPromptValue" - ], - "type": "string" - } - }, - "required": [ - "text" - ] - }, - "AIMessage": { - "title": "AIMessage", - "description": "Message from an AI.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "ai", - "enum": [ - "ai" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "HumanMessage": { - "title": "HumanMessage", - "description": "Message from a human.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "human", - "enum": [ - "human" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "ChatMessage": { - "title": "ChatMessage", - "description": "Message that can be assigned an arbitrary speaker (i.e. role).", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "chat", - "enum": [ - "chat" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "role": { - "title": "Role", - "type": "string" - } - }, - "required": [ - "content", - "role" - ] - }, - "SystemMessage": { - "title": "SystemMessage", - "description": "Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "system", - "enum": [ - "system" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content" - ] - }, - "FunctionMessage": { - "title": "FunctionMessage", - "description": "Message for passing the result of executing a function back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "function", - "enum": [ - "function" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content", - "name" - ] - }, - "ToolMessage": { - "title": "ToolMessage", - "description": "Message for passing the result of executing a tool back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "tool", - "enum": [ - "tool" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "tool_call_id": { - "title": "Tool Call Id", - "type": "string" - } - }, - "required": [ - "content", - "tool_call_id" - ] - }, - "ChatPromptValueConcrete": { - "title": "ChatPromptValueConcrete", - "description": "Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.", - "type": "object", - "properties": { - "messages": { - "title": "Messages", - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - }, - "type": { - "title": "Type", - "default": "ChatPromptValueConcrete", - "enum": [ - "ChatPromptValueConcrete" - ], - "type": "string" - } - }, - "required": [ - "messages" - ] - } - } - } + "data": "PromptTemplateOutput" } ], "edges": [ @@ -6411,16 +905,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "PromptInput", - "type": "object", - "properties": { - "question": { - "title": "Question", - "type": "string" - } - } - } + "data": "PromptInput" }, { "id": 1, @@ -6438,436 +923,7 @@ { "id": 2, "type": "schema", - "data": { - "title": "PromptTemplateOutput", - "anyOf": [ - { - "$ref": "#/definitions/StringPromptValue" - }, - { - "$ref": "#/definitions/ChatPromptValueConcrete" - } - ], - "definitions": { - "StringPromptValue": { - "title": "StringPromptValue", - "description": "String prompt value.", - "type": "object", - "properties": { - "text": { - "title": "Text", - "type": "string" - }, - "type": { - "title": "Type", - "default": "StringPromptValue", - "enum": [ - "StringPromptValue" - ], - "type": "string" - } - }, - "required": [ - "text" - ] - }, - "AIMessage": { - "title": "AIMessage", - "description": "Message from an AI.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "ai", - "enum": [ - "ai" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "HumanMessage": { - "title": "HumanMessage", - "description": "Message from a human.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "human", - "enum": [ - "human" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "ChatMessage": { - "title": "ChatMessage", - "description": "Message that can be assigned an arbitrary speaker (i.e. role).", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "chat", - "enum": [ - "chat" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "role": { - "title": "Role", - "type": "string" - } - }, - "required": [ - "content", - "role" - ] - }, - "SystemMessage": { - "title": "SystemMessage", - "description": "Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "system", - "enum": [ - "system" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content" - ] - }, - "FunctionMessage": { - "title": "FunctionMessage", - "description": "Message for passing the result of executing a function back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "function", - "enum": [ - "function" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content", - "name" - ] - }, - "ToolMessage": { - "title": "ToolMessage", - "description": "Message for passing the result of executing a tool back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "tool", - "enum": [ - "tool" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "tool_call_id": { - "title": "Tool Call Id", - "type": "string" - } - }, - "required": [ - "content", - "tool_call_id" - ] - }, - "ChatPromptValueConcrete": { - "title": "ChatPromptValueConcrete", - "description": "Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.", - "type": "object", - "properties": { - "messages": { - "title": "Messages", - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - }, - "type": { - "title": "Type", - "default": "ChatPromptValueConcrete", - "enum": [ - "ChatPromptValueConcrete" - ], - "type": "string" - } - }, - "required": [ - "messages" - ] - } - } - } + "data": "PromptTemplateOutput" } ], "edges": [ @@ -6895,16 +951,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "PromptInput", - "type": "object", - "properties": { - "question": { - "title": "Question", - "type": "string" - } - } - } + "data": "PromptInput" }, { "id": 1, @@ -6922,436 +969,7 @@ { "id": 2, "type": "schema", - "data": { - "title": "ChatPromptTemplateOutput", - "anyOf": [ - { - "$ref": "#/definitions/StringPromptValue" - }, - { - "$ref": "#/definitions/ChatPromptValueConcrete" - } - ], - "definitions": { - "StringPromptValue": { - "title": "StringPromptValue", - "description": "String prompt value.", - "type": "object", - "properties": { - "text": { - "title": "Text", - "type": "string" - }, - "type": { - "title": "Type", - "default": "StringPromptValue", - "enum": [ - "StringPromptValue" - ], - "type": "string" - } - }, - "required": [ - "text" - ] - }, - "AIMessage": { - "title": "AIMessage", - "description": "Message from an AI.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "ai", - "enum": [ - "ai" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "HumanMessage": { - "title": "HumanMessage", - "description": "Message from a human.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "human", - "enum": [ - "human" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "ChatMessage": { - "title": "ChatMessage", - "description": "Message that can be assigned an arbitrary speaker (i.e. role).", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "chat", - "enum": [ - "chat" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "role": { - "title": "Role", - "type": "string" - } - }, - "required": [ - "content", - "role" - ] - }, - "SystemMessage": { - "title": "SystemMessage", - "description": "Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "system", - "enum": [ - "system" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content" - ] - }, - "FunctionMessage": { - "title": "FunctionMessage", - "description": "Message for passing the result of executing a function back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "function", - "enum": [ - "function" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content", - "name" - ] - }, - "ToolMessage": { - "title": "ToolMessage", - "description": "Message for passing the result of executing a tool back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "tool", - "enum": [ - "tool" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "tool_call_id": { - "title": "Tool Call Id", - "type": "string" - } - }, - "required": [ - "content", - "tool_call_id" - ] - }, - "ChatPromptValueConcrete": { - "title": "ChatPromptValueConcrete", - "description": "Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.", - "type": "object", - "properties": { - "messages": { - "title": "Messages", - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - }, - "type": { - "title": "Type", - "default": "ChatPromptValueConcrete", - "enum": [ - "ChatPromptValueConcrete" - ], - "type": "string" - } - }, - "required": [ - "messages" - ] - } - } - } + "data": "ChatPromptTemplateOutput" } ], "edges": [ @@ -7383,464 +1001,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "FakeListChatModelInput", - "anyOf": [ - { - "type": "string" - }, - { - "$ref": "#/definitions/StringPromptValue" - }, - { - "$ref": "#/definitions/ChatPromptValueConcrete" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - } - ], - "definitions": { - "StringPromptValue": { - "title": "StringPromptValue", - "description": "String prompt value.", - "type": "object", - "properties": { - "text": { - "title": "Text", - "type": "string" - }, - "type": { - "title": "Type", - "default": "StringPromptValue", - "enum": [ - "StringPromptValue" - ], - "type": "string" - } - }, - "required": [ - "text" - ] - }, - "AIMessage": { - "title": "AIMessage", - "description": "Message from an AI.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "ai", - "enum": [ - "ai" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "HumanMessage": { - "title": "HumanMessage", - "description": "Message from a human.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "human", - "enum": [ - "human" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "ChatMessage": { - "title": "ChatMessage", - "description": "Message that can be assigned an arbitrary speaker (i.e. role).", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "chat", - "enum": [ - "chat" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "role": { - "title": "Role", - "type": "string" - } - }, - "required": [ - "content", - "role" - ] - }, - "SystemMessage": { - "title": "SystemMessage", - "description": "Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "system", - "enum": [ - "system" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content" - ] - }, - "FunctionMessage": { - "title": "FunctionMessage", - "description": "Message for passing the result of executing a function back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "function", - "enum": [ - "function" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content", - "name" - ] - }, - "ToolMessage": { - "title": "ToolMessage", - "description": "Message for passing the result of executing a tool back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "tool", - "enum": [ - "tool" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "tool_call_id": { - "title": "Tool Call Id", - "type": "string" - } - }, - "required": [ - "content", - "tool_call_id" - ] - }, - "ChatPromptValueConcrete": { - "title": "ChatPromptValueConcrete", - "description": "Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.", - "type": "object", - "properties": { - "messages": { - "title": "Messages", - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - }, - "type": { - "title": "Type", - "default": "ChatPromptValueConcrete", - "enum": [ - "ChatPromptValueConcrete" - ], - "type": "string" - } - }, - "required": [ - "messages" - ] - } - } - } + "data": "FakeListChatModelInput" }, { "id": 1, @@ -7858,382 +1019,7 @@ { "id": 2, "type": "schema", - "data": { - "title": "FakeListChatModelOutput", - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ], - "definitions": { - "AIMessage": { - "title": "AIMessage", - "description": "Message from an AI.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "ai", - "enum": [ - "ai" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "HumanMessage": { - "title": "HumanMessage", - "description": "Message from a human.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "human", - "enum": [ - "human" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "ChatMessage": { - "title": "ChatMessage", - "description": "Message that can be assigned an arbitrary speaker (i.e. role).", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "chat", - "enum": [ - "chat" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "role": { - "title": "Role", - "type": "string" - } - }, - "required": [ - "content", - "role" - ] - }, - "SystemMessage": { - "title": "SystemMessage", - "description": "Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "system", - "enum": [ - "system" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content" - ] - }, - "FunctionMessage": { - "title": "FunctionMessage", - "description": "Message for passing the result of executing a function back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "function", - "enum": [ - "function" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content", - "name" - ] - }, - "ToolMessage": { - "title": "ToolMessage", - "description": "Message for passing the result of executing a tool back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "tool", - "enum": [ - "tool" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "tool_call_id": { - "title": "Tool Call Id", - "type": "string" - } - }, - "required": [ - "content", - "tool_call_id" - ] - } - } - } + "data": "FakeListChatModelOutput" } ], "edges": [ @@ -8264,385 +1050,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "CommaSeparatedListOutputParserInput", - "anyOf": [ - { - "type": "string" - }, - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ], - "definitions": { - "AIMessage": { - "title": "AIMessage", - "description": "Message from an AI.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "ai", - "enum": [ - "ai" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "HumanMessage": { - "title": "HumanMessage", - "description": "Message from a human.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "human", - "enum": [ - "human" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "ChatMessage": { - "title": "ChatMessage", - "description": "Message that can be assigned an arbitrary speaker (i.e. role).", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "chat", - "enum": [ - "chat" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "role": { - "title": "Role", - "type": "string" - } - }, - "required": [ - "content", - "role" - ] - }, - "SystemMessage": { - "title": "SystemMessage", - "description": "Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "system", - "enum": [ - "system" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content" - ] - }, - "FunctionMessage": { - "title": "FunctionMessage", - "description": "Message for passing the result of executing a function back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "function", - "enum": [ - "function" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content", - "name" - ] - }, - "ToolMessage": { - "title": "ToolMessage", - "description": "Message for passing the result of executing a tool back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "tool", - "enum": [ - "tool" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "tool_call_id": { - "title": "Tool Call Id", - "type": "string" - } - }, - "required": [ - "content", - "tool_call_id" - ] - } - } - } + "data": "CommaSeparatedListOutputParserInput" }, { "id": 1, @@ -8660,13 +1068,7 @@ { "id": 2, "type": "schema", - "data": { - "title": "CommaSeparatedListOutputParserOutput", - "type": "array", - "items": { - "type": "string" - } - } + "data": "CommaSeparatedListOutputParserOutput" } ], "edges": [ @@ -8734,11 +1136,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "PromptInput", - "type": "object", - "properties": {} - } + "data": "PromptInput" }, { "id": 1, @@ -8756,436 +1154,7 @@ { "id": 2, "type": "schema", - "data": { - "title": "PromptTemplateOutput", - "anyOf": [ - { - "$ref": "#/definitions/StringPromptValue" - }, - { - "$ref": "#/definitions/ChatPromptValueConcrete" - } - ], - "definitions": { - "StringPromptValue": { - "title": "StringPromptValue", - "description": "String prompt value.", - "type": "object", - "properties": { - "text": { - "title": "Text", - "type": "string" - }, - "type": { - "title": "Type", - "default": "StringPromptValue", - "enum": [ - "StringPromptValue" - ], - "type": "string" - } - }, - "required": [ - "text" - ] - }, - "AIMessage": { - "title": "AIMessage", - "description": "Message from an AI.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "ai", - "enum": [ - "ai" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "HumanMessage": { - "title": "HumanMessage", - "description": "Message from a human.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "human", - "enum": [ - "human" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "ChatMessage": { - "title": "ChatMessage", - "description": "Message that can be assigned an arbitrary speaker (i.e. role).", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "chat", - "enum": [ - "chat" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "role": { - "title": "Role", - "type": "string" - } - }, - "required": [ - "content", - "role" - ] - }, - "SystemMessage": { - "title": "SystemMessage", - "description": "Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "system", - "enum": [ - "system" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content" - ] - }, - "FunctionMessage": { - "title": "FunctionMessage", - "description": "Message for passing the result of executing a function back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "function", - "enum": [ - "function" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content", - "name" - ] - }, - "ToolMessage": { - "title": "ToolMessage", - "description": "Message for passing the result of executing a tool back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "tool", - "enum": [ - "tool" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "tool_call_id": { - "title": "Tool Call Id", - "type": "string" - } - }, - "required": [ - "content", - "tool_call_id" - ] - }, - "ChatPromptValueConcrete": { - "title": "ChatPromptValueConcrete", - "description": "Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.", - "type": "object", - "properties": { - "messages": { - "title": "Messages", - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - }, - "type": { - "title": "Type", - "default": "ChatPromptValueConcrete", - "enum": [ - "ChatPromptValueConcrete" - ], - "type": "string" - } - }, - "required": [ - "messages" - ] - } - } - } + "data": "PromptTemplateOutput" } ], "edges": [ @@ -9235,16 +1204,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "PromptInput", - "type": "object", - "properties": { - "question": { - "title": "Question", - "type": "string" - } - } - } + "data": "PromptInput" }, { "id": 1, @@ -9262,436 +1222,7 @@ { "id": 2, "type": "schema", - "data": { - "title": "PromptTemplateOutput", - "anyOf": [ - { - "$ref": "#/definitions/StringPromptValue" - }, - { - "$ref": "#/definitions/ChatPromptValueConcrete" - } - ], - "definitions": { - "StringPromptValue": { - "title": "StringPromptValue", - "description": "String prompt value.", - "type": "object", - "properties": { - "text": { - "title": "Text", - "type": "string" - }, - "type": { - "title": "Type", - "default": "StringPromptValue", - "enum": [ - "StringPromptValue" - ], - "type": "string" - } - }, - "required": [ - "text" - ] - }, - "AIMessage": { - "title": "AIMessage", - "description": "Message from an AI.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "ai", - "enum": [ - "ai" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "HumanMessage": { - "title": "HumanMessage", - "description": "Message from a human.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "human", - "enum": [ - "human" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "ChatMessage": { - "title": "ChatMessage", - "description": "Message that can be assigned an arbitrary speaker (i.e. role).", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "chat", - "enum": [ - "chat" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "role": { - "title": "Role", - "type": "string" - } - }, - "required": [ - "content", - "role" - ] - }, - "SystemMessage": { - "title": "SystemMessage", - "description": "Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "system", - "enum": [ - "system" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content" - ] - }, - "FunctionMessage": { - "title": "FunctionMessage", - "description": "Message for passing the result of executing a function back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "function", - "enum": [ - "function" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content", - "name" - ] - }, - "ToolMessage": { - "title": "ToolMessage", - "description": "Message for passing the result of executing a tool back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "tool", - "enum": [ - "tool" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "tool_call_id": { - "title": "Tool Call Id", - "type": "string" - } - }, - "required": [ - "content", - "tool_call_id" - ] - }, - "ChatPromptValueConcrete": { - "title": "ChatPromptValueConcrete", - "description": "Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.", - "type": "object", - "properties": { - "messages": { - "title": "Messages", - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - }, - "type": { - "title": "Type", - "default": "ChatPromptValueConcrete", - "enum": [ - "ChatPromptValueConcrete" - ], - "type": "string" - } - }, - "required": [ - "messages" - ] - } - } - } + "data": "PromptTemplateOutput" } ], "edges": [ @@ -9719,16 +1250,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "PromptInput", - "type": "object", - "properties": { - "question": { - "title": "Question", - "type": "string" - } - } - } + "data": "PromptInput" }, { "id": 1, @@ -9746,436 +1268,7 @@ { "id": 2, "type": "schema", - "data": { - "title": "ChatPromptTemplateOutput", - "anyOf": [ - { - "$ref": "#/definitions/StringPromptValue" - }, - { - "$ref": "#/definitions/ChatPromptValueConcrete" - } - ], - "definitions": { - "StringPromptValue": { - "title": "StringPromptValue", - "description": "String prompt value.", - "type": "object", - "properties": { - "text": { - "title": "Text", - "type": "string" - }, - "type": { - "title": "Type", - "default": "StringPromptValue", - "enum": [ - "StringPromptValue" - ], - "type": "string" - } - }, - "required": [ - "text" - ] - }, - "AIMessage": { - "title": "AIMessage", - "description": "Message from an AI.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "ai", - "enum": [ - "ai" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "HumanMessage": { - "title": "HumanMessage", - "description": "Message from a human.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "human", - "enum": [ - "human" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "ChatMessage": { - "title": "ChatMessage", - "description": "Message that can be assigned an arbitrary speaker (i.e. role).", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "chat", - "enum": [ - "chat" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "role": { - "title": "Role", - "type": "string" - } - }, - "required": [ - "content", - "role" - ] - }, - "SystemMessage": { - "title": "SystemMessage", - "description": "Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "system", - "enum": [ - "system" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content" - ] - }, - "FunctionMessage": { - "title": "FunctionMessage", - "description": "Message for passing the result of executing a function back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "function", - "enum": [ - "function" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content", - "name" - ] - }, - "ToolMessage": { - "title": "ToolMessage", - "description": "Message for passing the result of executing a tool back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "tool", - "enum": [ - "tool" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "tool_call_id": { - "title": "Tool Call Id", - "type": "string" - } - }, - "required": [ - "content", - "tool_call_id" - ] - }, - "ChatPromptValueConcrete": { - "title": "ChatPromptValueConcrete", - "description": "Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.", - "type": "object", - "properties": { - "messages": { - "title": "Messages", - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - }, - "type": { - "title": "Type", - "default": "ChatPromptValueConcrete", - "enum": [ - "ChatPromptValueConcrete" - ], - "type": "string" - } - }, - "required": [ - "messages" - ] - } - } - } + "data": "ChatPromptTemplateOutput" } ], "edges": [ @@ -10206,464 +1299,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "FakeListChatModelInput", - "anyOf": [ - { - "type": "string" - }, - { - "$ref": "#/definitions/StringPromptValue" - }, - { - "$ref": "#/definitions/ChatPromptValueConcrete" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - } - ], - "definitions": { - "StringPromptValue": { - "title": "StringPromptValue", - "description": "String prompt value.", - "type": "object", - "properties": { - "text": { - "title": "Text", - "type": "string" - }, - "type": { - "title": "Type", - "default": "StringPromptValue", - "enum": [ - "StringPromptValue" - ], - "type": "string" - } - }, - "required": [ - "text" - ] - }, - "AIMessage": { - "title": "AIMessage", - "description": "Message from an AI.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "ai", - "enum": [ - "ai" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "HumanMessage": { - "title": "HumanMessage", - "description": "Message from a human.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "human", - "enum": [ - "human" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "ChatMessage": { - "title": "ChatMessage", - "description": "Message that can be assigned an arbitrary speaker (i.e. role).", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "chat", - "enum": [ - "chat" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "role": { - "title": "Role", - "type": "string" - } - }, - "required": [ - "content", - "role" - ] - }, - "SystemMessage": { - "title": "SystemMessage", - "description": "Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "system", - "enum": [ - "system" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content" - ] - }, - "FunctionMessage": { - "title": "FunctionMessage", - "description": "Message for passing the result of executing a function back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "function", - "enum": [ - "function" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content", - "name" - ] - }, - "ToolMessage": { - "title": "ToolMessage", - "description": "Message for passing the result of executing a tool back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "tool", - "enum": [ - "tool" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "tool_call_id": { - "title": "Tool Call Id", - "type": "string" - } - }, - "required": [ - "content", - "tool_call_id" - ] - }, - "ChatPromptValueConcrete": { - "title": "ChatPromptValueConcrete", - "description": "Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.", - "type": "object", - "properties": { - "messages": { - "title": "Messages", - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - }, - "type": { - "title": "Type", - "default": "ChatPromptValueConcrete", - "enum": [ - "ChatPromptValueConcrete" - ], - "type": "string" - } - }, - "required": [ - "messages" - ] - } - } - } + "data": "FakeListChatModelInput" }, { "id": 1, @@ -10681,382 +1317,7 @@ { "id": 2, "type": "schema", - "data": { - "title": "FakeListChatModelOutput", - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ], - "definitions": { - "AIMessage": { - "title": "AIMessage", - "description": "Message from an AI.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "ai", - "enum": [ - "ai" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "HumanMessage": { - "title": "HumanMessage", - "description": "Message from a human.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "human", - "enum": [ - "human" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "ChatMessage": { - "title": "ChatMessage", - "description": "Message that can be assigned an arbitrary speaker (i.e. role).", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "chat", - "enum": [ - "chat" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "role": { - "title": "Role", - "type": "string" - } - }, - "required": [ - "content", - "role" - ] - }, - "SystemMessage": { - "title": "SystemMessage", - "description": "Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "system", - "enum": [ - "system" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content" - ] - }, - "FunctionMessage": { - "title": "FunctionMessage", - "description": "Message for passing the result of executing a function back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "function", - "enum": [ - "function" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content", - "name" - ] - }, - "ToolMessage": { - "title": "ToolMessage", - "description": "Message for passing the result of executing a tool back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "tool", - "enum": [ - "tool" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "tool_call_id": { - "title": "Tool Call Id", - "type": "string" - } - }, - "required": [ - "content", - "tool_call_id" - ] - } - } - } + "data": "FakeListChatModelOutput" } ], "edges": [ @@ -11088,385 +1349,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "CommaSeparatedListOutputParserInput", - "anyOf": [ - { - "type": "string" - }, - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ], - "definitions": { - "AIMessage": { - "title": "AIMessage", - "description": "Message from an AI.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "ai", - "enum": [ - "ai" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "HumanMessage": { - "title": "HumanMessage", - "description": "Message from a human.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "human", - "enum": [ - "human" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "ChatMessage": { - "title": "ChatMessage", - "description": "Message that can be assigned an arbitrary speaker (i.e. role).", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "chat", - "enum": [ - "chat" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "role": { - "title": "Role", - "type": "string" - } - }, - "required": [ - "content", - "role" - ] - }, - "SystemMessage": { - "title": "SystemMessage", - "description": "Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "system", - "enum": [ - "system" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content" - ] - }, - "FunctionMessage": { - "title": "FunctionMessage", - "description": "Message for passing the result of executing a function back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "function", - "enum": [ - "function" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content", - "name" - ] - }, - "ToolMessage": { - "title": "ToolMessage", - "description": "Message for passing the result of executing a tool back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "tool", - "enum": [ - "tool" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "tool_call_id": { - "title": "Tool Call Id", - "type": "string" - } - }, - "required": [ - "content", - "tool_call_id" - ] - } - } - } + "data": "CommaSeparatedListOutputParserInput" }, { "id": 1, @@ -11484,13 +1367,7 @@ { "id": 2, "type": "schema", - "data": { - "title": "CommaSeparatedListOutputParserOutput", - "type": "array", - "items": { - "type": "string" - } - } + "data": "CommaSeparatedListOutputParserOutput" } ], "edges": [ @@ -11513,16 +1390,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "PromptInput", - "type": "object", - "properties": { - "question": { - "title": "Question", - "type": "string" - } - } - } + "data": "PromptInput" }, { "id": 1, @@ -11618,13 +1486,7 @@ { "id": 8, "type": "schema", - "data": { - "title": "CommaSeparatedListOutputParserOutput", - "type": "array", - "items": { - "type": "string" - } - } + "data": "CommaSeparatedListOutputParserOutput" } ], "edges": [ @@ -11667,7 +1529,7 @@ # --- # name: test_combining_sequences.3 list([ - Run(id=UUID('00000000-0000-4000-8000-000000000000'), name='RunnableSequence', start_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), run_type='chain', end_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), extra={}, error=None, serialized={'lc': 1, 'type': 'constructor', 'id': ['langchain', 'schema', 'runnable', 'RunnableSequence'], 'kwargs': {'first': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'kwargs': {'messages': [{'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'SystemMessagePromptTemplate'], 'kwargs': {'prompt': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'kwargs': {'input_variables': [], 'template': 'You are a nice assistant.', 'template_format': 'f-string', 'partial_variables': {}}, 'name': 'PromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'PromptInput', 'type': 'object', 'properties': {}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'name': 'PromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': {'title': 'PromptTemplateOutput', 'anyOf': [{'$ref': '#/definitions/StringPromptValue'}, {'$ref': '#/definitions/ChatPromptValueConcrete'}], 'definitions': {'StringPromptValue': {'title': 'StringPromptValue', 'description': 'String prompt value.', 'type': 'object', 'properties': {'text': {'title': 'Text', 'type': 'string'}, 'type': {'title': 'Type', 'default': 'StringPromptValue', 'enum': ['StringPromptValue'], 'type': 'string'}}, 'required': ['text']}, 'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}, 'ChatPromptValueConcrete': {'title': 'ChatPromptValueConcrete', 'description': 'Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.', 'type': 'object', 'properties': {'messages': {'title': 'Messages', 'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}, 'type': {'title': 'Type', 'default': 'ChatPromptValueConcrete', 'enum': ['ChatPromptValueConcrete'], 'type': 'string'}}, 'required': ['messages']}}}}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}}}, {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'HumanMessagePromptTemplate'], 'kwargs': {'prompt': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'kwargs': {'input_variables': ['question'], 'template': '{question}', 'template_format': 'f-string', 'partial_variables': {}}, 'name': 'PromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'PromptInput', 'type': 'object', 'properties': {'question': {'title': 'Question', 'type': 'string'}}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'name': 'PromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': {'title': 'PromptTemplateOutput', 'anyOf': [{'$ref': '#/definitions/StringPromptValue'}, {'$ref': '#/definitions/ChatPromptValueConcrete'}], 'definitions': {'StringPromptValue': {'title': 'StringPromptValue', 'description': 'String prompt value.', 'type': 'object', 'properties': {'text': {'title': 'Text', 'type': 'string'}, 'type': {'title': 'Type', 'default': 'StringPromptValue', 'enum': ['StringPromptValue'], 'type': 'string'}}, 'required': ['text']}, 'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}, 'ChatPromptValueConcrete': {'title': 'ChatPromptValueConcrete', 'description': 'Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.', 'type': 'object', 'properties': {'messages': {'title': 'Messages', 'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}, 'type': {'title': 'Type', 'default': 'ChatPromptValueConcrete', 'enum': ['ChatPromptValueConcrete'], 'type': 'string'}}, 'required': ['messages']}}}}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}}}], 'input_variables': ['question']}, 'name': 'ChatPromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'PromptInput', 'type': 'object', 'properties': {'question': {'title': 'Question', 'type': 'string'}}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'name': 'ChatPromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': {'title': 'ChatPromptTemplateOutput', 'anyOf': [{'$ref': '#/definitions/StringPromptValue'}, {'$ref': '#/definitions/ChatPromptValueConcrete'}], 'definitions': {'StringPromptValue': {'title': 'StringPromptValue', 'description': 'String prompt value.', 'type': 'object', 'properties': {'text': {'title': 'Text', 'type': 'string'}, 'type': {'title': 'Type', 'default': 'StringPromptValue', 'enum': ['StringPromptValue'], 'type': 'string'}}, 'required': ['text']}, 'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}, 'ChatPromptValueConcrete': {'title': 'ChatPromptValueConcrete', 'description': 'Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.', 'type': 'object', 'properties': {'messages': {'title': 'Messages', 'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}, 'type': {'title': 'Type', 'default': 'ChatPromptValueConcrete', 'enum': ['ChatPromptValueConcrete'], 'type': 'string'}}, 'required': ['messages']}}}}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}, 'middle': [{'lc': 1, 'type': 'not_implemented', 'id': ['langchain_core', 'language_models', 'fake_chat_models', 'FakeListChatModel'], 'repr': "FakeListChatModel(responses=['foo, bar'])", 'name': 'FakeListChatModel', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'FakeListChatModelInput', 'anyOf': [{'type': 'string'}, {'$ref': '#/definitions/StringPromptValue'}, {'$ref': '#/definitions/ChatPromptValueConcrete'}, {'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}], 'definitions': {'StringPromptValue': {'title': 'StringPromptValue', 'description': 'String prompt value.', 'type': 'object', 'properties': {'text': {'title': 'Text', 'type': 'string'}, 'type': {'title': 'Type', 'default': 'StringPromptValue', 'enum': ['StringPromptValue'], 'type': 'string'}}, 'required': ['text']}, 'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}, 'ChatPromptValueConcrete': {'title': 'ChatPromptValueConcrete', 'description': 'Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.', 'type': 'object', 'properties': {'messages': {'title': 'Messages', 'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}, 'type': {'title': 'Type', 'default': 'ChatPromptValueConcrete', 'enum': ['ChatPromptValueConcrete'], 'type': 'string'}}, 'required': ['messages']}}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain_core', 'language_models', 'fake_chat_models', 'FakeListChatModel'], 'name': 'FakeListChatModel'}}, {'id': 2, 'type': 'schema', 'data': {'title': 'FakeListChatModelOutput', 'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}], 'definitions': {'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}}}}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}, {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'output_parsers', 'list', 'CommaSeparatedListOutputParser'], 'kwargs': {}, 'name': 'CommaSeparatedListOutputParser', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'CommaSeparatedListOutputParserInput', 'anyOf': [{'type': 'string'}, {'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}], 'definitions': {'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'output_parsers', 'list', 'CommaSeparatedListOutputParser'], 'name': 'CommaSeparatedListOutputParser'}}, {'id': 2, 'type': 'schema', 'data': {'title': 'CommaSeparatedListOutputParserOutput', 'type': 'array', 'items': {'type': 'string'}}}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}, {'lc': 1, 'type': 'not_implemented', 'id': ['langchain_core', 'runnables', 'base', 'RunnableLambda'], 'repr': "RunnableLambda(lambda x: {'question': x[0] + x[1]})"}, {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'kwargs': {'messages': [{'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'SystemMessagePromptTemplate'], 'kwargs': {'prompt': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'kwargs': {'input_variables': [], 'template': 'You are a nicer assistant.', 'template_format': 'f-string', 'partial_variables': {}}, 'name': 'PromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'PromptInput', 'type': 'object', 'properties': {}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'name': 'PromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': {'title': 'PromptTemplateOutput', 'anyOf': [{'$ref': '#/definitions/StringPromptValue'}, {'$ref': '#/definitions/ChatPromptValueConcrete'}], 'definitions': {'StringPromptValue': {'title': 'StringPromptValue', 'description': 'String prompt value.', 'type': 'object', 'properties': {'text': {'title': 'Text', 'type': 'string'}, 'type': {'title': 'Type', 'default': 'StringPromptValue', 'enum': ['StringPromptValue'], 'type': 'string'}}, 'required': ['text']}, 'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}, 'ChatPromptValueConcrete': {'title': 'ChatPromptValueConcrete', 'description': 'Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.', 'type': 'object', 'properties': {'messages': {'title': 'Messages', 'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}, 'type': {'title': 'Type', 'default': 'ChatPromptValueConcrete', 'enum': ['ChatPromptValueConcrete'], 'type': 'string'}}, 'required': ['messages']}}}}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}}}, {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'HumanMessagePromptTemplate'], 'kwargs': {'prompt': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'kwargs': {'input_variables': ['question'], 'template': '{question}', 'template_format': 'f-string', 'partial_variables': {}}, 'name': 'PromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'PromptInput', 'type': 'object', 'properties': {'question': {'title': 'Question', 'type': 'string'}}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'name': 'PromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': {'title': 'PromptTemplateOutput', 'anyOf': [{'$ref': '#/definitions/StringPromptValue'}, {'$ref': '#/definitions/ChatPromptValueConcrete'}], 'definitions': {'StringPromptValue': {'title': 'StringPromptValue', 'description': 'String prompt value.', 'type': 'object', 'properties': {'text': {'title': 'Text', 'type': 'string'}, 'type': {'title': 'Type', 'default': 'StringPromptValue', 'enum': ['StringPromptValue'], 'type': 'string'}}, 'required': ['text']}, 'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}, 'ChatPromptValueConcrete': {'title': 'ChatPromptValueConcrete', 'description': 'Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.', 'type': 'object', 'properties': {'messages': {'title': 'Messages', 'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}, 'type': {'title': 'Type', 'default': 'ChatPromptValueConcrete', 'enum': ['ChatPromptValueConcrete'], 'type': 'string'}}, 'required': ['messages']}}}}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}}}], 'input_variables': ['question']}, 'name': 'ChatPromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'PromptInput', 'type': 'object', 'properties': {'question': {'title': 'Question', 'type': 'string'}}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'name': 'ChatPromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': {'title': 'ChatPromptTemplateOutput', 'anyOf': [{'$ref': '#/definitions/StringPromptValue'}, {'$ref': '#/definitions/ChatPromptValueConcrete'}], 'definitions': {'StringPromptValue': {'title': 'StringPromptValue', 'description': 'String prompt value.', 'type': 'object', 'properties': {'text': {'title': 'Text', 'type': 'string'}, 'type': {'title': 'Type', 'default': 'StringPromptValue', 'enum': ['StringPromptValue'], 'type': 'string'}}, 'required': ['text']}, 'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}, 'ChatPromptValueConcrete': {'title': 'ChatPromptValueConcrete', 'description': 'Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.', 'type': 'object', 'properties': {'messages': {'title': 'Messages', 'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}, 'type': {'title': 'Type', 'default': 'ChatPromptValueConcrete', 'enum': ['ChatPromptValueConcrete'], 'type': 'string'}}, 'required': ['messages']}}}}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}, {'lc': 1, 'type': 'not_implemented', 'id': ['langchain_core', 'language_models', 'fake_chat_models', 'FakeListChatModel'], 'repr': "FakeListChatModel(responses=['baz, qux'])", 'name': 'FakeListChatModel', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'FakeListChatModelInput', 'anyOf': [{'type': 'string'}, {'$ref': '#/definitions/StringPromptValue'}, {'$ref': '#/definitions/ChatPromptValueConcrete'}, {'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}], 'definitions': {'StringPromptValue': {'title': 'StringPromptValue', 'description': 'String prompt value.', 'type': 'object', 'properties': {'text': {'title': 'Text', 'type': 'string'}, 'type': {'title': 'Type', 'default': 'StringPromptValue', 'enum': ['StringPromptValue'], 'type': 'string'}}, 'required': ['text']}, 'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}, 'ChatPromptValueConcrete': {'title': 'ChatPromptValueConcrete', 'description': 'Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.', 'type': 'object', 'properties': {'messages': {'title': 'Messages', 'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}, 'type': {'title': 'Type', 'default': 'ChatPromptValueConcrete', 'enum': ['ChatPromptValueConcrete'], 'type': 'string'}}, 'required': ['messages']}}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain_core', 'language_models', 'fake_chat_models', 'FakeListChatModel'], 'name': 'FakeListChatModel'}}, {'id': 2, 'type': 'schema', 'data': {'title': 'FakeListChatModelOutput', 'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}], 'definitions': {'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}}}}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}], 'last': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'output_parsers', 'list', 'CommaSeparatedListOutputParser'], 'kwargs': {}, 'name': 'CommaSeparatedListOutputParser', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'CommaSeparatedListOutputParserInput', 'anyOf': [{'type': 'string'}, {'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}], 'definitions': {'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'output_parsers', 'list', 'CommaSeparatedListOutputParser'], 'name': 'CommaSeparatedListOutputParser'}}, {'id': 2, 'type': 'schema', 'data': {'title': 'CommaSeparatedListOutputParserOutput', 'type': 'array', 'items': {'type': 'string'}}}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}, 'name': None}, 'name': 'RunnableSequence', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'PromptInput', 'type': 'object', 'properties': {'question': {'title': 'Question', 'type': 'string'}}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'name': 'ChatPromptTemplate'}}, {'id': 2, 'type': 'runnable', 'data': {'id': ['langchain_core', 'language_models', 'fake_chat_models', 'FakeListChatModel'], 'name': 'FakeListChatModel'}}, {'id': 3, 'type': 'runnable', 'data': {'id': ['langchain', 'output_parsers', 'list', 'CommaSeparatedListOutputParser'], 'name': 'CommaSeparatedListOutputParser'}}, {'id': 4, 'type': 'runnable', 'data': {'id': ['langchain_core', 'runnables', 'base', 'RunnableLambda'], 'name': 'RunnableLambda'}}, {'id': 5, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'name': 'ChatPromptTemplate'}}, {'id': 6, 'type': 'runnable', 'data': {'id': ['langchain_core', 'language_models', 'fake_chat_models', 'FakeListChatModel'], 'name': 'FakeListChatModel'}}, {'id': 7, 'type': 'runnable', 'data': {'id': ['langchain', 'output_parsers', 'list', 'CommaSeparatedListOutputParser'], 'name': 'CommaSeparatedListOutputParser'}}, {'id': 8, 'type': 'schema', 'data': {'title': 'CommaSeparatedListOutputParserOutput', 'type': 'array', 'items': {'type': 'string'}}}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}, {'source': 2, 'target': 3}, {'source': 3, 'target': 4}, {'source': 4, 'target': 5}, {'source': 5, 'target': 6}, {'source': 7, 'target': 8}, {'source': 6, 'target': 7}]}}, events=[{'name': 'start', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}, {'name': 'end', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}], inputs={'question': 'What is your name?'}, outputs={'output': ['baz', 'qux']}, reference_example_id=None, parent_run_id=None, tags=[], execution_order=None, child_execution_order=None, child_runs=[Run(id=UUID('00000000-0000-4000-8000-000000000001'), name='ChatPromptTemplate', start_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), run_type='prompt', end_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), extra={}, error=None, serialized={'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'kwargs': {'messages': [{'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'SystemMessagePromptTemplate'], 'kwargs': {'prompt': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'kwargs': {'input_variables': [], 'template': 'You are a nice assistant.', 'template_format': 'f-string', 'partial_variables': {}}, 'name': 'PromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'PromptInput', 'type': 'object', 'properties': {}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'name': 'PromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': {'title': 'PromptTemplateOutput', 'anyOf': [{'$ref': '#/definitions/StringPromptValue'}, {'$ref': '#/definitions/ChatPromptValueConcrete'}], 'definitions': {'StringPromptValue': {'title': 'StringPromptValue', 'description': 'String prompt value.', 'type': 'object', 'properties': {'text': {'title': 'Text', 'type': 'string'}, 'type': {'title': 'Type', 'default': 'StringPromptValue', 'enum': ['StringPromptValue'], 'type': 'string'}}, 'required': ['text']}, 'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}, 'ChatPromptValueConcrete': {'title': 'ChatPromptValueConcrete', 'description': 'Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.', 'type': 'object', 'properties': {'messages': {'title': 'Messages', 'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}, 'type': {'title': 'Type', 'default': 'ChatPromptValueConcrete', 'enum': ['ChatPromptValueConcrete'], 'type': 'string'}}, 'required': ['messages']}}}}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}}}, {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'HumanMessagePromptTemplate'], 'kwargs': {'prompt': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'kwargs': {'input_variables': ['question'], 'template': '{question}', 'template_format': 'f-string', 'partial_variables': {}}, 'name': 'PromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'PromptInput', 'type': 'object', 'properties': {'question': {'title': 'Question', 'type': 'string'}}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'name': 'PromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': {'title': 'PromptTemplateOutput', 'anyOf': [{'$ref': '#/definitions/StringPromptValue'}, {'$ref': '#/definitions/ChatPromptValueConcrete'}], 'definitions': {'StringPromptValue': {'title': 'StringPromptValue', 'description': 'String prompt value.', 'type': 'object', 'properties': {'text': {'title': 'Text', 'type': 'string'}, 'type': {'title': 'Type', 'default': 'StringPromptValue', 'enum': ['StringPromptValue'], 'type': 'string'}}, 'required': ['text']}, 'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}, 'ChatPromptValueConcrete': {'title': 'ChatPromptValueConcrete', 'description': 'Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.', 'type': 'object', 'properties': {'messages': {'title': 'Messages', 'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}, 'type': {'title': 'Type', 'default': 'ChatPromptValueConcrete', 'enum': ['ChatPromptValueConcrete'], 'type': 'string'}}, 'required': ['messages']}}}}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}}}], 'input_variables': ['question']}, 'name': 'ChatPromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'PromptInput', 'type': 'object', 'properties': {'question': {'title': 'Question', 'type': 'string'}}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'name': 'ChatPromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': {'title': 'ChatPromptTemplateOutput', 'anyOf': [{'$ref': '#/definitions/StringPromptValue'}, {'$ref': '#/definitions/ChatPromptValueConcrete'}], 'definitions': {'StringPromptValue': {'title': 'StringPromptValue', 'description': 'String prompt value.', 'type': 'object', 'properties': {'text': {'title': 'Text', 'type': 'string'}, 'type': {'title': 'Type', 'default': 'StringPromptValue', 'enum': ['StringPromptValue'], 'type': 'string'}}, 'required': ['text']}, 'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}, 'ChatPromptValueConcrete': {'title': 'ChatPromptValueConcrete', 'description': 'Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.', 'type': 'object', 'properties': {'messages': {'title': 'Messages', 'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}, 'type': {'title': 'Type', 'default': 'ChatPromptValueConcrete', 'enum': ['ChatPromptValueConcrete'], 'type': 'string'}}, 'required': ['messages']}}}}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}, events=[{'name': 'start', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}, {'name': 'end', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}], inputs={'question': 'What is your name?'}, outputs={'output': ChatPromptValue(messages=[SystemMessage(content='You are a nice assistant.'), HumanMessage(content='What is your name?')])}, reference_example_id=None, parent_run_id=UUID('00000000-0000-4000-8000-000000000000'), tags=['seq:step:1'], execution_order=None, child_execution_order=None, child_runs=[], trace_id=UUID('00000000-0000-4000-8000-000000000000'), dotted_order='20230101T000000000000Z00000000-0000-4000-8000-000000000000.20230101T000000000000Z00000000-0000-4000-8000-000000000001'), Run(id=UUID('00000000-0000-4000-8000-000000000002'), name='FakeListChatModel', start_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), run_type='llm', end_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), extra={'invocation_params': {'responses': ['foo, bar'], '_type': 'fake-list-chat-model', 'stop': None}, 'options': {'stop': None}, 'batch_size': 1}, error=None, serialized={'lc': 1, 'type': 'not_implemented', 'id': ['langchain_core', 'language_models', 'fake_chat_models', 'FakeListChatModel'], 'repr': "FakeListChatModel(responses=['foo, bar'])", 'name': 'FakeListChatModel', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'FakeListChatModelInput', 'anyOf': [{'type': 'string'}, {'$ref': '#/definitions/StringPromptValue'}, {'$ref': '#/definitions/ChatPromptValueConcrete'}, {'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}], 'definitions': {'StringPromptValue': {'title': 'StringPromptValue', 'description': 'String prompt value.', 'type': 'object', 'properties': {'text': {'title': 'Text', 'type': 'string'}, 'type': {'title': 'Type', 'default': 'StringPromptValue', 'enum': ['StringPromptValue'], 'type': 'string'}}, 'required': ['text']}, 'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}, 'ChatPromptValueConcrete': {'title': 'ChatPromptValueConcrete', 'description': 'Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.', 'type': 'object', 'properties': {'messages': {'title': 'Messages', 'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}, 'type': {'title': 'Type', 'default': 'ChatPromptValueConcrete', 'enum': ['ChatPromptValueConcrete'], 'type': 'string'}}, 'required': ['messages']}}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain_core', 'language_models', 'fake_chat_models', 'FakeListChatModel'], 'name': 'FakeListChatModel'}}, {'id': 2, 'type': 'schema', 'data': {'title': 'FakeListChatModelOutput', 'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}], 'definitions': {'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}}}}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}, events=[{'name': 'start', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}, {'name': 'end', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}], inputs={'prompts': ['System: You are a nice assistant.\nHuman: What is your name?']}, outputs={'generations': [[{'text': 'foo, bar', 'generation_info': None, 'type': 'ChatGeneration', 'message': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'schema', 'messages', 'AIMessage'], 'kwargs': {'content': 'foo, bar'}}}]], 'llm_output': None, 'run': None}, reference_example_id=None, parent_run_id=UUID('00000000-0000-4000-8000-000000000000'), tags=['seq:step:2'], execution_order=None, child_execution_order=None, child_runs=[], trace_id=UUID('00000000-0000-4000-8000-000000000000'), dotted_order='20230101T000000000000Z00000000-0000-4000-8000-000000000000.20230101T000000000000Z00000000-0000-4000-8000-000000000002'), Run(id=UUID('00000000-0000-4000-8000-000000000003'), name='CommaSeparatedListOutputParser', start_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), run_type='parser', end_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), extra={}, error=None, serialized={'lc': 1, 'type': 'constructor', 'id': ['langchain', 'output_parsers', 'list', 'CommaSeparatedListOutputParser'], 'kwargs': {}, 'name': 'CommaSeparatedListOutputParser', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'CommaSeparatedListOutputParserInput', 'anyOf': [{'type': 'string'}, {'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}], 'definitions': {'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'output_parsers', 'list', 'CommaSeparatedListOutputParser'], 'name': 'CommaSeparatedListOutputParser'}}, {'id': 2, 'type': 'schema', 'data': {'title': 'CommaSeparatedListOutputParserOutput', 'type': 'array', 'items': {'type': 'string'}}}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}, events=[{'name': 'start', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}, {'name': 'end', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}], inputs={'input': AIMessage(content='foo, bar')}, outputs={'output': ['foo', 'bar']}, reference_example_id=None, parent_run_id=UUID('00000000-0000-4000-8000-000000000000'), tags=['seq:step:3'], execution_order=None, child_execution_order=None, child_runs=[], trace_id=UUID('00000000-0000-4000-8000-000000000000'), dotted_order='20230101T000000000000Z00000000-0000-4000-8000-000000000000.20230101T000000000000Z00000000-0000-4000-8000-000000000003'), Run(id=UUID('00000000-0000-4000-8000-000000000004'), name='RunnableLambda', start_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), run_type='chain', end_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), extra={}, error=None, serialized={'lc': 1, 'type': 'not_implemented', 'id': ['langchain_core', 'runnables', 'base', 'RunnableLambda'], 'repr': "RunnableLambda(lambda x: {'question': x[0] + x[1]})"}, events=[{'name': 'start', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}, {'name': 'end', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}], inputs={'input': ['foo', 'bar']}, outputs={'question': 'foobar'}, reference_example_id=None, parent_run_id=UUID('00000000-0000-4000-8000-000000000000'), tags=['seq:step:4'], execution_order=None, child_execution_order=None, child_runs=[], trace_id=UUID('00000000-0000-4000-8000-000000000000'), dotted_order='20230101T000000000000Z00000000-0000-4000-8000-000000000000.20230101T000000000000Z00000000-0000-4000-8000-000000000004'), Run(id=UUID('00000000-0000-4000-8000-000000000005'), name='ChatPromptTemplate', start_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), run_type='prompt', end_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), extra={}, error=None, serialized={'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'kwargs': {'messages': [{'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'SystemMessagePromptTemplate'], 'kwargs': {'prompt': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'kwargs': {'input_variables': [], 'template': 'You are a nicer assistant.', 'template_format': 'f-string', 'partial_variables': {}}, 'name': 'PromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'PromptInput', 'type': 'object', 'properties': {}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'name': 'PromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': {'title': 'PromptTemplateOutput', 'anyOf': [{'$ref': '#/definitions/StringPromptValue'}, {'$ref': '#/definitions/ChatPromptValueConcrete'}], 'definitions': {'StringPromptValue': {'title': 'StringPromptValue', 'description': 'String prompt value.', 'type': 'object', 'properties': {'text': {'title': 'Text', 'type': 'string'}, 'type': {'title': 'Type', 'default': 'StringPromptValue', 'enum': ['StringPromptValue'], 'type': 'string'}}, 'required': ['text']}, 'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}, 'ChatPromptValueConcrete': {'title': 'ChatPromptValueConcrete', 'description': 'Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.', 'type': 'object', 'properties': {'messages': {'title': 'Messages', 'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}, 'type': {'title': 'Type', 'default': 'ChatPromptValueConcrete', 'enum': ['ChatPromptValueConcrete'], 'type': 'string'}}, 'required': ['messages']}}}}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}}}, {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'HumanMessagePromptTemplate'], 'kwargs': {'prompt': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'kwargs': {'input_variables': ['question'], 'template': '{question}', 'template_format': 'f-string', 'partial_variables': {}}, 'name': 'PromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'PromptInput', 'type': 'object', 'properties': {'question': {'title': 'Question', 'type': 'string'}}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'name': 'PromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': {'title': 'PromptTemplateOutput', 'anyOf': [{'$ref': '#/definitions/StringPromptValue'}, {'$ref': '#/definitions/ChatPromptValueConcrete'}], 'definitions': {'StringPromptValue': {'title': 'StringPromptValue', 'description': 'String prompt value.', 'type': 'object', 'properties': {'text': {'title': 'Text', 'type': 'string'}, 'type': {'title': 'Type', 'default': 'StringPromptValue', 'enum': ['StringPromptValue'], 'type': 'string'}}, 'required': ['text']}, 'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}, 'ChatPromptValueConcrete': {'title': 'ChatPromptValueConcrete', 'description': 'Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.', 'type': 'object', 'properties': {'messages': {'title': 'Messages', 'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}, 'type': {'title': 'Type', 'default': 'ChatPromptValueConcrete', 'enum': ['ChatPromptValueConcrete'], 'type': 'string'}}, 'required': ['messages']}}}}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}}}], 'input_variables': ['question']}, 'name': 'ChatPromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'PromptInput', 'type': 'object', 'properties': {'question': {'title': 'Question', 'type': 'string'}}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'name': 'ChatPromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': {'title': 'ChatPromptTemplateOutput', 'anyOf': [{'$ref': '#/definitions/StringPromptValue'}, {'$ref': '#/definitions/ChatPromptValueConcrete'}], 'definitions': {'StringPromptValue': {'title': 'StringPromptValue', 'description': 'String prompt value.', 'type': 'object', 'properties': {'text': {'title': 'Text', 'type': 'string'}, 'type': {'title': 'Type', 'default': 'StringPromptValue', 'enum': ['StringPromptValue'], 'type': 'string'}}, 'required': ['text']}, 'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}, 'ChatPromptValueConcrete': {'title': 'ChatPromptValueConcrete', 'description': 'Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.', 'type': 'object', 'properties': {'messages': {'title': 'Messages', 'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}, 'type': {'title': 'Type', 'default': 'ChatPromptValueConcrete', 'enum': ['ChatPromptValueConcrete'], 'type': 'string'}}, 'required': ['messages']}}}}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}, events=[{'name': 'start', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}, {'name': 'end', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}], inputs={'question': 'foobar'}, outputs={'output': ChatPromptValue(messages=[SystemMessage(content='You are a nicer assistant.'), HumanMessage(content='foobar')])}, reference_example_id=None, parent_run_id=UUID('00000000-0000-4000-8000-000000000000'), tags=['seq:step:5'], execution_order=None, child_execution_order=None, child_runs=[], trace_id=UUID('00000000-0000-4000-8000-000000000000'), dotted_order='20230101T000000000000Z00000000-0000-4000-8000-000000000000.20230101T000000000000Z00000000-0000-4000-8000-000000000005'), Run(id=UUID('00000000-0000-4000-8000-000000000006'), name='FakeListChatModel', start_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), run_type='llm', end_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), extra={'invocation_params': {'responses': ['baz, qux'], '_type': 'fake-list-chat-model', 'stop': None}, 'options': {'stop': None}, 'batch_size': 1}, error=None, serialized={'lc': 1, 'type': 'not_implemented', 'id': ['langchain_core', 'language_models', 'fake_chat_models', 'FakeListChatModel'], 'repr': "FakeListChatModel(responses=['baz, qux'])", 'name': 'FakeListChatModel', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'FakeListChatModelInput', 'anyOf': [{'type': 'string'}, {'$ref': '#/definitions/StringPromptValue'}, {'$ref': '#/definitions/ChatPromptValueConcrete'}, {'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}], 'definitions': {'StringPromptValue': {'title': 'StringPromptValue', 'description': 'String prompt value.', 'type': 'object', 'properties': {'text': {'title': 'Text', 'type': 'string'}, 'type': {'title': 'Type', 'default': 'StringPromptValue', 'enum': ['StringPromptValue'], 'type': 'string'}}, 'required': ['text']}, 'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}, 'ChatPromptValueConcrete': {'title': 'ChatPromptValueConcrete', 'description': 'Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.', 'type': 'object', 'properties': {'messages': {'title': 'Messages', 'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}, 'type': {'title': 'Type', 'default': 'ChatPromptValueConcrete', 'enum': ['ChatPromptValueConcrete'], 'type': 'string'}}, 'required': ['messages']}}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain_core', 'language_models', 'fake_chat_models', 'FakeListChatModel'], 'name': 'FakeListChatModel'}}, {'id': 2, 'type': 'schema', 'data': {'title': 'FakeListChatModelOutput', 'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}], 'definitions': {'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}}}}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}, events=[{'name': 'start', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}, {'name': 'end', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}], inputs={'prompts': ['System: You are a nicer assistant.\nHuman: foobar']}, outputs={'generations': [[{'text': 'baz, qux', 'generation_info': None, 'type': 'ChatGeneration', 'message': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'schema', 'messages', 'AIMessage'], 'kwargs': {'content': 'baz, qux'}}}]], 'llm_output': None, 'run': None}, reference_example_id=None, parent_run_id=UUID('00000000-0000-4000-8000-000000000000'), tags=['seq:step:6'], execution_order=None, child_execution_order=None, child_runs=[], trace_id=UUID('00000000-0000-4000-8000-000000000000'), dotted_order='20230101T000000000000Z00000000-0000-4000-8000-000000000000.20230101T000000000000Z00000000-0000-4000-8000-000000000006'), Run(id=UUID('00000000-0000-4000-8000-000000000007'), name='CommaSeparatedListOutputParser', start_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), run_type='parser', end_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), extra={}, error=None, serialized={'lc': 1, 'type': 'constructor', 'id': ['langchain', 'output_parsers', 'list', 'CommaSeparatedListOutputParser'], 'kwargs': {}, 'name': 'CommaSeparatedListOutputParser', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'CommaSeparatedListOutputParserInput', 'anyOf': [{'type': 'string'}, {'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}], 'definitions': {'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'output_parsers', 'list', 'CommaSeparatedListOutputParser'], 'name': 'CommaSeparatedListOutputParser'}}, {'id': 2, 'type': 'schema', 'data': {'title': 'CommaSeparatedListOutputParserOutput', 'type': 'array', 'items': {'type': 'string'}}}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}, events=[{'name': 'start', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}, {'name': 'end', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}], inputs={'input': AIMessage(content='baz, qux')}, outputs={'output': ['baz', 'qux']}, reference_example_id=None, parent_run_id=UUID('00000000-0000-4000-8000-000000000000'), tags=['seq:step:7'], execution_order=None, child_execution_order=None, child_runs=[], trace_id=UUID('00000000-0000-4000-8000-000000000000'), dotted_order='20230101T000000000000Z00000000-0000-4000-8000-000000000000.20230101T000000000000Z00000000-0000-4000-8000-000000000007')], trace_id=UUID('00000000-0000-4000-8000-000000000000'), dotted_order='20230101T000000000000Z00000000-0000-4000-8000-000000000000'), + Run(id=UUID('00000000-0000-4000-8000-000000000000'), name='RunnableSequence', start_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), run_type='chain', end_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), extra={}, error=None, serialized={'lc': 1, 'type': 'constructor', 'id': ['langchain', 'schema', 'runnable', 'RunnableSequence'], 'kwargs': {'first': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'kwargs': {'messages': [{'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'SystemMessagePromptTemplate'], 'kwargs': {'prompt': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'kwargs': {'input_variables': [], 'template': 'You are a nice assistant.', 'template_format': 'f-string', 'partial_variables': {}}, 'name': 'PromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'PromptInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'name': 'PromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': 'PromptTemplateOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}}}, {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'HumanMessagePromptTemplate'], 'kwargs': {'prompt': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'kwargs': {'input_variables': ['question'], 'template': '{question}', 'template_format': 'f-string', 'partial_variables': {}}, 'name': 'PromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'PromptInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'name': 'PromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': 'PromptTemplateOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}}}], 'input_variables': ['question']}, 'name': 'ChatPromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'PromptInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'name': 'ChatPromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': 'ChatPromptTemplateOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}, 'middle': [{'lc': 1, 'type': 'not_implemented', 'id': ['langchain_core', 'language_models', 'fake_chat_models', 'FakeListChatModel'], 'repr': "FakeListChatModel(responses=['foo, bar'])", 'name': 'FakeListChatModel', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'FakeListChatModelInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain_core', 'language_models', 'fake_chat_models', 'FakeListChatModel'], 'name': 'FakeListChatModel'}}, {'id': 2, 'type': 'schema', 'data': 'FakeListChatModelOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}, {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'output_parsers', 'list', 'CommaSeparatedListOutputParser'], 'kwargs': {}, 'name': 'CommaSeparatedListOutputParser', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'CommaSeparatedListOutputParserInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'output_parsers', 'list', 'CommaSeparatedListOutputParser'], 'name': 'CommaSeparatedListOutputParser'}}, {'id': 2, 'type': 'schema', 'data': 'CommaSeparatedListOutputParserOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}, {'lc': 1, 'type': 'not_implemented', 'id': ['langchain_core', 'runnables', 'base', 'RunnableLambda'], 'repr': "RunnableLambda(lambda x: {'question': x[0] + x[1]})"}, {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'kwargs': {'messages': [{'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'SystemMessagePromptTemplate'], 'kwargs': {'prompt': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'kwargs': {'input_variables': [], 'template': 'You are a nicer assistant.', 'template_format': 'f-string', 'partial_variables': {}}, 'name': 'PromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'PromptInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'name': 'PromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': 'PromptTemplateOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}}}, {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'HumanMessagePromptTemplate'], 'kwargs': {'prompt': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'kwargs': {'input_variables': ['question'], 'template': '{question}', 'template_format': 'f-string', 'partial_variables': {}}, 'name': 'PromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'PromptInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'name': 'PromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': 'PromptTemplateOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}}}], 'input_variables': ['question']}, 'name': 'ChatPromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'PromptInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'name': 'ChatPromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': 'ChatPromptTemplateOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}, {'lc': 1, 'type': 'not_implemented', 'id': ['langchain_core', 'language_models', 'fake_chat_models', 'FakeListChatModel'], 'repr': "FakeListChatModel(responses=['baz, qux'])", 'name': 'FakeListChatModel', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'FakeListChatModelInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain_core', 'language_models', 'fake_chat_models', 'FakeListChatModel'], 'name': 'FakeListChatModel'}}, {'id': 2, 'type': 'schema', 'data': 'FakeListChatModelOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}], 'last': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'output_parsers', 'list', 'CommaSeparatedListOutputParser'], 'kwargs': {}, 'name': 'CommaSeparatedListOutputParser', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'CommaSeparatedListOutputParserInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'output_parsers', 'list', 'CommaSeparatedListOutputParser'], 'name': 'CommaSeparatedListOutputParser'}}, {'id': 2, 'type': 'schema', 'data': 'CommaSeparatedListOutputParserOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}, 'name': None}, 'name': 'RunnableSequence', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'PromptInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'name': 'ChatPromptTemplate'}}, {'id': 2, 'type': 'runnable', 'data': {'id': ['langchain_core', 'language_models', 'fake_chat_models', 'FakeListChatModel'], 'name': 'FakeListChatModel'}}, {'id': 3, 'type': 'runnable', 'data': {'id': ['langchain', 'output_parsers', 'list', 'CommaSeparatedListOutputParser'], 'name': 'CommaSeparatedListOutputParser'}}, {'id': 4, 'type': 'runnable', 'data': {'id': ['langchain_core', 'runnables', 'base', 'RunnableLambda'], 'name': 'RunnableLambda'}}, {'id': 5, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'name': 'ChatPromptTemplate'}}, {'id': 6, 'type': 'runnable', 'data': {'id': ['langchain_core', 'language_models', 'fake_chat_models', 'FakeListChatModel'], 'name': 'FakeListChatModel'}}, {'id': 7, 'type': 'runnable', 'data': {'id': ['langchain', 'output_parsers', 'list', 'CommaSeparatedListOutputParser'], 'name': 'CommaSeparatedListOutputParser'}}, {'id': 8, 'type': 'schema', 'data': 'CommaSeparatedListOutputParserOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}, {'source': 2, 'target': 3}, {'source': 3, 'target': 4}, {'source': 4, 'target': 5}, {'source': 5, 'target': 6}, {'source': 7, 'target': 8}, {'source': 6, 'target': 7}]}}, events=[{'name': 'start', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}, {'name': 'end', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}], inputs={'question': 'What is your name?'}, outputs={'output': ['baz', 'qux']}, reference_example_id=None, parent_run_id=None, tags=[], execution_order=None, child_execution_order=None, child_runs=[Run(id=UUID('00000000-0000-4000-8000-000000000001'), name='ChatPromptTemplate', start_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), run_type='prompt', end_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), extra={}, error=None, serialized={'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'kwargs': {'messages': [{'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'SystemMessagePromptTemplate'], 'kwargs': {'prompt': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'kwargs': {'input_variables': [], 'template': 'You are a nice assistant.', 'template_format': 'f-string', 'partial_variables': {}}, 'name': 'PromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'PromptInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'name': 'PromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': 'PromptTemplateOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}}}, {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'HumanMessagePromptTemplate'], 'kwargs': {'prompt': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'kwargs': {'input_variables': ['question'], 'template': '{question}', 'template_format': 'f-string', 'partial_variables': {}}, 'name': 'PromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'PromptInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'name': 'PromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': 'PromptTemplateOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}}}], 'input_variables': ['question']}, 'name': 'ChatPromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'PromptInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'name': 'ChatPromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': 'ChatPromptTemplateOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}, events=[{'name': 'start', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}, {'name': 'end', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}], inputs={'question': 'What is your name?'}, outputs={'output': ChatPromptValue(messages=[SystemMessage(content='You are a nice assistant.'), HumanMessage(content='What is your name?')])}, reference_example_id=None, parent_run_id=UUID('00000000-0000-4000-8000-000000000000'), tags=['seq:step:1'], execution_order=None, child_execution_order=None, child_runs=[], trace_id=UUID('00000000-0000-4000-8000-000000000000'), dotted_order='20230101T000000000000Z00000000-0000-4000-8000-000000000000.20230101T000000000000Z00000000-0000-4000-8000-000000000001'), Run(id=UUID('00000000-0000-4000-8000-000000000002'), name='FakeListChatModel', start_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), run_type='llm', end_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), extra={'invocation_params': {'responses': ['foo, bar'], '_type': 'fake-list-chat-model', 'stop': None}, 'options': {'stop': None}, 'batch_size': 1}, error=None, serialized={'lc': 1, 'type': 'not_implemented', 'id': ['langchain_core', 'language_models', 'fake_chat_models', 'FakeListChatModel'], 'repr': "FakeListChatModel(responses=['foo, bar'])", 'name': 'FakeListChatModel', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'FakeListChatModelInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain_core', 'language_models', 'fake_chat_models', 'FakeListChatModel'], 'name': 'FakeListChatModel'}}, {'id': 2, 'type': 'schema', 'data': 'FakeListChatModelOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}, events=[{'name': 'start', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}, {'name': 'end', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}], inputs={'prompts': ['System: You are a nice assistant.\nHuman: What is your name?']}, outputs={'generations': [[{'text': 'foo, bar', 'generation_info': None, 'type': 'ChatGeneration', 'message': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'schema', 'messages', 'AIMessage'], 'kwargs': {'content': 'foo, bar'}}}]], 'llm_output': None, 'run': None}, reference_example_id=None, parent_run_id=UUID('00000000-0000-4000-8000-000000000000'), tags=['seq:step:2'], execution_order=None, child_execution_order=None, child_runs=[], trace_id=UUID('00000000-0000-4000-8000-000000000000'), dotted_order='20230101T000000000000Z00000000-0000-4000-8000-000000000000.20230101T000000000000Z00000000-0000-4000-8000-000000000002'), Run(id=UUID('00000000-0000-4000-8000-000000000003'), name='CommaSeparatedListOutputParser', start_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), run_type='parser', end_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), extra={}, error=None, serialized={'lc': 1, 'type': 'constructor', 'id': ['langchain', 'output_parsers', 'list', 'CommaSeparatedListOutputParser'], 'kwargs': {}, 'name': 'CommaSeparatedListOutputParser', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'CommaSeparatedListOutputParserInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'output_parsers', 'list', 'CommaSeparatedListOutputParser'], 'name': 'CommaSeparatedListOutputParser'}}, {'id': 2, 'type': 'schema', 'data': 'CommaSeparatedListOutputParserOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}, events=[{'name': 'start', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}, {'name': 'end', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}], inputs={'input': AIMessage(content='foo, bar', id='')}, outputs={'output': ['foo', 'bar']}, reference_example_id=None, parent_run_id=UUID('00000000-0000-4000-8000-000000000000'), tags=['seq:step:3'], execution_order=None, child_execution_order=None, child_runs=[], trace_id=UUID('00000000-0000-4000-8000-000000000000'), dotted_order='20230101T000000000000Z00000000-0000-4000-8000-000000000000.20230101T000000000000Z00000000-0000-4000-8000-000000000003'), Run(id=UUID('00000000-0000-4000-8000-000000000004'), name='RunnableLambda', start_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), run_type='chain', end_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), extra={}, error=None, serialized={'lc': 1, 'type': 'not_implemented', 'id': ['langchain_core', 'runnables', 'base', 'RunnableLambda'], 'repr': "RunnableLambda(lambda x: {'question': x[0] + x[1]})"}, events=[{'name': 'start', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}, {'name': 'end', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}], inputs={'input': ['foo', 'bar']}, outputs={'question': 'foobar'}, reference_example_id=None, parent_run_id=UUID('00000000-0000-4000-8000-000000000000'), tags=['seq:step:4'], execution_order=None, child_execution_order=None, child_runs=[], trace_id=UUID('00000000-0000-4000-8000-000000000000'), dotted_order='20230101T000000000000Z00000000-0000-4000-8000-000000000000.20230101T000000000000Z00000000-0000-4000-8000-000000000004'), Run(id=UUID('00000000-0000-4000-8000-000000000005'), name='ChatPromptTemplate', start_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), run_type='prompt', end_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), extra={}, error=None, serialized={'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'kwargs': {'messages': [{'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'SystemMessagePromptTemplate'], 'kwargs': {'prompt': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'kwargs': {'input_variables': [], 'template': 'You are a nicer assistant.', 'template_format': 'f-string', 'partial_variables': {}}, 'name': 'PromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'PromptInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'name': 'PromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': 'PromptTemplateOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}}}, {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'HumanMessagePromptTemplate'], 'kwargs': {'prompt': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'kwargs': {'input_variables': ['question'], 'template': '{question}', 'template_format': 'f-string', 'partial_variables': {}}, 'name': 'PromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'PromptInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'name': 'PromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': 'PromptTemplateOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}}}], 'input_variables': ['question']}, 'name': 'ChatPromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'PromptInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'name': 'ChatPromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': 'ChatPromptTemplateOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}, events=[{'name': 'start', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}, {'name': 'end', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}], inputs={'question': 'foobar'}, outputs={'output': ChatPromptValue(messages=[SystemMessage(content='You are a nicer assistant.'), HumanMessage(content='foobar')])}, reference_example_id=None, parent_run_id=UUID('00000000-0000-4000-8000-000000000000'), tags=['seq:step:5'], execution_order=None, child_execution_order=None, child_runs=[], trace_id=UUID('00000000-0000-4000-8000-000000000000'), dotted_order='20230101T000000000000Z00000000-0000-4000-8000-000000000000.20230101T000000000000Z00000000-0000-4000-8000-000000000005'), Run(id=UUID('00000000-0000-4000-8000-000000000006'), name='FakeListChatModel', start_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), run_type='llm', end_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), extra={'invocation_params': {'responses': ['baz, qux'], '_type': 'fake-list-chat-model', 'stop': None}, 'options': {'stop': None}, 'batch_size': 1}, error=None, serialized={'lc': 1, 'type': 'not_implemented', 'id': ['langchain_core', 'language_models', 'fake_chat_models', 'FakeListChatModel'], 'repr': "FakeListChatModel(responses=['baz, qux'])", 'name': 'FakeListChatModel', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'FakeListChatModelInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain_core', 'language_models', 'fake_chat_models', 'FakeListChatModel'], 'name': 'FakeListChatModel'}}, {'id': 2, 'type': 'schema', 'data': 'FakeListChatModelOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}, events=[{'name': 'start', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}, {'name': 'end', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}], inputs={'prompts': ['System: You are a nicer assistant.\nHuman: foobar']}, outputs={'generations': [[{'text': 'baz, qux', 'generation_info': None, 'type': 'ChatGeneration', 'message': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'schema', 'messages', 'AIMessage'], 'kwargs': {'content': 'baz, qux'}}}]], 'llm_output': None, 'run': None}, reference_example_id=None, parent_run_id=UUID('00000000-0000-4000-8000-000000000000'), tags=['seq:step:6'], execution_order=None, child_execution_order=None, child_runs=[], trace_id=UUID('00000000-0000-4000-8000-000000000000'), dotted_order='20230101T000000000000Z00000000-0000-4000-8000-000000000000.20230101T000000000000Z00000000-0000-4000-8000-000000000006'), Run(id=UUID('00000000-0000-4000-8000-000000000007'), name='CommaSeparatedListOutputParser', start_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), run_type='parser', end_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), extra={}, error=None, serialized={'lc': 1, 'type': 'constructor', 'id': ['langchain', 'output_parsers', 'list', 'CommaSeparatedListOutputParser'], 'kwargs': {}, 'name': 'CommaSeparatedListOutputParser', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'CommaSeparatedListOutputParserInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'output_parsers', 'list', 'CommaSeparatedListOutputParser'], 'name': 'CommaSeparatedListOutputParser'}}, {'id': 2, 'type': 'schema', 'data': 'CommaSeparatedListOutputParserOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}, events=[{'name': 'start', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}, {'name': 'end', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}], inputs={'input': AIMessage(content='baz, qux', id='')}, outputs={'output': ['baz', 'qux']}, reference_example_id=None, parent_run_id=UUID('00000000-0000-4000-8000-000000000000'), tags=['seq:step:7'], execution_order=None, child_execution_order=None, child_runs=[], trace_id=UUID('00000000-0000-4000-8000-000000000000'), dotted_order='20230101T000000000000Z00000000-0000-4000-8000-000000000000.20230101T000000000000Z00000000-0000-4000-8000-000000000007')], trace_id=UUID('00000000-0000-4000-8000-000000000000'), dotted_order='20230101T000000000000Z00000000-0000-4000-8000-000000000000'), ]) # --- # name: test_each @@ -11724,11 +1586,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "PromptInput", - "type": "object", - "properties": {} - } + "data": "PromptInput" }, { "id": 1, @@ -11746,436 +1604,7 @@ { "id": 2, "type": "schema", - "data": { - "title": "PromptTemplateOutput", - "anyOf": [ - { - "$ref": "#/definitions/StringPromptValue" - }, - { - "$ref": "#/definitions/ChatPromptValueConcrete" - } - ], - "definitions": { - "StringPromptValue": { - "title": "StringPromptValue", - "description": "String prompt value.", - "type": "object", - "properties": { - "text": { - "title": "Text", - "type": "string" - }, - "type": { - "title": "Type", - "default": "StringPromptValue", - "enum": [ - "StringPromptValue" - ], - "type": "string" - } - }, - "required": [ - "text" - ] - }, - "AIMessage": { - "title": "AIMessage", - "description": "Message from an AI.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "ai", - "enum": [ - "ai" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "HumanMessage": { - "title": "HumanMessage", - "description": "Message from a human.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "human", - "enum": [ - "human" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "ChatMessage": { - "title": "ChatMessage", - "description": "Message that can be assigned an arbitrary speaker (i.e. role).", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "chat", - "enum": [ - "chat" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "role": { - "title": "Role", - "type": "string" - } - }, - "required": [ - "content", - "role" - ] - }, - "SystemMessage": { - "title": "SystemMessage", - "description": "Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "system", - "enum": [ - "system" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content" - ] - }, - "FunctionMessage": { - "title": "FunctionMessage", - "description": "Message for passing the result of executing a function back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "function", - "enum": [ - "function" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content", - "name" - ] - }, - "ToolMessage": { - "title": "ToolMessage", - "description": "Message for passing the result of executing a tool back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "tool", - "enum": [ - "tool" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "tool_call_id": { - "title": "Tool Call Id", - "type": "string" - } - }, - "required": [ - "content", - "tool_call_id" - ] - }, - "ChatPromptValueConcrete": { - "title": "ChatPromptValueConcrete", - "description": "Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.", - "type": "object", - "properties": { - "messages": { - "title": "Messages", - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - }, - "type": { - "title": "Type", - "default": "ChatPromptValueConcrete", - "enum": [ - "ChatPromptValueConcrete" - ], - "type": "string" - } - }, - "required": [ - "messages" - ] - } - } - } + "data": "PromptTemplateOutput" } ], "edges": [ @@ -12225,16 +1654,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "PromptInput", - "type": "object", - "properties": { - "question": { - "title": "Question", - "type": "string" - } - } - } + "data": "PromptInput" }, { "id": 1, @@ -12252,436 +1672,7 @@ { "id": 2, "type": "schema", - "data": { - "title": "PromptTemplateOutput", - "anyOf": [ - { - "$ref": "#/definitions/StringPromptValue" - }, - { - "$ref": "#/definitions/ChatPromptValueConcrete" - } - ], - "definitions": { - "StringPromptValue": { - "title": "StringPromptValue", - "description": "String prompt value.", - "type": "object", - "properties": { - "text": { - "title": "Text", - "type": "string" - }, - "type": { - "title": "Type", - "default": "StringPromptValue", - "enum": [ - "StringPromptValue" - ], - "type": "string" - } - }, - "required": [ - "text" - ] - }, - "AIMessage": { - "title": "AIMessage", - "description": "Message from an AI.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "ai", - "enum": [ - "ai" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "HumanMessage": { - "title": "HumanMessage", - "description": "Message from a human.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "human", - "enum": [ - "human" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "ChatMessage": { - "title": "ChatMessage", - "description": "Message that can be assigned an arbitrary speaker (i.e. role).", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "chat", - "enum": [ - "chat" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "role": { - "title": "Role", - "type": "string" - } - }, - "required": [ - "content", - "role" - ] - }, - "SystemMessage": { - "title": "SystemMessage", - "description": "Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "system", - "enum": [ - "system" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content" - ] - }, - "FunctionMessage": { - "title": "FunctionMessage", - "description": "Message for passing the result of executing a function back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "function", - "enum": [ - "function" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content", - "name" - ] - }, - "ToolMessage": { - "title": "ToolMessage", - "description": "Message for passing the result of executing a tool back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "tool", - "enum": [ - "tool" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "tool_call_id": { - "title": "Tool Call Id", - "type": "string" - } - }, - "required": [ - "content", - "tool_call_id" - ] - }, - "ChatPromptValueConcrete": { - "title": "ChatPromptValueConcrete", - "description": "Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.", - "type": "object", - "properties": { - "messages": { - "title": "Messages", - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - }, - "type": { - "title": "Type", - "default": "ChatPromptValueConcrete", - "enum": [ - "ChatPromptValueConcrete" - ], - "type": "string" - } - }, - "required": [ - "messages" - ] - } - } - } + "data": "PromptTemplateOutput" } ], "edges": [ @@ -12709,16 +1700,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "PromptInput", - "type": "object", - "properties": { - "question": { - "title": "Question", - "type": "string" - } - } - } + "data": "PromptInput" }, { "id": 1, @@ -12736,436 +1718,7 @@ { "id": 2, "type": "schema", - "data": { - "title": "ChatPromptTemplateOutput", - "anyOf": [ - { - "$ref": "#/definitions/StringPromptValue" - }, - { - "$ref": "#/definitions/ChatPromptValueConcrete" - } - ], - "definitions": { - "StringPromptValue": { - "title": "StringPromptValue", - "description": "String prompt value.", - "type": "object", - "properties": { - "text": { - "title": "Text", - "type": "string" - }, - "type": { - "title": "Type", - "default": "StringPromptValue", - "enum": [ - "StringPromptValue" - ], - "type": "string" - } - }, - "required": [ - "text" - ] - }, - "AIMessage": { - "title": "AIMessage", - "description": "Message from an AI.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "ai", - "enum": [ - "ai" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "HumanMessage": { - "title": "HumanMessage", - "description": "Message from a human.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "human", - "enum": [ - "human" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "ChatMessage": { - "title": "ChatMessage", - "description": "Message that can be assigned an arbitrary speaker (i.e. role).", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "chat", - "enum": [ - "chat" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "role": { - "title": "Role", - "type": "string" - } - }, - "required": [ - "content", - "role" - ] - }, - "SystemMessage": { - "title": "SystemMessage", - "description": "Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "system", - "enum": [ - "system" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content" - ] - }, - "FunctionMessage": { - "title": "FunctionMessage", - "description": "Message for passing the result of executing a function back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "function", - "enum": [ - "function" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content", - "name" - ] - }, - "ToolMessage": { - "title": "ToolMessage", - "description": "Message for passing the result of executing a tool back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "tool", - "enum": [ - "tool" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "tool_call_id": { - "title": "Tool Call Id", - "type": "string" - } - }, - "required": [ - "content", - "tool_call_id" - ] - }, - "ChatPromptValueConcrete": { - "title": "ChatPromptValueConcrete", - "description": "Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.", - "type": "object", - "properties": { - "messages": { - "title": "Messages", - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - }, - "type": { - "title": "Type", - "default": "ChatPromptValueConcrete", - "enum": [ - "ChatPromptValueConcrete" - ], - "type": "string" - } - }, - "required": [ - "messages" - ] - } - } - } + "data": "ChatPromptTemplateOutput" } ], "edges": [ @@ -13197,464 +1750,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "FakeStreamingListLLMInput", - "anyOf": [ - { - "type": "string" - }, - { - "$ref": "#/definitions/StringPromptValue" - }, - { - "$ref": "#/definitions/ChatPromptValueConcrete" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - } - ], - "definitions": { - "StringPromptValue": { - "title": "StringPromptValue", - "description": "String prompt value.", - "type": "object", - "properties": { - "text": { - "title": "Text", - "type": "string" - }, - "type": { - "title": "Type", - "default": "StringPromptValue", - "enum": [ - "StringPromptValue" - ], - "type": "string" - } - }, - "required": [ - "text" - ] - }, - "AIMessage": { - "title": "AIMessage", - "description": "Message from an AI.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "ai", - "enum": [ - "ai" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "HumanMessage": { - "title": "HumanMessage", - "description": "Message from a human.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "human", - "enum": [ - "human" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "ChatMessage": { - "title": "ChatMessage", - "description": "Message that can be assigned an arbitrary speaker (i.e. role).", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "chat", - "enum": [ - "chat" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "role": { - "title": "Role", - "type": "string" - } - }, - "required": [ - "content", - "role" - ] - }, - "SystemMessage": { - "title": "SystemMessage", - "description": "Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "system", - "enum": [ - "system" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content" - ] - }, - "FunctionMessage": { - "title": "FunctionMessage", - "description": "Message for passing the result of executing a function back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "function", - "enum": [ - "function" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content", - "name" - ] - }, - "ToolMessage": { - "title": "ToolMessage", - "description": "Message for passing the result of executing a tool back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "tool", - "enum": [ - "tool" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "tool_call_id": { - "title": "Tool Call Id", - "type": "string" - } - }, - "required": [ - "content", - "tool_call_id" - ] - }, - "ChatPromptValueConcrete": { - "title": "ChatPromptValueConcrete", - "description": "Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.", - "type": "object", - "properties": { - "messages": { - "title": "Messages", - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - }, - "type": { - "title": "Type", - "default": "ChatPromptValueConcrete", - "enum": [ - "ChatPromptValueConcrete" - ], - "type": "string" - } - }, - "required": [ - "messages" - ] - } - } - } + "data": "FakeStreamingListLLMInput" }, { "id": 1, @@ -13672,10 +1768,7 @@ { "id": 2, "type": "schema", - "data": { - "title": "FakeStreamingListLLMOutput", - "type": "string" - } + "data": "FakeStreamingListLLMOutput" } ], "edges": [ @@ -13707,385 +1800,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "FakeSplitIntoListParserInput", - "anyOf": [ - { - "type": "string" - }, - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ], - "definitions": { - "AIMessage": { - "title": "AIMessage", - "description": "Message from an AI.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "ai", - "enum": [ - "ai" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "HumanMessage": { - "title": "HumanMessage", - "description": "Message from a human.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "human", - "enum": [ - "human" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "ChatMessage": { - "title": "ChatMessage", - "description": "Message that can be assigned an arbitrary speaker (i.e. role).", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "chat", - "enum": [ - "chat" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "role": { - "title": "Role", - "type": "string" - } - }, - "required": [ - "content", - "role" - ] - }, - "SystemMessage": { - "title": "SystemMessage", - "description": "Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "system", - "enum": [ - "system" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content" - ] - }, - "FunctionMessage": { - "title": "FunctionMessage", - "description": "Message for passing the result of executing a function back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "function", - "enum": [ - "function" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content", - "name" - ] - }, - "ToolMessage": { - "title": "ToolMessage", - "description": "Message for passing the result of executing a tool back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "tool", - "enum": [ - "tool" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "tool_call_id": { - "title": "Tool Call Id", - "type": "string" - } - }, - "required": [ - "content", - "tool_call_id" - ] - } - } - } + "data": "FakeSplitIntoListParserInput" }, { "id": 1, @@ -14104,13 +1819,7 @@ { "id": 2, "type": "schema", - "data": { - "title": "FakeSplitIntoListParserOutput", - "type": "array", - "items": { - "type": "string" - } - } + "data": "FakeSplitIntoListParserOutput" } ], "edges": [ @@ -14152,464 +1861,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "FakeStreamingListLLMInput", - "anyOf": [ - { - "type": "string" - }, - { - "$ref": "#/definitions/StringPromptValue" - }, - { - "$ref": "#/definitions/ChatPromptValueConcrete" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - } - ], - "definitions": { - "StringPromptValue": { - "title": "StringPromptValue", - "description": "String prompt value.", - "type": "object", - "properties": { - "text": { - "title": "Text", - "type": "string" - }, - "type": { - "title": "Type", - "default": "StringPromptValue", - "enum": [ - "StringPromptValue" - ], - "type": "string" - } - }, - "required": [ - "text" - ] - }, - "AIMessage": { - "title": "AIMessage", - "description": "Message from an AI.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "ai", - "enum": [ - "ai" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "HumanMessage": { - "title": "HumanMessage", - "description": "Message from a human.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "human", - "enum": [ - "human" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "ChatMessage": { - "title": "ChatMessage", - "description": "Message that can be assigned an arbitrary speaker (i.e. role).", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "chat", - "enum": [ - "chat" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "role": { - "title": "Role", - "type": "string" - } - }, - "required": [ - "content", - "role" - ] - }, - "SystemMessage": { - "title": "SystemMessage", - "description": "Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "system", - "enum": [ - "system" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content" - ] - }, - "FunctionMessage": { - "title": "FunctionMessage", - "description": "Message for passing the result of executing a function back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "function", - "enum": [ - "function" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content", - "name" - ] - }, - "ToolMessage": { - "title": "ToolMessage", - "description": "Message for passing the result of executing a tool back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "tool", - "enum": [ - "tool" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "tool_call_id": { - "title": "Tool Call Id", - "type": "string" - } - }, - "required": [ - "content", - "tool_call_id" - ] - }, - "ChatPromptValueConcrete": { - "title": "ChatPromptValueConcrete", - "description": "Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.", - "type": "object", - "properties": { - "messages": { - "title": "Messages", - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - }, - "type": { - "title": "Type", - "default": "ChatPromptValueConcrete", - "enum": [ - "ChatPromptValueConcrete" - ], - "type": "string" - } - }, - "required": [ - "messages" - ] - } - } - } + "data": "FakeStreamingListLLMInput" }, { "id": 1, @@ -14627,10 +1879,7 @@ { "id": 2, "type": "schema", - "data": { - "title": "FakeStreamingListLLMOutput", - "type": "string" - } + "data": "FakeStreamingListLLMOutput" } ], "edges": [ @@ -14652,464 +1901,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "FakeStreamingListLLMInput", - "anyOf": [ - { - "type": "string" - }, - { - "$ref": "#/definitions/StringPromptValue" - }, - { - "$ref": "#/definitions/ChatPromptValueConcrete" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - } - ], - "definitions": { - "StringPromptValue": { - "title": "StringPromptValue", - "description": "String prompt value.", - "type": "object", - "properties": { - "text": { - "title": "Text", - "type": "string" - }, - "type": { - "title": "Type", - "default": "StringPromptValue", - "enum": [ - "StringPromptValue" - ], - "type": "string" - } - }, - "required": [ - "text" - ] - }, - "AIMessage": { - "title": "AIMessage", - "description": "Message from an AI.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "ai", - "enum": [ - "ai" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "HumanMessage": { - "title": "HumanMessage", - "description": "Message from a human.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "human", - "enum": [ - "human" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "ChatMessage": { - "title": "ChatMessage", - "description": "Message that can be assigned an arbitrary speaker (i.e. role).", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "chat", - "enum": [ - "chat" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "role": { - "title": "Role", - "type": "string" - } - }, - "required": [ - "content", - "role" - ] - }, - "SystemMessage": { - "title": "SystemMessage", - "description": "Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "system", - "enum": [ - "system" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content" - ] - }, - "FunctionMessage": { - "title": "FunctionMessage", - "description": "Message for passing the result of executing a function back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "function", - "enum": [ - "function" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content", - "name" - ] - }, - "ToolMessage": { - "title": "ToolMessage", - "description": "Message for passing the result of executing a tool back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "tool", - "enum": [ - "tool" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "tool_call_id": { - "title": "Tool Call Id", - "type": "string" - } - }, - "required": [ - "content", - "tool_call_id" - ] - }, - "ChatPromptValueConcrete": { - "title": "ChatPromptValueConcrete", - "description": "Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.", - "type": "object", - "properties": { - "messages": { - "title": "Messages", - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - }, - "type": { - "title": "Type", - "default": "ChatPromptValueConcrete", - "enum": [ - "ChatPromptValueConcrete" - ], - "type": "string" - } - }, - "required": [ - "messages" - ] - } - } - } + "data": "FakeStreamingListLLMInput" }, { "id": 1, @@ -15127,10 +1919,7 @@ { "id": 2, "type": "schema", - "data": { - "title": "FakeStreamingListLLMOutput", - "type": "string" - } + "data": "FakeStreamingListLLMOutput" } ], "edges": [ @@ -15153,16 +1942,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "PromptInput", - "type": "object", - "properties": { - "question": { - "title": "Question", - "type": "string" - } - } - } + "data": "PromptInput" }, { "id": 1, @@ -15220,10 +2000,7 @@ { "id": 5, "type": "schema", - "data": { - "title": "FakeStreamingListLLMOutput", - "type": "string" - } + "data": "FakeStreamingListLLMOutput" } ], "edges": [ @@ -15316,28 +2093,12 @@ { "id": 0, "type": "schema", - "data": { - "title": "RunnableParallelInput", - "type": "object", - "properties": { - "question": { - "title": "Question" - } - } - } + "data": "ParallelInput" }, { "id": 1, "type": "schema", - "data": { - "title": "RunnableParallelOutput", - "type": "object", - "properties": { - "question": { - "title": "Question" - } - } - } + "data": "ParallelOutput" }, { "id": 2, @@ -15373,35 +2134,12 @@ { "id": 0, "type": "schema", - "data": { - "title": "RunnableParallelInput", - "type": "object", - "properties": { - "key": { - "title": "Key" - }, - "question": { - "title": "Question" - } - } - } + "data": "ParallelInput" }, { "id": 1, "type": "schema", - "data": { - "title": "RunnableParallelOutput", - "type": "object", - "properties": { - "key": { - "title": "Key" - }, - "input": { - "title": "Input", - "type": "object" - } - } - } + "data": "ParallelOutput" }, { "id": 2, @@ -15470,35 +2208,12 @@ { "id": 0, "type": "schema", - "data": { - "title": "RunnableParallelInput", - "type": "object", - "properties": { - "key": { - "title": "Key" - }, - "question": { - "title": "Question" - } - } - } + "data": "ParallelInput" }, { "id": 1, "type": "schema", - "data": { - "title": "RunnableParallelOutput", - "type": "object", - "properties": { - "key": { - "title": "Key" - }, - "input": { - "title": "Input", - "type": "object" - } - } - } + "data": "ParallelOutput" }, { "id": 2, @@ -15529,17 +2244,12 @@ { "id": 4, "type": "schema", - "data": { - "title": "router_input", - "type": "object" - } + "data": "router_input" }, { "id": 5, "type": "schema", - "data": { - "title": "router_output" - } + "data": "router_output" }, { "id": 6, @@ -15704,11 +2414,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "PromptInput", - "type": "object", - "properties": {} - } + "data": "PromptInput" }, { "id": 1, @@ -15726,436 +2432,7 @@ { "id": 2, "type": "schema", - "data": { - "title": "PromptTemplateOutput", - "anyOf": [ - { - "$ref": "#/definitions/StringPromptValue" - }, - { - "$ref": "#/definitions/ChatPromptValueConcrete" - } - ], - "definitions": { - "StringPromptValue": { - "title": "StringPromptValue", - "description": "String prompt value.", - "type": "object", - "properties": { - "text": { - "title": "Text", - "type": "string" - }, - "type": { - "title": "Type", - "default": "StringPromptValue", - "enum": [ - "StringPromptValue" - ], - "type": "string" - } - }, - "required": [ - "text" - ] - }, - "AIMessage": { - "title": "AIMessage", - "description": "Message from an AI.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "ai", - "enum": [ - "ai" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "HumanMessage": { - "title": "HumanMessage", - "description": "Message from a human.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "human", - "enum": [ - "human" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "ChatMessage": { - "title": "ChatMessage", - "description": "Message that can be assigned an arbitrary speaker (i.e. role).", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "chat", - "enum": [ - "chat" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "role": { - "title": "Role", - "type": "string" - } - }, - "required": [ - "content", - "role" - ] - }, - "SystemMessage": { - "title": "SystemMessage", - "description": "Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "system", - "enum": [ - "system" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content" - ] - }, - "FunctionMessage": { - "title": "FunctionMessage", - "description": "Message for passing the result of executing a function back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "function", - "enum": [ - "function" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content", - "name" - ] - }, - "ToolMessage": { - "title": "ToolMessage", - "description": "Message for passing the result of executing a tool back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "tool", - "enum": [ - "tool" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "tool_call_id": { - "title": "Tool Call Id", - "type": "string" - } - }, - "required": [ - "content", - "tool_call_id" - ] - }, - "ChatPromptValueConcrete": { - "title": "ChatPromptValueConcrete", - "description": "Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.", - "type": "object", - "properties": { - "messages": { - "title": "Messages", - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - }, - "type": { - "title": "Type", - "default": "ChatPromptValueConcrete", - "enum": [ - "ChatPromptValueConcrete" - ], - "type": "string" - } - }, - "required": [ - "messages" - ] - } - } - } + "data": "PromptTemplateOutput" } ], "edges": [ @@ -16205,16 +2482,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "PromptInput", - "type": "object", - "properties": { - "question": { - "title": "Question", - "type": "string" - } - } - } + "data": "PromptInput" }, { "id": 1, @@ -16232,436 +2500,7 @@ { "id": 2, "type": "schema", - "data": { - "title": "PromptTemplateOutput", - "anyOf": [ - { - "$ref": "#/definitions/StringPromptValue" - }, - { - "$ref": "#/definitions/ChatPromptValueConcrete" - } - ], - "definitions": { - "StringPromptValue": { - "title": "StringPromptValue", - "description": "String prompt value.", - "type": "object", - "properties": { - "text": { - "title": "Text", - "type": "string" - }, - "type": { - "title": "Type", - "default": "StringPromptValue", - "enum": [ - "StringPromptValue" - ], - "type": "string" - } - }, - "required": [ - "text" - ] - }, - "AIMessage": { - "title": "AIMessage", - "description": "Message from an AI.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "ai", - "enum": [ - "ai" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "HumanMessage": { - "title": "HumanMessage", - "description": "Message from a human.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "human", - "enum": [ - "human" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "ChatMessage": { - "title": "ChatMessage", - "description": "Message that can be assigned an arbitrary speaker (i.e. role).", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "chat", - "enum": [ - "chat" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "role": { - "title": "Role", - "type": "string" - } - }, - "required": [ - "content", - "role" - ] - }, - "SystemMessage": { - "title": "SystemMessage", - "description": "Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "system", - "enum": [ - "system" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content" - ] - }, - "FunctionMessage": { - "title": "FunctionMessage", - "description": "Message for passing the result of executing a function back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "function", - "enum": [ - "function" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content", - "name" - ] - }, - "ToolMessage": { - "title": "ToolMessage", - "description": "Message for passing the result of executing a tool back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "tool", - "enum": [ - "tool" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "tool_call_id": { - "title": "Tool Call Id", - "type": "string" - } - }, - "required": [ - "content", - "tool_call_id" - ] - }, - "ChatPromptValueConcrete": { - "title": "ChatPromptValueConcrete", - "description": "Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.", - "type": "object", - "properties": { - "messages": { - "title": "Messages", - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - }, - "type": { - "title": "Type", - "default": "ChatPromptValueConcrete", - "enum": [ - "ChatPromptValueConcrete" - ], - "type": "string" - } - }, - "required": [ - "messages" - ] - } - } - } + "data": "PromptTemplateOutput" } ], "edges": [ @@ -16689,16 +2528,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "PromptInput", - "type": "object", - "properties": { - "question": { - "title": "Question", - "type": "string" - } - } - } + "data": "PromptInput" }, { "id": 1, @@ -16716,436 +2546,7 @@ { "id": 2, "type": "schema", - "data": { - "title": "ChatPromptTemplateOutput", - "anyOf": [ - { - "$ref": "#/definitions/StringPromptValue" - }, - { - "$ref": "#/definitions/ChatPromptValueConcrete" - } - ], - "definitions": { - "StringPromptValue": { - "title": "StringPromptValue", - "description": "String prompt value.", - "type": "object", - "properties": { - "text": { - "title": "Text", - "type": "string" - }, - "type": { - "title": "Type", - "default": "StringPromptValue", - "enum": [ - "StringPromptValue" - ], - "type": "string" - } - }, - "required": [ - "text" - ] - }, - "AIMessage": { - "title": "AIMessage", - "description": "Message from an AI.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "ai", - "enum": [ - "ai" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "HumanMessage": { - "title": "HumanMessage", - "description": "Message from a human.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "human", - "enum": [ - "human" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "ChatMessage": { - "title": "ChatMessage", - "description": "Message that can be assigned an arbitrary speaker (i.e. role).", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "chat", - "enum": [ - "chat" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "role": { - "title": "Role", - "type": "string" - } - }, - "required": [ - "content", - "role" - ] - }, - "SystemMessage": { - "title": "SystemMessage", - "description": "Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "system", - "enum": [ - "system" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content" - ] - }, - "FunctionMessage": { - "title": "FunctionMessage", - "description": "Message for passing the result of executing a function back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "function", - "enum": [ - "function" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content", - "name" - ] - }, - "ToolMessage": { - "title": "ToolMessage", - "description": "Message for passing the result of executing a tool back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "tool", - "enum": [ - "tool" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "tool_call_id": { - "title": "Tool Call Id", - "type": "string" - } - }, - "required": [ - "content", - "tool_call_id" - ] - }, - "ChatPromptValueConcrete": { - "title": "ChatPromptValueConcrete", - "description": "Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.", - "type": "object", - "properties": { - "messages": { - "title": "Messages", - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - }, - "type": { - "title": "Type", - "default": "ChatPromptValueConcrete", - "enum": [ - "ChatPromptValueConcrete" - ], - "type": "string" - } - }, - "required": [ - "messages" - ] - } - } - } + "data": "ChatPromptTemplateOutput" } ], "edges": [ @@ -17177,464 +2578,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "FakeListChatModelInput", - "anyOf": [ - { - "type": "string" - }, - { - "$ref": "#/definitions/StringPromptValue" - }, - { - "$ref": "#/definitions/ChatPromptValueConcrete" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - } - ], - "definitions": { - "StringPromptValue": { - "title": "StringPromptValue", - "description": "String prompt value.", - "type": "object", - "properties": { - "text": { - "title": "Text", - "type": "string" - }, - "type": { - "title": "Type", - "default": "StringPromptValue", - "enum": [ - "StringPromptValue" - ], - "type": "string" - } - }, - "required": [ - "text" - ] - }, - "AIMessage": { - "title": "AIMessage", - "description": "Message from an AI.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "ai", - "enum": [ - "ai" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "HumanMessage": { - "title": "HumanMessage", - "description": "Message from a human.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "human", - "enum": [ - "human" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "ChatMessage": { - "title": "ChatMessage", - "description": "Message that can be assigned an arbitrary speaker (i.e. role).", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "chat", - "enum": [ - "chat" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "role": { - "title": "Role", - "type": "string" - } - }, - "required": [ - "content", - "role" - ] - }, - "SystemMessage": { - "title": "SystemMessage", - "description": "Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "system", - "enum": [ - "system" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content" - ] - }, - "FunctionMessage": { - "title": "FunctionMessage", - "description": "Message for passing the result of executing a function back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "function", - "enum": [ - "function" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content", - "name" - ] - }, - "ToolMessage": { - "title": "ToolMessage", - "description": "Message for passing the result of executing a tool back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "tool", - "enum": [ - "tool" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "tool_call_id": { - "title": "Tool Call Id", - "type": "string" - } - }, - "required": [ - "content", - "tool_call_id" - ] - }, - "ChatPromptValueConcrete": { - "title": "ChatPromptValueConcrete", - "description": "Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.", - "type": "object", - "properties": { - "messages": { - "title": "Messages", - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - }, - "type": { - "title": "Type", - "default": "ChatPromptValueConcrete", - "enum": [ - "ChatPromptValueConcrete" - ], - "type": "string" - } - }, - "required": [ - "messages" - ] - } - } - } + "data": "FakeListChatModelInput" }, { "id": 1, @@ -17652,382 +2596,7 @@ { "id": 2, "type": "schema", - "data": { - "title": "FakeListChatModelOutput", - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ], - "definitions": { - "AIMessage": { - "title": "AIMessage", - "description": "Message from an AI.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "ai", - "enum": [ - "ai" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "HumanMessage": { - "title": "HumanMessage", - "description": "Message from a human.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "human", - "enum": [ - "human" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "ChatMessage": { - "title": "ChatMessage", - "description": "Message that can be assigned an arbitrary speaker (i.e. role).", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "chat", - "enum": [ - "chat" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "role": { - "title": "Role", - "type": "string" - } - }, - "required": [ - "content", - "role" - ] - }, - "SystemMessage": { - "title": "SystemMessage", - "description": "Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "system", - "enum": [ - "system" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content" - ] - }, - "FunctionMessage": { - "title": "FunctionMessage", - "description": "Message for passing the result of executing a function back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "function", - "enum": [ - "function" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content", - "name" - ] - }, - "ToolMessage": { - "title": "ToolMessage", - "description": "Message for passing the result of executing a tool back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "tool", - "enum": [ - "tool" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "tool_call_id": { - "title": "Tool Call Id", - "type": "string" - } - }, - "required": [ - "content", - "tool_call_id" - ] - } - } - } + "data": "FakeListChatModelOutput" } ], "edges": [ @@ -18050,16 +2619,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "PromptInput", - "type": "object", - "properties": { - "question": { - "title": "Question", - "type": "string" - } - } - } + "data": "PromptInput" }, { "id": 1, @@ -18090,382 +2650,7 @@ { "id": 3, "type": "schema", - "data": { - "title": "FakeListChatModelOutput", - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ], - "definitions": { - "AIMessage": { - "title": "AIMessage", - "description": "Message from an AI.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "ai", - "enum": [ - "ai" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "HumanMessage": { - "title": "HumanMessage", - "description": "Message from a human.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "human", - "enum": [ - "human" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "ChatMessage": { - "title": "ChatMessage", - "description": "Message that can be assigned an arbitrary speaker (i.e. role).", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "chat", - "enum": [ - "chat" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "role": { - "title": "Role", - "type": "string" - } - }, - "required": [ - "content", - "role" - ] - }, - "SystemMessage": { - "title": "SystemMessage", - "description": "Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "system", - "enum": [ - "system" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content" - ] - }, - "FunctionMessage": { - "title": "FunctionMessage", - "description": "Message for passing the result of executing a function back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "function", - "enum": [ - "function" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content", - "name" - ] - }, - "ToolMessage": { - "title": "ToolMessage", - "description": "Message for passing the result of executing a tool back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "tool", - "enum": [ - "tool" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "tool_call_id": { - "title": "Tool Call Id", - "type": "string" - } - }, - "required": [ - "content", - "tool_call_id" - ] - } - } - } + "data": "FakeListChatModelOutput" } ], "edges": [ @@ -18488,7 +2673,7 @@ # --- # name: test_prompt_with_chat_model.2 list([ - Run(id=UUID('00000000-0000-4000-8000-000000000000'), name='RunnableSequence', start_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), run_type='chain', end_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), extra={}, error=None, serialized={'lc': 1, 'type': 'constructor', 'id': ['langchain', 'schema', 'runnable', 'RunnableSequence'], 'kwargs': {'first': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'kwargs': {'messages': [{'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'SystemMessagePromptTemplate'], 'kwargs': {'prompt': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'kwargs': {'input_variables': [], 'template': 'You are a nice assistant.', 'template_format': 'f-string', 'partial_variables': {}}, 'name': 'PromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'PromptInput', 'type': 'object', 'properties': {}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'name': 'PromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': {'title': 'PromptTemplateOutput', 'anyOf': [{'$ref': '#/definitions/StringPromptValue'}, {'$ref': '#/definitions/ChatPromptValueConcrete'}], 'definitions': {'StringPromptValue': {'title': 'StringPromptValue', 'description': 'String prompt value.', 'type': 'object', 'properties': {'text': {'title': 'Text', 'type': 'string'}, 'type': {'title': 'Type', 'default': 'StringPromptValue', 'enum': ['StringPromptValue'], 'type': 'string'}}, 'required': ['text']}, 'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}, 'ChatPromptValueConcrete': {'title': 'ChatPromptValueConcrete', 'description': 'Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.', 'type': 'object', 'properties': {'messages': {'title': 'Messages', 'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}, 'type': {'title': 'Type', 'default': 'ChatPromptValueConcrete', 'enum': ['ChatPromptValueConcrete'], 'type': 'string'}}, 'required': ['messages']}}}}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}}}, {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'HumanMessagePromptTemplate'], 'kwargs': {'prompt': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'kwargs': {'input_variables': ['question'], 'template': '{question}', 'template_format': 'f-string', 'partial_variables': {}}, 'name': 'PromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'PromptInput', 'type': 'object', 'properties': {'question': {'title': 'Question', 'type': 'string'}}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'name': 'PromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': {'title': 'PromptTemplateOutput', 'anyOf': [{'$ref': '#/definitions/StringPromptValue'}, {'$ref': '#/definitions/ChatPromptValueConcrete'}], 'definitions': {'StringPromptValue': {'title': 'StringPromptValue', 'description': 'String prompt value.', 'type': 'object', 'properties': {'text': {'title': 'Text', 'type': 'string'}, 'type': {'title': 'Type', 'default': 'StringPromptValue', 'enum': ['StringPromptValue'], 'type': 'string'}}, 'required': ['text']}, 'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}, 'ChatPromptValueConcrete': {'title': 'ChatPromptValueConcrete', 'description': 'Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.', 'type': 'object', 'properties': {'messages': {'title': 'Messages', 'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}, 'type': {'title': 'Type', 'default': 'ChatPromptValueConcrete', 'enum': ['ChatPromptValueConcrete'], 'type': 'string'}}, 'required': ['messages']}}}}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}}}], 'input_variables': ['question']}, 'name': 'ChatPromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'PromptInput', 'type': 'object', 'properties': {'question': {'title': 'Question', 'type': 'string'}}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'name': 'ChatPromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': {'title': 'ChatPromptTemplateOutput', 'anyOf': [{'$ref': '#/definitions/StringPromptValue'}, {'$ref': '#/definitions/ChatPromptValueConcrete'}], 'definitions': {'StringPromptValue': {'title': 'StringPromptValue', 'description': 'String prompt value.', 'type': 'object', 'properties': {'text': {'title': 'Text', 'type': 'string'}, 'type': {'title': 'Type', 'default': 'StringPromptValue', 'enum': ['StringPromptValue'], 'type': 'string'}}, 'required': ['text']}, 'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}, 'ChatPromptValueConcrete': {'title': 'ChatPromptValueConcrete', 'description': 'Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.', 'type': 'object', 'properties': {'messages': {'title': 'Messages', 'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}, 'type': {'title': 'Type', 'default': 'ChatPromptValueConcrete', 'enum': ['ChatPromptValueConcrete'], 'type': 'string'}}, 'required': ['messages']}}}}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}, 'middle': [], 'last': {'lc': 1, 'type': 'not_implemented', 'id': ['langchain_core', 'language_models', 'fake_chat_models', 'FakeListChatModel'], 'repr': "FakeListChatModel(responses=['foo'])", 'name': 'FakeListChatModel', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'FakeListChatModelInput', 'anyOf': [{'type': 'string'}, {'$ref': '#/definitions/StringPromptValue'}, {'$ref': '#/definitions/ChatPromptValueConcrete'}, {'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}], 'definitions': {'StringPromptValue': {'title': 'StringPromptValue', 'description': 'String prompt value.', 'type': 'object', 'properties': {'text': {'title': 'Text', 'type': 'string'}, 'type': {'title': 'Type', 'default': 'StringPromptValue', 'enum': ['StringPromptValue'], 'type': 'string'}}, 'required': ['text']}, 'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}, 'ChatPromptValueConcrete': {'title': 'ChatPromptValueConcrete', 'description': 'Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.', 'type': 'object', 'properties': {'messages': {'title': 'Messages', 'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}, 'type': {'title': 'Type', 'default': 'ChatPromptValueConcrete', 'enum': ['ChatPromptValueConcrete'], 'type': 'string'}}, 'required': ['messages']}}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain_core', 'language_models', 'fake_chat_models', 'FakeListChatModel'], 'name': 'FakeListChatModel'}}, {'id': 2, 'type': 'schema', 'data': {'title': 'FakeListChatModelOutput', 'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}], 'definitions': {'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}}}}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}, 'name': None}, 'name': 'RunnableSequence', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'PromptInput', 'type': 'object', 'properties': {'question': {'title': 'Question', 'type': 'string'}}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'name': 'ChatPromptTemplate'}}, {'id': 2, 'type': 'runnable', 'data': {'id': ['langchain_core', 'language_models', 'fake_chat_models', 'FakeListChatModel'], 'name': 'FakeListChatModel'}}, {'id': 3, 'type': 'schema', 'data': {'title': 'FakeListChatModelOutput', 'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}], 'definitions': {'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}}}}], 'edges': [{'source': 0, 'target': 1}, {'source': 2, 'target': 3}, {'source': 1, 'target': 2}]}}, events=[{'name': 'start', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}, {'name': 'end', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}], inputs={'question': 'What is your name?'}, outputs={'output': AIMessage(content='foo')}, reference_example_id=None, parent_run_id=None, tags=[], execution_order=None, child_execution_order=None, child_runs=[Run(id=UUID('00000000-0000-4000-8000-000000000001'), name='ChatPromptTemplate', start_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), run_type='prompt', end_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), extra={}, error=None, serialized={'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'kwargs': {'messages': [{'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'SystemMessagePromptTemplate'], 'kwargs': {'prompt': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'kwargs': {'input_variables': [], 'template': 'You are a nice assistant.', 'template_format': 'f-string', 'partial_variables': {}}, 'name': 'PromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'PromptInput', 'type': 'object', 'properties': {}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'name': 'PromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': {'title': 'PromptTemplateOutput', 'anyOf': [{'$ref': '#/definitions/StringPromptValue'}, {'$ref': '#/definitions/ChatPromptValueConcrete'}], 'definitions': {'StringPromptValue': {'title': 'StringPromptValue', 'description': 'String prompt value.', 'type': 'object', 'properties': {'text': {'title': 'Text', 'type': 'string'}, 'type': {'title': 'Type', 'default': 'StringPromptValue', 'enum': ['StringPromptValue'], 'type': 'string'}}, 'required': ['text']}, 'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}, 'ChatPromptValueConcrete': {'title': 'ChatPromptValueConcrete', 'description': 'Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.', 'type': 'object', 'properties': {'messages': {'title': 'Messages', 'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}, 'type': {'title': 'Type', 'default': 'ChatPromptValueConcrete', 'enum': ['ChatPromptValueConcrete'], 'type': 'string'}}, 'required': ['messages']}}}}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}}}, {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'HumanMessagePromptTemplate'], 'kwargs': {'prompt': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'kwargs': {'input_variables': ['question'], 'template': '{question}', 'template_format': 'f-string', 'partial_variables': {}}, 'name': 'PromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'PromptInput', 'type': 'object', 'properties': {'question': {'title': 'Question', 'type': 'string'}}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'name': 'PromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': {'title': 'PromptTemplateOutput', 'anyOf': [{'$ref': '#/definitions/StringPromptValue'}, {'$ref': '#/definitions/ChatPromptValueConcrete'}], 'definitions': {'StringPromptValue': {'title': 'StringPromptValue', 'description': 'String prompt value.', 'type': 'object', 'properties': {'text': {'title': 'Text', 'type': 'string'}, 'type': {'title': 'Type', 'default': 'StringPromptValue', 'enum': ['StringPromptValue'], 'type': 'string'}}, 'required': ['text']}, 'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}, 'ChatPromptValueConcrete': {'title': 'ChatPromptValueConcrete', 'description': 'Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.', 'type': 'object', 'properties': {'messages': {'title': 'Messages', 'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}, 'type': {'title': 'Type', 'default': 'ChatPromptValueConcrete', 'enum': ['ChatPromptValueConcrete'], 'type': 'string'}}, 'required': ['messages']}}}}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}}}], 'input_variables': ['question']}, 'name': 'ChatPromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'PromptInput', 'type': 'object', 'properties': {'question': {'title': 'Question', 'type': 'string'}}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'name': 'ChatPromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': {'title': 'ChatPromptTemplateOutput', 'anyOf': [{'$ref': '#/definitions/StringPromptValue'}, {'$ref': '#/definitions/ChatPromptValueConcrete'}], 'definitions': {'StringPromptValue': {'title': 'StringPromptValue', 'description': 'String prompt value.', 'type': 'object', 'properties': {'text': {'title': 'Text', 'type': 'string'}, 'type': {'title': 'Type', 'default': 'StringPromptValue', 'enum': ['StringPromptValue'], 'type': 'string'}}, 'required': ['text']}, 'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}, 'ChatPromptValueConcrete': {'title': 'ChatPromptValueConcrete', 'description': 'Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.', 'type': 'object', 'properties': {'messages': {'title': 'Messages', 'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}, 'type': {'title': 'Type', 'default': 'ChatPromptValueConcrete', 'enum': ['ChatPromptValueConcrete'], 'type': 'string'}}, 'required': ['messages']}}}}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}, events=[{'name': 'start', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}, {'name': 'end', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}], inputs={'question': 'What is your name?'}, outputs={'output': ChatPromptValue(messages=[SystemMessage(content='You are a nice assistant.'), HumanMessage(content='What is your name?')])}, reference_example_id=None, parent_run_id=UUID('00000000-0000-4000-8000-000000000000'), tags=['seq:step:1'], execution_order=None, child_execution_order=None, child_runs=[], trace_id=UUID('00000000-0000-4000-8000-000000000000'), dotted_order='20230101T000000000000Z00000000-0000-4000-8000-000000000000.20230101T000000000000Z00000000-0000-4000-8000-000000000001'), Run(id=UUID('00000000-0000-4000-8000-000000000002'), name='FakeListChatModel', start_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), run_type='llm', end_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), extra={'invocation_params': {'responses': ['foo'], '_type': 'fake-list-chat-model', 'stop': None}, 'options': {'stop': None}, 'batch_size': 1}, error=None, serialized={'lc': 1, 'type': 'not_implemented', 'id': ['langchain_core', 'language_models', 'fake_chat_models', 'FakeListChatModel'], 'repr': "FakeListChatModel(responses=['foo'])", 'name': 'FakeListChatModel', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'FakeListChatModelInput', 'anyOf': [{'type': 'string'}, {'$ref': '#/definitions/StringPromptValue'}, {'$ref': '#/definitions/ChatPromptValueConcrete'}, {'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}], 'definitions': {'StringPromptValue': {'title': 'StringPromptValue', 'description': 'String prompt value.', 'type': 'object', 'properties': {'text': {'title': 'Text', 'type': 'string'}, 'type': {'title': 'Type', 'default': 'StringPromptValue', 'enum': ['StringPromptValue'], 'type': 'string'}}, 'required': ['text']}, 'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}, 'ChatPromptValueConcrete': {'title': 'ChatPromptValueConcrete', 'description': 'Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.', 'type': 'object', 'properties': {'messages': {'title': 'Messages', 'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}, 'type': {'title': 'Type', 'default': 'ChatPromptValueConcrete', 'enum': ['ChatPromptValueConcrete'], 'type': 'string'}}, 'required': ['messages']}}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain_core', 'language_models', 'fake_chat_models', 'FakeListChatModel'], 'name': 'FakeListChatModel'}}, {'id': 2, 'type': 'schema', 'data': {'title': 'FakeListChatModelOutput', 'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}], 'definitions': {'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}}}}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}, events=[{'name': 'start', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}, {'name': 'end', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}], inputs={'prompts': ['System: You are a nice assistant.\nHuman: What is your name?']}, outputs={'generations': [[{'text': 'foo', 'generation_info': None, 'type': 'ChatGeneration', 'message': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'schema', 'messages', 'AIMessage'], 'kwargs': {'content': 'foo'}}}]], 'llm_output': None, 'run': None}, reference_example_id=None, parent_run_id=UUID('00000000-0000-4000-8000-000000000000'), tags=['seq:step:2'], execution_order=None, child_execution_order=None, child_runs=[], trace_id=UUID('00000000-0000-4000-8000-000000000000'), dotted_order='20230101T000000000000Z00000000-0000-4000-8000-000000000000.20230101T000000000000Z00000000-0000-4000-8000-000000000002')], trace_id=UUID('00000000-0000-4000-8000-000000000000'), dotted_order='20230101T000000000000Z00000000-0000-4000-8000-000000000000'), + Run(id=UUID('00000000-0000-4000-8000-000000000000'), name='RunnableSequence', start_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), run_type='chain', end_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), extra={}, error=None, serialized={'lc': 1, 'type': 'constructor', 'id': ['langchain', 'schema', 'runnable', 'RunnableSequence'], 'kwargs': {'first': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'kwargs': {'messages': [{'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'SystemMessagePromptTemplate'], 'kwargs': {'prompt': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'kwargs': {'input_variables': [], 'template': 'You are a nice assistant.', 'template_format': 'f-string', 'partial_variables': {}}, 'name': 'PromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'PromptInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'name': 'PromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': 'PromptTemplateOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}}}, {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'HumanMessagePromptTemplate'], 'kwargs': {'prompt': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'kwargs': {'input_variables': ['question'], 'template': '{question}', 'template_format': 'f-string', 'partial_variables': {}}, 'name': 'PromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'PromptInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'name': 'PromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': 'PromptTemplateOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}}}], 'input_variables': ['question']}, 'name': 'ChatPromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'PromptInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'name': 'ChatPromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': 'ChatPromptTemplateOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}, 'middle': [], 'last': {'lc': 1, 'type': 'not_implemented', 'id': ['langchain_core', 'language_models', 'fake_chat_models', 'FakeListChatModel'], 'repr': "FakeListChatModel(responses=['foo'])", 'name': 'FakeListChatModel', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'FakeListChatModelInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain_core', 'language_models', 'fake_chat_models', 'FakeListChatModel'], 'name': 'FakeListChatModel'}}, {'id': 2, 'type': 'schema', 'data': 'FakeListChatModelOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}, 'name': None}, 'name': 'RunnableSequence', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'PromptInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'name': 'ChatPromptTemplate'}}, {'id': 2, 'type': 'runnable', 'data': {'id': ['langchain_core', 'language_models', 'fake_chat_models', 'FakeListChatModel'], 'name': 'FakeListChatModel'}}, {'id': 3, 'type': 'schema', 'data': 'FakeListChatModelOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 2, 'target': 3}, {'source': 1, 'target': 2}]}}, events=[{'name': 'start', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}, {'name': 'end', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}], inputs={'question': 'What is your name?'}, outputs={'output': AIMessage(content='foo', id='')}, reference_example_id=None, parent_run_id=None, tags=[], execution_order=None, child_execution_order=None, child_runs=[Run(id=UUID('00000000-0000-4000-8000-000000000001'), name='ChatPromptTemplate', start_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), run_type='prompt', end_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), extra={}, error=None, serialized={'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'kwargs': {'messages': [{'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'SystemMessagePromptTemplate'], 'kwargs': {'prompt': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'kwargs': {'input_variables': [], 'template': 'You are a nice assistant.', 'template_format': 'f-string', 'partial_variables': {}}, 'name': 'PromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'PromptInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'name': 'PromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': 'PromptTemplateOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}}}, {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'HumanMessagePromptTemplate'], 'kwargs': {'prompt': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'kwargs': {'input_variables': ['question'], 'template': '{question}', 'template_format': 'f-string', 'partial_variables': {}}, 'name': 'PromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'PromptInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'name': 'PromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': 'PromptTemplateOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}}}], 'input_variables': ['question']}, 'name': 'ChatPromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'PromptInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'name': 'ChatPromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': 'ChatPromptTemplateOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}, events=[{'name': 'start', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}, {'name': 'end', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}], inputs={'question': 'What is your name?'}, outputs={'output': ChatPromptValue(messages=[SystemMessage(content='You are a nice assistant.'), HumanMessage(content='What is your name?')])}, reference_example_id=None, parent_run_id=UUID('00000000-0000-4000-8000-000000000000'), tags=['seq:step:1'], execution_order=None, child_execution_order=None, child_runs=[], trace_id=UUID('00000000-0000-4000-8000-000000000000'), dotted_order='20230101T000000000000Z00000000-0000-4000-8000-000000000000.20230101T000000000000Z00000000-0000-4000-8000-000000000001'), Run(id=UUID('00000000-0000-4000-8000-000000000002'), name='FakeListChatModel', start_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), run_type='llm', end_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), extra={'invocation_params': {'responses': ['foo'], '_type': 'fake-list-chat-model', 'stop': None}, 'options': {'stop': None}, 'batch_size': 1}, error=None, serialized={'lc': 1, 'type': 'not_implemented', 'id': ['langchain_core', 'language_models', 'fake_chat_models', 'FakeListChatModel'], 'repr': "FakeListChatModel(responses=['foo'])", 'name': 'FakeListChatModel', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'FakeListChatModelInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain_core', 'language_models', 'fake_chat_models', 'FakeListChatModel'], 'name': 'FakeListChatModel'}}, {'id': 2, 'type': 'schema', 'data': 'FakeListChatModelOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}, events=[{'name': 'start', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}, {'name': 'end', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}], inputs={'prompts': ['System: You are a nice assistant.\nHuman: What is your name?']}, outputs={'generations': [[{'text': 'foo', 'generation_info': None, 'type': 'ChatGeneration', 'message': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'schema', 'messages', 'AIMessage'], 'kwargs': {'content': 'foo'}}}]], 'llm_output': None, 'run': None}, reference_example_id=None, parent_run_id=UUID('00000000-0000-4000-8000-000000000000'), tags=['seq:step:2'], execution_order=None, child_execution_order=None, child_runs=[], trace_id=UUID('00000000-0000-4000-8000-000000000000'), dotted_order='20230101T000000000000Z00000000-0000-4000-8000-000000000000.20230101T000000000000Z00000000-0000-4000-8000-000000000002')], trace_id=UUID('00000000-0000-4000-8000-000000000000'), dotted_order='20230101T000000000000Z00000000-0000-4000-8000-000000000000'), ]) # --- # name: test_prompt_with_chat_model_and_parser @@ -18545,11 +2730,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "PromptInput", - "type": "object", - "properties": {} - } + "data": "PromptInput" }, { "id": 1, @@ -18567,436 +2748,7 @@ { "id": 2, "type": "schema", - "data": { - "title": "PromptTemplateOutput", - "anyOf": [ - { - "$ref": "#/definitions/StringPromptValue" - }, - { - "$ref": "#/definitions/ChatPromptValueConcrete" - } - ], - "definitions": { - "StringPromptValue": { - "title": "StringPromptValue", - "description": "String prompt value.", - "type": "object", - "properties": { - "text": { - "title": "Text", - "type": "string" - }, - "type": { - "title": "Type", - "default": "StringPromptValue", - "enum": [ - "StringPromptValue" - ], - "type": "string" - } - }, - "required": [ - "text" - ] - }, - "AIMessage": { - "title": "AIMessage", - "description": "Message from an AI.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "ai", - "enum": [ - "ai" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "HumanMessage": { - "title": "HumanMessage", - "description": "Message from a human.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "human", - "enum": [ - "human" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "ChatMessage": { - "title": "ChatMessage", - "description": "Message that can be assigned an arbitrary speaker (i.e. role).", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "chat", - "enum": [ - "chat" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "role": { - "title": "Role", - "type": "string" - } - }, - "required": [ - "content", - "role" - ] - }, - "SystemMessage": { - "title": "SystemMessage", - "description": "Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "system", - "enum": [ - "system" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content" - ] - }, - "FunctionMessage": { - "title": "FunctionMessage", - "description": "Message for passing the result of executing a function back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "function", - "enum": [ - "function" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content", - "name" - ] - }, - "ToolMessage": { - "title": "ToolMessage", - "description": "Message for passing the result of executing a tool back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "tool", - "enum": [ - "tool" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "tool_call_id": { - "title": "Tool Call Id", - "type": "string" - } - }, - "required": [ - "content", - "tool_call_id" - ] - }, - "ChatPromptValueConcrete": { - "title": "ChatPromptValueConcrete", - "description": "Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.", - "type": "object", - "properties": { - "messages": { - "title": "Messages", - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - }, - "type": { - "title": "Type", - "default": "ChatPromptValueConcrete", - "enum": [ - "ChatPromptValueConcrete" - ], - "type": "string" - } - }, - "required": [ - "messages" - ] - } - } - } + "data": "PromptTemplateOutput" } ], "edges": [ @@ -19046,16 +2798,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "PromptInput", - "type": "object", - "properties": { - "question": { - "title": "Question", - "type": "string" - } - } - } + "data": "PromptInput" }, { "id": 1, @@ -19073,436 +2816,7 @@ { "id": 2, "type": "schema", - "data": { - "title": "PromptTemplateOutput", - "anyOf": [ - { - "$ref": "#/definitions/StringPromptValue" - }, - { - "$ref": "#/definitions/ChatPromptValueConcrete" - } - ], - "definitions": { - "StringPromptValue": { - "title": "StringPromptValue", - "description": "String prompt value.", - "type": "object", - "properties": { - "text": { - "title": "Text", - "type": "string" - }, - "type": { - "title": "Type", - "default": "StringPromptValue", - "enum": [ - "StringPromptValue" - ], - "type": "string" - } - }, - "required": [ - "text" - ] - }, - "AIMessage": { - "title": "AIMessage", - "description": "Message from an AI.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "ai", - "enum": [ - "ai" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "HumanMessage": { - "title": "HumanMessage", - "description": "Message from a human.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "human", - "enum": [ - "human" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "ChatMessage": { - "title": "ChatMessage", - "description": "Message that can be assigned an arbitrary speaker (i.e. role).", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "chat", - "enum": [ - "chat" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "role": { - "title": "Role", - "type": "string" - } - }, - "required": [ - "content", - "role" - ] - }, - "SystemMessage": { - "title": "SystemMessage", - "description": "Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "system", - "enum": [ - "system" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content" - ] - }, - "FunctionMessage": { - "title": "FunctionMessage", - "description": "Message for passing the result of executing a function back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "function", - "enum": [ - "function" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content", - "name" - ] - }, - "ToolMessage": { - "title": "ToolMessage", - "description": "Message for passing the result of executing a tool back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "tool", - "enum": [ - "tool" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "tool_call_id": { - "title": "Tool Call Id", - "type": "string" - } - }, - "required": [ - "content", - "tool_call_id" - ] - }, - "ChatPromptValueConcrete": { - "title": "ChatPromptValueConcrete", - "description": "Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.", - "type": "object", - "properties": { - "messages": { - "title": "Messages", - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - }, - "type": { - "title": "Type", - "default": "ChatPromptValueConcrete", - "enum": [ - "ChatPromptValueConcrete" - ], - "type": "string" - } - }, - "required": [ - "messages" - ] - } - } - } + "data": "PromptTemplateOutput" } ], "edges": [ @@ -19530,16 +2844,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "PromptInput", - "type": "object", - "properties": { - "question": { - "title": "Question", - "type": "string" - } - } - } + "data": "PromptInput" }, { "id": 1, @@ -19557,436 +2862,7 @@ { "id": 2, "type": "schema", - "data": { - "title": "ChatPromptTemplateOutput", - "anyOf": [ - { - "$ref": "#/definitions/StringPromptValue" - }, - { - "$ref": "#/definitions/ChatPromptValueConcrete" - } - ], - "definitions": { - "StringPromptValue": { - "title": "StringPromptValue", - "description": "String prompt value.", - "type": "object", - "properties": { - "text": { - "title": "Text", - "type": "string" - }, - "type": { - "title": "Type", - "default": "StringPromptValue", - "enum": [ - "StringPromptValue" - ], - "type": "string" - } - }, - "required": [ - "text" - ] - }, - "AIMessage": { - "title": "AIMessage", - "description": "Message from an AI.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "ai", - "enum": [ - "ai" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "HumanMessage": { - "title": "HumanMessage", - "description": "Message from a human.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "human", - "enum": [ - "human" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "ChatMessage": { - "title": "ChatMessage", - "description": "Message that can be assigned an arbitrary speaker (i.e. role).", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "chat", - "enum": [ - "chat" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "role": { - "title": "Role", - "type": "string" - } - }, - "required": [ - "content", - "role" - ] - }, - "SystemMessage": { - "title": "SystemMessage", - "description": "Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "system", - "enum": [ - "system" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content" - ] - }, - "FunctionMessage": { - "title": "FunctionMessage", - "description": "Message for passing the result of executing a function back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "function", - "enum": [ - "function" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content", - "name" - ] - }, - "ToolMessage": { - "title": "ToolMessage", - "description": "Message for passing the result of executing a tool back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "tool", - "enum": [ - "tool" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "tool_call_id": { - "title": "Tool Call Id", - "type": "string" - } - }, - "required": [ - "content", - "tool_call_id" - ] - }, - "ChatPromptValueConcrete": { - "title": "ChatPromptValueConcrete", - "description": "Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.", - "type": "object", - "properties": { - "messages": { - "title": "Messages", - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - }, - "type": { - "title": "Type", - "default": "ChatPromptValueConcrete", - "enum": [ - "ChatPromptValueConcrete" - ], - "type": "string" - } - }, - "required": [ - "messages" - ] - } - } - } + "data": "ChatPromptTemplateOutput" } ], "edges": [ @@ -20018,464 +2894,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "FakeListChatModelInput", - "anyOf": [ - { - "type": "string" - }, - { - "$ref": "#/definitions/StringPromptValue" - }, - { - "$ref": "#/definitions/ChatPromptValueConcrete" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - } - ], - "definitions": { - "StringPromptValue": { - "title": "StringPromptValue", - "description": "String prompt value.", - "type": "object", - "properties": { - "text": { - "title": "Text", - "type": "string" - }, - "type": { - "title": "Type", - "default": "StringPromptValue", - "enum": [ - "StringPromptValue" - ], - "type": "string" - } - }, - "required": [ - "text" - ] - }, - "AIMessage": { - "title": "AIMessage", - "description": "Message from an AI.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "ai", - "enum": [ - "ai" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "HumanMessage": { - "title": "HumanMessage", - "description": "Message from a human.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "human", - "enum": [ - "human" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "ChatMessage": { - "title": "ChatMessage", - "description": "Message that can be assigned an arbitrary speaker (i.e. role).", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "chat", - "enum": [ - "chat" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "role": { - "title": "Role", - "type": "string" - } - }, - "required": [ - "content", - "role" - ] - }, - "SystemMessage": { - "title": "SystemMessage", - "description": "Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "system", - "enum": [ - "system" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content" - ] - }, - "FunctionMessage": { - "title": "FunctionMessage", - "description": "Message for passing the result of executing a function back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "function", - "enum": [ - "function" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content", - "name" - ] - }, - "ToolMessage": { - "title": "ToolMessage", - "description": "Message for passing the result of executing a tool back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "tool", - "enum": [ - "tool" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "tool_call_id": { - "title": "Tool Call Id", - "type": "string" - } - }, - "required": [ - "content", - "tool_call_id" - ] - }, - "ChatPromptValueConcrete": { - "title": "ChatPromptValueConcrete", - "description": "Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.", - "type": "object", - "properties": { - "messages": { - "title": "Messages", - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - }, - "type": { - "title": "Type", - "default": "ChatPromptValueConcrete", - "enum": [ - "ChatPromptValueConcrete" - ], - "type": "string" - } - }, - "required": [ - "messages" - ] - } - } - } + "data": "FakeListChatModelInput" }, { "id": 1, @@ -20493,382 +2912,7 @@ { "id": 2, "type": "schema", - "data": { - "title": "FakeListChatModelOutput", - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ], - "definitions": { - "AIMessage": { - "title": "AIMessage", - "description": "Message from an AI.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "ai", - "enum": [ - "ai" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "HumanMessage": { - "title": "HumanMessage", - "description": "Message from a human.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "human", - "enum": [ - "human" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "ChatMessage": { - "title": "ChatMessage", - "description": "Message that can be assigned an arbitrary speaker (i.e. role).", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "chat", - "enum": [ - "chat" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "role": { - "title": "Role", - "type": "string" - } - }, - "required": [ - "content", - "role" - ] - }, - "SystemMessage": { - "title": "SystemMessage", - "description": "Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "system", - "enum": [ - "system" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content" - ] - }, - "FunctionMessage": { - "title": "FunctionMessage", - "description": "Message for passing the result of executing a function back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "function", - "enum": [ - "function" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content", - "name" - ] - }, - "ToolMessage": { - "title": "ToolMessage", - "description": "Message for passing the result of executing a tool back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "tool", - "enum": [ - "tool" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "tool_call_id": { - "title": "Tool Call Id", - "type": "string" - } - }, - "required": [ - "content", - "tool_call_id" - ] - } - } - } + "data": "FakeListChatModelOutput" } ], "edges": [ @@ -20900,385 +2944,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "CommaSeparatedListOutputParserInput", - "anyOf": [ - { - "type": "string" - }, - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ], - "definitions": { - "AIMessage": { - "title": "AIMessage", - "description": "Message from an AI.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "ai", - "enum": [ - "ai" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "HumanMessage": { - "title": "HumanMessage", - "description": "Message from a human.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "human", - "enum": [ - "human" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "ChatMessage": { - "title": "ChatMessage", - "description": "Message that can be assigned an arbitrary speaker (i.e. role).", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "chat", - "enum": [ - "chat" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "role": { - "title": "Role", - "type": "string" - } - }, - "required": [ - "content", - "role" - ] - }, - "SystemMessage": { - "title": "SystemMessage", - "description": "Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "system", - "enum": [ - "system" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content" - ] - }, - "FunctionMessage": { - "title": "FunctionMessage", - "description": "Message for passing the result of executing a function back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "function", - "enum": [ - "function" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content", - "name" - ] - }, - "ToolMessage": { - "title": "ToolMessage", - "description": "Message for passing the result of executing a tool back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "tool", - "enum": [ - "tool" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "tool_call_id": { - "title": "Tool Call Id", - "type": "string" - } - }, - "required": [ - "content", - "tool_call_id" - ] - } - } - } + "data": "CommaSeparatedListOutputParserInput" }, { "id": 1, @@ -21296,13 +2962,7 @@ { "id": 2, "type": "schema", - "data": { - "title": "CommaSeparatedListOutputParserOutput", - "type": "array", - "items": { - "type": "string" - } - } + "data": "CommaSeparatedListOutputParserOutput" } ], "edges": [ @@ -21325,16 +2985,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "PromptInput", - "type": "object", - "properties": { - "question": { - "title": "Question", - "type": "string" - } - } - } + "data": "PromptInput" }, { "id": 1, @@ -21378,13 +3029,7 @@ { "id": 4, "type": "schema", - "data": { - "title": "CommaSeparatedListOutputParserOutput", - "type": "array", - "items": { - "type": "string" - } - } + "data": "CommaSeparatedListOutputParserOutput" } ], "edges": [ @@ -21411,7 +3056,7 @@ # --- # name: test_prompt_with_chat_model_and_parser.1 list([ - Run(id=UUID('00000000-0000-4000-8000-000000000000'), name='RunnableSequence', start_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), run_type='chain', end_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), extra={}, error=None, serialized={'lc': 1, 'type': 'constructor', 'id': ['langchain', 'schema', 'runnable', 'RunnableSequence'], 'kwargs': {'first': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'kwargs': {'messages': [{'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'SystemMessagePromptTemplate'], 'kwargs': {'prompt': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'kwargs': {'input_variables': [], 'template': 'You are a nice assistant.', 'template_format': 'f-string', 'partial_variables': {}}, 'name': 'PromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'PromptInput', 'type': 'object', 'properties': {}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'name': 'PromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': {'title': 'PromptTemplateOutput', 'anyOf': [{'$ref': '#/definitions/StringPromptValue'}, {'$ref': '#/definitions/ChatPromptValueConcrete'}], 'definitions': {'StringPromptValue': {'title': 'StringPromptValue', 'description': 'String prompt value.', 'type': 'object', 'properties': {'text': {'title': 'Text', 'type': 'string'}, 'type': {'title': 'Type', 'default': 'StringPromptValue', 'enum': ['StringPromptValue'], 'type': 'string'}}, 'required': ['text']}, 'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}, 'ChatPromptValueConcrete': {'title': 'ChatPromptValueConcrete', 'description': 'Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.', 'type': 'object', 'properties': {'messages': {'title': 'Messages', 'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}, 'type': {'title': 'Type', 'default': 'ChatPromptValueConcrete', 'enum': ['ChatPromptValueConcrete'], 'type': 'string'}}, 'required': ['messages']}}}}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}}}, {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'HumanMessagePromptTemplate'], 'kwargs': {'prompt': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'kwargs': {'input_variables': ['question'], 'template': '{question}', 'template_format': 'f-string', 'partial_variables': {}}, 'name': 'PromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'PromptInput', 'type': 'object', 'properties': {'question': {'title': 'Question', 'type': 'string'}}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'name': 'PromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': {'title': 'PromptTemplateOutput', 'anyOf': [{'$ref': '#/definitions/StringPromptValue'}, {'$ref': '#/definitions/ChatPromptValueConcrete'}], 'definitions': {'StringPromptValue': {'title': 'StringPromptValue', 'description': 'String prompt value.', 'type': 'object', 'properties': {'text': {'title': 'Text', 'type': 'string'}, 'type': {'title': 'Type', 'default': 'StringPromptValue', 'enum': ['StringPromptValue'], 'type': 'string'}}, 'required': ['text']}, 'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}, 'ChatPromptValueConcrete': {'title': 'ChatPromptValueConcrete', 'description': 'Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.', 'type': 'object', 'properties': {'messages': {'title': 'Messages', 'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}, 'type': {'title': 'Type', 'default': 'ChatPromptValueConcrete', 'enum': ['ChatPromptValueConcrete'], 'type': 'string'}}, 'required': ['messages']}}}}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}}}], 'input_variables': ['question']}, 'name': 'ChatPromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'PromptInput', 'type': 'object', 'properties': {'question': {'title': 'Question', 'type': 'string'}}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'name': 'ChatPromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': {'title': 'ChatPromptTemplateOutput', 'anyOf': [{'$ref': '#/definitions/StringPromptValue'}, {'$ref': '#/definitions/ChatPromptValueConcrete'}], 'definitions': {'StringPromptValue': {'title': 'StringPromptValue', 'description': 'String prompt value.', 'type': 'object', 'properties': {'text': {'title': 'Text', 'type': 'string'}, 'type': {'title': 'Type', 'default': 'StringPromptValue', 'enum': ['StringPromptValue'], 'type': 'string'}}, 'required': ['text']}, 'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}, 'ChatPromptValueConcrete': {'title': 'ChatPromptValueConcrete', 'description': 'Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.', 'type': 'object', 'properties': {'messages': {'title': 'Messages', 'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}, 'type': {'title': 'Type', 'default': 'ChatPromptValueConcrete', 'enum': ['ChatPromptValueConcrete'], 'type': 'string'}}, 'required': ['messages']}}}}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}, 'middle': [{'lc': 1, 'type': 'not_implemented', 'id': ['langchain_core', 'language_models', 'fake_chat_models', 'FakeListChatModel'], 'repr': "FakeListChatModel(responses=['foo, bar'])", 'name': 'FakeListChatModel', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'FakeListChatModelInput', 'anyOf': [{'type': 'string'}, {'$ref': '#/definitions/StringPromptValue'}, {'$ref': '#/definitions/ChatPromptValueConcrete'}, {'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}], 'definitions': {'StringPromptValue': {'title': 'StringPromptValue', 'description': 'String prompt value.', 'type': 'object', 'properties': {'text': {'title': 'Text', 'type': 'string'}, 'type': {'title': 'Type', 'default': 'StringPromptValue', 'enum': ['StringPromptValue'], 'type': 'string'}}, 'required': ['text']}, 'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}, 'ChatPromptValueConcrete': {'title': 'ChatPromptValueConcrete', 'description': 'Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.', 'type': 'object', 'properties': {'messages': {'title': 'Messages', 'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}, 'type': {'title': 'Type', 'default': 'ChatPromptValueConcrete', 'enum': ['ChatPromptValueConcrete'], 'type': 'string'}}, 'required': ['messages']}}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain_core', 'language_models', 'fake_chat_models', 'FakeListChatModel'], 'name': 'FakeListChatModel'}}, {'id': 2, 'type': 'schema', 'data': {'title': 'FakeListChatModelOutput', 'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}], 'definitions': {'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}}}}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}], 'last': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'output_parsers', 'list', 'CommaSeparatedListOutputParser'], 'kwargs': {}, 'name': 'CommaSeparatedListOutputParser', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'CommaSeparatedListOutputParserInput', 'anyOf': [{'type': 'string'}, {'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}], 'definitions': {'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'output_parsers', 'list', 'CommaSeparatedListOutputParser'], 'name': 'CommaSeparatedListOutputParser'}}, {'id': 2, 'type': 'schema', 'data': {'title': 'CommaSeparatedListOutputParserOutput', 'type': 'array', 'items': {'type': 'string'}}}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}, 'name': None}, 'name': 'RunnableSequence', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'PromptInput', 'type': 'object', 'properties': {'question': {'title': 'Question', 'type': 'string'}}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'name': 'ChatPromptTemplate'}}, {'id': 2, 'type': 'runnable', 'data': {'id': ['langchain_core', 'language_models', 'fake_chat_models', 'FakeListChatModel'], 'name': 'FakeListChatModel'}}, {'id': 3, 'type': 'runnable', 'data': {'id': ['langchain', 'output_parsers', 'list', 'CommaSeparatedListOutputParser'], 'name': 'CommaSeparatedListOutputParser'}}, {'id': 4, 'type': 'schema', 'data': {'title': 'CommaSeparatedListOutputParserOutput', 'type': 'array', 'items': {'type': 'string'}}}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}, {'source': 3, 'target': 4}, {'source': 2, 'target': 3}]}}, events=[{'name': 'start', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}, {'name': 'end', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}], inputs={'question': 'What is your name?'}, outputs={'output': ['foo', 'bar']}, reference_example_id=None, parent_run_id=None, tags=[], execution_order=None, child_execution_order=None, child_runs=[Run(id=UUID('00000000-0000-4000-8000-000000000001'), name='ChatPromptTemplate', start_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), run_type='prompt', end_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), extra={}, error=None, serialized={'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'kwargs': {'messages': [{'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'SystemMessagePromptTemplate'], 'kwargs': {'prompt': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'kwargs': {'input_variables': [], 'template': 'You are a nice assistant.', 'template_format': 'f-string', 'partial_variables': {}}, 'name': 'PromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'PromptInput', 'type': 'object', 'properties': {}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'name': 'PromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': {'title': 'PromptTemplateOutput', 'anyOf': [{'$ref': '#/definitions/StringPromptValue'}, {'$ref': '#/definitions/ChatPromptValueConcrete'}], 'definitions': {'StringPromptValue': {'title': 'StringPromptValue', 'description': 'String prompt value.', 'type': 'object', 'properties': {'text': {'title': 'Text', 'type': 'string'}, 'type': {'title': 'Type', 'default': 'StringPromptValue', 'enum': ['StringPromptValue'], 'type': 'string'}}, 'required': ['text']}, 'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}, 'ChatPromptValueConcrete': {'title': 'ChatPromptValueConcrete', 'description': 'Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.', 'type': 'object', 'properties': {'messages': {'title': 'Messages', 'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}, 'type': {'title': 'Type', 'default': 'ChatPromptValueConcrete', 'enum': ['ChatPromptValueConcrete'], 'type': 'string'}}, 'required': ['messages']}}}}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}}}, {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'HumanMessagePromptTemplate'], 'kwargs': {'prompt': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'kwargs': {'input_variables': ['question'], 'template': '{question}', 'template_format': 'f-string', 'partial_variables': {}}, 'name': 'PromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'PromptInput', 'type': 'object', 'properties': {'question': {'title': 'Question', 'type': 'string'}}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'name': 'PromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': {'title': 'PromptTemplateOutput', 'anyOf': [{'$ref': '#/definitions/StringPromptValue'}, {'$ref': '#/definitions/ChatPromptValueConcrete'}], 'definitions': {'StringPromptValue': {'title': 'StringPromptValue', 'description': 'String prompt value.', 'type': 'object', 'properties': {'text': {'title': 'Text', 'type': 'string'}, 'type': {'title': 'Type', 'default': 'StringPromptValue', 'enum': ['StringPromptValue'], 'type': 'string'}}, 'required': ['text']}, 'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}, 'ChatPromptValueConcrete': {'title': 'ChatPromptValueConcrete', 'description': 'Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.', 'type': 'object', 'properties': {'messages': {'title': 'Messages', 'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}, 'type': {'title': 'Type', 'default': 'ChatPromptValueConcrete', 'enum': ['ChatPromptValueConcrete'], 'type': 'string'}}, 'required': ['messages']}}}}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}}}], 'input_variables': ['question']}, 'name': 'ChatPromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'PromptInput', 'type': 'object', 'properties': {'question': {'title': 'Question', 'type': 'string'}}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'name': 'ChatPromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': {'title': 'ChatPromptTemplateOutput', 'anyOf': [{'$ref': '#/definitions/StringPromptValue'}, {'$ref': '#/definitions/ChatPromptValueConcrete'}], 'definitions': {'StringPromptValue': {'title': 'StringPromptValue', 'description': 'String prompt value.', 'type': 'object', 'properties': {'text': {'title': 'Text', 'type': 'string'}, 'type': {'title': 'Type', 'default': 'StringPromptValue', 'enum': ['StringPromptValue'], 'type': 'string'}}, 'required': ['text']}, 'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}, 'ChatPromptValueConcrete': {'title': 'ChatPromptValueConcrete', 'description': 'Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.', 'type': 'object', 'properties': {'messages': {'title': 'Messages', 'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}, 'type': {'title': 'Type', 'default': 'ChatPromptValueConcrete', 'enum': ['ChatPromptValueConcrete'], 'type': 'string'}}, 'required': ['messages']}}}}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}, events=[{'name': 'start', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}, {'name': 'end', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}], inputs={'question': 'What is your name?'}, outputs={'output': ChatPromptValue(messages=[SystemMessage(content='You are a nice assistant.'), HumanMessage(content='What is your name?')])}, reference_example_id=None, parent_run_id=UUID('00000000-0000-4000-8000-000000000000'), tags=['seq:step:1'], execution_order=None, child_execution_order=None, child_runs=[], trace_id=UUID('00000000-0000-4000-8000-000000000000'), dotted_order='20230101T000000000000Z00000000-0000-4000-8000-000000000000.20230101T000000000000Z00000000-0000-4000-8000-000000000001'), Run(id=UUID('00000000-0000-4000-8000-000000000002'), name='FakeListChatModel', start_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), run_type='llm', end_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), extra={'invocation_params': {'responses': ['foo, bar'], '_type': 'fake-list-chat-model', 'stop': None}, 'options': {'stop': None}, 'batch_size': 1}, error=None, serialized={'lc': 1, 'type': 'not_implemented', 'id': ['langchain_core', 'language_models', 'fake_chat_models', 'FakeListChatModel'], 'repr': "FakeListChatModel(responses=['foo, bar'])", 'name': 'FakeListChatModel', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'FakeListChatModelInput', 'anyOf': [{'type': 'string'}, {'$ref': '#/definitions/StringPromptValue'}, {'$ref': '#/definitions/ChatPromptValueConcrete'}, {'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}], 'definitions': {'StringPromptValue': {'title': 'StringPromptValue', 'description': 'String prompt value.', 'type': 'object', 'properties': {'text': {'title': 'Text', 'type': 'string'}, 'type': {'title': 'Type', 'default': 'StringPromptValue', 'enum': ['StringPromptValue'], 'type': 'string'}}, 'required': ['text']}, 'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}, 'ChatPromptValueConcrete': {'title': 'ChatPromptValueConcrete', 'description': 'Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.', 'type': 'object', 'properties': {'messages': {'title': 'Messages', 'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}, 'type': {'title': 'Type', 'default': 'ChatPromptValueConcrete', 'enum': ['ChatPromptValueConcrete'], 'type': 'string'}}, 'required': ['messages']}}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain_core', 'language_models', 'fake_chat_models', 'FakeListChatModel'], 'name': 'FakeListChatModel'}}, {'id': 2, 'type': 'schema', 'data': {'title': 'FakeListChatModelOutput', 'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}], 'definitions': {'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}}}}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}, events=[{'name': 'start', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}, {'name': 'end', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}], inputs={'prompts': ['System: You are a nice assistant.\nHuman: What is your name?']}, outputs={'generations': [[{'text': 'foo, bar', 'generation_info': None, 'type': 'ChatGeneration', 'message': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'schema', 'messages', 'AIMessage'], 'kwargs': {'content': 'foo, bar'}}}]], 'llm_output': None, 'run': None}, reference_example_id=None, parent_run_id=UUID('00000000-0000-4000-8000-000000000000'), tags=['seq:step:2'], execution_order=None, child_execution_order=None, child_runs=[], trace_id=UUID('00000000-0000-4000-8000-000000000000'), dotted_order='20230101T000000000000Z00000000-0000-4000-8000-000000000000.20230101T000000000000Z00000000-0000-4000-8000-000000000002'), Run(id=UUID('00000000-0000-4000-8000-000000000003'), name='CommaSeparatedListOutputParser', start_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), run_type='parser', end_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), extra={}, error=None, serialized={'lc': 1, 'type': 'constructor', 'id': ['langchain', 'output_parsers', 'list', 'CommaSeparatedListOutputParser'], 'kwargs': {}, 'name': 'CommaSeparatedListOutputParser', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'CommaSeparatedListOutputParserInput', 'anyOf': [{'type': 'string'}, {'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}], 'definitions': {'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'output_parsers', 'list', 'CommaSeparatedListOutputParser'], 'name': 'CommaSeparatedListOutputParser'}}, {'id': 2, 'type': 'schema', 'data': {'title': 'CommaSeparatedListOutputParserOutput', 'type': 'array', 'items': {'type': 'string'}}}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}, events=[{'name': 'start', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}, {'name': 'end', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}], inputs={'input': AIMessage(content='foo, bar')}, outputs={'output': ['foo', 'bar']}, reference_example_id=None, parent_run_id=UUID('00000000-0000-4000-8000-000000000000'), tags=['seq:step:3'], execution_order=None, child_execution_order=None, child_runs=[], trace_id=UUID('00000000-0000-4000-8000-000000000000'), dotted_order='20230101T000000000000Z00000000-0000-4000-8000-000000000000.20230101T000000000000Z00000000-0000-4000-8000-000000000003')], trace_id=UUID('00000000-0000-4000-8000-000000000000'), dotted_order='20230101T000000000000Z00000000-0000-4000-8000-000000000000'), + Run(id=UUID('00000000-0000-4000-8000-000000000000'), name='RunnableSequence', start_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), run_type='chain', end_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), extra={}, error=None, serialized={'lc': 1, 'type': 'constructor', 'id': ['langchain', 'schema', 'runnable', 'RunnableSequence'], 'kwargs': {'first': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'kwargs': {'messages': [{'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'SystemMessagePromptTemplate'], 'kwargs': {'prompt': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'kwargs': {'input_variables': [], 'template': 'You are a nice assistant.', 'template_format': 'f-string', 'partial_variables': {}}, 'name': 'PromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'PromptInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'name': 'PromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': 'PromptTemplateOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}}}, {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'HumanMessagePromptTemplate'], 'kwargs': {'prompt': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'kwargs': {'input_variables': ['question'], 'template': '{question}', 'template_format': 'f-string', 'partial_variables': {}}, 'name': 'PromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'PromptInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'name': 'PromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': 'PromptTemplateOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}}}], 'input_variables': ['question']}, 'name': 'ChatPromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'PromptInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'name': 'ChatPromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': 'ChatPromptTemplateOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}, 'middle': [{'lc': 1, 'type': 'not_implemented', 'id': ['langchain_core', 'language_models', 'fake_chat_models', 'FakeListChatModel'], 'repr': "FakeListChatModel(responses=['foo, bar'])", 'name': 'FakeListChatModel', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'FakeListChatModelInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain_core', 'language_models', 'fake_chat_models', 'FakeListChatModel'], 'name': 'FakeListChatModel'}}, {'id': 2, 'type': 'schema', 'data': 'FakeListChatModelOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}], 'last': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'output_parsers', 'list', 'CommaSeparatedListOutputParser'], 'kwargs': {}, 'name': 'CommaSeparatedListOutputParser', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'CommaSeparatedListOutputParserInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'output_parsers', 'list', 'CommaSeparatedListOutputParser'], 'name': 'CommaSeparatedListOutputParser'}}, {'id': 2, 'type': 'schema', 'data': 'CommaSeparatedListOutputParserOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}, 'name': None}, 'name': 'RunnableSequence', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'PromptInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'name': 'ChatPromptTemplate'}}, {'id': 2, 'type': 'runnable', 'data': {'id': ['langchain_core', 'language_models', 'fake_chat_models', 'FakeListChatModel'], 'name': 'FakeListChatModel'}}, {'id': 3, 'type': 'runnable', 'data': {'id': ['langchain', 'output_parsers', 'list', 'CommaSeparatedListOutputParser'], 'name': 'CommaSeparatedListOutputParser'}}, {'id': 4, 'type': 'schema', 'data': 'CommaSeparatedListOutputParserOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}, {'source': 3, 'target': 4}, {'source': 2, 'target': 3}]}}, events=[{'name': 'start', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}, {'name': 'end', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}], inputs={'question': 'What is your name?'}, outputs={'output': ['foo', 'bar']}, reference_example_id=None, parent_run_id=None, tags=[], execution_order=None, child_execution_order=None, child_runs=[Run(id=UUID('00000000-0000-4000-8000-000000000001'), name='ChatPromptTemplate', start_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), run_type='prompt', end_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), extra={}, error=None, serialized={'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'kwargs': {'messages': [{'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'SystemMessagePromptTemplate'], 'kwargs': {'prompt': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'kwargs': {'input_variables': [], 'template': 'You are a nice assistant.', 'template_format': 'f-string', 'partial_variables': {}}, 'name': 'PromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'PromptInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'name': 'PromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': 'PromptTemplateOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}}}, {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'HumanMessagePromptTemplate'], 'kwargs': {'prompt': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'kwargs': {'input_variables': ['question'], 'template': '{question}', 'template_format': 'f-string', 'partial_variables': {}}, 'name': 'PromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'PromptInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'name': 'PromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': 'PromptTemplateOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}}}], 'input_variables': ['question']}, 'name': 'ChatPromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'PromptInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'name': 'ChatPromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': 'ChatPromptTemplateOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}, events=[{'name': 'start', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}, {'name': 'end', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}], inputs={'question': 'What is your name?'}, outputs={'output': ChatPromptValue(messages=[SystemMessage(content='You are a nice assistant.'), HumanMessage(content='What is your name?')])}, reference_example_id=None, parent_run_id=UUID('00000000-0000-4000-8000-000000000000'), tags=['seq:step:1'], execution_order=None, child_execution_order=None, child_runs=[], trace_id=UUID('00000000-0000-4000-8000-000000000000'), dotted_order='20230101T000000000000Z00000000-0000-4000-8000-000000000000.20230101T000000000000Z00000000-0000-4000-8000-000000000001'), Run(id=UUID('00000000-0000-4000-8000-000000000002'), name='FakeListChatModel', start_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), run_type='llm', end_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), extra={'invocation_params': {'responses': ['foo, bar'], '_type': 'fake-list-chat-model', 'stop': None}, 'options': {'stop': None}, 'batch_size': 1}, error=None, serialized={'lc': 1, 'type': 'not_implemented', 'id': ['langchain_core', 'language_models', 'fake_chat_models', 'FakeListChatModel'], 'repr': "FakeListChatModel(responses=['foo, bar'])", 'name': 'FakeListChatModel', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'FakeListChatModelInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain_core', 'language_models', 'fake_chat_models', 'FakeListChatModel'], 'name': 'FakeListChatModel'}}, {'id': 2, 'type': 'schema', 'data': 'FakeListChatModelOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}, events=[{'name': 'start', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}, {'name': 'end', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}], inputs={'prompts': ['System: You are a nice assistant.\nHuman: What is your name?']}, outputs={'generations': [[{'text': 'foo, bar', 'generation_info': None, 'type': 'ChatGeneration', 'message': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'schema', 'messages', 'AIMessage'], 'kwargs': {'content': 'foo, bar'}}}]], 'llm_output': None, 'run': None}, reference_example_id=None, parent_run_id=UUID('00000000-0000-4000-8000-000000000000'), tags=['seq:step:2'], execution_order=None, child_execution_order=None, child_runs=[], trace_id=UUID('00000000-0000-4000-8000-000000000000'), dotted_order='20230101T000000000000Z00000000-0000-4000-8000-000000000000.20230101T000000000000Z00000000-0000-4000-8000-000000000002'), Run(id=UUID('00000000-0000-4000-8000-000000000003'), name='CommaSeparatedListOutputParser', start_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), run_type='parser', end_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), extra={}, error=None, serialized={'lc': 1, 'type': 'constructor', 'id': ['langchain', 'output_parsers', 'list', 'CommaSeparatedListOutputParser'], 'kwargs': {}, 'name': 'CommaSeparatedListOutputParser', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'CommaSeparatedListOutputParserInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'output_parsers', 'list', 'CommaSeparatedListOutputParser'], 'name': 'CommaSeparatedListOutputParser'}}, {'id': 2, 'type': 'schema', 'data': 'CommaSeparatedListOutputParserOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}, events=[{'name': 'start', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}, {'name': 'end', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}], inputs={'input': AIMessage(content='foo, bar', id='')}, outputs={'output': ['foo', 'bar']}, reference_example_id=None, parent_run_id=UUID('00000000-0000-4000-8000-000000000000'), tags=['seq:step:3'], execution_order=None, child_execution_order=None, child_runs=[], trace_id=UUID('00000000-0000-4000-8000-000000000000'), dotted_order='20230101T000000000000Z00000000-0000-4000-8000-000000000000.20230101T000000000000Z00000000-0000-4000-8000-000000000003')], trace_id=UUID('00000000-0000-4000-8000-000000000000'), dotted_order='20230101T000000000000Z00000000-0000-4000-8000-000000000000'), ]) # --- # name: test_prompt_with_chat_model_async @@ -21474,11 +3119,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "PromptInput", - "type": "object", - "properties": {} - } + "data": "PromptInput" }, { "id": 1, @@ -21496,436 +3137,7 @@ { "id": 2, "type": "schema", - "data": { - "title": "PromptTemplateOutput", - "anyOf": [ - { - "$ref": "#/definitions/StringPromptValue" - }, - { - "$ref": "#/definitions/ChatPromptValueConcrete" - } - ], - "definitions": { - "StringPromptValue": { - "title": "StringPromptValue", - "description": "String prompt value.", - "type": "object", - "properties": { - "text": { - "title": "Text", - "type": "string" - }, - "type": { - "title": "Type", - "default": "StringPromptValue", - "enum": [ - "StringPromptValue" - ], - "type": "string" - } - }, - "required": [ - "text" - ] - }, - "AIMessage": { - "title": "AIMessage", - "description": "Message from an AI.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "ai", - "enum": [ - "ai" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "HumanMessage": { - "title": "HumanMessage", - "description": "Message from a human.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "human", - "enum": [ - "human" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "ChatMessage": { - "title": "ChatMessage", - "description": "Message that can be assigned an arbitrary speaker (i.e. role).", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "chat", - "enum": [ - "chat" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "role": { - "title": "Role", - "type": "string" - } - }, - "required": [ - "content", - "role" - ] - }, - "SystemMessage": { - "title": "SystemMessage", - "description": "Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "system", - "enum": [ - "system" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content" - ] - }, - "FunctionMessage": { - "title": "FunctionMessage", - "description": "Message for passing the result of executing a function back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "function", - "enum": [ - "function" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content", - "name" - ] - }, - "ToolMessage": { - "title": "ToolMessage", - "description": "Message for passing the result of executing a tool back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "tool", - "enum": [ - "tool" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "tool_call_id": { - "title": "Tool Call Id", - "type": "string" - } - }, - "required": [ - "content", - "tool_call_id" - ] - }, - "ChatPromptValueConcrete": { - "title": "ChatPromptValueConcrete", - "description": "Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.", - "type": "object", - "properties": { - "messages": { - "title": "Messages", - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - }, - "type": { - "title": "Type", - "default": "ChatPromptValueConcrete", - "enum": [ - "ChatPromptValueConcrete" - ], - "type": "string" - } - }, - "required": [ - "messages" - ] - } - } - } + "data": "PromptTemplateOutput" } ], "edges": [ @@ -21975,16 +3187,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "PromptInput", - "type": "object", - "properties": { - "question": { - "title": "Question", - "type": "string" - } - } - } + "data": "PromptInput" }, { "id": 1, @@ -22002,436 +3205,7 @@ { "id": 2, "type": "schema", - "data": { - "title": "PromptTemplateOutput", - "anyOf": [ - { - "$ref": "#/definitions/StringPromptValue" - }, - { - "$ref": "#/definitions/ChatPromptValueConcrete" - } - ], - "definitions": { - "StringPromptValue": { - "title": "StringPromptValue", - "description": "String prompt value.", - "type": "object", - "properties": { - "text": { - "title": "Text", - "type": "string" - }, - "type": { - "title": "Type", - "default": "StringPromptValue", - "enum": [ - "StringPromptValue" - ], - "type": "string" - } - }, - "required": [ - "text" - ] - }, - "AIMessage": { - "title": "AIMessage", - "description": "Message from an AI.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "ai", - "enum": [ - "ai" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "HumanMessage": { - "title": "HumanMessage", - "description": "Message from a human.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "human", - "enum": [ - "human" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "ChatMessage": { - "title": "ChatMessage", - "description": "Message that can be assigned an arbitrary speaker (i.e. role).", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "chat", - "enum": [ - "chat" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "role": { - "title": "Role", - "type": "string" - } - }, - "required": [ - "content", - "role" - ] - }, - "SystemMessage": { - "title": "SystemMessage", - "description": "Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "system", - "enum": [ - "system" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content" - ] - }, - "FunctionMessage": { - "title": "FunctionMessage", - "description": "Message for passing the result of executing a function back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "function", - "enum": [ - "function" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content", - "name" - ] - }, - "ToolMessage": { - "title": "ToolMessage", - "description": "Message for passing the result of executing a tool back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "tool", - "enum": [ - "tool" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "tool_call_id": { - "title": "Tool Call Id", - "type": "string" - } - }, - "required": [ - "content", - "tool_call_id" - ] - }, - "ChatPromptValueConcrete": { - "title": "ChatPromptValueConcrete", - "description": "Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.", - "type": "object", - "properties": { - "messages": { - "title": "Messages", - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - }, - "type": { - "title": "Type", - "default": "ChatPromptValueConcrete", - "enum": [ - "ChatPromptValueConcrete" - ], - "type": "string" - } - }, - "required": [ - "messages" - ] - } - } - } + "data": "PromptTemplateOutput" } ], "edges": [ @@ -22459,16 +3233,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "PromptInput", - "type": "object", - "properties": { - "question": { - "title": "Question", - "type": "string" - } - } - } + "data": "PromptInput" }, { "id": 1, @@ -22486,436 +3251,7 @@ { "id": 2, "type": "schema", - "data": { - "title": "ChatPromptTemplateOutput", - "anyOf": [ - { - "$ref": "#/definitions/StringPromptValue" - }, - { - "$ref": "#/definitions/ChatPromptValueConcrete" - } - ], - "definitions": { - "StringPromptValue": { - "title": "StringPromptValue", - "description": "String prompt value.", - "type": "object", - "properties": { - "text": { - "title": "Text", - "type": "string" - }, - "type": { - "title": "Type", - "default": "StringPromptValue", - "enum": [ - "StringPromptValue" - ], - "type": "string" - } - }, - "required": [ - "text" - ] - }, - "AIMessage": { - "title": "AIMessage", - "description": "Message from an AI.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "ai", - "enum": [ - "ai" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "HumanMessage": { - "title": "HumanMessage", - "description": "Message from a human.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "human", - "enum": [ - "human" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "ChatMessage": { - "title": "ChatMessage", - "description": "Message that can be assigned an arbitrary speaker (i.e. role).", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "chat", - "enum": [ - "chat" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "role": { - "title": "Role", - "type": "string" - } - }, - "required": [ - "content", - "role" - ] - }, - "SystemMessage": { - "title": "SystemMessage", - "description": "Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "system", - "enum": [ - "system" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content" - ] - }, - "FunctionMessage": { - "title": "FunctionMessage", - "description": "Message for passing the result of executing a function back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "function", - "enum": [ - "function" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content", - "name" - ] - }, - "ToolMessage": { - "title": "ToolMessage", - "description": "Message for passing the result of executing a tool back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "tool", - "enum": [ - "tool" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "tool_call_id": { - "title": "Tool Call Id", - "type": "string" - } - }, - "required": [ - "content", - "tool_call_id" - ] - }, - "ChatPromptValueConcrete": { - "title": "ChatPromptValueConcrete", - "description": "Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.", - "type": "object", - "properties": { - "messages": { - "title": "Messages", - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - }, - "type": { - "title": "Type", - "default": "ChatPromptValueConcrete", - "enum": [ - "ChatPromptValueConcrete" - ], - "type": "string" - } - }, - "required": [ - "messages" - ] - } - } - } + "data": "ChatPromptTemplateOutput" } ], "edges": [ @@ -22947,464 +3283,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "FakeListChatModelInput", - "anyOf": [ - { - "type": "string" - }, - { - "$ref": "#/definitions/StringPromptValue" - }, - { - "$ref": "#/definitions/ChatPromptValueConcrete" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - } - ], - "definitions": { - "StringPromptValue": { - "title": "StringPromptValue", - "description": "String prompt value.", - "type": "object", - "properties": { - "text": { - "title": "Text", - "type": "string" - }, - "type": { - "title": "Type", - "default": "StringPromptValue", - "enum": [ - "StringPromptValue" - ], - "type": "string" - } - }, - "required": [ - "text" - ] - }, - "AIMessage": { - "title": "AIMessage", - "description": "Message from an AI.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "ai", - "enum": [ - "ai" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "HumanMessage": { - "title": "HumanMessage", - "description": "Message from a human.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "human", - "enum": [ - "human" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "ChatMessage": { - "title": "ChatMessage", - "description": "Message that can be assigned an arbitrary speaker (i.e. role).", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "chat", - "enum": [ - "chat" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "role": { - "title": "Role", - "type": "string" - } - }, - "required": [ - "content", - "role" - ] - }, - "SystemMessage": { - "title": "SystemMessage", - "description": "Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "system", - "enum": [ - "system" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content" - ] - }, - "FunctionMessage": { - "title": "FunctionMessage", - "description": "Message for passing the result of executing a function back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "function", - "enum": [ - "function" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content", - "name" - ] - }, - "ToolMessage": { - "title": "ToolMessage", - "description": "Message for passing the result of executing a tool back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "tool", - "enum": [ - "tool" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "tool_call_id": { - "title": "Tool Call Id", - "type": "string" - } - }, - "required": [ - "content", - "tool_call_id" - ] - }, - "ChatPromptValueConcrete": { - "title": "ChatPromptValueConcrete", - "description": "Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.", - "type": "object", - "properties": { - "messages": { - "title": "Messages", - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - }, - "type": { - "title": "Type", - "default": "ChatPromptValueConcrete", - "enum": [ - "ChatPromptValueConcrete" - ], - "type": "string" - } - }, - "required": [ - "messages" - ] - } - } - } + "data": "FakeListChatModelInput" }, { "id": 1, @@ -23422,382 +3301,7 @@ { "id": 2, "type": "schema", - "data": { - "title": "FakeListChatModelOutput", - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ], - "definitions": { - "AIMessage": { - "title": "AIMessage", - "description": "Message from an AI.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "ai", - "enum": [ - "ai" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "HumanMessage": { - "title": "HumanMessage", - "description": "Message from a human.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "human", - "enum": [ - "human" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "ChatMessage": { - "title": "ChatMessage", - "description": "Message that can be assigned an arbitrary speaker (i.e. role).", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "chat", - "enum": [ - "chat" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "role": { - "title": "Role", - "type": "string" - } - }, - "required": [ - "content", - "role" - ] - }, - "SystemMessage": { - "title": "SystemMessage", - "description": "Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "system", - "enum": [ - "system" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content" - ] - }, - "FunctionMessage": { - "title": "FunctionMessage", - "description": "Message for passing the result of executing a function back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "function", - "enum": [ - "function" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content", - "name" - ] - }, - "ToolMessage": { - "title": "ToolMessage", - "description": "Message for passing the result of executing a tool back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "tool", - "enum": [ - "tool" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "tool_call_id": { - "title": "Tool Call Id", - "type": "string" - } - }, - "required": [ - "content", - "tool_call_id" - ] - } - } - } + "data": "FakeListChatModelOutput" } ], "edges": [ @@ -23820,16 +3324,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "PromptInput", - "type": "object", - "properties": { - "question": { - "title": "Question", - "type": "string" - } - } - } + "data": "PromptInput" }, { "id": 1, @@ -23860,382 +3355,7 @@ { "id": 3, "type": "schema", - "data": { - "title": "FakeListChatModelOutput", - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ], - "definitions": { - "AIMessage": { - "title": "AIMessage", - "description": "Message from an AI.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "ai", - "enum": [ - "ai" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "HumanMessage": { - "title": "HumanMessage", - "description": "Message from a human.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "human", - "enum": [ - "human" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "ChatMessage": { - "title": "ChatMessage", - "description": "Message that can be assigned an arbitrary speaker (i.e. role).", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "chat", - "enum": [ - "chat" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "role": { - "title": "Role", - "type": "string" - } - }, - "required": [ - "content", - "role" - ] - }, - "SystemMessage": { - "title": "SystemMessage", - "description": "Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "system", - "enum": [ - "system" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content" - ] - }, - "FunctionMessage": { - "title": "FunctionMessage", - "description": "Message for passing the result of executing a function back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "function", - "enum": [ - "function" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content", - "name" - ] - }, - "ToolMessage": { - "title": "ToolMessage", - "description": "Message for passing the result of executing a tool back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "tool", - "enum": [ - "tool" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "tool_call_id": { - "title": "Tool Call Id", - "type": "string" - } - }, - "required": [ - "content", - "tool_call_id" - ] - } - } - } + "data": "FakeListChatModelOutput" } ], "edges": [ @@ -24258,7 +3378,7 @@ # --- # name: test_prompt_with_chat_model_async.2 list([ - Run(id=UUID('00000000-0000-4000-8000-000000000000'), name='RunnableSequence', start_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), run_type='chain', end_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), extra={}, error=None, serialized={'lc': 1, 'type': 'constructor', 'id': ['langchain', 'schema', 'runnable', 'RunnableSequence'], 'kwargs': {'first': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'kwargs': {'messages': [{'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'SystemMessagePromptTemplate'], 'kwargs': {'prompt': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'kwargs': {'input_variables': [], 'template': 'You are a nice assistant.', 'template_format': 'f-string', 'partial_variables': {}}, 'name': 'PromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'PromptInput', 'type': 'object', 'properties': {}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'name': 'PromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': {'title': 'PromptTemplateOutput', 'anyOf': [{'$ref': '#/definitions/StringPromptValue'}, {'$ref': '#/definitions/ChatPromptValueConcrete'}], 'definitions': {'StringPromptValue': {'title': 'StringPromptValue', 'description': 'String prompt value.', 'type': 'object', 'properties': {'text': {'title': 'Text', 'type': 'string'}, 'type': {'title': 'Type', 'default': 'StringPromptValue', 'enum': ['StringPromptValue'], 'type': 'string'}}, 'required': ['text']}, 'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}, 'ChatPromptValueConcrete': {'title': 'ChatPromptValueConcrete', 'description': 'Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.', 'type': 'object', 'properties': {'messages': {'title': 'Messages', 'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}, 'type': {'title': 'Type', 'default': 'ChatPromptValueConcrete', 'enum': ['ChatPromptValueConcrete'], 'type': 'string'}}, 'required': ['messages']}}}}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}}}, {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'HumanMessagePromptTemplate'], 'kwargs': {'prompt': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'kwargs': {'input_variables': ['question'], 'template': '{question}', 'template_format': 'f-string', 'partial_variables': {}}, 'name': 'PromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'PromptInput', 'type': 'object', 'properties': {'question': {'title': 'Question', 'type': 'string'}}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'name': 'PromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': {'title': 'PromptTemplateOutput', 'anyOf': [{'$ref': '#/definitions/StringPromptValue'}, {'$ref': '#/definitions/ChatPromptValueConcrete'}], 'definitions': {'StringPromptValue': {'title': 'StringPromptValue', 'description': 'String prompt value.', 'type': 'object', 'properties': {'text': {'title': 'Text', 'type': 'string'}, 'type': {'title': 'Type', 'default': 'StringPromptValue', 'enum': ['StringPromptValue'], 'type': 'string'}}, 'required': ['text']}, 'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}, 'ChatPromptValueConcrete': {'title': 'ChatPromptValueConcrete', 'description': 'Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.', 'type': 'object', 'properties': {'messages': {'title': 'Messages', 'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}, 'type': {'title': 'Type', 'default': 'ChatPromptValueConcrete', 'enum': ['ChatPromptValueConcrete'], 'type': 'string'}}, 'required': ['messages']}}}}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}}}], 'input_variables': ['question']}, 'name': 'ChatPromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'PromptInput', 'type': 'object', 'properties': {'question': {'title': 'Question', 'type': 'string'}}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'name': 'ChatPromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': {'title': 'ChatPromptTemplateOutput', 'anyOf': [{'$ref': '#/definitions/StringPromptValue'}, {'$ref': '#/definitions/ChatPromptValueConcrete'}], 'definitions': {'StringPromptValue': {'title': 'StringPromptValue', 'description': 'String prompt value.', 'type': 'object', 'properties': {'text': {'title': 'Text', 'type': 'string'}, 'type': {'title': 'Type', 'default': 'StringPromptValue', 'enum': ['StringPromptValue'], 'type': 'string'}}, 'required': ['text']}, 'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}, 'ChatPromptValueConcrete': {'title': 'ChatPromptValueConcrete', 'description': 'Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.', 'type': 'object', 'properties': {'messages': {'title': 'Messages', 'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}, 'type': {'title': 'Type', 'default': 'ChatPromptValueConcrete', 'enum': ['ChatPromptValueConcrete'], 'type': 'string'}}, 'required': ['messages']}}}}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}, 'middle': [], 'last': {'lc': 1, 'type': 'not_implemented', 'id': ['langchain_core', 'language_models', 'fake_chat_models', 'FakeListChatModel'], 'repr': "FakeListChatModel(responses=['foo'])", 'name': 'FakeListChatModel', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'FakeListChatModelInput', 'anyOf': [{'type': 'string'}, {'$ref': '#/definitions/StringPromptValue'}, {'$ref': '#/definitions/ChatPromptValueConcrete'}, {'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}], 'definitions': {'StringPromptValue': {'title': 'StringPromptValue', 'description': 'String prompt value.', 'type': 'object', 'properties': {'text': {'title': 'Text', 'type': 'string'}, 'type': {'title': 'Type', 'default': 'StringPromptValue', 'enum': ['StringPromptValue'], 'type': 'string'}}, 'required': ['text']}, 'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}, 'ChatPromptValueConcrete': {'title': 'ChatPromptValueConcrete', 'description': 'Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.', 'type': 'object', 'properties': {'messages': {'title': 'Messages', 'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}, 'type': {'title': 'Type', 'default': 'ChatPromptValueConcrete', 'enum': ['ChatPromptValueConcrete'], 'type': 'string'}}, 'required': ['messages']}}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain_core', 'language_models', 'fake_chat_models', 'FakeListChatModel'], 'name': 'FakeListChatModel'}}, {'id': 2, 'type': 'schema', 'data': {'title': 'FakeListChatModelOutput', 'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}], 'definitions': {'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}}}}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}, 'name': None}, 'name': 'RunnableSequence', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'PromptInput', 'type': 'object', 'properties': {'question': {'title': 'Question', 'type': 'string'}}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'name': 'ChatPromptTemplate'}}, {'id': 2, 'type': 'runnable', 'data': {'id': ['langchain_core', 'language_models', 'fake_chat_models', 'FakeListChatModel'], 'name': 'FakeListChatModel'}}, {'id': 3, 'type': 'schema', 'data': {'title': 'FakeListChatModelOutput', 'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}], 'definitions': {'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}}}}], 'edges': [{'source': 0, 'target': 1}, {'source': 2, 'target': 3}, {'source': 1, 'target': 2}]}}, events=[{'name': 'start', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}, {'name': 'end', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}], inputs={'question': 'What is your name?'}, outputs={'output': AIMessage(content='foo')}, reference_example_id=None, parent_run_id=None, tags=[], execution_order=None, child_execution_order=None, child_runs=[Run(id=UUID('00000000-0000-4000-8000-000000000001'), name='ChatPromptTemplate', start_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), run_type='prompt', end_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), extra={}, error=None, serialized={'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'kwargs': {'messages': [{'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'SystemMessagePromptTemplate'], 'kwargs': {'prompt': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'kwargs': {'input_variables': [], 'template': 'You are a nice assistant.', 'template_format': 'f-string', 'partial_variables': {}}, 'name': 'PromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'PromptInput', 'type': 'object', 'properties': {}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'name': 'PromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': {'title': 'PromptTemplateOutput', 'anyOf': [{'$ref': '#/definitions/StringPromptValue'}, {'$ref': '#/definitions/ChatPromptValueConcrete'}], 'definitions': {'StringPromptValue': {'title': 'StringPromptValue', 'description': 'String prompt value.', 'type': 'object', 'properties': {'text': {'title': 'Text', 'type': 'string'}, 'type': {'title': 'Type', 'default': 'StringPromptValue', 'enum': ['StringPromptValue'], 'type': 'string'}}, 'required': ['text']}, 'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}, 'ChatPromptValueConcrete': {'title': 'ChatPromptValueConcrete', 'description': 'Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.', 'type': 'object', 'properties': {'messages': {'title': 'Messages', 'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}, 'type': {'title': 'Type', 'default': 'ChatPromptValueConcrete', 'enum': ['ChatPromptValueConcrete'], 'type': 'string'}}, 'required': ['messages']}}}}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}}}, {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'HumanMessagePromptTemplate'], 'kwargs': {'prompt': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'kwargs': {'input_variables': ['question'], 'template': '{question}', 'template_format': 'f-string', 'partial_variables': {}}, 'name': 'PromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'PromptInput', 'type': 'object', 'properties': {'question': {'title': 'Question', 'type': 'string'}}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'name': 'PromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': {'title': 'PromptTemplateOutput', 'anyOf': [{'$ref': '#/definitions/StringPromptValue'}, {'$ref': '#/definitions/ChatPromptValueConcrete'}], 'definitions': {'StringPromptValue': {'title': 'StringPromptValue', 'description': 'String prompt value.', 'type': 'object', 'properties': {'text': {'title': 'Text', 'type': 'string'}, 'type': {'title': 'Type', 'default': 'StringPromptValue', 'enum': ['StringPromptValue'], 'type': 'string'}}, 'required': ['text']}, 'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}, 'ChatPromptValueConcrete': {'title': 'ChatPromptValueConcrete', 'description': 'Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.', 'type': 'object', 'properties': {'messages': {'title': 'Messages', 'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}, 'type': {'title': 'Type', 'default': 'ChatPromptValueConcrete', 'enum': ['ChatPromptValueConcrete'], 'type': 'string'}}, 'required': ['messages']}}}}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}}}], 'input_variables': ['question']}, 'name': 'ChatPromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'PromptInput', 'type': 'object', 'properties': {'question': {'title': 'Question', 'type': 'string'}}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'name': 'ChatPromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': {'title': 'ChatPromptTemplateOutput', 'anyOf': [{'$ref': '#/definitions/StringPromptValue'}, {'$ref': '#/definitions/ChatPromptValueConcrete'}], 'definitions': {'StringPromptValue': {'title': 'StringPromptValue', 'description': 'String prompt value.', 'type': 'object', 'properties': {'text': {'title': 'Text', 'type': 'string'}, 'type': {'title': 'Type', 'default': 'StringPromptValue', 'enum': ['StringPromptValue'], 'type': 'string'}}, 'required': ['text']}, 'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}, 'ChatPromptValueConcrete': {'title': 'ChatPromptValueConcrete', 'description': 'Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.', 'type': 'object', 'properties': {'messages': {'title': 'Messages', 'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}, 'type': {'title': 'Type', 'default': 'ChatPromptValueConcrete', 'enum': ['ChatPromptValueConcrete'], 'type': 'string'}}, 'required': ['messages']}}}}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}, events=[{'name': 'start', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}, {'name': 'end', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}], inputs={'question': 'What is your name?'}, outputs={'output': ChatPromptValue(messages=[SystemMessage(content='You are a nice assistant.'), HumanMessage(content='What is your name?')])}, reference_example_id=None, parent_run_id=UUID('00000000-0000-4000-8000-000000000000'), tags=['seq:step:1'], execution_order=None, child_execution_order=None, child_runs=[], trace_id=UUID('00000000-0000-4000-8000-000000000000'), dotted_order='20230101T000000000000Z00000000-0000-4000-8000-000000000000.20230101T000000000000Z00000000-0000-4000-8000-000000000001'), Run(id=UUID('00000000-0000-4000-8000-000000000002'), name='FakeListChatModel', start_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), run_type='llm', end_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), extra={'invocation_params': {'responses': ['foo'], '_type': 'fake-list-chat-model', 'stop': None}, 'options': {'stop': None}, 'batch_size': 1}, error=None, serialized={'lc': 1, 'type': 'not_implemented', 'id': ['langchain_core', 'language_models', 'fake_chat_models', 'FakeListChatModel'], 'repr': "FakeListChatModel(responses=['foo'])", 'name': 'FakeListChatModel', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'FakeListChatModelInput', 'anyOf': [{'type': 'string'}, {'$ref': '#/definitions/StringPromptValue'}, {'$ref': '#/definitions/ChatPromptValueConcrete'}, {'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}], 'definitions': {'StringPromptValue': {'title': 'StringPromptValue', 'description': 'String prompt value.', 'type': 'object', 'properties': {'text': {'title': 'Text', 'type': 'string'}, 'type': {'title': 'Type', 'default': 'StringPromptValue', 'enum': ['StringPromptValue'], 'type': 'string'}}, 'required': ['text']}, 'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}, 'ChatPromptValueConcrete': {'title': 'ChatPromptValueConcrete', 'description': 'Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.', 'type': 'object', 'properties': {'messages': {'title': 'Messages', 'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}, 'type': {'title': 'Type', 'default': 'ChatPromptValueConcrete', 'enum': ['ChatPromptValueConcrete'], 'type': 'string'}}, 'required': ['messages']}}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain_core', 'language_models', 'fake_chat_models', 'FakeListChatModel'], 'name': 'FakeListChatModel'}}, {'id': 2, 'type': 'schema', 'data': {'title': 'FakeListChatModelOutput', 'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}], 'definitions': {'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}}}}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}, events=[{'name': 'start', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}, {'name': 'end', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}], inputs={'prompts': ['System: You are a nice assistant.\nHuman: What is your name?']}, outputs={'generations': [[{'text': 'foo', 'generation_info': None, 'type': 'ChatGeneration', 'message': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'schema', 'messages', 'AIMessage'], 'kwargs': {'content': 'foo'}}}]], 'llm_output': None, 'run': None}, reference_example_id=None, parent_run_id=UUID('00000000-0000-4000-8000-000000000000'), tags=['seq:step:2'], execution_order=None, child_execution_order=None, child_runs=[], trace_id=UUID('00000000-0000-4000-8000-000000000000'), dotted_order='20230101T000000000000Z00000000-0000-4000-8000-000000000000.20230101T000000000000Z00000000-0000-4000-8000-000000000002')], trace_id=UUID('00000000-0000-4000-8000-000000000000'), dotted_order='20230101T000000000000Z00000000-0000-4000-8000-000000000000'), + Run(id=UUID('00000000-0000-4000-8000-000000000000'), name='RunnableSequence', start_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), run_type='chain', end_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), extra={}, error=None, serialized={'lc': 1, 'type': 'constructor', 'id': ['langchain', 'schema', 'runnable', 'RunnableSequence'], 'kwargs': {'first': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'kwargs': {'messages': [{'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'SystemMessagePromptTemplate'], 'kwargs': {'prompt': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'kwargs': {'input_variables': [], 'template': 'You are a nice assistant.', 'template_format': 'f-string', 'partial_variables': {}}, 'name': 'PromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'PromptInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'name': 'PromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': 'PromptTemplateOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}}}, {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'HumanMessagePromptTemplate'], 'kwargs': {'prompt': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'kwargs': {'input_variables': ['question'], 'template': '{question}', 'template_format': 'f-string', 'partial_variables': {}}, 'name': 'PromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'PromptInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'name': 'PromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': 'PromptTemplateOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}}}], 'input_variables': ['question']}, 'name': 'ChatPromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'PromptInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'name': 'ChatPromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': 'ChatPromptTemplateOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}, 'middle': [], 'last': {'lc': 1, 'type': 'not_implemented', 'id': ['langchain_core', 'language_models', 'fake_chat_models', 'FakeListChatModel'], 'repr': "FakeListChatModel(responses=['foo'])", 'name': 'FakeListChatModel', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'FakeListChatModelInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain_core', 'language_models', 'fake_chat_models', 'FakeListChatModel'], 'name': 'FakeListChatModel'}}, {'id': 2, 'type': 'schema', 'data': 'FakeListChatModelOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}, 'name': None}, 'name': 'RunnableSequence', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'PromptInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'name': 'ChatPromptTemplate'}}, {'id': 2, 'type': 'runnable', 'data': {'id': ['langchain_core', 'language_models', 'fake_chat_models', 'FakeListChatModel'], 'name': 'FakeListChatModel'}}, {'id': 3, 'type': 'schema', 'data': 'FakeListChatModelOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 2, 'target': 3}, {'source': 1, 'target': 2}]}}, events=[{'name': 'start', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}, {'name': 'end', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}], inputs={'question': 'What is your name?'}, outputs={'output': AIMessage(content='foo', id='')}, reference_example_id=None, parent_run_id=None, tags=[], execution_order=None, child_execution_order=None, child_runs=[Run(id=UUID('00000000-0000-4000-8000-000000000001'), name='ChatPromptTemplate', start_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), run_type='prompt', end_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), extra={}, error=None, serialized={'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'kwargs': {'messages': [{'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'SystemMessagePromptTemplate'], 'kwargs': {'prompt': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'kwargs': {'input_variables': [], 'template': 'You are a nice assistant.', 'template_format': 'f-string', 'partial_variables': {}}, 'name': 'PromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'PromptInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'name': 'PromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': 'PromptTemplateOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}}}, {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'HumanMessagePromptTemplate'], 'kwargs': {'prompt': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'kwargs': {'input_variables': ['question'], 'template': '{question}', 'template_format': 'f-string', 'partial_variables': {}}, 'name': 'PromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'PromptInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'name': 'PromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': 'PromptTemplateOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}}}], 'input_variables': ['question']}, 'name': 'ChatPromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'PromptInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'name': 'ChatPromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': 'ChatPromptTemplateOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}, events=[{'name': 'start', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}, {'name': 'end', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}], inputs={'question': 'What is your name?'}, outputs={'output': ChatPromptValue(messages=[SystemMessage(content='You are a nice assistant.'), HumanMessage(content='What is your name?')])}, reference_example_id=None, parent_run_id=UUID('00000000-0000-4000-8000-000000000000'), tags=['seq:step:1'], execution_order=None, child_execution_order=None, child_runs=[], trace_id=UUID('00000000-0000-4000-8000-000000000000'), dotted_order='20230101T000000000000Z00000000-0000-4000-8000-000000000000.20230101T000000000000Z00000000-0000-4000-8000-000000000001'), Run(id=UUID('00000000-0000-4000-8000-000000000002'), name='FakeListChatModel', start_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), run_type='llm', end_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), extra={'invocation_params': {'responses': ['foo'], '_type': 'fake-list-chat-model', 'stop': None}, 'options': {'stop': None}, 'batch_size': 1}, error=None, serialized={'lc': 1, 'type': 'not_implemented', 'id': ['langchain_core', 'language_models', 'fake_chat_models', 'FakeListChatModel'], 'repr': "FakeListChatModel(responses=['foo'])", 'name': 'FakeListChatModel', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'FakeListChatModelInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain_core', 'language_models', 'fake_chat_models', 'FakeListChatModel'], 'name': 'FakeListChatModel'}}, {'id': 2, 'type': 'schema', 'data': 'FakeListChatModelOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}, events=[{'name': 'start', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}, {'name': 'end', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}], inputs={'prompts': ['System: You are a nice assistant.\nHuman: What is your name?']}, outputs={'generations': [[{'text': 'foo', 'generation_info': None, 'type': 'ChatGeneration', 'message': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'schema', 'messages', 'AIMessage'], 'kwargs': {'content': 'foo'}}}]], 'llm_output': None, 'run': None}, reference_example_id=None, parent_run_id=UUID('00000000-0000-4000-8000-000000000000'), tags=['seq:step:2'], execution_order=None, child_execution_order=None, child_runs=[], trace_id=UUID('00000000-0000-4000-8000-000000000000'), dotted_order='20230101T000000000000Z00000000-0000-4000-8000-000000000000.20230101T000000000000Z00000000-0000-4000-8000-000000000002')], trace_id=UUID('00000000-0000-4000-8000-000000000000'), dotted_order='20230101T000000000000Z00000000-0000-4000-8000-000000000000'), ]) # --- # name: test_prompt_with_llm @@ -24315,11 +3435,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "PromptInput", - "type": "object", - "properties": {} - } + "data": "PromptInput" }, { "id": 1, @@ -24337,436 +3453,7 @@ { "id": 2, "type": "schema", - "data": { - "title": "PromptTemplateOutput", - "anyOf": [ - { - "$ref": "#/definitions/StringPromptValue" - }, - { - "$ref": "#/definitions/ChatPromptValueConcrete" - } - ], - "definitions": { - "StringPromptValue": { - "title": "StringPromptValue", - "description": "String prompt value.", - "type": "object", - "properties": { - "text": { - "title": "Text", - "type": "string" - }, - "type": { - "title": "Type", - "default": "StringPromptValue", - "enum": [ - "StringPromptValue" - ], - "type": "string" - } - }, - "required": [ - "text" - ] - }, - "AIMessage": { - "title": "AIMessage", - "description": "Message from an AI.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "ai", - "enum": [ - "ai" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "HumanMessage": { - "title": "HumanMessage", - "description": "Message from a human.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "human", - "enum": [ - "human" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "ChatMessage": { - "title": "ChatMessage", - "description": "Message that can be assigned an arbitrary speaker (i.e. role).", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "chat", - "enum": [ - "chat" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "role": { - "title": "Role", - "type": "string" - } - }, - "required": [ - "content", - "role" - ] - }, - "SystemMessage": { - "title": "SystemMessage", - "description": "Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "system", - "enum": [ - "system" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content" - ] - }, - "FunctionMessage": { - "title": "FunctionMessage", - "description": "Message for passing the result of executing a function back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "function", - "enum": [ - "function" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content", - "name" - ] - }, - "ToolMessage": { - "title": "ToolMessage", - "description": "Message for passing the result of executing a tool back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "tool", - "enum": [ - "tool" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "tool_call_id": { - "title": "Tool Call Id", - "type": "string" - } - }, - "required": [ - "content", - "tool_call_id" - ] - }, - "ChatPromptValueConcrete": { - "title": "ChatPromptValueConcrete", - "description": "Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.", - "type": "object", - "properties": { - "messages": { - "title": "Messages", - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - }, - "type": { - "title": "Type", - "default": "ChatPromptValueConcrete", - "enum": [ - "ChatPromptValueConcrete" - ], - "type": "string" - } - }, - "required": [ - "messages" - ] - } - } - } + "data": "PromptTemplateOutput" } ], "edges": [ @@ -24816,16 +3503,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "PromptInput", - "type": "object", - "properties": { - "question": { - "title": "Question", - "type": "string" - } - } - } + "data": "PromptInput" }, { "id": 1, @@ -24843,436 +3521,7 @@ { "id": 2, "type": "schema", - "data": { - "title": "PromptTemplateOutput", - "anyOf": [ - { - "$ref": "#/definitions/StringPromptValue" - }, - { - "$ref": "#/definitions/ChatPromptValueConcrete" - } - ], - "definitions": { - "StringPromptValue": { - "title": "StringPromptValue", - "description": "String prompt value.", - "type": "object", - "properties": { - "text": { - "title": "Text", - "type": "string" - }, - "type": { - "title": "Type", - "default": "StringPromptValue", - "enum": [ - "StringPromptValue" - ], - "type": "string" - } - }, - "required": [ - "text" - ] - }, - "AIMessage": { - "title": "AIMessage", - "description": "Message from an AI.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "ai", - "enum": [ - "ai" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "HumanMessage": { - "title": "HumanMessage", - "description": "Message from a human.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "human", - "enum": [ - "human" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "ChatMessage": { - "title": "ChatMessage", - "description": "Message that can be assigned an arbitrary speaker (i.e. role).", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "chat", - "enum": [ - "chat" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "role": { - "title": "Role", - "type": "string" - } - }, - "required": [ - "content", - "role" - ] - }, - "SystemMessage": { - "title": "SystemMessage", - "description": "Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "system", - "enum": [ - "system" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content" - ] - }, - "FunctionMessage": { - "title": "FunctionMessage", - "description": "Message for passing the result of executing a function back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "function", - "enum": [ - "function" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content", - "name" - ] - }, - "ToolMessage": { - "title": "ToolMessage", - "description": "Message for passing the result of executing a tool back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "tool", - "enum": [ - "tool" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "tool_call_id": { - "title": "Tool Call Id", - "type": "string" - } - }, - "required": [ - "content", - "tool_call_id" - ] - }, - "ChatPromptValueConcrete": { - "title": "ChatPromptValueConcrete", - "description": "Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.", - "type": "object", - "properties": { - "messages": { - "title": "Messages", - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - }, - "type": { - "title": "Type", - "default": "ChatPromptValueConcrete", - "enum": [ - "ChatPromptValueConcrete" - ], - "type": "string" - } - }, - "required": [ - "messages" - ] - } - } - } + "data": "PromptTemplateOutput" } ], "edges": [ @@ -25300,16 +3549,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "PromptInput", - "type": "object", - "properties": { - "question": { - "title": "Question", - "type": "string" - } - } - } + "data": "PromptInput" }, { "id": 1, @@ -25327,436 +3567,7 @@ { "id": 2, "type": "schema", - "data": { - "title": "ChatPromptTemplateOutput", - "anyOf": [ - { - "$ref": "#/definitions/StringPromptValue" - }, - { - "$ref": "#/definitions/ChatPromptValueConcrete" - } - ], - "definitions": { - "StringPromptValue": { - "title": "StringPromptValue", - "description": "String prompt value.", - "type": "object", - "properties": { - "text": { - "title": "Text", - "type": "string" - }, - "type": { - "title": "Type", - "default": "StringPromptValue", - "enum": [ - "StringPromptValue" - ], - "type": "string" - } - }, - "required": [ - "text" - ] - }, - "AIMessage": { - "title": "AIMessage", - "description": "Message from an AI.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "ai", - "enum": [ - "ai" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "HumanMessage": { - "title": "HumanMessage", - "description": "Message from a human.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "human", - "enum": [ - "human" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "ChatMessage": { - "title": "ChatMessage", - "description": "Message that can be assigned an arbitrary speaker (i.e. role).", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "chat", - "enum": [ - "chat" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "role": { - "title": "Role", - "type": "string" - } - }, - "required": [ - "content", - "role" - ] - }, - "SystemMessage": { - "title": "SystemMessage", - "description": "Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "system", - "enum": [ - "system" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content" - ] - }, - "FunctionMessage": { - "title": "FunctionMessage", - "description": "Message for passing the result of executing a function back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "function", - "enum": [ - "function" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content", - "name" - ] - }, - "ToolMessage": { - "title": "ToolMessage", - "description": "Message for passing the result of executing a tool back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "tool", - "enum": [ - "tool" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "tool_call_id": { - "title": "Tool Call Id", - "type": "string" - } - }, - "required": [ - "content", - "tool_call_id" - ] - }, - "ChatPromptValueConcrete": { - "title": "ChatPromptValueConcrete", - "description": "Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.", - "type": "object", - "properties": { - "messages": { - "title": "Messages", - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - }, - "type": { - "title": "Type", - "default": "ChatPromptValueConcrete", - "enum": [ - "ChatPromptValueConcrete" - ], - "type": "string" - } - }, - "required": [ - "messages" - ] - } - } - } + "data": "ChatPromptTemplateOutput" } ], "edges": [ @@ -25788,464 +3599,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "FakeListLLMInput", - "anyOf": [ - { - "type": "string" - }, - { - "$ref": "#/definitions/StringPromptValue" - }, - { - "$ref": "#/definitions/ChatPromptValueConcrete" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - } - ], - "definitions": { - "StringPromptValue": { - "title": "StringPromptValue", - "description": "String prompt value.", - "type": "object", - "properties": { - "text": { - "title": "Text", - "type": "string" - }, - "type": { - "title": "Type", - "default": "StringPromptValue", - "enum": [ - "StringPromptValue" - ], - "type": "string" - } - }, - "required": [ - "text" - ] - }, - "AIMessage": { - "title": "AIMessage", - "description": "Message from an AI.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "ai", - "enum": [ - "ai" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "HumanMessage": { - "title": "HumanMessage", - "description": "Message from a human.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "human", - "enum": [ - "human" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "ChatMessage": { - "title": "ChatMessage", - "description": "Message that can be assigned an arbitrary speaker (i.e. role).", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "chat", - "enum": [ - "chat" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "role": { - "title": "Role", - "type": "string" - } - }, - "required": [ - "content", - "role" - ] - }, - "SystemMessage": { - "title": "SystemMessage", - "description": "Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "system", - "enum": [ - "system" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content" - ] - }, - "FunctionMessage": { - "title": "FunctionMessage", - "description": "Message for passing the result of executing a function back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "function", - "enum": [ - "function" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content", - "name" - ] - }, - "ToolMessage": { - "title": "ToolMessage", - "description": "Message for passing the result of executing a tool back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "tool", - "enum": [ - "tool" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "tool_call_id": { - "title": "Tool Call Id", - "type": "string" - } - }, - "required": [ - "content", - "tool_call_id" - ] - }, - "ChatPromptValueConcrete": { - "title": "ChatPromptValueConcrete", - "description": "Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.", - "type": "object", - "properties": { - "messages": { - "title": "Messages", - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - }, - "type": { - "title": "Type", - "default": "ChatPromptValueConcrete", - "enum": [ - "ChatPromptValueConcrete" - ], - "type": "string" - } - }, - "required": [ - "messages" - ] - } - } - } + "data": "FakeListLLMInput" }, { "id": 1, @@ -26263,10 +3617,7 @@ { "id": 2, "type": "schema", - "data": { - "title": "FakeListLLMOutput", - "type": "string" - } + "data": "FakeListLLMOutput" } ], "edges": [ @@ -26289,16 +3640,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "PromptInput", - "type": "object", - "properties": { - "question": { - "title": "Question", - "type": "string" - } - } - } + "data": "PromptInput" }, { "id": 1, @@ -26329,10 +3671,7 @@ { "id": 3, "type": "schema", - "data": { - "title": "FakeListLLMOutput", - "type": "string" - } + "data": "FakeListLLMOutput" } ], "edges": [ @@ -26355,13 +3694,13 @@ # --- # name: test_prompt_with_llm.1 list([ - Run(id=UUID('00000000-0000-4000-8000-000000000000'), name='RunnableSequence', start_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), run_type='chain', end_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), extra={}, error=None, serialized={'lc': 1, 'type': 'constructor', 'id': ['langchain', 'schema', 'runnable', 'RunnableSequence'], 'kwargs': {'first': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'kwargs': {'messages': [{'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'SystemMessagePromptTemplate'], 'kwargs': {'prompt': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'kwargs': {'input_variables': [], 'template': 'You are a nice assistant.', 'template_format': 'f-string', 'partial_variables': {}}, 'name': 'PromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'PromptInput', 'type': 'object', 'properties': {}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'name': 'PromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': {'title': 'PromptTemplateOutput', 'anyOf': [{'$ref': '#/definitions/StringPromptValue'}, {'$ref': '#/definitions/ChatPromptValueConcrete'}], 'definitions': {'StringPromptValue': {'title': 'StringPromptValue', 'description': 'String prompt value.', 'type': 'object', 'properties': {'text': {'title': 'Text', 'type': 'string'}, 'type': {'title': 'Type', 'default': 'StringPromptValue', 'enum': ['StringPromptValue'], 'type': 'string'}}, 'required': ['text']}, 'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}, 'ChatPromptValueConcrete': {'title': 'ChatPromptValueConcrete', 'description': 'Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.', 'type': 'object', 'properties': {'messages': {'title': 'Messages', 'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}, 'type': {'title': 'Type', 'default': 'ChatPromptValueConcrete', 'enum': ['ChatPromptValueConcrete'], 'type': 'string'}}, 'required': ['messages']}}}}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}}}, {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'HumanMessagePromptTemplate'], 'kwargs': {'prompt': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'kwargs': {'input_variables': ['question'], 'template': '{question}', 'template_format': 'f-string', 'partial_variables': {}}, 'name': 'PromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'PromptInput', 'type': 'object', 'properties': {'question': {'title': 'Question', 'type': 'string'}}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'name': 'PromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': {'title': 'PromptTemplateOutput', 'anyOf': [{'$ref': '#/definitions/StringPromptValue'}, {'$ref': '#/definitions/ChatPromptValueConcrete'}], 'definitions': {'StringPromptValue': {'title': 'StringPromptValue', 'description': 'String prompt value.', 'type': 'object', 'properties': {'text': {'title': 'Text', 'type': 'string'}, 'type': {'title': 'Type', 'default': 'StringPromptValue', 'enum': ['StringPromptValue'], 'type': 'string'}}, 'required': ['text']}, 'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}, 'ChatPromptValueConcrete': {'title': 'ChatPromptValueConcrete', 'description': 'Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.', 'type': 'object', 'properties': {'messages': {'title': 'Messages', 'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}, 'type': {'title': 'Type', 'default': 'ChatPromptValueConcrete', 'enum': ['ChatPromptValueConcrete'], 'type': 'string'}}, 'required': ['messages']}}}}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}}}], 'input_variables': ['question']}, 'name': 'ChatPromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'PromptInput', 'type': 'object', 'properties': {'question': {'title': 'Question', 'type': 'string'}}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'name': 'ChatPromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': {'title': 'ChatPromptTemplateOutput', 'anyOf': [{'$ref': '#/definitions/StringPromptValue'}, {'$ref': '#/definitions/ChatPromptValueConcrete'}], 'definitions': {'StringPromptValue': {'title': 'StringPromptValue', 'description': 'String prompt value.', 'type': 'object', 'properties': {'text': {'title': 'Text', 'type': 'string'}, 'type': {'title': 'Type', 'default': 'StringPromptValue', 'enum': ['StringPromptValue'], 'type': 'string'}}, 'required': ['text']}, 'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}, 'ChatPromptValueConcrete': {'title': 'ChatPromptValueConcrete', 'description': 'Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.', 'type': 'object', 'properties': {'messages': {'title': 'Messages', 'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}, 'type': {'title': 'Type', 'default': 'ChatPromptValueConcrete', 'enum': ['ChatPromptValueConcrete'], 'type': 'string'}}, 'required': ['messages']}}}}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}, 'middle': [], 'last': {'lc': 1, 'type': 'not_implemented', 'id': ['langchain_core', 'language_models', 'fake', 'FakeListLLM'], 'repr': "FakeListLLM(responses=['foo', 'bar'])", 'name': 'FakeListLLM', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'FakeListLLMInput', 'anyOf': [{'type': 'string'}, {'$ref': '#/definitions/StringPromptValue'}, {'$ref': '#/definitions/ChatPromptValueConcrete'}, {'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}], 'definitions': {'StringPromptValue': {'title': 'StringPromptValue', 'description': 'String prompt value.', 'type': 'object', 'properties': {'text': {'title': 'Text', 'type': 'string'}, 'type': {'title': 'Type', 'default': 'StringPromptValue', 'enum': ['StringPromptValue'], 'type': 'string'}}, 'required': ['text']}, 'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}, 'ChatPromptValueConcrete': {'title': 'ChatPromptValueConcrete', 'description': 'Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.', 'type': 'object', 'properties': {'messages': {'title': 'Messages', 'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}, 'type': {'title': 'Type', 'default': 'ChatPromptValueConcrete', 'enum': ['ChatPromptValueConcrete'], 'type': 'string'}}, 'required': ['messages']}}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain_core', 'language_models', 'fake', 'FakeListLLM'], 'name': 'FakeListLLM'}}, {'id': 2, 'type': 'schema', 'data': {'title': 'FakeListLLMOutput', 'type': 'string'}}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}, 'name': None}, 'name': 'RunnableSequence', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'PromptInput', 'type': 'object', 'properties': {'question': {'title': 'Question', 'type': 'string'}}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'name': 'ChatPromptTemplate'}}, {'id': 2, 'type': 'runnable', 'data': {'id': ['langchain_core', 'language_models', 'fake', 'FakeListLLM'], 'name': 'FakeListLLM'}}, {'id': 3, 'type': 'schema', 'data': {'title': 'FakeListLLMOutput', 'type': 'string'}}], 'edges': [{'source': 0, 'target': 1}, {'source': 2, 'target': 3}, {'source': 1, 'target': 2}]}}, events=[{'name': 'start', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}, {'name': 'end', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}], inputs={'question': 'What is your name?'}, outputs={'output': 'foo'}, reference_example_id=None, parent_run_id=None, tags=[], execution_order=None, child_execution_order=None, child_runs=[Run(id=UUID('00000000-0000-4000-8000-000000000001'), name='ChatPromptTemplate', start_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), run_type='prompt', end_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), extra={}, error=None, serialized={'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'kwargs': {'messages': [{'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'SystemMessagePromptTemplate'], 'kwargs': {'prompt': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'kwargs': {'input_variables': [], 'template': 'You are a nice assistant.', 'template_format': 'f-string', 'partial_variables': {}}, 'name': 'PromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'PromptInput', 'type': 'object', 'properties': {}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'name': 'PromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': {'title': 'PromptTemplateOutput', 'anyOf': [{'$ref': '#/definitions/StringPromptValue'}, {'$ref': '#/definitions/ChatPromptValueConcrete'}], 'definitions': {'StringPromptValue': {'title': 'StringPromptValue', 'description': 'String prompt value.', 'type': 'object', 'properties': {'text': {'title': 'Text', 'type': 'string'}, 'type': {'title': 'Type', 'default': 'StringPromptValue', 'enum': ['StringPromptValue'], 'type': 'string'}}, 'required': ['text']}, 'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}, 'ChatPromptValueConcrete': {'title': 'ChatPromptValueConcrete', 'description': 'Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.', 'type': 'object', 'properties': {'messages': {'title': 'Messages', 'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}, 'type': {'title': 'Type', 'default': 'ChatPromptValueConcrete', 'enum': ['ChatPromptValueConcrete'], 'type': 'string'}}, 'required': ['messages']}}}}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}}}, {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'HumanMessagePromptTemplate'], 'kwargs': {'prompt': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'kwargs': {'input_variables': ['question'], 'template': '{question}', 'template_format': 'f-string', 'partial_variables': {}}, 'name': 'PromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'PromptInput', 'type': 'object', 'properties': {'question': {'title': 'Question', 'type': 'string'}}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'name': 'PromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': {'title': 'PromptTemplateOutput', 'anyOf': [{'$ref': '#/definitions/StringPromptValue'}, {'$ref': '#/definitions/ChatPromptValueConcrete'}], 'definitions': {'StringPromptValue': {'title': 'StringPromptValue', 'description': 'String prompt value.', 'type': 'object', 'properties': {'text': {'title': 'Text', 'type': 'string'}, 'type': {'title': 'Type', 'default': 'StringPromptValue', 'enum': ['StringPromptValue'], 'type': 'string'}}, 'required': ['text']}, 'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}, 'ChatPromptValueConcrete': {'title': 'ChatPromptValueConcrete', 'description': 'Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.', 'type': 'object', 'properties': {'messages': {'title': 'Messages', 'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}, 'type': {'title': 'Type', 'default': 'ChatPromptValueConcrete', 'enum': ['ChatPromptValueConcrete'], 'type': 'string'}}, 'required': ['messages']}}}}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}}}], 'input_variables': ['question']}, 'name': 'ChatPromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'PromptInput', 'type': 'object', 'properties': {'question': {'title': 'Question', 'type': 'string'}}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'name': 'ChatPromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': {'title': 'ChatPromptTemplateOutput', 'anyOf': [{'$ref': '#/definitions/StringPromptValue'}, {'$ref': '#/definitions/ChatPromptValueConcrete'}], 'definitions': {'StringPromptValue': {'title': 'StringPromptValue', 'description': 'String prompt value.', 'type': 'object', 'properties': {'text': {'title': 'Text', 'type': 'string'}, 'type': {'title': 'Type', 'default': 'StringPromptValue', 'enum': ['StringPromptValue'], 'type': 'string'}}, 'required': ['text']}, 'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}, 'ChatPromptValueConcrete': {'title': 'ChatPromptValueConcrete', 'description': 'Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.', 'type': 'object', 'properties': {'messages': {'title': 'Messages', 'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}, 'type': {'title': 'Type', 'default': 'ChatPromptValueConcrete', 'enum': ['ChatPromptValueConcrete'], 'type': 'string'}}, 'required': ['messages']}}}}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}, events=[{'name': 'start', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}, {'name': 'end', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}], inputs={'question': 'What is your name?'}, outputs={'output': ChatPromptValue(messages=[SystemMessage(content='You are a nice assistant.'), HumanMessage(content='What is your name?')])}, reference_example_id=None, parent_run_id=UUID('00000000-0000-4000-8000-000000000000'), tags=['seq:step:1'], execution_order=None, child_execution_order=None, child_runs=[], trace_id=UUID('00000000-0000-4000-8000-000000000000'), dotted_order='20230101T000000000000Z00000000-0000-4000-8000-000000000000.20230101T000000000000Z00000000-0000-4000-8000-000000000001'), Run(id=UUID('00000000-0000-4000-8000-000000000002'), name='FakeListLLM', start_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), run_type='llm', end_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), extra={'invocation_params': {'responses': ['foo', 'bar'], '_type': 'fake-list', 'stop': None}, 'options': {'stop': None}, 'batch_size': 1}, error=None, serialized={'lc': 1, 'type': 'not_implemented', 'id': ['langchain_core', 'language_models', 'fake', 'FakeListLLM'], 'repr': "FakeListLLM(responses=['foo', 'bar'])", 'name': 'FakeListLLM', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'FakeListLLMInput', 'anyOf': [{'type': 'string'}, {'$ref': '#/definitions/StringPromptValue'}, {'$ref': '#/definitions/ChatPromptValueConcrete'}, {'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}], 'definitions': {'StringPromptValue': {'title': 'StringPromptValue', 'description': 'String prompt value.', 'type': 'object', 'properties': {'text': {'title': 'Text', 'type': 'string'}, 'type': {'title': 'Type', 'default': 'StringPromptValue', 'enum': ['StringPromptValue'], 'type': 'string'}}, 'required': ['text']}, 'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}, 'ChatPromptValueConcrete': {'title': 'ChatPromptValueConcrete', 'description': 'Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.', 'type': 'object', 'properties': {'messages': {'title': 'Messages', 'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}, 'type': {'title': 'Type', 'default': 'ChatPromptValueConcrete', 'enum': ['ChatPromptValueConcrete'], 'type': 'string'}}, 'required': ['messages']}}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain_core', 'language_models', 'fake', 'FakeListLLM'], 'name': 'FakeListLLM'}}, {'id': 2, 'type': 'schema', 'data': {'title': 'FakeListLLMOutput', 'type': 'string'}}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}, events=[{'name': 'start', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}, {'name': 'end', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}], inputs={'prompts': ['System: You are a nice assistant.\nHuman: What is your name?']}, outputs={'generations': [[{'text': 'foo', 'generation_info': None, 'type': 'Generation'}]], 'llm_output': None, 'run': None}, reference_example_id=None, parent_run_id=UUID('00000000-0000-4000-8000-000000000000'), tags=['seq:step:2'], execution_order=None, child_execution_order=None, child_runs=[], trace_id=UUID('00000000-0000-4000-8000-000000000000'), dotted_order='20230101T000000000000Z00000000-0000-4000-8000-000000000000.20230101T000000000000Z00000000-0000-4000-8000-000000000002')], trace_id=UUID('00000000-0000-4000-8000-000000000000'), dotted_order='20230101T000000000000Z00000000-0000-4000-8000-000000000000'), + Run(id=UUID('00000000-0000-4000-8000-000000000000'), name='RunnableSequence', start_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), run_type='chain', end_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), extra={}, error=None, serialized={'lc': 1, 'type': 'constructor', 'id': ['langchain', 'schema', 'runnable', 'RunnableSequence'], 'kwargs': {'first': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'kwargs': {'messages': [{'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'SystemMessagePromptTemplate'], 'kwargs': {'prompt': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'kwargs': {'input_variables': [], 'template': 'You are a nice assistant.', 'template_format': 'f-string', 'partial_variables': {}}, 'name': 'PromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'PromptInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'name': 'PromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': 'PromptTemplateOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}}}, {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'HumanMessagePromptTemplate'], 'kwargs': {'prompt': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'kwargs': {'input_variables': ['question'], 'template': '{question}', 'template_format': 'f-string', 'partial_variables': {}}, 'name': 'PromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'PromptInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'name': 'PromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': 'PromptTemplateOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}}}], 'input_variables': ['question']}, 'name': 'ChatPromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'PromptInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'name': 'ChatPromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': 'ChatPromptTemplateOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}, 'middle': [], 'last': {'lc': 1, 'type': 'not_implemented', 'id': ['langchain_core', 'language_models', 'fake', 'FakeListLLM'], 'repr': "FakeListLLM(responses=['foo', 'bar'])", 'name': 'FakeListLLM', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'FakeListLLMInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain_core', 'language_models', 'fake', 'FakeListLLM'], 'name': 'FakeListLLM'}}, {'id': 2, 'type': 'schema', 'data': 'FakeListLLMOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}, 'name': None}, 'name': 'RunnableSequence', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'PromptInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'name': 'ChatPromptTemplate'}}, {'id': 2, 'type': 'runnable', 'data': {'id': ['langchain_core', 'language_models', 'fake', 'FakeListLLM'], 'name': 'FakeListLLM'}}, {'id': 3, 'type': 'schema', 'data': 'FakeListLLMOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 2, 'target': 3}, {'source': 1, 'target': 2}]}}, events=[{'name': 'start', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}, {'name': 'end', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}], inputs={'question': 'What is your name?'}, outputs={'output': 'foo'}, reference_example_id=None, parent_run_id=None, tags=[], execution_order=None, child_execution_order=None, child_runs=[Run(id=UUID('00000000-0000-4000-8000-000000000001'), name='ChatPromptTemplate', start_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), run_type='prompt', end_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), extra={}, error=None, serialized={'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'kwargs': {'messages': [{'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'SystemMessagePromptTemplate'], 'kwargs': {'prompt': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'kwargs': {'input_variables': [], 'template': 'You are a nice assistant.', 'template_format': 'f-string', 'partial_variables': {}}, 'name': 'PromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'PromptInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'name': 'PromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': 'PromptTemplateOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}}}, {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'HumanMessagePromptTemplate'], 'kwargs': {'prompt': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'kwargs': {'input_variables': ['question'], 'template': '{question}', 'template_format': 'f-string', 'partial_variables': {}}, 'name': 'PromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'PromptInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'name': 'PromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': 'PromptTemplateOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}}}], 'input_variables': ['question']}, 'name': 'ChatPromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'PromptInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'name': 'ChatPromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': 'ChatPromptTemplateOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}, events=[{'name': 'start', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}, {'name': 'end', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}], inputs={'question': 'What is your name?'}, outputs={'output': ChatPromptValue(messages=[SystemMessage(content='You are a nice assistant.'), HumanMessage(content='What is your name?')])}, reference_example_id=None, parent_run_id=UUID('00000000-0000-4000-8000-000000000000'), tags=['seq:step:1'], execution_order=None, child_execution_order=None, child_runs=[], trace_id=UUID('00000000-0000-4000-8000-000000000000'), dotted_order='20230101T000000000000Z00000000-0000-4000-8000-000000000000.20230101T000000000000Z00000000-0000-4000-8000-000000000001'), Run(id=UUID('00000000-0000-4000-8000-000000000002'), name='FakeListLLM', start_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), run_type='llm', end_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), extra={'invocation_params': {'responses': ['foo', 'bar'], '_type': 'fake-list', 'stop': None}, 'options': {'stop': None}, 'batch_size': 1}, error=None, serialized={'lc': 1, 'type': 'not_implemented', 'id': ['langchain_core', 'language_models', 'fake', 'FakeListLLM'], 'repr': "FakeListLLM(responses=['foo', 'bar'])", 'name': 'FakeListLLM', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'FakeListLLMInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain_core', 'language_models', 'fake', 'FakeListLLM'], 'name': 'FakeListLLM'}}, {'id': 2, 'type': 'schema', 'data': 'FakeListLLMOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}, events=[{'name': 'start', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}, {'name': 'end', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}], inputs={'prompts': ['System: You are a nice assistant.\nHuman: What is your name?']}, outputs={'generations': [[{'text': 'foo', 'generation_info': None, 'type': 'Generation'}]], 'llm_output': None, 'run': None}, reference_example_id=None, parent_run_id=UUID('00000000-0000-4000-8000-000000000000'), tags=['seq:step:2'], execution_order=None, child_execution_order=None, child_runs=[], trace_id=UUID('00000000-0000-4000-8000-000000000000'), dotted_order='20230101T000000000000Z00000000-0000-4000-8000-000000000000.20230101T000000000000Z00000000-0000-4000-8000-000000000002')], trace_id=UUID('00000000-0000-4000-8000-000000000000'), dotted_order='20230101T000000000000Z00000000-0000-4000-8000-000000000000'), ]) # --- # name: test_prompt_with_llm.2 list([ - Run(id=UUID('00000000-0000-4000-8000-000000000000'), name='RunnableSequence', start_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), run_type='chain', end_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), extra={}, error=None, serialized={'lc': 1, 'type': 'constructor', 'id': ['langchain', 'schema', 'runnable', 'RunnableSequence'], 'kwargs': {'first': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'kwargs': {'messages': [{'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'SystemMessagePromptTemplate'], 'kwargs': {'prompt': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'kwargs': {'input_variables': [], 'template': 'You are a nice assistant.', 'template_format': 'f-string', 'partial_variables': {}}, 'name': 'PromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'PromptInput', 'type': 'object', 'properties': {}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'name': 'PromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': {'title': 'PromptTemplateOutput', 'anyOf': [{'$ref': '#/definitions/StringPromptValue'}, {'$ref': '#/definitions/ChatPromptValueConcrete'}], 'definitions': {'StringPromptValue': {'title': 'StringPromptValue', 'description': 'String prompt value.', 'type': 'object', 'properties': {'text': {'title': 'Text', 'type': 'string'}, 'type': {'title': 'Type', 'default': 'StringPromptValue', 'enum': ['StringPromptValue'], 'type': 'string'}}, 'required': ['text']}, 'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}, 'ChatPromptValueConcrete': {'title': 'ChatPromptValueConcrete', 'description': 'Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.', 'type': 'object', 'properties': {'messages': {'title': 'Messages', 'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}, 'type': {'title': 'Type', 'default': 'ChatPromptValueConcrete', 'enum': ['ChatPromptValueConcrete'], 'type': 'string'}}, 'required': ['messages']}}}}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}}}, {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'HumanMessagePromptTemplate'], 'kwargs': {'prompt': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'kwargs': {'input_variables': ['question'], 'template': '{question}', 'template_format': 'f-string', 'partial_variables': {}}, 'name': 'PromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'PromptInput', 'type': 'object', 'properties': {'question': {'title': 'Question', 'type': 'string'}}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'name': 'PromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': {'title': 'PromptTemplateOutput', 'anyOf': [{'$ref': '#/definitions/StringPromptValue'}, {'$ref': '#/definitions/ChatPromptValueConcrete'}], 'definitions': {'StringPromptValue': {'title': 'StringPromptValue', 'description': 'String prompt value.', 'type': 'object', 'properties': {'text': {'title': 'Text', 'type': 'string'}, 'type': {'title': 'Type', 'default': 'StringPromptValue', 'enum': ['StringPromptValue'], 'type': 'string'}}, 'required': ['text']}, 'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}, 'ChatPromptValueConcrete': {'title': 'ChatPromptValueConcrete', 'description': 'Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.', 'type': 'object', 'properties': {'messages': {'title': 'Messages', 'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}, 'type': {'title': 'Type', 'default': 'ChatPromptValueConcrete', 'enum': ['ChatPromptValueConcrete'], 'type': 'string'}}, 'required': ['messages']}}}}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}}}], 'input_variables': ['question']}, 'name': 'ChatPromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'PromptInput', 'type': 'object', 'properties': {'question': {'title': 'Question', 'type': 'string'}}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'name': 'ChatPromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': {'title': 'ChatPromptTemplateOutput', 'anyOf': [{'$ref': '#/definitions/StringPromptValue'}, {'$ref': '#/definitions/ChatPromptValueConcrete'}], 'definitions': {'StringPromptValue': {'title': 'StringPromptValue', 'description': 'String prompt value.', 'type': 'object', 'properties': {'text': {'title': 'Text', 'type': 'string'}, 'type': {'title': 'Type', 'default': 'StringPromptValue', 'enum': ['StringPromptValue'], 'type': 'string'}}, 'required': ['text']}, 'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}, 'ChatPromptValueConcrete': {'title': 'ChatPromptValueConcrete', 'description': 'Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.', 'type': 'object', 'properties': {'messages': {'title': 'Messages', 'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}, 'type': {'title': 'Type', 'default': 'ChatPromptValueConcrete', 'enum': ['ChatPromptValueConcrete'], 'type': 'string'}}, 'required': ['messages']}}}}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}, 'middle': [], 'last': {'lc': 1, 'type': 'not_implemented', 'id': ['langchain_core', 'language_models', 'fake', 'FakeListLLM'], 'repr': "FakeListLLM(responses=['foo', 'bar'], i=1)", 'name': 'FakeListLLM', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'FakeListLLMInput', 'anyOf': [{'type': 'string'}, {'$ref': '#/definitions/StringPromptValue'}, {'$ref': '#/definitions/ChatPromptValueConcrete'}, {'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}], 'definitions': {'StringPromptValue': {'title': 'StringPromptValue', 'description': 'String prompt value.', 'type': 'object', 'properties': {'text': {'title': 'Text', 'type': 'string'}, 'type': {'title': 'Type', 'default': 'StringPromptValue', 'enum': ['StringPromptValue'], 'type': 'string'}}, 'required': ['text']}, 'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}, 'ChatPromptValueConcrete': {'title': 'ChatPromptValueConcrete', 'description': 'Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.', 'type': 'object', 'properties': {'messages': {'title': 'Messages', 'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}, 'type': {'title': 'Type', 'default': 'ChatPromptValueConcrete', 'enum': ['ChatPromptValueConcrete'], 'type': 'string'}}, 'required': ['messages']}}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain_core', 'language_models', 'fake', 'FakeListLLM'], 'name': 'FakeListLLM'}}, {'id': 2, 'type': 'schema', 'data': {'title': 'FakeListLLMOutput', 'type': 'string'}}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}, 'name': None}, 'name': 'RunnableSequence', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'PromptInput', 'type': 'object', 'properties': {'question': {'title': 'Question', 'type': 'string'}}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'name': 'ChatPromptTemplate'}}, {'id': 2, 'type': 'runnable', 'data': {'id': ['langchain_core', 'language_models', 'fake', 'FakeListLLM'], 'name': 'FakeListLLM'}}, {'id': 3, 'type': 'schema', 'data': {'title': 'FakeListLLMOutput', 'type': 'string'}}], 'edges': [{'source': 0, 'target': 1}, {'source': 2, 'target': 3}, {'source': 1, 'target': 2}]}}, events=[{'name': 'start', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}, {'name': 'end', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}], inputs={'question': 'What is your name?'}, outputs={'output': 'bar'}, reference_example_id=None, parent_run_id=None, tags=[], execution_order=None, child_execution_order=None, child_runs=[Run(id=UUID('00000000-0000-4000-8000-000000000001'), name='ChatPromptTemplate', start_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), run_type='prompt', end_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), extra={}, error=None, serialized={'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'kwargs': {'messages': [{'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'SystemMessagePromptTemplate'], 'kwargs': {'prompt': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'kwargs': {'input_variables': [], 'template': 'You are a nice assistant.', 'template_format': 'f-string', 'partial_variables': {}}, 'name': 'PromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'PromptInput', 'type': 'object', 'properties': {}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'name': 'PromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': {'title': 'PromptTemplateOutput', 'anyOf': [{'$ref': '#/definitions/StringPromptValue'}, {'$ref': '#/definitions/ChatPromptValueConcrete'}], 'definitions': {'StringPromptValue': {'title': 'StringPromptValue', 'description': 'String prompt value.', 'type': 'object', 'properties': {'text': {'title': 'Text', 'type': 'string'}, 'type': {'title': 'Type', 'default': 'StringPromptValue', 'enum': ['StringPromptValue'], 'type': 'string'}}, 'required': ['text']}, 'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}, 'ChatPromptValueConcrete': {'title': 'ChatPromptValueConcrete', 'description': 'Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.', 'type': 'object', 'properties': {'messages': {'title': 'Messages', 'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}, 'type': {'title': 'Type', 'default': 'ChatPromptValueConcrete', 'enum': ['ChatPromptValueConcrete'], 'type': 'string'}}, 'required': ['messages']}}}}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}}}, {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'HumanMessagePromptTemplate'], 'kwargs': {'prompt': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'kwargs': {'input_variables': ['question'], 'template': '{question}', 'template_format': 'f-string', 'partial_variables': {}}, 'name': 'PromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'PromptInput', 'type': 'object', 'properties': {'question': {'title': 'Question', 'type': 'string'}}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'name': 'PromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': {'title': 'PromptTemplateOutput', 'anyOf': [{'$ref': '#/definitions/StringPromptValue'}, {'$ref': '#/definitions/ChatPromptValueConcrete'}], 'definitions': {'StringPromptValue': {'title': 'StringPromptValue', 'description': 'String prompt value.', 'type': 'object', 'properties': {'text': {'title': 'Text', 'type': 'string'}, 'type': {'title': 'Type', 'default': 'StringPromptValue', 'enum': ['StringPromptValue'], 'type': 'string'}}, 'required': ['text']}, 'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}, 'ChatPromptValueConcrete': {'title': 'ChatPromptValueConcrete', 'description': 'Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.', 'type': 'object', 'properties': {'messages': {'title': 'Messages', 'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}, 'type': {'title': 'Type', 'default': 'ChatPromptValueConcrete', 'enum': ['ChatPromptValueConcrete'], 'type': 'string'}}, 'required': ['messages']}}}}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}}}], 'input_variables': ['question']}, 'name': 'ChatPromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'PromptInput', 'type': 'object', 'properties': {'question': {'title': 'Question', 'type': 'string'}}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'name': 'ChatPromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': {'title': 'ChatPromptTemplateOutput', 'anyOf': [{'$ref': '#/definitions/StringPromptValue'}, {'$ref': '#/definitions/ChatPromptValueConcrete'}], 'definitions': {'StringPromptValue': {'title': 'StringPromptValue', 'description': 'String prompt value.', 'type': 'object', 'properties': {'text': {'title': 'Text', 'type': 'string'}, 'type': {'title': 'Type', 'default': 'StringPromptValue', 'enum': ['StringPromptValue'], 'type': 'string'}}, 'required': ['text']}, 'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}, 'ChatPromptValueConcrete': {'title': 'ChatPromptValueConcrete', 'description': 'Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.', 'type': 'object', 'properties': {'messages': {'title': 'Messages', 'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}, 'type': {'title': 'Type', 'default': 'ChatPromptValueConcrete', 'enum': ['ChatPromptValueConcrete'], 'type': 'string'}}, 'required': ['messages']}}}}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}, events=[{'name': 'start', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}, {'name': 'end', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}], inputs={'question': 'What is your name?'}, outputs={'output': ChatPromptValue(messages=[SystemMessage(content='You are a nice assistant.'), HumanMessage(content='What is your name?')])}, reference_example_id=None, parent_run_id=UUID('00000000-0000-4000-8000-000000000000'), tags=['seq:step:1'], execution_order=None, child_execution_order=None, child_runs=[], trace_id=UUID('00000000-0000-4000-8000-000000000000'), dotted_order='20230101T000000000000Z00000000-0000-4000-8000-000000000000.20230101T000000000000Z00000000-0000-4000-8000-000000000001'), Run(id=UUID('00000000-0000-4000-8000-000000000002'), name='FakeListLLM', start_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), run_type='llm', end_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), extra={'invocation_params': {'responses': ['foo', 'bar'], '_type': 'fake-list', 'stop': None}, 'options': {'stop': None}, 'batch_size': 2}, error=None, serialized={'lc': 1, 'type': 'not_implemented', 'id': ['langchain_core', 'language_models', 'fake', 'FakeListLLM'], 'repr': "FakeListLLM(responses=['foo', 'bar'], i=1)", 'name': 'FakeListLLM', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'FakeListLLMInput', 'anyOf': [{'type': 'string'}, {'$ref': '#/definitions/StringPromptValue'}, {'$ref': '#/definitions/ChatPromptValueConcrete'}, {'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}], 'definitions': {'StringPromptValue': {'title': 'StringPromptValue', 'description': 'String prompt value.', 'type': 'object', 'properties': {'text': {'title': 'Text', 'type': 'string'}, 'type': {'title': 'Type', 'default': 'StringPromptValue', 'enum': ['StringPromptValue'], 'type': 'string'}}, 'required': ['text']}, 'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}, 'ChatPromptValueConcrete': {'title': 'ChatPromptValueConcrete', 'description': 'Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.', 'type': 'object', 'properties': {'messages': {'title': 'Messages', 'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}, 'type': {'title': 'Type', 'default': 'ChatPromptValueConcrete', 'enum': ['ChatPromptValueConcrete'], 'type': 'string'}}, 'required': ['messages']}}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain_core', 'language_models', 'fake', 'FakeListLLM'], 'name': 'FakeListLLM'}}, {'id': 2, 'type': 'schema', 'data': {'title': 'FakeListLLMOutput', 'type': 'string'}}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}, events=[{'name': 'start', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}, {'name': 'end', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}], inputs={'prompts': ['System: You are a nice assistant.\nHuman: What is your name?']}, outputs={'generations': [[{'text': 'bar', 'generation_info': None, 'type': 'Generation'}]], 'llm_output': None, 'run': None}, reference_example_id=None, parent_run_id=UUID('00000000-0000-4000-8000-000000000000'), tags=['seq:step:2'], execution_order=None, child_execution_order=None, child_runs=[], trace_id=UUID('00000000-0000-4000-8000-000000000000'), dotted_order='20230101T000000000000Z00000000-0000-4000-8000-000000000000.20230101T000000000000Z00000000-0000-4000-8000-000000000002')], trace_id=UUID('00000000-0000-4000-8000-000000000000'), dotted_order='20230101T000000000000Z00000000-0000-4000-8000-000000000000'), - Run(id=UUID('00000000-0000-4000-8000-000000000003'), name='RunnableSequence', start_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), run_type='chain', end_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), extra={}, error=None, serialized={'lc': 1, 'type': 'constructor', 'id': ['langchain', 'schema', 'runnable', 'RunnableSequence'], 'kwargs': {'first': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'kwargs': {'messages': [{'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'SystemMessagePromptTemplate'], 'kwargs': {'prompt': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'kwargs': {'input_variables': [], 'template': 'You are a nice assistant.', 'template_format': 'f-string', 'partial_variables': {}}, 'name': 'PromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'PromptInput', 'type': 'object', 'properties': {}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'name': 'PromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': {'title': 'PromptTemplateOutput', 'anyOf': [{'$ref': '#/definitions/StringPromptValue'}, {'$ref': '#/definitions/ChatPromptValueConcrete'}], 'definitions': {'StringPromptValue': {'title': 'StringPromptValue', 'description': 'String prompt value.', 'type': 'object', 'properties': {'text': {'title': 'Text', 'type': 'string'}, 'type': {'title': 'Type', 'default': 'StringPromptValue', 'enum': ['StringPromptValue'], 'type': 'string'}}, 'required': ['text']}, 'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}, 'ChatPromptValueConcrete': {'title': 'ChatPromptValueConcrete', 'description': 'Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.', 'type': 'object', 'properties': {'messages': {'title': 'Messages', 'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}, 'type': {'title': 'Type', 'default': 'ChatPromptValueConcrete', 'enum': ['ChatPromptValueConcrete'], 'type': 'string'}}, 'required': ['messages']}}}}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}}}, {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'HumanMessagePromptTemplate'], 'kwargs': {'prompt': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'kwargs': {'input_variables': ['question'], 'template': '{question}', 'template_format': 'f-string', 'partial_variables': {}}, 'name': 'PromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'PromptInput', 'type': 'object', 'properties': {'question': {'title': 'Question', 'type': 'string'}}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'name': 'PromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': {'title': 'PromptTemplateOutput', 'anyOf': [{'$ref': '#/definitions/StringPromptValue'}, {'$ref': '#/definitions/ChatPromptValueConcrete'}], 'definitions': {'StringPromptValue': {'title': 'StringPromptValue', 'description': 'String prompt value.', 'type': 'object', 'properties': {'text': {'title': 'Text', 'type': 'string'}, 'type': {'title': 'Type', 'default': 'StringPromptValue', 'enum': ['StringPromptValue'], 'type': 'string'}}, 'required': ['text']}, 'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}, 'ChatPromptValueConcrete': {'title': 'ChatPromptValueConcrete', 'description': 'Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.', 'type': 'object', 'properties': {'messages': {'title': 'Messages', 'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}, 'type': {'title': 'Type', 'default': 'ChatPromptValueConcrete', 'enum': ['ChatPromptValueConcrete'], 'type': 'string'}}, 'required': ['messages']}}}}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}}}], 'input_variables': ['question']}, 'name': 'ChatPromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'PromptInput', 'type': 'object', 'properties': {'question': {'title': 'Question', 'type': 'string'}}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'name': 'ChatPromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': {'title': 'ChatPromptTemplateOutput', 'anyOf': [{'$ref': '#/definitions/StringPromptValue'}, {'$ref': '#/definitions/ChatPromptValueConcrete'}], 'definitions': {'StringPromptValue': {'title': 'StringPromptValue', 'description': 'String prompt value.', 'type': 'object', 'properties': {'text': {'title': 'Text', 'type': 'string'}, 'type': {'title': 'Type', 'default': 'StringPromptValue', 'enum': ['StringPromptValue'], 'type': 'string'}}, 'required': ['text']}, 'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}, 'ChatPromptValueConcrete': {'title': 'ChatPromptValueConcrete', 'description': 'Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.', 'type': 'object', 'properties': {'messages': {'title': 'Messages', 'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}, 'type': {'title': 'Type', 'default': 'ChatPromptValueConcrete', 'enum': ['ChatPromptValueConcrete'], 'type': 'string'}}, 'required': ['messages']}}}}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}, 'middle': [], 'last': {'lc': 1, 'type': 'not_implemented', 'id': ['langchain_core', 'language_models', 'fake', 'FakeListLLM'], 'repr': "FakeListLLM(responses=['foo', 'bar'], i=1)", 'name': 'FakeListLLM', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'FakeListLLMInput', 'anyOf': [{'type': 'string'}, {'$ref': '#/definitions/StringPromptValue'}, {'$ref': '#/definitions/ChatPromptValueConcrete'}, {'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}], 'definitions': {'StringPromptValue': {'title': 'StringPromptValue', 'description': 'String prompt value.', 'type': 'object', 'properties': {'text': {'title': 'Text', 'type': 'string'}, 'type': {'title': 'Type', 'default': 'StringPromptValue', 'enum': ['StringPromptValue'], 'type': 'string'}}, 'required': ['text']}, 'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}, 'ChatPromptValueConcrete': {'title': 'ChatPromptValueConcrete', 'description': 'Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.', 'type': 'object', 'properties': {'messages': {'title': 'Messages', 'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}, 'type': {'title': 'Type', 'default': 'ChatPromptValueConcrete', 'enum': ['ChatPromptValueConcrete'], 'type': 'string'}}, 'required': ['messages']}}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain_core', 'language_models', 'fake', 'FakeListLLM'], 'name': 'FakeListLLM'}}, {'id': 2, 'type': 'schema', 'data': {'title': 'FakeListLLMOutput', 'type': 'string'}}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}, 'name': None}, 'name': 'RunnableSequence', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'PromptInput', 'type': 'object', 'properties': {'question': {'title': 'Question', 'type': 'string'}}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'name': 'ChatPromptTemplate'}}, {'id': 2, 'type': 'runnable', 'data': {'id': ['langchain_core', 'language_models', 'fake', 'FakeListLLM'], 'name': 'FakeListLLM'}}, {'id': 3, 'type': 'schema', 'data': {'title': 'FakeListLLMOutput', 'type': 'string'}}], 'edges': [{'source': 0, 'target': 1}, {'source': 2, 'target': 3}, {'source': 1, 'target': 2}]}}, events=[{'name': 'start', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}, {'name': 'end', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}], inputs={'question': 'What is your favorite color?'}, outputs={'output': 'foo'}, reference_example_id=None, parent_run_id=None, tags=[], execution_order=None, child_execution_order=None, child_runs=[Run(id=UUID('00000000-0000-4000-8000-000000000004'), name='ChatPromptTemplate', start_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), run_type='prompt', end_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), extra={}, error=None, serialized={'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'kwargs': {'messages': [{'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'SystemMessagePromptTemplate'], 'kwargs': {'prompt': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'kwargs': {'input_variables': [], 'template': 'You are a nice assistant.', 'template_format': 'f-string', 'partial_variables': {}}, 'name': 'PromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'PromptInput', 'type': 'object', 'properties': {}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'name': 'PromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': {'title': 'PromptTemplateOutput', 'anyOf': [{'$ref': '#/definitions/StringPromptValue'}, {'$ref': '#/definitions/ChatPromptValueConcrete'}], 'definitions': {'StringPromptValue': {'title': 'StringPromptValue', 'description': 'String prompt value.', 'type': 'object', 'properties': {'text': {'title': 'Text', 'type': 'string'}, 'type': {'title': 'Type', 'default': 'StringPromptValue', 'enum': ['StringPromptValue'], 'type': 'string'}}, 'required': ['text']}, 'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}, 'ChatPromptValueConcrete': {'title': 'ChatPromptValueConcrete', 'description': 'Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.', 'type': 'object', 'properties': {'messages': {'title': 'Messages', 'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}, 'type': {'title': 'Type', 'default': 'ChatPromptValueConcrete', 'enum': ['ChatPromptValueConcrete'], 'type': 'string'}}, 'required': ['messages']}}}}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}}}, {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'HumanMessagePromptTemplate'], 'kwargs': {'prompt': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'kwargs': {'input_variables': ['question'], 'template': '{question}', 'template_format': 'f-string', 'partial_variables': {}}, 'name': 'PromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'PromptInput', 'type': 'object', 'properties': {'question': {'title': 'Question', 'type': 'string'}}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'name': 'PromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': {'title': 'PromptTemplateOutput', 'anyOf': [{'$ref': '#/definitions/StringPromptValue'}, {'$ref': '#/definitions/ChatPromptValueConcrete'}], 'definitions': {'StringPromptValue': {'title': 'StringPromptValue', 'description': 'String prompt value.', 'type': 'object', 'properties': {'text': {'title': 'Text', 'type': 'string'}, 'type': {'title': 'Type', 'default': 'StringPromptValue', 'enum': ['StringPromptValue'], 'type': 'string'}}, 'required': ['text']}, 'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}, 'ChatPromptValueConcrete': {'title': 'ChatPromptValueConcrete', 'description': 'Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.', 'type': 'object', 'properties': {'messages': {'title': 'Messages', 'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}, 'type': {'title': 'Type', 'default': 'ChatPromptValueConcrete', 'enum': ['ChatPromptValueConcrete'], 'type': 'string'}}, 'required': ['messages']}}}}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}}}], 'input_variables': ['question']}, 'name': 'ChatPromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'PromptInput', 'type': 'object', 'properties': {'question': {'title': 'Question', 'type': 'string'}}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'name': 'ChatPromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': {'title': 'ChatPromptTemplateOutput', 'anyOf': [{'$ref': '#/definitions/StringPromptValue'}, {'$ref': '#/definitions/ChatPromptValueConcrete'}], 'definitions': {'StringPromptValue': {'title': 'StringPromptValue', 'description': 'String prompt value.', 'type': 'object', 'properties': {'text': {'title': 'Text', 'type': 'string'}, 'type': {'title': 'Type', 'default': 'StringPromptValue', 'enum': ['StringPromptValue'], 'type': 'string'}}, 'required': ['text']}, 'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}, 'ChatPromptValueConcrete': {'title': 'ChatPromptValueConcrete', 'description': 'Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.', 'type': 'object', 'properties': {'messages': {'title': 'Messages', 'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}, 'type': {'title': 'Type', 'default': 'ChatPromptValueConcrete', 'enum': ['ChatPromptValueConcrete'], 'type': 'string'}}, 'required': ['messages']}}}}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}, events=[{'name': 'start', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}, {'name': 'end', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}], inputs={'question': 'What is your favorite color?'}, outputs={'output': ChatPromptValue(messages=[SystemMessage(content='You are a nice assistant.'), HumanMessage(content='What is your favorite color?')])}, reference_example_id=None, parent_run_id=UUID('00000000-0000-4000-8000-000000000003'), tags=['seq:step:1'], execution_order=None, child_execution_order=None, child_runs=[], trace_id=UUID('00000000-0000-4000-8000-000000000003'), dotted_order='20230101T000000000000Z00000000-0000-4000-8000-000000000003.20230101T000000000000Z00000000-0000-4000-8000-000000000004'), Run(id=UUID('00000000-0000-4000-8000-000000000005'), name='FakeListLLM', start_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), run_type='llm', end_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), extra={'invocation_params': {'responses': ['foo', 'bar'], '_type': 'fake-list', 'stop': None}, 'options': {'stop': None}, 'batch_size': 2}, error=None, serialized={'lc': 1, 'type': 'not_implemented', 'id': ['langchain_core', 'language_models', 'fake', 'FakeListLLM'], 'repr': "FakeListLLM(responses=['foo', 'bar'], i=1)", 'name': 'FakeListLLM', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'FakeListLLMInput', 'anyOf': [{'type': 'string'}, {'$ref': '#/definitions/StringPromptValue'}, {'$ref': '#/definitions/ChatPromptValueConcrete'}, {'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}], 'definitions': {'StringPromptValue': {'title': 'StringPromptValue', 'description': 'String prompt value.', 'type': 'object', 'properties': {'text': {'title': 'Text', 'type': 'string'}, 'type': {'title': 'Type', 'default': 'StringPromptValue', 'enum': ['StringPromptValue'], 'type': 'string'}}, 'required': ['text']}, 'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}, 'ChatPromptValueConcrete': {'title': 'ChatPromptValueConcrete', 'description': 'Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.', 'type': 'object', 'properties': {'messages': {'title': 'Messages', 'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}, 'type': {'title': 'Type', 'default': 'ChatPromptValueConcrete', 'enum': ['ChatPromptValueConcrete'], 'type': 'string'}}, 'required': ['messages']}}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain_core', 'language_models', 'fake', 'FakeListLLM'], 'name': 'FakeListLLM'}}, {'id': 2, 'type': 'schema', 'data': {'title': 'FakeListLLMOutput', 'type': 'string'}}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}, events=[{'name': 'start', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}, {'name': 'end', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}], inputs={'prompts': ['System: You are a nice assistant.\nHuman: What is your favorite color?']}, outputs={'generations': [[{'text': 'foo', 'generation_info': None, 'type': 'Generation'}]], 'llm_output': None, 'run': None}, reference_example_id=None, parent_run_id=UUID('00000000-0000-4000-8000-000000000003'), tags=['seq:step:2'], execution_order=None, child_execution_order=None, child_runs=[], trace_id=UUID('00000000-0000-4000-8000-000000000003'), dotted_order='20230101T000000000000Z00000000-0000-4000-8000-000000000003.20230101T000000000000Z00000000-0000-4000-8000-000000000005')], trace_id=UUID('00000000-0000-4000-8000-000000000003'), dotted_order='20230101T000000000000Z00000000-0000-4000-8000-000000000003'), + Run(id=UUID('00000000-0000-4000-8000-000000000000'), name='RunnableSequence', start_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), run_type='chain', end_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), extra={}, error=None, serialized={'lc': 1, 'type': 'constructor', 'id': ['langchain', 'schema', 'runnable', 'RunnableSequence'], 'kwargs': {'first': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'kwargs': {'messages': [{'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'SystemMessagePromptTemplate'], 'kwargs': {'prompt': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'kwargs': {'input_variables': [], 'template': 'You are a nice assistant.', 'template_format': 'f-string', 'partial_variables': {}}, 'name': 'PromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'PromptInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'name': 'PromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': 'PromptTemplateOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}}}, {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'HumanMessagePromptTemplate'], 'kwargs': {'prompt': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'kwargs': {'input_variables': ['question'], 'template': '{question}', 'template_format': 'f-string', 'partial_variables': {}}, 'name': 'PromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'PromptInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'name': 'PromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': 'PromptTemplateOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}}}], 'input_variables': ['question']}, 'name': 'ChatPromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'PromptInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'name': 'ChatPromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': 'ChatPromptTemplateOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}, 'middle': [], 'last': {'lc': 1, 'type': 'not_implemented', 'id': ['langchain_core', 'language_models', 'fake', 'FakeListLLM'], 'repr': "FakeListLLM(responses=['foo', 'bar'], i=1)", 'name': 'FakeListLLM', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'FakeListLLMInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain_core', 'language_models', 'fake', 'FakeListLLM'], 'name': 'FakeListLLM'}}, {'id': 2, 'type': 'schema', 'data': 'FakeListLLMOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}, 'name': None}, 'name': 'RunnableSequence', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'PromptInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'name': 'ChatPromptTemplate'}}, {'id': 2, 'type': 'runnable', 'data': {'id': ['langchain_core', 'language_models', 'fake', 'FakeListLLM'], 'name': 'FakeListLLM'}}, {'id': 3, 'type': 'schema', 'data': 'FakeListLLMOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 2, 'target': 3}, {'source': 1, 'target': 2}]}}, events=[{'name': 'start', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}, {'name': 'end', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}], inputs={'question': 'What is your name?'}, outputs={'output': 'bar'}, reference_example_id=None, parent_run_id=None, tags=[], execution_order=None, child_execution_order=None, child_runs=[Run(id=UUID('00000000-0000-4000-8000-000000000001'), name='ChatPromptTemplate', start_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), run_type='prompt', end_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), extra={}, error=None, serialized={'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'kwargs': {'messages': [{'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'SystemMessagePromptTemplate'], 'kwargs': {'prompt': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'kwargs': {'input_variables': [], 'template': 'You are a nice assistant.', 'template_format': 'f-string', 'partial_variables': {}}, 'name': 'PromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'PromptInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'name': 'PromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': 'PromptTemplateOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}}}, {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'HumanMessagePromptTemplate'], 'kwargs': {'prompt': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'kwargs': {'input_variables': ['question'], 'template': '{question}', 'template_format': 'f-string', 'partial_variables': {}}, 'name': 'PromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'PromptInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'name': 'PromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': 'PromptTemplateOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}}}], 'input_variables': ['question']}, 'name': 'ChatPromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'PromptInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'name': 'ChatPromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': 'ChatPromptTemplateOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}, events=[{'name': 'start', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}, {'name': 'end', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}], inputs={'question': 'What is your name?'}, outputs={'output': ChatPromptValue(messages=[SystemMessage(content='You are a nice assistant.'), HumanMessage(content='What is your name?')])}, reference_example_id=None, parent_run_id=UUID('00000000-0000-4000-8000-000000000000'), tags=['seq:step:1'], execution_order=None, child_execution_order=None, child_runs=[], trace_id=UUID('00000000-0000-4000-8000-000000000000'), dotted_order='20230101T000000000000Z00000000-0000-4000-8000-000000000000.20230101T000000000000Z00000000-0000-4000-8000-000000000001'), Run(id=UUID('00000000-0000-4000-8000-000000000002'), name='FakeListLLM', start_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), run_type='llm', end_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), extra={'invocation_params': {'responses': ['foo', 'bar'], '_type': 'fake-list', 'stop': None}, 'options': {'stop': None}, 'batch_size': 2}, error=None, serialized={'lc': 1, 'type': 'not_implemented', 'id': ['langchain_core', 'language_models', 'fake', 'FakeListLLM'], 'repr': "FakeListLLM(responses=['foo', 'bar'], i=1)", 'name': 'FakeListLLM', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'FakeListLLMInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain_core', 'language_models', 'fake', 'FakeListLLM'], 'name': 'FakeListLLM'}}, {'id': 2, 'type': 'schema', 'data': 'FakeListLLMOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}, events=[{'name': 'start', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}, {'name': 'end', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}], inputs={'prompts': ['System: You are a nice assistant.\nHuman: What is your name?']}, outputs={'generations': [[{'text': 'bar', 'generation_info': None, 'type': 'Generation'}]], 'llm_output': None, 'run': None}, reference_example_id=None, parent_run_id=UUID('00000000-0000-4000-8000-000000000000'), tags=['seq:step:2'], execution_order=None, child_execution_order=None, child_runs=[], trace_id=UUID('00000000-0000-4000-8000-000000000000'), dotted_order='20230101T000000000000Z00000000-0000-4000-8000-000000000000.20230101T000000000000Z00000000-0000-4000-8000-000000000002')], trace_id=UUID('00000000-0000-4000-8000-000000000000'), dotted_order='20230101T000000000000Z00000000-0000-4000-8000-000000000000'), + Run(id=UUID('00000000-0000-4000-8000-000000000003'), name='RunnableSequence', start_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), run_type='chain', end_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), extra={}, error=None, serialized={'lc': 1, 'type': 'constructor', 'id': ['langchain', 'schema', 'runnable', 'RunnableSequence'], 'kwargs': {'first': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'kwargs': {'messages': [{'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'SystemMessagePromptTemplate'], 'kwargs': {'prompt': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'kwargs': {'input_variables': [], 'template': 'You are a nice assistant.', 'template_format': 'f-string', 'partial_variables': {}}, 'name': 'PromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'PromptInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'name': 'PromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': 'PromptTemplateOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}}}, {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'HumanMessagePromptTemplate'], 'kwargs': {'prompt': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'kwargs': {'input_variables': ['question'], 'template': '{question}', 'template_format': 'f-string', 'partial_variables': {}}, 'name': 'PromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'PromptInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'name': 'PromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': 'PromptTemplateOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}}}], 'input_variables': ['question']}, 'name': 'ChatPromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'PromptInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'name': 'ChatPromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': 'ChatPromptTemplateOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}, 'middle': [], 'last': {'lc': 1, 'type': 'not_implemented', 'id': ['langchain_core', 'language_models', 'fake', 'FakeListLLM'], 'repr': "FakeListLLM(responses=['foo', 'bar'], i=1)", 'name': 'FakeListLLM', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'FakeListLLMInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain_core', 'language_models', 'fake', 'FakeListLLM'], 'name': 'FakeListLLM'}}, {'id': 2, 'type': 'schema', 'data': 'FakeListLLMOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}, 'name': None}, 'name': 'RunnableSequence', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'PromptInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'name': 'ChatPromptTemplate'}}, {'id': 2, 'type': 'runnable', 'data': {'id': ['langchain_core', 'language_models', 'fake', 'FakeListLLM'], 'name': 'FakeListLLM'}}, {'id': 3, 'type': 'schema', 'data': 'FakeListLLMOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 2, 'target': 3}, {'source': 1, 'target': 2}]}}, events=[{'name': 'start', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}, {'name': 'end', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}], inputs={'question': 'What is your favorite color?'}, outputs={'output': 'foo'}, reference_example_id=None, parent_run_id=None, tags=[], execution_order=None, child_execution_order=None, child_runs=[Run(id=UUID('00000000-0000-4000-8000-000000000004'), name='ChatPromptTemplate', start_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), run_type='prompt', end_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), extra={}, error=None, serialized={'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'kwargs': {'messages': [{'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'SystemMessagePromptTemplate'], 'kwargs': {'prompt': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'kwargs': {'input_variables': [], 'template': 'You are a nice assistant.', 'template_format': 'f-string', 'partial_variables': {}}, 'name': 'PromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'PromptInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'name': 'PromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': 'PromptTemplateOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}}}, {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'HumanMessagePromptTemplate'], 'kwargs': {'prompt': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'kwargs': {'input_variables': ['question'], 'template': '{question}', 'template_format': 'f-string', 'partial_variables': {}}, 'name': 'PromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'PromptInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'name': 'PromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': 'PromptTemplateOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}}}], 'input_variables': ['question']}, 'name': 'ChatPromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'PromptInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'name': 'ChatPromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': 'ChatPromptTemplateOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}, events=[{'name': 'start', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}, {'name': 'end', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}], inputs={'question': 'What is your favorite color?'}, outputs={'output': ChatPromptValue(messages=[SystemMessage(content='You are a nice assistant.'), HumanMessage(content='What is your favorite color?')])}, reference_example_id=None, parent_run_id=UUID('00000000-0000-4000-8000-000000000003'), tags=['seq:step:1'], execution_order=None, child_execution_order=None, child_runs=[], trace_id=UUID('00000000-0000-4000-8000-000000000003'), dotted_order='20230101T000000000000Z00000000-0000-4000-8000-000000000003.20230101T000000000000Z00000000-0000-4000-8000-000000000004'), Run(id=UUID('00000000-0000-4000-8000-000000000005'), name='FakeListLLM', start_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), run_type='llm', end_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), extra={'invocation_params': {'responses': ['foo', 'bar'], '_type': 'fake-list', 'stop': None}, 'options': {'stop': None}, 'batch_size': 2}, error=None, serialized={'lc': 1, 'type': 'not_implemented', 'id': ['langchain_core', 'language_models', 'fake', 'FakeListLLM'], 'repr': "FakeListLLM(responses=['foo', 'bar'], i=1)", 'name': 'FakeListLLM', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'FakeListLLMInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain_core', 'language_models', 'fake', 'FakeListLLM'], 'name': 'FakeListLLM'}}, {'id': 2, 'type': 'schema', 'data': 'FakeListLLMOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}, events=[{'name': 'start', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}, {'name': 'end', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}], inputs={'prompts': ['System: You are a nice assistant.\nHuman: What is your favorite color?']}, outputs={'generations': [[{'text': 'foo', 'generation_info': None, 'type': 'Generation'}]], 'llm_output': None, 'run': None}, reference_example_id=None, parent_run_id=UUID('00000000-0000-4000-8000-000000000003'), tags=['seq:step:2'], execution_order=None, child_execution_order=None, child_runs=[], trace_id=UUID('00000000-0000-4000-8000-000000000003'), dotted_order='20230101T000000000000Z00000000-0000-4000-8000-000000000003.20230101T000000000000Z00000000-0000-4000-8000-000000000005')], trace_id=UUID('00000000-0000-4000-8000-000000000003'), dotted_order='20230101T000000000000Z00000000-0000-4000-8000-000000000003'), ]) # --- # name: test_prompt_with_llm_and_async_lambda @@ -26418,11 +3757,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "PromptInput", - "type": "object", - "properties": {} - } + "data": "PromptInput" }, { "id": 1, @@ -26440,436 +3775,7 @@ { "id": 2, "type": "schema", - "data": { - "title": "PromptTemplateOutput", - "anyOf": [ - { - "$ref": "#/definitions/StringPromptValue" - }, - { - "$ref": "#/definitions/ChatPromptValueConcrete" - } - ], - "definitions": { - "StringPromptValue": { - "title": "StringPromptValue", - "description": "String prompt value.", - "type": "object", - "properties": { - "text": { - "title": "Text", - "type": "string" - }, - "type": { - "title": "Type", - "default": "StringPromptValue", - "enum": [ - "StringPromptValue" - ], - "type": "string" - } - }, - "required": [ - "text" - ] - }, - "AIMessage": { - "title": "AIMessage", - "description": "Message from an AI.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "ai", - "enum": [ - "ai" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "HumanMessage": { - "title": "HumanMessage", - "description": "Message from a human.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "human", - "enum": [ - "human" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "ChatMessage": { - "title": "ChatMessage", - "description": "Message that can be assigned an arbitrary speaker (i.e. role).", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "chat", - "enum": [ - "chat" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "role": { - "title": "Role", - "type": "string" - } - }, - "required": [ - "content", - "role" - ] - }, - "SystemMessage": { - "title": "SystemMessage", - "description": "Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "system", - "enum": [ - "system" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content" - ] - }, - "FunctionMessage": { - "title": "FunctionMessage", - "description": "Message for passing the result of executing a function back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "function", - "enum": [ - "function" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content", - "name" - ] - }, - "ToolMessage": { - "title": "ToolMessage", - "description": "Message for passing the result of executing a tool back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "tool", - "enum": [ - "tool" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "tool_call_id": { - "title": "Tool Call Id", - "type": "string" - } - }, - "required": [ - "content", - "tool_call_id" - ] - }, - "ChatPromptValueConcrete": { - "title": "ChatPromptValueConcrete", - "description": "Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.", - "type": "object", - "properties": { - "messages": { - "title": "Messages", - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - }, - "type": { - "title": "Type", - "default": "ChatPromptValueConcrete", - "enum": [ - "ChatPromptValueConcrete" - ], - "type": "string" - } - }, - "required": [ - "messages" - ] - } - } - } + "data": "PromptTemplateOutput" } ], "edges": [ @@ -26919,16 +3825,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "PromptInput", - "type": "object", - "properties": { - "question": { - "title": "Question", - "type": "string" - } - } - } + "data": "PromptInput" }, { "id": 1, @@ -26946,436 +3843,7 @@ { "id": 2, "type": "schema", - "data": { - "title": "PromptTemplateOutput", - "anyOf": [ - { - "$ref": "#/definitions/StringPromptValue" - }, - { - "$ref": "#/definitions/ChatPromptValueConcrete" - } - ], - "definitions": { - "StringPromptValue": { - "title": "StringPromptValue", - "description": "String prompt value.", - "type": "object", - "properties": { - "text": { - "title": "Text", - "type": "string" - }, - "type": { - "title": "Type", - "default": "StringPromptValue", - "enum": [ - "StringPromptValue" - ], - "type": "string" - } - }, - "required": [ - "text" - ] - }, - "AIMessage": { - "title": "AIMessage", - "description": "Message from an AI.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "ai", - "enum": [ - "ai" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "HumanMessage": { - "title": "HumanMessage", - "description": "Message from a human.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "human", - "enum": [ - "human" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "ChatMessage": { - "title": "ChatMessage", - "description": "Message that can be assigned an arbitrary speaker (i.e. role).", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "chat", - "enum": [ - "chat" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "role": { - "title": "Role", - "type": "string" - } - }, - "required": [ - "content", - "role" - ] - }, - "SystemMessage": { - "title": "SystemMessage", - "description": "Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "system", - "enum": [ - "system" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content" - ] - }, - "FunctionMessage": { - "title": "FunctionMessage", - "description": "Message for passing the result of executing a function back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "function", - "enum": [ - "function" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content", - "name" - ] - }, - "ToolMessage": { - "title": "ToolMessage", - "description": "Message for passing the result of executing a tool back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "tool", - "enum": [ - "tool" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "tool_call_id": { - "title": "Tool Call Id", - "type": "string" - } - }, - "required": [ - "content", - "tool_call_id" - ] - }, - "ChatPromptValueConcrete": { - "title": "ChatPromptValueConcrete", - "description": "Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.", - "type": "object", - "properties": { - "messages": { - "title": "Messages", - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - }, - "type": { - "title": "Type", - "default": "ChatPromptValueConcrete", - "enum": [ - "ChatPromptValueConcrete" - ], - "type": "string" - } - }, - "required": [ - "messages" - ] - } - } - } + "data": "PromptTemplateOutput" } ], "edges": [ @@ -27403,16 +3871,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "PromptInput", - "type": "object", - "properties": { - "question": { - "title": "Question", - "type": "string" - } - } - } + "data": "PromptInput" }, { "id": 1, @@ -27430,436 +3889,7 @@ { "id": 2, "type": "schema", - "data": { - "title": "ChatPromptTemplateOutput", - "anyOf": [ - { - "$ref": "#/definitions/StringPromptValue" - }, - { - "$ref": "#/definitions/ChatPromptValueConcrete" - } - ], - "definitions": { - "StringPromptValue": { - "title": "StringPromptValue", - "description": "String prompt value.", - "type": "object", - "properties": { - "text": { - "title": "Text", - "type": "string" - }, - "type": { - "title": "Type", - "default": "StringPromptValue", - "enum": [ - "StringPromptValue" - ], - "type": "string" - } - }, - "required": [ - "text" - ] - }, - "AIMessage": { - "title": "AIMessage", - "description": "Message from an AI.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "ai", - "enum": [ - "ai" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "HumanMessage": { - "title": "HumanMessage", - "description": "Message from a human.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "human", - "enum": [ - "human" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "ChatMessage": { - "title": "ChatMessage", - "description": "Message that can be assigned an arbitrary speaker (i.e. role).", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "chat", - "enum": [ - "chat" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "role": { - "title": "Role", - "type": "string" - } - }, - "required": [ - "content", - "role" - ] - }, - "SystemMessage": { - "title": "SystemMessage", - "description": "Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "system", - "enum": [ - "system" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content" - ] - }, - "FunctionMessage": { - "title": "FunctionMessage", - "description": "Message for passing the result of executing a function back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "function", - "enum": [ - "function" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content", - "name" - ] - }, - "ToolMessage": { - "title": "ToolMessage", - "description": "Message for passing the result of executing a tool back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "tool", - "enum": [ - "tool" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "tool_call_id": { - "title": "Tool Call Id", - "type": "string" - } - }, - "required": [ - "content", - "tool_call_id" - ] - }, - "ChatPromptValueConcrete": { - "title": "ChatPromptValueConcrete", - "description": "Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.", - "type": "object", - "properties": { - "messages": { - "title": "Messages", - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - }, - "type": { - "title": "Type", - "default": "ChatPromptValueConcrete", - "enum": [ - "ChatPromptValueConcrete" - ], - "type": "string" - } - }, - "required": [ - "messages" - ] - } - } - } + "data": "ChatPromptTemplateOutput" } ], "edges": [ @@ -27891,464 +3921,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "FakeListLLMInput", - "anyOf": [ - { - "type": "string" - }, - { - "$ref": "#/definitions/StringPromptValue" - }, - { - "$ref": "#/definitions/ChatPromptValueConcrete" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - } - ], - "definitions": { - "StringPromptValue": { - "title": "StringPromptValue", - "description": "String prompt value.", - "type": "object", - "properties": { - "text": { - "title": "Text", - "type": "string" - }, - "type": { - "title": "Type", - "default": "StringPromptValue", - "enum": [ - "StringPromptValue" - ], - "type": "string" - } - }, - "required": [ - "text" - ] - }, - "AIMessage": { - "title": "AIMessage", - "description": "Message from an AI.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "ai", - "enum": [ - "ai" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "HumanMessage": { - "title": "HumanMessage", - "description": "Message from a human.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "human", - "enum": [ - "human" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "ChatMessage": { - "title": "ChatMessage", - "description": "Message that can be assigned an arbitrary speaker (i.e. role).", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "chat", - "enum": [ - "chat" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "role": { - "title": "Role", - "type": "string" - } - }, - "required": [ - "content", - "role" - ] - }, - "SystemMessage": { - "title": "SystemMessage", - "description": "Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "system", - "enum": [ - "system" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content" - ] - }, - "FunctionMessage": { - "title": "FunctionMessage", - "description": "Message for passing the result of executing a function back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "function", - "enum": [ - "function" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content", - "name" - ] - }, - "ToolMessage": { - "title": "ToolMessage", - "description": "Message for passing the result of executing a tool back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "tool", - "enum": [ - "tool" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "tool_call_id": { - "title": "Tool Call Id", - "type": "string" - } - }, - "required": [ - "content", - "tool_call_id" - ] - }, - "ChatPromptValueConcrete": { - "title": "ChatPromptValueConcrete", - "description": "Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.", - "type": "object", - "properties": { - "messages": { - "title": "Messages", - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - }, - "type": { - "title": "Type", - "default": "ChatPromptValueConcrete", - "enum": [ - "ChatPromptValueConcrete" - ], - "type": "string" - } - }, - "required": [ - "messages" - ] - } - } - } + "data": "FakeListLLMInput" }, { "id": 1, @@ -28366,10 +3939,7 @@ { "id": 2, "type": "schema", - "data": { - "title": "FakeListLLMOutput", - "type": "string" - } + "data": "FakeListLLMOutput" } ], "edges": [ @@ -28404,16 +3974,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "PromptInput", - "type": "object", - "properties": { - "question": { - "title": "Question", - "type": "string" - } - } - } + "data": "PromptInput" }, { "id": 1, @@ -28457,9 +4018,7 @@ { "id": 4, "type": "schema", - "data": { - "title": "passthrough_output" - } + "data": "passthrough_output" } ], "edges": [ @@ -28486,7 +4045,7 @@ # --- # name: test_prompt_with_llm_and_async_lambda.1 list([ - Run(id=UUID('00000000-0000-4000-8000-000000000000'), name='RunnableSequence', start_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), run_type='chain', end_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), extra={}, error=None, serialized={'lc': 1, 'type': 'constructor', 'id': ['langchain', 'schema', 'runnable', 'RunnableSequence'], 'kwargs': {'first': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'kwargs': {'messages': [{'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'SystemMessagePromptTemplate'], 'kwargs': {'prompt': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'kwargs': {'input_variables': [], 'template': 'You are a nice assistant.', 'template_format': 'f-string', 'partial_variables': {}}, 'name': 'PromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'PromptInput', 'type': 'object', 'properties': {}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'name': 'PromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': {'title': 'PromptTemplateOutput', 'anyOf': [{'$ref': '#/definitions/StringPromptValue'}, {'$ref': '#/definitions/ChatPromptValueConcrete'}], 'definitions': {'StringPromptValue': {'title': 'StringPromptValue', 'description': 'String prompt value.', 'type': 'object', 'properties': {'text': {'title': 'Text', 'type': 'string'}, 'type': {'title': 'Type', 'default': 'StringPromptValue', 'enum': ['StringPromptValue'], 'type': 'string'}}, 'required': ['text']}, 'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}, 'ChatPromptValueConcrete': {'title': 'ChatPromptValueConcrete', 'description': 'Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.', 'type': 'object', 'properties': {'messages': {'title': 'Messages', 'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}, 'type': {'title': 'Type', 'default': 'ChatPromptValueConcrete', 'enum': ['ChatPromptValueConcrete'], 'type': 'string'}}, 'required': ['messages']}}}}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}}}, {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'HumanMessagePromptTemplate'], 'kwargs': {'prompt': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'kwargs': {'input_variables': ['question'], 'template': '{question}', 'template_format': 'f-string', 'partial_variables': {}}, 'name': 'PromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'PromptInput', 'type': 'object', 'properties': {'question': {'title': 'Question', 'type': 'string'}}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'name': 'PromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': {'title': 'PromptTemplateOutput', 'anyOf': [{'$ref': '#/definitions/StringPromptValue'}, {'$ref': '#/definitions/ChatPromptValueConcrete'}], 'definitions': {'StringPromptValue': {'title': 'StringPromptValue', 'description': 'String prompt value.', 'type': 'object', 'properties': {'text': {'title': 'Text', 'type': 'string'}, 'type': {'title': 'Type', 'default': 'StringPromptValue', 'enum': ['StringPromptValue'], 'type': 'string'}}, 'required': ['text']}, 'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}, 'ChatPromptValueConcrete': {'title': 'ChatPromptValueConcrete', 'description': 'Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.', 'type': 'object', 'properties': {'messages': {'title': 'Messages', 'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}, 'type': {'title': 'Type', 'default': 'ChatPromptValueConcrete', 'enum': ['ChatPromptValueConcrete'], 'type': 'string'}}, 'required': ['messages']}}}}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}}}], 'input_variables': ['question']}, 'name': 'ChatPromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'PromptInput', 'type': 'object', 'properties': {'question': {'title': 'Question', 'type': 'string'}}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'name': 'ChatPromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': {'title': 'ChatPromptTemplateOutput', 'anyOf': [{'$ref': '#/definitions/StringPromptValue'}, {'$ref': '#/definitions/ChatPromptValueConcrete'}], 'definitions': {'StringPromptValue': {'title': 'StringPromptValue', 'description': 'String prompt value.', 'type': 'object', 'properties': {'text': {'title': 'Text', 'type': 'string'}, 'type': {'title': 'Type', 'default': 'StringPromptValue', 'enum': ['StringPromptValue'], 'type': 'string'}}, 'required': ['text']}, 'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}, 'ChatPromptValueConcrete': {'title': 'ChatPromptValueConcrete', 'description': 'Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.', 'type': 'object', 'properties': {'messages': {'title': 'Messages', 'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}, 'type': {'title': 'Type', 'default': 'ChatPromptValueConcrete', 'enum': ['ChatPromptValueConcrete'], 'type': 'string'}}, 'required': ['messages']}}}}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}, 'middle': [{'lc': 1, 'type': 'not_implemented', 'id': ['langchain_core', 'language_models', 'fake', 'FakeListLLM'], 'repr': "FakeListLLM(responses=['foo', 'bar'])", 'name': 'FakeListLLM', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'FakeListLLMInput', 'anyOf': [{'type': 'string'}, {'$ref': '#/definitions/StringPromptValue'}, {'$ref': '#/definitions/ChatPromptValueConcrete'}, {'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}], 'definitions': {'StringPromptValue': {'title': 'StringPromptValue', 'description': 'String prompt value.', 'type': 'object', 'properties': {'text': {'title': 'Text', 'type': 'string'}, 'type': {'title': 'Type', 'default': 'StringPromptValue', 'enum': ['StringPromptValue'], 'type': 'string'}}, 'required': ['text']}, 'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}, 'ChatPromptValueConcrete': {'title': 'ChatPromptValueConcrete', 'description': 'Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.', 'type': 'object', 'properties': {'messages': {'title': 'Messages', 'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}, 'type': {'title': 'Type', 'default': 'ChatPromptValueConcrete', 'enum': ['ChatPromptValueConcrete'], 'type': 'string'}}, 'required': ['messages']}}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain_core', 'language_models', 'fake', 'FakeListLLM'], 'name': 'FakeListLLM'}}, {'id': 2, 'type': 'schema', 'data': {'title': 'FakeListLLMOutput', 'type': 'string'}}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}], 'last': {'lc': 1, 'type': 'not_implemented', 'id': ['langchain_core', 'runnables', 'base', 'RunnableLambda'], 'repr': 'RunnableLambda(afunc=passthrough)'}, 'name': None}, 'name': 'RunnableSequence', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'PromptInput', 'type': 'object', 'properties': {'question': {'title': 'Question', 'type': 'string'}}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'name': 'ChatPromptTemplate'}}, {'id': 2, 'type': 'runnable', 'data': {'id': ['langchain_core', 'language_models', 'fake', 'FakeListLLM'], 'name': 'FakeListLLM'}}, {'id': 3, 'type': 'runnable', 'data': {'id': ['langchain_core', 'runnables', 'base', 'RunnableLambda'], 'name': 'passthrough'}}, {'id': 4, 'type': 'schema', 'data': {'title': 'passthrough_output'}}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}, {'source': 3, 'target': 4}, {'source': 2, 'target': 3}]}}, events=[{'name': 'start', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}, {'name': 'end', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}], inputs={'question': 'What is your name?'}, outputs={'output': 'foo'}, reference_example_id=None, parent_run_id=None, tags=[], execution_order=None, child_execution_order=None, child_runs=[Run(id=UUID('00000000-0000-4000-8000-000000000001'), name='ChatPromptTemplate', start_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), run_type='prompt', end_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), extra={}, error=None, serialized={'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'kwargs': {'messages': [{'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'SystemMessagePromptTemplate'], 'kwargs': {'prompt': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'kwargs': {'input_variables': [], 'template': 'You are a nice assistant.', 'template_format': 'f-string', 'partial_variables': {}}, 'name': 'PromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'PromptInput', 'type': 'object', 'properties': {}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'name': 'PromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': {'title': 'PromptTemplateOutput', 'anyOf': [{'$ref': '#/definitions/StringPromptValue'}, {'$ref': '#/definitions/ChatPromptValueConcrete'}], 'definitions': {'StringPromptValue': {'title': 'StringPromptValue', 'description': 'String prompt value.', 'type': 'object', 'properties': {'text': {'title': 'Text', 'type': 'string'}, 'type': {'title': 'Type', 'default': 'StringPromptValue', 'enum': ['StringPromptValue'], 'type': 'string'}}, 'required': ['text']}, 'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}, 'ChatPromptValueConcrete': {'title': 'ChatPromptValueConcrete', 'description': 'Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.', 'type': 'object', 'properties': {'messages': {'title': 'Messages', 'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}, 'type': {'title': 'Type', 'default': 'ChatPromptValueConcrete', 'enum': ['ChatPromptValueConcrete'], 'type': 'string'}}, 'required': ['messages']}}}}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}}}, {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'HumanMessagePromptTemplate'], 'kwargs': {'prompt': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'kwargs': {'input_variables': ['question'], 'template': '{question}', 'template_format': 'f-string', 'partial_variables': {}}, 'name': 'PromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'PromptInput', 'type': 'object', 'properties': {'question': {'title': 'Question', 'type': 'string'}}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'name': 'PromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': {'title': 'PromptTemplateOutput', 'anyOf': [{'$ref': '#/definitions/StringPromptValue'}, {'$ref': '#/definitions/ChatPromptValueConcrete'}], 'definitions': {'StringPromptValue': {'title': 'StringPromptValue', 'description': 'String prompt value.', 'type': 'object', 'properties': {'text': {'title': 'Text', 'type': 'string'}, 'type': {'title': 'Type', 'default': 'StringPromptValue', 'enum': ['StringPromptValue'], 'type': 'string'}}, 'required': ['text']}, 'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}, 'ChatPromptValueConcrete': {'title': 'ChatPromptValueConcrete', 'description': 'Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.', 'type': 'object', 'properties': {'messages': {'title': 'Messages', 'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}, 'type': {'title': 'Type', 'default': 'ChatPromptValueConcrete', 'enum': ['ChatPromptValueConcrete'], 'type': 'string'}}, 'required': ['messages']}}}}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}}}], 'input_variables': ['question']}, 'name': 'ChatPromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'PromptInput', 'type': 'object', 'properties': {'question': {'title': 'Question', 'type': 'string'}}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'name': 'ChatPromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': {'title': 'ChatPromptTemplateOutput', 'anyOf': [{'$ref': '#/definitions/StringPromptValue'}, {'$ref': '#/definitions/ChatPromptValueConcrete'}], 'definitions': {'StringPromptValue': {'title': 'StringPromptValue', 'description': 'String prompt value.', 'type': 'object', 'properties': {'text': {'title': 'Text', 'type': 'string'}, 'type': {'title': 'Type', 'default': 'StringPromptValue', 'enum': ['StringPromptValue'], 'type': 'string'}}, 'required': ['text']}, 'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}, 'ChatPromptValueConcrete': {'title': 'ChatPromptValueConcrete', 'description': 'Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.', 'type': 'object', 'properties': {'messages': {'title': 'Messages', 'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}, 'type': {'title': 'Type', 'default': 'ChatPromptValueConcrete', 'enum': ['ChatPromptValueConcrete'], 'type': 'string'}}, 'required': ['messages']}}}}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}, events=[{'name': 'start', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}, {'name': 'end', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}], inputs={'question': 'What is your name?'}, outputs={'output': ChatPromptValue(messages=[SystemMessage(content='You are a nice assistant.'), HumanMessage(content='What is your name?')])}, reference_example_id=None, parent_run_id=UUID('00000000-0000-4000-8000-000000000000'), tags=['seq:step:1'], execution_order=None, child_execution_order=None, child_runs=[], trace_id=UUID('00000000-0000-4000-8000-000000000000'), dotted_order='20230101T000000000000Z00000000-0000-4000-8000-000000000000.20230101T000000000000Z00000000-0000-4000-8000-000000000001'), Run(id=UUID('00000000-0000-4000-8000-000000000002'), name='FakeListLLM', start_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), run_type='llm', end_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), extra={'invocation_params': {'responses': ['foo', 'bar'], '_type': 'fake-list', 'stop': None}, 'options': {'stop': None}, 'batch_size': 1}, error=None, serialized={'lc': 1, 'type': 'not_implemented', 'id': ['langchain_core', 'language_models', 'fake', 'FakeListLLM'], 'repr': "FakeListLLM(responses=['foo', 'bar'])", 'name': 'FakeListLLM', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'FakeListLLMInput', 'anyOf': [{'type': 'string'}, {'$ref': '#/definitions/StringPromptValue'}, {'$ref': '#/definitions/ChatPromptValueConcrete'}, {'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}], 'definitions': {'StringPromptValue': {'title': 'StringPromptValue', 'description': 'String prompt value.', 'type': 'object', 'properties': {'text': {'title': 'Text', 'type': 'string'}, 'type': {'title': 'Type', 'default': 'StringPromptValue', 'enum': ['StringPromptValue'], 'type': 'string'}}, 'required': ['text']}, 'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}, 'ChatPromptValueConcrete': {'title': 'ChatPromptValueConcrete', 'description': 'Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.', 'type': 'object', 'properties': {'messages': {'title': 'Messages', 'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}, 'type': {'title': 'Type', 'default': 'ChatPromptValueConcrete', 'enum': ['ChatPromptValueConcrete'], 'type': 'string'}}, 'required': ['messages']}}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain_core', 'language_models', 'fake', 'FakeListLLM'], 'name': 'FakeListLLM'}}, {'id': 2, 'type': 'schema', 'data': {'title': 'FakeListLLMOutput', 'type': 'string'}}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}, events=[{'name': 'start', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}, {'name': 'end', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}], inputs={'prompts': ['System: You are a nice assistant.\nHuman: What is your name?']}, outputs={'generations': [[{'text': 'foo', 'generation_info': None, 'type': 'Generation'}]], 'llm_output': None, 'run': None}, reference_example_id=None, parent_run_id=UUID('00000000-0000-4000-8000-000000000000'), tags=['seq:step:2'], execution_order=None, child_execution_order=None, child_runs=[], trace_id=UUID('00000000-0000-4000-8000-000000000000'), dotted_order='20230101T000000000000Z00000000-0000-4000-8000-000000000000.20230101T000000000000Z00000000-0000-4000-8000-000000000002'), Run(id=UUID('00000000-0000-4000-8000-000000000003'), name='passthrough', start_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), run_type='chain', end_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), extra={}, error=None, serialized={'lc': 1, 'type': 'not_implemented', 'id': ['langchain_core', 'runnables', 'base', 'RunnableLambda'], 'repr': 'RunnableLambda(afunc=passthrough)'}, events=[{'name': 'start', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}, {'name': 'end', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}], inputs={'input': 'foo'}, outputs={'output': 'foo'}, reference_example_id=None, parent_run_id=UUID('00000000-0000-4000-8000-000000000000'), tags=['seq:step:3'], execution_order=None, child_execution_order=None, child_runs=[], trace_id=UUID('00000000-0000-4000-8000-000000000000'), dotted_order='20230101T000000000000Z00000000-0000-4000-8000-000000000000.20230101T000000000000Z00000000-0000-4000-8000-000000000003')], trace_id=UUID('00000000-0000-4000-8000-000000000000'), dotted_order='20230101T000000000000Z00000000-0000-4000-8000-000000000000'), + Run(id=UUID('00000000-0000-4000-8000-000000000000'), name='RunnableSequence', start_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), run_type='chain', end_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), extra={}, error=None, serialized={'lc': 1, 'type': 'constructor', 'id': ['langchain', 'schema', 'runnable', 'RunnableSequence'], 'kwargs': {'first': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'kwargs': {'messages': [{'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'SystemMessagePromptTemplate'], 'kwargs': {'prompt': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'kwargs': {'input_variables': [], 'template': 'You are a nice assistant.', 'template_format': 'f-string', 'partial_variables': {}}, 'name': 'PromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'PromptInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'name': 'PromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': 'PromptTemplateOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}}}, {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'HumanMessagePromptTemplate'], 'kwargs': {'prompt': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'kwargs': {'input_variables': ['question'], 'template': '{question}', 'template_format': 'f-string', 'partial_variables': {}}, 'name': 'PromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'PromptInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'name': 'PromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': 'PromptTemplateOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}}}], 'input_variables': ['question']}, 'name': 'ChatPromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'PromptInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'name': 'ChatPromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': 'ChatPromptTemplateOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}, 'middle': [{'lc': 1, 'type': 'not_implemented', 'id': ['langchain_core', 'language_models', 'fake', 'FakeListLLM'], 'repr': "FakeListLLM(responses=['foo', 'bar'])", 'name': 'FakeListLLM', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'FakeListLLMInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain_core', 'language_models', 'fake', 'FakeListLLM'], 'name': 'FakeListLLM'}}, {'id': 2, 'type': 'schema', 'data': 'FakeListLLMOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}], 'last': {'lc': 1, 'type': 'not_implemented', 'id': ['langchain_core', 'runnables', 'base', 'RunnableLambda'], 'repr': 'RunnableLambda(afunc=passthrough)'}, 'name': None}, 'name': 'RunnableSequence', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'PromptInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'name': 'ChatPromptTemplate'}}, {'id': 2, 'type': 'runnable', 'data': {'id': ['langchain_core', 'language_models', 'fake', 'FakeListLLM'], 'name': 'FakeListLLM'}}, {'id': 3, 'type': 'runnable', 'data': {'id': ['langchain_core', 'runnables', 'base', 'RunnableLambda'], 'name': 'passthrough'}}, {'id': 4, 'type': 'schema', 'data': 'passthrough_output'}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}, {'source': 3, 'target': 4}, {'source': 2, 'target': 3}]}}, events=[{'name': 'start', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}, {'name': 'end', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}], inputs={'question': 'What is your name?'}, outputs={'output': 'foo'}, reference_example_id=None, parent_run_id=None, tags=[], execution_order=None, child_execution_order=None, child_runs=[Run(id=UUID('00000000-0000-4000-8000-000000000001'), name='ChatPromptTemplate', start_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), run_type='prompt', end_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), extra={}, error=None, serialized={'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'kwargs': {'messages': [{'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'SystemMessagePromptTemplate'], 'kwargs': {'prompt': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'kwargs': {'input_variables': [], 'template': 'You are a nice assistant.', 'template_format': 'f-string', 'partial_variables': {}}, 'name': 'PromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'PromptInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'name': 'PromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': 'PromptTemplateOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}}}, {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'HumanMessagePromptTemplate'], 'kwargs': {'prompt': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'kwargs': {'input_variables': ['question'], 'template': '{question}', 'template_format': 'f-string', 'partial_variables': {}}, 'name': 'PromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'PromptInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'name': 'PromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': 'PromptTemplateOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}}}], 'input_variables': ['question']}, 'name': 'ChatPromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'PromptInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'name': 'ChatPromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': 'ChatPromptTemplateOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}, events=[{'name': 'start', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}, {'name': 'end', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}], inputs={'question': 'What is your name?'}, outputs={'output': ChatPromptValue(messages=[SystemMessage(content='You are a nice assistant.'), HumanMessage(content='What is your name?')])}, reference_example_id=None, parent_run_id=UUID('00000000-0000-4000-8000-000000000000'), tags=['seq:step:1'], execution_order=None, child_execution_order=None, child_runs=[], trace_id=UUID('00000000-0000-4000-8000-000000000000'), dotted_order='20230101T000000000000Z00000000-0000-4000-8000-000000000000.20230101T000000000000Z00000000-0000-4000-8000-000000000001'), Run(id=UUID('00000000-0000-4000-8000-000000000002'), name='FakeListLLM', start_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), run_type='llm', end_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), extra={'invocation_params': {'responses': ['foo', 'bar'], '_type': 'fake-list', 'stop': None}, 'options': {'stop': None}, 'batch_size': 1}, error=None, serialized={'lc': 1, 'type': 'not_implemented', 'id': ['langchain_core', 'language_models', 'fake', 'FakeListLLM'], 'repr': "FakeListLLM(responses=['foo', 'bar'])", 'name': 'FakeListLLM', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'FakeListLLMInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain_core', 'language_models', 'fake', 'FakeListLLM'], 'name': 'FakeListLLM'}}, {'id': 2, 'type': 'schema', 'data': 'FakeListLLMOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}, events=[{'name': 'start', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}, {'name': 'end', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}], inputs={'prompts': ['System: You are a nice assistant.\nHuman: What is your name?']}, outputs={'generations': [[{'text': 'foo', 'generation_info': None, 'type': 'Generation'}]], 'llm_output': None, 'run': None}, reference_example_id=None, parent_run_id=UUID('00000000-0000-4000-8000-000000000000'), tags=['seq:step:2'], execution_order=None, child_execution_order=None, child_runs=[], trace_id=UUID('00000000-0000-4000-8000-000000000000'), dotted_order='20230101T000000000000Z00000000-0000-4000-8000-000000000000.20230101T000000000000Z00000000-0000-4000-8000-000000000002'), Run(id=UUID('00000000-0000-4000-8000-000000000003'), name='passthrough', start_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), run_type='chain', end_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), extra={}, error=None, serialized={'lc': 1, 'type': 'not_implemented', 'id': ['langchain_core', 'runnables', 'base', 'RunnableLambda'], 'repr': 'RunnableLambda(afunc=passthrough)'}, events=[{'name': 'start', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}, {'name': 'end', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}], inputs={'input': 'foo'}, outputs={'output': 'foo'}, reference_example_id=None, parent_run_id=UUID('00000000-0000-4000-8000-000000000000'), tags=['seq:step:3'], execution_order=None, child_execution_order=None, child_runs=[], trace_id=UUID('00000000-0000-4000-8000-000000000000'), dotted_order='20230101T000000000000Z00000000-0000-4000-8000-000000000000.20230101T000000000000Z00000000-0000-4000-8000-000000000003')], trace_id=UUID('00000000-0000-4000-8000-000000000000'), dotted_order='20230101T000000000000Z00000000-0000-4000-8000-000000000000'), ]) # --- # name: test_prompt_with_llm_parser @@ -28543,11 +4102,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "PromptInput", - "type": "object", - "properties": {} - } + "data": "PromptInput" }, { "id": 1, @@ -28565,436 +4120,7 @@ { "id": 2, "type": "schema", - "data": { - "title": "PromptTemplateOutput", - "anyOf": [ - { - "$ref": "#/definitions/StringPromptValue" - }, - { - "$ref": "#/definitions/ChatPromptValueConcrete" - } - ], - "definitions": { - "StringPromptValue": { - "title": "StringPromptValue", - "description": "String prompt value.", - "type": "object", - "properties": { - "text": { - "title": "Text", - "type": "string" - }, - "type": { - "title": "Type", - "default": "StringPromptValue", - "enum": [ - "StringPromptValue" - ], - "type": "string" - } - }, - "required": [ - "text" - ] - }, - "AIMessage": { - "title": "AIMessage", - "description": "Message from an AI.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "ai", - "enum": [ - "ai" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "HumanMessage": { - "title": "HumanMessage", - "description": "Message from a human.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "human", - "enum": [ - "human" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "ChatMessage": { - "title": "ChatMessage", - "description": "Message that can be assigned an arbitrary speaker (i.e. role).", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "chat", - "enum": [ - "chat" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "role": { - "title": "Role", - "type": "string" - } - }, - "required": [ - "content", - "role" - ] - }, - "SystemMessage": { - "title": "SystemMessage", - "description": "Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "system", - "enum": [ - "system" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content" - ] - }, - "FunctionMessage": { - "title": "FunctionMessage", - "description": "Message for passing the result of executing a function back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "function", - "enum": [ - "function" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content", - "name" - ] - }, - "ToolMessage": { - "title": "ToolMessage", - "description": "Message for passing the result of executing a tool back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "tool", - "enum": [ - "tool" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "tool_call_id": { - "title": "Tool Call Id", - "type": "string" - } - }, - "required": [ - "content", - "tool_call_id" - ] - }, - "ChatPromptValueConcrete": { - "title": "ChatPromptValueConcrete", - "description": "Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.", - "type": "object", - "properties": { - "messages": { - "title": "Messages", - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - }, - "type": { - "title": "Type", - "default": "ChatPromptValueConcrete", - "enum": [ - "ChatPromptValueConcrete" - ], - "type": "string" - } - }, - "required": [ - "messages" - ] - } - } - } + "data": "PromptTemplateOutput" } ], "edges": [ @@ -29044,16 +4170,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "PromptInput", - "type": "object", - "properties": { - "question": { - "title": "Question", - "type": "string" - } - } - } + "data": "PromptInput" }, { "id": 1, @@ -29071,436 +4188,7 @@ { "id": 2, "type": "schema", - "data": { - "title": "PromptTemplateOutput", - "anyOf": [ - { - "$ref": "#/definitions/StringPromptValue" - }, - { - "$ref": "#/definitions/ChatPromptValueConcrete" - } - ], - "definitions": { - "StringPromptValue": { - "title": "StringPromptValue", - "description": "String prompt value.", - "type": "object", - "properties": { - "text": { - "title": "Text", - "type": "string" - }, - "type": { - "title": "Type", - "default": "StringPromptValue", - "enum": [ - "StringPromptValue" - ], - "type": "string" - } - }, - "required": [ - "text" - ] - }, - "AIMessage": { - "title": "AIMessage", - "description": "Message from an AI.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "ai", - "enum": [ - "ai" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "HumanMessage": { - "title": "HumanMessage", - "description": "Message from a human.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "human", - "enum": [ - "human" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "ChatMessage": { - "title": "ChatMessage", - "description": "Message that can be assigned an arbitrary speaker (i.e. role).", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "chat", - "enum": [ - "chat" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "role": { - "title": "Role", - "type": "string" - } - }, - "required": [ - "content", - "role" - ] - }, - "SystemMessage": { - "title": "SystemMessage", - "description": "Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "system", - "enum": [ - "system" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content" - ] - }, - "FunctionMessage": { - "title": "FunctionMessage", - "description": "Message for passing the result of executing a function back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "function", - "enum": [ - "function" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content", - "name" - ] - }, - "ToolMessage": { - "title": "ToolMessage", - "description": "Message for passing the result of executing a tool back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "tool", - "enum": [ - "tool" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "tool_call_id": { - "title": "Tool Call Id", - "type": "string" - } - }, - "required": [ - "content", - "tool_call_id" - ] - }, - "ChatPromptValueConcrete": { - "title": "ChatPromptValueConcrete", - "description": "Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.", - "type": "object", - "properties": { - "messages": { - "title": "Messages", - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - }, - "type": { - "title": "Type", - "default": "ChatPromptValueConcrete", - "enum": [ - "ChatPromptValueConcrete" - ], - "type": "string" - } - }, - "required": [ - "messages" - ] - } - } - } + "data": "PromptTemplateOutput" } ], "edges": [ @@ -29528,16 +4216,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "PromptInput", - "type": "object", - "properties": { - "question": { - "title": "Question", - "type": "string" - } - } - } + "data": "PromptInput" }, { "id": 1, @@ -29555,436 +4234,7 @@ { "id": 2, "type": "schema", - "data": { - "title": "ChatPromptTemplateOutput", - "anyOf": [ - { - "$ref": "#/definitions/StringPromptValue" - }, - { - "$ref": "#/definitions/ChatPromptValueConcrete" - } - ], - "definitions": { - "StringPromptValue": { - "title": "StringPromptValue", - "description": "String prompt value.", - "type": "object", - "properties": { - "text": { - "title": "Text", - "type": "string" - }, - "type": { - "title": "Type", - "default": "StringPromptValue", - "enum": [ - "StringPromptValue" - ], - "type": "string" - } - }, - "required": [ - "text" - ] - }, - "AIMessage": { - "title": "AIMessage", - "description": "Message from an AI.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "ai", - "enum": [ - "ai" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "HumanMessage": { - "title": "HumanMessage", - "description": "Message from a human.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "human", - "enum": [ - "human" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "ChatMessage": { - "title": "ChatMessage", - "description": "Message that can be assigned an arbitrary speaker (i.e. role).", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "chat", - "enum": [ - "chat" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "role": { - "title": "Role", - "type": "string" - } - }, - "required": [ - "content", - "role" - ] - }, - "SystemMessage": { - "title": "SystemMessage", - "description": "Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "system", - "enum": [ - "system" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content" - ] - }, - "FunctionMessage": { - "title": "FunctionMessage", - "description": "Message for passing the result of executing a function back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "function", - "enum": [ - "function" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content", - "name" - ] - }, - "ToolMessage": { - "title": "ToolMessage", - "description": "Message for passing the result of executing a tool back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "tool", - "enum": [ - "tool" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "tool_call_id": { - "title": "Tool Call Id", - "type": "string" - } - }, - "required": [ - "content", - "tool_call_id" - ] - }, - "ChatPromptValueConcrete": { - "title": "ChatPromptValueConcrete", - "description": "Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.", - "type": "object", - "properties": { - "messages": { - "title": "Messages", - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - }, - "type": { - "title": "Type", - "default": "ChatPromptValueConcrete", - "enum": [ - "ChatPromptValueConcrete" - ], - "type": "string" - } - }, - "required": [ - "messages" - ] - } - } - } + "data": "ChatPromptTemplateOutput" } ], "edges": [ @@ -30016,464 +4266,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "FakeStreamingListLLMInput", - "anyOf": [ - { - "type": "string" - }, - { - "$ref": "#/definitions/StringPromptValue" - }, - { - "$ref": "#/definitions/ChatPromptValueConcrete" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - } - ], - "definitions": { - "StringPromptValue": { - "title": "StringPromptValue", - "description": "String prompt value.", - "type": "object", - "properties": { - "text": { - "title": "Text", - "type": "string" - }, - "type": { - "title": "Type", - "default": "StringPromptValue", - "enum": [ - "StringPromptValue" - ], - "type": "string" - } - }, - "required": [ - "text" - ] - }, - "AIMessage": { - "title": "AIMessage", - "description": "Message from an AI.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "ai", - "enum": [ - "ai" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "HumanMessage": { - "title": "HumanMessage", - "description": "Message from a human.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "human", - "enum": [ - "human" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "ChatMessage": { - "title": "ChatMessage", - "description": "Message that can be assigned an arbitrary speaker (i.e. role).", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "chat", - "enum": [ - "chat" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "role": { - "title": "Role", - "type": "string" - } - }, - "required": [ - "content", - "role" - ] - }, - "SystemMessage": { - "title": "SystemMessage", - "description": "Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "system", - "enum": [ - "system" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content" - ] - }, - "FunctionMessage": { - "title": "FunctionMessage", - "description": "Message for passing the result of executing a function back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "function", - "enum": [ - "function" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content", - "name" - ] - }, - "ToolMessage": { - "title": "ToolMessage", - "description": "Message for passing the result of executing a tool back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "tool", - "enum": [ - "tool" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "tool_call_id": { - "title": "Tool Call Id", - "type": "string" - } - }, - "required": [ - "content", - "tool_call_id" - ] - }, - "ChatPromptValueConcrete": { - "title": "ChatPromptValueConcrete", - "description": "Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.", - "type": "object", - "properties": { - "messages": { - "title": "Messages", - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - }, - "type": { - "title": "Type", - "default": "ChatPromptValueConcrete", - "enum": [ - "ChatPromptValueConcrete" - ], - "type": "string" - } - }, - "required": [ - "messages" - ] - } - } - } + "data": "FakeStreamingListLLMInput" }, { "id": 1, @@ -30491,10 +4284,7 @@ { "id": 2, "type": "schema", - "data": { - "title": "FakeStreamingListLLMOutput", - "type": "string" - } + "data": "FakeStreamingListLLMOutput" } ], "edges": [ @@ -30526,385 +4316,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "CommaSeparatedListOutputParserInput", - "anyOf": [ - { - "type": "string" - }, - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ], - "definitions": { - "AIMessage": { - "title": "AIMessage", - "description": "Message from an AI.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "ai", - "enum": [ - "ai" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "HumanMessage": { - "title": "HumanMessage", - "description": "Message from a human.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "human", - "enum": [ - "human" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "ChatMessage": { - "title": "ChatMessage", - "description": "Message that can be assigned an arbitrary speaker (i.e. role).", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "chat", - "enum": [ - "chat" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "role": { - "title": "Role", - "type": "string" - } - }, - "required": [ - "content", - "role" - ] - }, - "SystemMessage": { - "title": "SystemMessage", - "description": "Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "system", - "enum": [ - "system" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content" - ] - }, - "FunctionMessage": { - "title": "FunctionMessage", - "description": "Message for passing the result of executing a function back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "function", - "enum": [ - "function" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content", - "name" - ] - }, - "ToolMessage": { - "title": "ToolMessage", - "description": "Message for passing the result of executing a tool back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "tool", - "enum": [ - "tool" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "tool_call_id": { - "title": "Tool Call Id", - "type": "string" - } - }, - "required": [ - "content", - "tool_call_id" - ] - } - } - } + "data": "CommaSeparatedListOutputParserInput" }, { "id": 1, @@ -30922,13 +4334,7 @@ { "id": 2, "type": "schema", - "data": { - "title": "CommaSeparatedListOutputParserOutput", - "type": "array", - "items": { - "type": "string" - } - } + "data": "CommaSeparatedListOutputParserOutput" } ], "edges": [ @@ -30951,16 +4357,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "PromptInput", - "type": "object", - "properties": { - "question": { - "title": "Question", - "type": "string" - } - } - } + "data": "PromptInput" }, { "id": 1, @@ -31004,13 +4401,7 @@ { "id": 4, "type": "schema", - "data": { - "title": "CommaSeparatedListOutputParserOutput", - "type": "array", - "items": { - "type": "string" - } - } + "data": "CommaSeparatedListOutputParserOutput" } ], "edges": [ @@ -31037,13 +4428,13 @@ # --- # name: test_prompt_with_llm_parser.1 list([ - Run(id=UUID('00000000-0000-4000-8000-000000000000'), name='RunnableSequence', start_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), run_type='chain', end_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), extra={}, error=None, serialized={'lc': 1, 'type': 'constructor', 'id': ['langchain', 'schema', 'runnable', 'RunnableSequence'], 'kwargs': {'first': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'kwargs': {'messages': [{'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'SystemMessagePromptTemplate'], 'kwargs': {'prompt': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'kwargs': {'input_variables': [], 'template': 'You are a nice assistant.', 'template_format': 'f-string', 'partial_variables': {}}, 'name': 'PromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'PromptInput', 'type': 'object', 'properties': {}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'name': 'PromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': {'title': 'PromptTemplateOutput', 'anyOf': [{'$ref': '#/definitions/StringPromptValue'}, {'$ref': '#/definitions/ChatPromptValueConcrete'}], 'definitions': {'StringPromptValue': {'title': 'StringPromptValue', 'description': 'String prompt value.', 'type': 'object', 'properties': {'text': {'title': 'Text', 'type': 'string'}, 'type': {'title': 'Type', 'default': 'StringPromptValue', 'enum': ['StringPromptValue'], 'type': 'string'}}, 'required': ['text']}, 'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}, 'ChatPromptValueConcrete': {'title': 'ChatPromptValueConcrete', 'description': 'Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.', 'type': 'object', 'properties': {'messages': {'title': 'Messages', 'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}, 'type': {'title': 'Type', 'default': 'ChatPromptValueConcrete', 'enum': ['ChatPromptValueConcrete'], 'type': 'string'}}, 'required': ['messages']}}}}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}}}, {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'HumanMessagePromptTemplate'], 'kwargs': {'prompt': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'kwargs': {'input_variables': ['question'], 'template': '{question}', 'template_format': 'f-string', 'partial_variables': {}}, 'name': 'PromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'PromptInput', 'type': 'object', 'properties': {'question': {'title': 'Question', 'type': 'string'}}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'name': 'PromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': {'title': 'PromptTemplateOutput', 'anyOf': [{'$ref': '#/definitions/StringPromptValue'}, {'$ref': '#/definitions/ChatPromptValueConcrete'}], 'definitions': {'StringPromptValue': {'title': 'StringPromptValue', 'description': 'String prompt value.', 'type': 'object', 'properties': {'text': {'title': 'Text', 'type': 'string'}, 'type': {'title': 'Type', 'default': 'StringPromptValue', 'enum': ['StringPromptValue'], 'type': 'string'}}, 'required': ['text']}, 'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}, 'ChatPromptValueConcrete': {'title': 'ChatPromptValueConcrete', 'description': 'Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.', 'type': 'object', 'properties': {'messages': {'title': 'Messages', 'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}, 'type': {'title': 'Type', 'default': 'ChatPromptValueConcrete', 'enum': ['ChatPromptValueConcrete'], 'type': 'string'}}, 'required': ['messages']}}}}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}}}], 'input_variables': ['question']}, 'name': 'ChatPromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'PromptInput', 'type': 'object', 'properties': {'question': {'title': 'Question', 'type': 'string'}}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'name': 'ChatPromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': {'title': 'ChatPromptTemplateOutput', 'anyOf': [{'$ref': '#/definitions/StringPromptValue'}, {'$ref': '#/definitions/ChatPromptValueConcrete'}], 'definitions': {'StringPromptValue': {'title': 'StringPromptValue', 'description': 'String prompt value.', 'type': 'object', 'properties': {'text': {'title': 'Text', 'type': 'string'}, 'type': {'title': 'Type', 'default': 'StringPromptValue', 'enum': ['StringPromptValue'], 'type': 'string'}}, 'required': ['text']}, 'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}, 'ChatPromptValueConcrete': {'title': 'ChatPromptValueConcrete', 'description': 'Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.', 'type': 'object', 'properties': {'messages': {'title': 'Messages', 'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}, 'type': {'title': 'Type', 'default': 'ChatPromptValueConcrete', 'enum': ['ChatPromptValueConcrete'], 'type': 'string'}}, 'required': ['messages']}}}}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}, 'middle': [{'lc': 1, 'type': 'not_implemented', 'id': ['langchain_core', 'language_models', 'fake', 'FakeStreamingListLLM'], 'repr': "FakeStreamingListLLM(responses=['bear, dog, cat', 'tomato, lettuce, onion'])", 'name': 'FakeStreamingListLLM', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'FakeStreamingListLLMInput', 'anyOf': [{'type': 'string'}, {'$ref': '#/definitions/StringPromptValue'}, {'$ref': '#/definitions/ChatPromptValueConcrete'}, {'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}], 'definitions': {'StringPromptValue': {'title': 'StringPromptValue', 'description': 'String prompt value.', 'type': 'object', 'properties': {'text': {'title': 'Text', 'type': 'string'}, 'type': {'title': 'Type', 'default': 'StringPromptValue', 'enum': ['StringPromptValue'], 'type': 'string'}}, 'required': ['text']}, 'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}, 'ChatPromptValueConcrete': {'title': 'ChatPromptValueConcrete', 'description': 'Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.', 'type': 'object', 'properties': {'messages': {'title': 'Messages', 'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}, 'type': {'title': 'Type', 'default': 'ChatPromptValueConcrete', 'enum': ['ChatPromptValueConcrete'], 'type': 'string'}}, 'required': ['messages']}}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain_core', 'language_models', 'fake', 'FakeStreamingListLLM'], 'name': 'FakeStreamingListLLM'}}, {'id': 2, 'type': 'schema', 'data': {'title': 'FakeStreamingListLLMOutput', 'type': 'string'}}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}], 'last': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'output_parsers', 'list', 'CommaSeparatedListOutputParser'], 'kwargs': {}, 'name': 'CommaSeparatedListOutputParser', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'CommaSeparatedListOutputParserInput', 'anyOf': [{'type': 'string'}, {'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}], 'definitions': {'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'output_parsers', 'list', 'CommaSeparatedListOutputParser'], 'name': 'CommaSeparatedListOutputParser'}}, {'id': 2, 'type': 'schema', 'data': {'title': 'CommaSeparatedListOutputParserOutput', 'type': 'array', 'items': {'type': 'string'}}}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}, 'name': None}, 'name': 'RunnableSequence', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'PromptInput', 'type': 'object', 'properties': {'question': {'title': 'Question', 'type': 'string'}}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'name': 'ChatPromptTemplate'}}, {'id': 2, 'type': 'runnable', 'data': {'id': ['langchain_core', 'language_models', 'fake', 'FakeStreamingListLLM'], 'name': 'FakeStreamingListLLM'}}, {'id': 3, 'type': 'runnable', 'data': {'id': ['langchain', 'output_parsers', 'list', 'CommaSeparatedListOutputParser'], 'name': 'CommaSeparatedListOutputParser'}}, {'id': 4, 'type': 'schema', 'data': {'title': 'CommaSeparatedListOutputParserOutput', 'type': 'array', 'items': {'type': 'string'}}}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}, {'source': 3, 'target': 4}, {'source': 2, 'target': 3}]}}, events=[{'name': 'start', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}, {'name': 'end', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}], inputs={'question': 'What is your name?'}, outputs={'output': ['bear', 'dog', 'cat']}, reference_example_id=None, parent_run_id=None, tags=[], execution_order=None, child_execution_order=None, child_runs=[Run(id=UUID('00000000-0000-4000-8000-000000000001'), name='ChatPromptTemplate', start_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), run_type='prompt', end_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), extra={}, error=None, serialized={'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'kwargs': {'messages': [{'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'SystemMessagePromptTemplate'], 'kwargs': {'prompt': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'kwargs': {'input_variables': [], 'template': 'You are a nice assistant.', 'template_format': 'f-string', 'partial_variables': {}}, 'name': 'PromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'PromptInput', 'type': 'object', 'properties': {}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'name': 'PromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': {'title': 'PromptTemplateOutput', 'anyOf': [{'$ref': '#/definitions/StringPromptValue'}, {'$ref': '#/definitions/ChatPromptValueConcrete'}], 'definitions': {'StringPromptValue': {'title': 'StringPromptValue', 'description': 'String prompt value.', 'type': 'object', 'properties': {'text': {'title': 'Text', 'type': 'string'}, 'type': {'title': 'Type', 'default': 'StringPromptValue', 'enum': ['StringPromptValue'], 'type': 'string'}}, 'required': ['text']}, 'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}, 'ChatPromptValueConcrete': {'title': 'ChatPromptValueConcrete', 'description': 'Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.', 'type': 'object', 'properties': {'messages': {'title': 'Messages', 'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}, 'type': {'title': 'Type', 'default': 'ChatPromptValueConcrete', 'enum': ['ChatPromptValueConcrete'], 'type': 'string'}}, 'required': ['messages']}}}}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}}}, {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'HumanMessagePromptTemplate'], 'kwargs': {'prompt': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'kwargs': {'input_variables': ['question'], 'template': '{question}', 'template_format': 'f-string', 'partial_variables': {}}, 'name': 'PromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'PromptInput', 'type': 'object', 'properties': {'question': {'title': 'Question', 'type': 'string'}}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'name': 'PromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': {'title': 'PromptTemplateOutput', 'anyOf': [{'$ref': '#/definitions/StringPromptValue'}, {'$ref': '#/definitions/ChatPromptValueConcrete'}], 'definitions': {'StringPromptValue': {'title': 'StringPromptValue', 'description': 'String prompt value.', 'type': 'object', 'properties': {'text': {'title': 'Text', 'type': 'string'}, 'type': {'title': 'Type', 'default': 'StringPromptValue', 'enum': ['StringPromptValue'], 'type': 'string'}}, 'required': ['text']}, 'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}, 'ChatPromptValueConcrete': {'title': 'ChatPromptValueConcrete', 'description': 'Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.', 'type': 'object', 'properties': {'messages': {'title': 'Messages', 'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}, 'type': {'title': 'Type', 'default': 'ChatPromptValueConcrete', 'enum': ['ChatPromptValueConcrete'], 'type': 'string'}}, 'required': ['messages']}}}}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}}}], 'input_variables': ['question']}, 'name': 'ChatPromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'PromptInput', 'type': 'object', 'properties': {'question': {'title': 'Question', 'type': 'string'}}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'name': 'ChatPromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': {'title': 'ChatPromptTemplateOutput', 'anyOf': [{'$ref': '#/definitions/StringPromptValue'}, {'$ref': '#/definitions/ChatPromptValueConcrete'}], 'definitions': {'StringPromptValue': {'title': 'StringPromptValue', 'description': 'String prompt value.', 'type': 'object', 'properties': {'text': {'title': 'Text', 'type': 'string'}, 'type': {'title': 'Type', 'default': 'StringPromptValue', 'enum': ['StringPromptValue'], 'type': 'string'}}, 'required': ['text']}, 'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}, 'ChatPromptValueConcrete': {'title': 'ChatPromptValueConcrete', 'description': 'Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.', 'type': 'object', 'properties': {'messages': {'title': 'Messages', 'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}, 'type': {'title': 'Type', 'default': 'ChatPromptValueConcrete', 'enum': ['ChatPromptValueConcrete'], 'type': 'string'}}, 'required': ['messages']}}}}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}, events=[{'name': 'start', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}, {'name': 'end', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}], inputs={'question': 'What is your name?'}, outputs={'output': ChatPromptValue(messages=[SystemMessage(content='You are a nice assistant.'), HumanMessage(content='What is your name?')])}, reference_example_id=None, parent_run_id=UUID('00000000-0000-4000-8000-000000000000'), tags=['seq:step:1'], execution_order=None, child_execution_order=None, child_runs=[], trace_id=UUID('00000000-0000-4000-8000-000000000000'), dotted_order='20230101T000000000000Z00000000-0000-4000-8000-000000000000.20230101T000000000000Z00000000-0000-4000-8000-000000000001'), Run(id=UUID('00000000-0000-4000-8000-000000000002'), name='FakeStreamingListLLM', start_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), run_type='llm', end_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), extra={'invocation_params': {'responses': ['bear, dog, cat', 'tomato, lettuce, onion'], '_type': 'fake-list', 'stop': None}, 'options': {'stop': None}, 'batch_size': 1}, error=None, serialized={'lc': 1, 'type': 'not_implemented', 'id': ['langchain_core', 'language_models', 'fake', 'FakeStreamingListLLM'], 'repr': "FakeStreamingListLLM(responses=['bear, dog, cat', 'tomato, lettuce, onion'])", 'name': 'FakeStreamingListLLM', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'FakeStreamingListLLMInput', 'anyOf': [{'type': 'string'}, {'$ref': '#/definitions/StringPromptValue'}, {'$ref': '#/definitions/ChatPromptValueConcrete'}, {'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}], 'definitions': {'StringPromptValue': {'title': 'StringPromptValue', 'description': 'String prompt value.', 'type': 'object', 'properties': {'text': {'title': 'Text', 'type': 'string'}, 'type': {'title': 'Type', 'default': 'StringPromptValue', 'enum': ['StringPromptValue'], 'type': 'string'}}, 'required': ['text']}, 'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}, 'ChatPromptValueConcrete': {'title': 'ChatPromptValueConcrete', 'description': 'Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.', 'type': 'object', 'properties': {'messages': {'title': 'Messages', 'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}, 'type': {'title': 'Type', 'default': 'ChatPromptValueConcrete', 'enum': ['ChatPromptValueConcrete'], 'type': 'string'}}, 'required': ['messages']}}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain_core', 'language_models', 'fake', 'FakeStreamingListLLM'], 'name': 'FakeStreamingListLLM'}}, {'id': 2, 'type': 'schema', 'data': {'title': 'FakeStreamingListLLMOutput', 'type': 'string'}}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}, events=[{'name': 'start', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}, {'name': 'end', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}], inputs={'prompts': ['System: You are a nice assistant.\nHuman: What is your name?']}, outputs={'generations': [[{'text': 'bear, dog, cat', 'generation_info': None, 'type': 'Generation'}]], 'llm_output': None, 'run': None}, reference_example_id=None, parent_run_id=UUID('00000000-0000-4000-8000-000000000000'), tags=['seq:step:2'], execution_order=None, child_execution_order=None, child_runs=[], trace_id=UUID('00000000-0000-4000-8000-000000000000'), dotted_order='20230101T000000000000Z00000000-0000-4000-8000-000000000000.20230101T000000000000Z00000000-0000-4000-8000-000000000002'), Run(id=UUID('00000000-0000-4000-8000-000000000003'), name='CommaSeparatedListOutputParser', start_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), run_type='parser', end_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), extra={}, error=None, serialized={'lc': 1, 'type': 'constructor', 'id': ['langchain', 'output_parsers', 'list', 'CommaSeparatedListOutputParser'], 'kwargs': {}, 'name': 'CommaSeparatedListOutputParser', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'CommaSeparatedListOutputParserInput', 'anyOf': [{'type': 'string'}, {'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}], 'definitions': {'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'output_parsers', 'list', 'CommaSeparatedListOutputParser'], 'name': 'CommaSeparatedListOutputParser'}}, {'id': 2, 'type': 'schema', 'data': {'title': 'CommaSeparatedListOutputParserOutput', 'type': 'array', 'items': {'type': 'string'}}}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}, events=[{'name': 'start', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}, {'name': 'end', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}], inputs={'input': 'bear, dog, cat'}, outputs={'output': ['bear', 'dog', 'cat']}, reference_example_id=None, parent_run_id=UUID('00000000-0000-4000-8000-000000000000'), tags=['seq:step:3'], execution_order=None, child_execution_order=None, child_runs=[], trace_id=UUID('00000000-0000-4000-8000-000000000000'), dotted_order='20230101T000000000000Z00000000-0000-4000-8000-000000000000.20230101T000000000000Z00000000-0000-4000-8000-000000000003')], trace_id=UUID('00000000-0000-4000-8000-000000000000'), dotted_order='20230101T000000000000Z00000000-0000-4000-8000-000000000000'), + Run(id=UUID('00000000-0000-4000-8000-000000000000'), name='RunnableSequence', start_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), run_type='chain', end_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), extra={}, error=None, serialized={'lc': 1, 'type': 'constructor', 'id': ['langchain', 'schema', 'runnable', 'RunnableSequence'], 'kwargs': {'first': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'kwargs': {'messages': [{'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'SystemMessagePromptTemplate'], 'kwargs': {'prompt': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'kwargs': {'input_variables': [], 'template': 'You are a nice assistant.', 'template_format': 'f-string', 'partial_variables': {}}, 'name': 'PromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'PromptInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'name': 'PromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': 'PromptTemplateOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}}}, {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'HumanMessagePromptTemplate'], 'kwargs': {'prompt': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'kwargs': {'input_variables': ['question'], 'template': '{question}', 'template_format': 'f-string', 'partial_variables': {}}, 'name': 'PromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'PromptInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'name': 'PromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': 'PromptTemplateOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}}}], 'input_variables': ['question']}, 'name': 'ChatPromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'PromptInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'name': 'ChatPromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': 'ChatPromptTemplateOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}, 'middle': [{'lc': 1, 'type': 'not_implemented', 'id': ['langchain_core', 'language_models', 'fake', 'FakeStreamingListLLM'], 'repr': "FakeStreamingListLLM(responses=['bear, dog, cat', 'tomato, lettuce, onion'])", 'name': 'FakeStreamingListLLM', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'FakeStreamingListLLMInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain_core', 'language_models', 'fake', 'FakeStreamingListLLM'], 'name': 'FakeStreamingListLLM'}}, {'id': 2, 'type': 'schema', 'data': 'FakeStreamingListLLMOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}], 'last': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'output_parsers', 'list', 'CommaSeparatedListOutputParser'], 'kwargs': {}, 'name': 'CommaSeparatedListOutputParser', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'CommaSeparatedListOutputParserInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'output_parsers', 'list', 'CommaSeparatedListOutputParser'], 'name': 'CommaSeparatedListOutputParser'}}, {'id': 2, 'type': 'schema', 'data': 'CommaSeparatedListOutputParserOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}, 'name': None}, 'name': 'RunnableSequence', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'PromptInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'name': 'ChatPromptTemplate'}}, {'id': 2, 'type': 'runnable', 'data': {'id': ['langchain_core', 'language_models', 'fake', 'FakeStreamingListLLM'], 'name': 'FakeStreamingListLLM'}}, {'id': 3, 'type': 'runnable', 'data': {'id': ['langchain', 'output_parsers', 'list', 'CommaSeparatedListOutputParser'], 'name': 'CommaSeparatedListOutputParser'}}, {'id': 4, 'type': 'schema', 'data': 'CommaSeparatedListOutputParserOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}, {'source': 3, 'target': 4}, {'source': 2, 'target': 3}]}}, events=[{'name': 'start', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}, {'name': 'end', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}], inputs={'question': 'What is your name?'}, outputs={'output': ['bear', 'dog', 'cat']}, reference_example_id=None, parent_run_id=None, tags=[], execution_order=None, child_execution_order=None, child_runs=[Run(id=UUID('00000000-0000-4000-8000-000000000001'), name='ChatPromptTemplate', start_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), run_type='prompt', end_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), extra={}, error=None, serialized={'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'kwargs': {'messages': [{'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'SystemMessagePromptTemplate'], 'kwargs': {'prompt': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'kwargs': {'input_variables': [], 'template': 'You are a nice assistant.', 'template_format': 'f-string', 'partial_variables': {}}, 'name': 'PromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'PromptInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'name': 'PromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': 'PromptTemplateOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}}}, {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'HumanMessagePromptTemplate'], 'kwargs': {'prompt': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'kwargs': {'input_variables': ['question'], 'template': '{question}', 'template_format': 'f-string', 'partial_variables': {}}, 'name': 'PromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'PromptInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'name': 'PromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': 'PromptTemplateOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}}}], 'input_variables': ['question']}, 'name': 'ChatPromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'PromptInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'name': 'ChatPromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': 'ChatPromptTemplateOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}, events=[{'name': 'start', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}, {'name': 'end', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}], inputs={'question': 'What is your name?'}, outputs={'output': ChatPromptValue(messages=[SystemMessage(content='You are a nice assistant.'), HumanMessage(content='What is your name?')])}, reference_example_id=None, parent_run_id=UUID('00000000-0000-4000-8000-000000000000'), tags=['seq:step:1'], execution_order=None, child_execution_order=None, child_runs=[], trace_id=UUID('00000000-0000-4000-8000-000000000000'), dotted_order='20230101T000000000000Z00000000-0000-4000-8000-000000000000.20230101T000000000000Z00000000-0000-4000-8000-000000000001'), Run(id=UUID('00000000-0000-4000-8000-000000000002'), name='FakeStreamingListLLM', start_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), run_type='llm', end_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), extra={'invocation_params': {'responses': ['bear, dog, cat', 'tomato, lettuce, onion'], '_type': 'fake-list', 'stop': None}, 'options': {'stop': None}, 'batch_size': 1}, error=None, serialized={'lc': 1, 'type': 'not_implemented', 'id': ['langchain_core', 'language_models', 'fake', 'FakeStreamingListLLM'], 'repr': "FakeStreamingListLLM(responses=['bear, dog, cat', 'tomato, lettuce, onion'])", 'name': 'FakeStreamingListLLM', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'FakeStreamingListLLMInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain_core', 'language_models', 'fake', 'FakeStreamingListLLM'], 'name': 'FakeStreamingListLLM'}}, {'id': 2, 'type': 'schema', 'data': 'FakeStreamingListLLMOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}, events=[{'name': 'start', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}, {'name': 'end', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}], inputs={'prompts': ['System: You are a nice assistant.\nHuman: What is your name?']}, outputs={'generations': [[{'text': 'bear, dog, cat', 'generation_info': None, 'type': 'Generation'}]], 'llm_output': None, 'run': None}, reference_example_id=None, parent_run_id=UUID('00000000-0000-4000-8000-000000000000'), tags=['seq:step:2'], execution_order=None, child_execution_order=None, child_runs=[], trace_id=UUID('00000000-0000-4000-8000-000000000000'), dotted_order='20230101T000000000000Z00000000-0000-4000-8000-000000000000.20230101T000000000000Z00000000-0000-4000-8000-000000000002'), Run(id=UUID('00000000-0000-4000-8000-000000000003'), name='CommaSeparatedListOutputParser', start_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), run_type='parser', end_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), extra={}, error=None, serialized={'lc': 1, 'type': 'constructor', 'id': ['langchain', 'output_parsers', 'list', 'CommaSeparatedListOutputParser'], 'kwargs': {}, 'name': 'CommaSeparatedListOutputParser', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'CommaSeparatedListOutputParserInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'output_parsers', 'list', 'CommaSeparatedListOutputParser'], 'name': 'CommaSeparatedListOutputParser'}}, {'id': 2, 'type': 'schema', 'data': 'CommaSeparatedListOutputParserOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}, events=[{'name': 'start', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}, {'name': 'end', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}], inputs={'input': 'bear, dog, cat'}, outputs={'output': ['bear', 'dog', 'cat']}, reference_example_id=None, parent_run_id=UUID('00000000-0000-4000-8000-000000000000'), tags=['seq:step:3'], execution_order=None, child_execution_order=None, child_runs=[], trace_id=UUID('00000000-0000-4000-8000-000000000000'), dotted_order='20230101T000000000000Z00000000-0000-4000-8000-000000000000.20230101T000000000000Z00000000-0000-4000-8000-000000000003')], trace_id=UUID('00000000-0000-4000-8000-000000000000'), dotted_order='20230101T000000000000Z00000000-0000-4000-8000-000000000000'), ]) # --- # name: test_prompt_with_llm_parser.2 list([ - Run(id=UUID('00000000-0000-4000-8000-000000000000'), name='RunnableSequence', start_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), run_type='chain', end_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), extra={}, error=None, serialized={'lc': 1, 'type': 'constructor', 'id': ['langchain', 'schema', 'runnable', 'RunnableSequence'], 'kwargs': {'first': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'kwargs': {'messages': [{'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'SystemMessagePromptTemplate'], 'kwargs': {'prompt': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'kwargs': {'input_variables': [], 'template': 'You are a nice assistant.', 'template_format': 'f-string', 'partial_variables': {}}, 'name': 'PromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'PromptInput', 'type': 'object', 'properties': {}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'name': 'PromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': {'title': 'PromptTemplateOutput', 'anyOf': [{'$ref': '#/definitions/StringPromptValue'}, {'$ref': '#/definitions/ChatPromptValueConcrete'}], 'definitions': {'StringPromptValue': {'title': 'StringPromptValue', 'description': 'String prompt value.', 'type': 'object', 'properties': {'text': {'title': 'Text', 'type': 'string'}, 'type': {'title': 'Type', 'default': 'StringPromptValue', 'enum': ['StringPromptValue'], 'type': 'string'}}, 'required': ['text']}, 'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}, 'ChatPromptValueConcrete': {'title': 'ChatPromptValueConcrete', 'description': 'Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.', 'type': 'object', 'properties': {'messages': {'title': 'Messages', 'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}, 'type': {'title': 'Type', 'default': 'ChatPromptValueConcrete', 'enum': ['ChatPromptValueConcrete'], 'type': 'string'}}, 'required': ['messages']}}}}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}}}, {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'HumanMessagePromptTemplate'], 'kwargs': {'prompt': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'kwargs': {'input_variables': ['question'], 'template': '{question}', 'template_format': 'f-string', 'partial_variables': {}}, 'name': 'PromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'PromptInput', 'type': 'object', 'properties': {'question': {'title': 'Question', 'type': 'string'}}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'name': 'PromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': {'title': 'PromptTemplateOutput', 'anyOf': [{'$ref': '#/definitions/StringPromptValue'}, {'$ref': '#/definitions/ChatPromptValueConcrete'}], 'definitions': {'StringPromptValue': {'title': 'StringPromptValue', 'description': 'String prompt value.', 'type': 'object', 'properties': {'text': {'title': 'Text', 'type': 'string'}, 'type': {'title': 'Type', 'default': 'StringPromptValue', 'enum': ['StringPromptValue'], 'type': 'string'}}, 'required': ['text']}, 'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}, 'ChatPromptValueConcrete': {'title': 'ChatPromptValueConcrete', 'description': 'Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.', 'type': 'object', 'properties': {'messages': {'title': 'Messages', 'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}, 'type': {'title': 'Type', 'default': 'ChatPromptValueConcrete', 'enum': ['ChatPromptValueConcrete'], 'type': 'string'}}, 'required': ['messages']}}}}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}}}], 'input_variables': ['question']}, 'name': 'ChatPromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'PromptInput', 'type': 'object', 'properties': {'question': {'title': 'Question', 'type': 'string'}}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'name': 'ChatPromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': {'title': 'ChatPromptTemplateOutput', 'anyOf': [{'$ref': '#/definitions/StringPromptValue'}, {'$ref': '#/definitions/ChatPromptValueConcrete'}], 'definitions': {'StringPromptValue': {'title': 'StringPromptValue', 'description': 'String prompt value.', 'type': 'object', 'properties': {'text': {'title': 'Text', 'type': 'string'}, 'type': {'title': 'Type', 'default': 'StringPromptValue', 'enum': ['StringPromptValue'], 'type': 'string'}}, 'required': ['text']}, 'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}, 'ChatPromptValueConcrete': {'title': 'ChatPromptValueConcrete', 'description': 'Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.', 'type': 'object', 'properties': {'messages': {'title': 'Messages', 'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}, 'type': {'title': 'Type', 'default': 'ChatPromptValueConcrete', 'enum': ['ChatPromptValueConcrete'], 'type': 'string'}}, 'required': ['messages']}}}}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}, 'middle': [{'lc': 1, 'type': 'not_implemented', 'id': ['langchain_core', 'language_models', 'fake', 'FakeStreamingListLLM'], 'repr': "FakeStreamingListLLM(responses=['bear, dog, cat', 'tomato, lettuce, onion'], i=1)", 'name': 'FakeStreamingListLLM', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'FakeStreamingListLLMInput', 'anyOf': [{'type': 'string'}, {'$ref': '#/definitions/StringPromptValue'}, {'$ref': '#/definitions/ChatPromptValueConcrete'}, {'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}], 'definitions': {'StringPromptValue': {'title': 'StringPromptValue', 'description': 'String prompt value.', 'type': 'object', 'properties': {'text': {'title': 'Text', 'type': 'string'}, 'type': {'title': 'Type', 'default': 'StringPromptValue', 'enum': ['StringPromptValue'], 'type': 'string'}}, 'required': ['text']}, 'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}, 'ChatPromptValueConcrete': {'title': 'ChatPromptValueConcrete', 'description': 'Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.', 'type': 'object', 'properties': {'messages': {'title': 'Messages', 'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}, 'type': {'title': 'Type', 'default': 'ChatPromptValueConcrete', 'enum': ['ChatPromptValueConcrete'], 'type': 'string'}}, 'required': ['messages']}}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain_core', 'language_models', 'fake', 'FakeStreamingListLLM'], 'name': 'FakeStreamingListLLM'}}, {'id': 2, 'type': 'schema', 'data': {'title': 'FakeStreamingListLLMOutput', 'type': 'string'}}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}], 'last': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'output_parsers', 'list', 'CommaSeparatedListOutputParser'], 'kwargs': {}, 'name': 'CommaSeparatedListOutputParser', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'CommaSeparatedListOutputParserInput', 'anyOf': [{'type': 'string'}, {'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}], 'definitions': {'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'output_parsers', 'list', 'CommaSeparatedListOutputParser'], 'name': 'CommaSeparatedListOutputParser'}}, {'id': 2, 'type': 'schema', 'data': {'title': 'CommaSeparatedListOutputParserOutput', 'type': 'array', 'items': {'type': 'string'}}}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}, 'name': None}, 'name': 'RunnableSequence', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'PromptInput', 'type': 'object', 'properties': {'question': {'title': 'Question', 'type': 'string'}}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'name': 'ChatPromptTemplate'}}, {'id': 2, 'type': 'runnable', 'data': {'id': ['langchain_core', 'language_models', 'fake', 'FakeStreamingListLLM'], 'name': 'FakeStreamingListLLM'}}, {'id': 3, 'type': 'runnable', 'data': {'id': ['langchain', 'output_parsers', 'list', 'CommaSeparatedListOutputParser'], 'name': 'CommaSeparatedListOutputParser'}}, {'id': 4, 'type': 'schema', 'data': {'title': 'CommaSeparatedListOutputParserOutput', 'type': 'array', 'items': {'type': 'string'}}}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}, {'source': 3, 'target': 4}, {'source': 2, 'target': 3}]}}, events=[{'name': 'start', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}, {'name': 'end', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}], inputs={'question': 'What is your name?'}, outputs={'output': ['tomato', 'lettuce', 'onion']}, reference_example_id=None, parent_run_id=None, tags=[], execution_order=None, child_execution_order=None, child_runs=[Run(id=UUID('00000000-0000-4000-8000-000000000001'), name='ChatPromptTemplate', start_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), run_type='prompt', end_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), extra={}, error=None, serialized={'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'kwargs': {'messages': [{'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'SystemMessagePromptTemplate'], 'kwargs': {'prompt': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'kwargs': {'input_variables': [], 'template': 'You are a nice assistant.', 'template_format': 'f-string', 'partial_variables': {}}, 'name': 'PromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'PromptInput', 'type': 'object', 'properties': {}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'name': 'PromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': {'title': 'PromptTemplateOutput', 'anyOf': [{'$ref': '#/definitions/StringPromptValue'}, {'$ref': '#/definitions/ChatPromptValueConcrete'}], 'definitions': {'StringPromptValue': {'title': 'StringPromptValue', 'description': 'String prompt value.', 'type': 'object', 'properties': {'text': {'title': 'Text', 'type': 'string'}, 'type': {'title': 'Type', 'default': 'StringPromptValue', 'enum': ['StringPromptValue'], 'type': 'string'}}, 'required': ['text']}, 'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}, 'ChatPromptValueConcrete': {'title': 'ChatPromptValueConcrete', 'description': 'Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.', 'type': 'object', 'properties': {'messages': {'title': 'Messages', 'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}, 'type': {'title': 'Type', 'default': 'ChatPromptValueConcrete', 'enum': ['ChatPromptValueConcrete'], 'type': 'string'}}, 'required': ['messages']}}}}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}}}, {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'HumanMessagePromptTemplate'], 'kwargs': {'prompt': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'kwargs': {'input_variables': ['question'], 'template': '{question}', 'template_format': 'f-string', 'partial_variables': {}}, 'name': 'PromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'PromptInput', 'type': 'object', 'properties': {'question': {'title': 'Question', 'type': 'string'}}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'name': 'PromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': {'title': 'PromptTemplateOutput', 'anyOf': [{'$ref': '#/definitions/StringPromptValue'}, {'$ref': '#/definitions/ChatPromptValueConcrete'}], 'definitions': {'StringPromptValue': {'title': 'StringPromptValue', 'description': 'String prompt value.', 'type': 'object', 'properties': {'text': {'title': 'Text', 'type': 'string'}, 'type': {'title': 'Type', 'default': 'StringPromptValue', 'enum': ['StringPromptValue'], 'type': 'string'}}, 'required': ['text']}, 'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}, 'ChatPromptValueConcrete': {'title': 'ChatPromptValueConcrete', 'description': 'Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.', 'type': 'object', 'properties': {'messages': {'title': 'Messages', 'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}, 'type': {'title': 'Type', 'default': 'ChatPromptValueConcrete', 'enum': ['ChatPromptValueConcrete'], 'type': 'string'}}, 'required': ['messages']}}}}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}}}], 'input_variables': ['question']}, 'name': 'ChatPromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'PromptInput', 'type': 'object', 'properties': {'question': {'title': 'Question', 'type': 'string'}}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'name': 'ChatPromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': {'title': 'ChatPromptTemplateOutput', 'anyOf': [{'$ref': '#/definitions/StringPromptValue'}, {'$ref': '#/definitions/ChatPromptValueConcrete'}], 'definitions': {'StringPromptValue': {'title': 'StringPromptValue', 'description': 'String prompt value.', 'type': 'object', 'properties': {'text': {'title': 'Text', 'type': 'string'}, 'type': {'title': 'Type', 'default': 'StringPromptValue', 'enum': ['StringPromptValue'], 'type': 'string'}}, 'required': ['text']}, 'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}, 'ChatPromptValueConcrete': {'title': 'ChatPromptValueConcrete', 'description': 'Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.', 'type': 'object', 'properties': {'messages': {'title': 'Messages', 'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}, 'type': {'title': 'Type', 'default': 'ChatPromptValueConcrete', 'enum': ['ChatPromptValueConcrete'], 'type': 'string'}}, 'required': ['messages']}}}}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}, events=[{'name': 'start', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}, {'name': 'end', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}], inputs={'question': 'What is your name?'}, outputs={'output': ChatPromptValue(messages=[SystemMessage(content='You are a nice assistant.'), HumanMessage(content='What is your name?')])}, reference_example_id=None, parent_run_id=UUID('00000000-0000-4000-8000-000000000000'), tags=['seq:step:1'], execution_order=None, child_execution_order=None, child_runs=[], trace_id=UUID('00000000-0000-4000-8000-000000000000'), dotted_order='20230101T000000000000Z00000000-0000-4000-8000-000000000000.20230101T000000000000Z00000000-0000-4000-8000-000000000001'), Run(id=UUID('00000000-0000-4000-8000-000000000002'), name='FakeStreamingListLLM', start_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), run_type='llm', end_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), extra={'invocation_params': {'responses': ['bear, dog, cat', 'tomato, lettuce, onion'], '_type': 'fake-list', 'stop': None}, 'options': {'stop': None}, 'batch_size': 2}, error=None, serialized={'lc': 1, 'type': 'not_implemented', 'id': ['langchain_core', 'language_models', 'fake', 'FakeStreamingListLLM'], 'repr': "FakeStreamingListLLM(responses=['bear, dog, cat', 'tomato, lettuce, onion'], i=1)", 'name': 'FakeStreamingListLLM', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'FakeStreamingListLLMInput', 'anyOf': [{'type': 'string'}, {'$ref': '#/definitions/StringPromptValue'}, {'$ref': '#/definitions/ChatPromptValueConcrete'}, {'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}], 'definitions': {'StringPromptValue': {'title': 'StringPromptValue', 'description': 'String prompt value.', 'type': 'object', 'properties': {'text': {'title': 'Text', 'type': 'string'}, 'type': {'title': 'Type', 'default': 'StringPromptValue', 'enum': ['StringPromptValue'], 'type': 'string'}}, 'required': ['text']}, 'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}, 'ChatPromptValueConcrete': {'title': 'ChatPromptValueConcrete', 'description': 'Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.', 'type': 'object', 'properties': {'messages': {'title': 'Messages', 'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}, 'type': {'title': 'Type', 'default': 'ChatPromptValueConcrete', 'enum': ['ChatPromptValueConcrete'], 'type': 'string'}}, 'required': ['messages']}}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain_core', 'language_models', 'fake', 'FakeStreamingListLLM'], 'name': 'FakeStreamingListLLM'}}, {'id': 2, 'type': 'schema', 'data': {'title': 'FakeStreamingListLLMOutput', 'type': 'string'}}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}, events=[{'name': 'start', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}, {'name': 'end', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}], inputs={'prompts': ['System: You are a nice assistant.\nHuman: What is your name?']}, outputs={'generations': [[{'text': 'tomato, lettuce, onion', 'generation_info': None, 'type': 'Generation'}]], 'llm_output': None, 'run': None}, reference_example_id=None, parent_run_id=UUID('00000000-0000-4000-8000-000000000000'), tags=['seq:step:2'], execution_order=None, child_execution_order=None, child_runs=[], trace_id=UUID('00000000-0000-4000-8000-000000000000'), dotted_order='20230101T000000000000Z00000000-0000-4000-8000-000000000000.20230101T000000000000Z00000000-0000-4000-8000-000000000002'), Run(id=UUID('00000000-0000-4000-8000-000000000003'), name='CommaSeparatedListOutputParser', start_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), run_type='parser', end_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), extra={}, error=None, serialized={'lc': 1, 'type': 'constructor', 'id': ['langchain', 'output_parsers', 'list', 'CommaSeparatedListOutputParser'], 'kwargs': {}, 'name': 'CommaSeparatedListOutputParser', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'CommaSeparatedListOutputParserInput', 'anyOf': [{'type': 'string'}, {'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}], 'definitions': {'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'output_parsers', 'list', 'CommaSeparatedListOutputParser'], 'name': 'CommaSeparatedListOutputParser'}}, {'id': 2, 'type': 'schema', 'data': {'title': 'CommaSeparatedListOutputParserOutput', 'type': 'array', 'items': {'type': 'string'}}}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}, events=[{'name': 'start', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}, {'name': 'end', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}], inputs={'input': 'tomato, lettuce, onion'}, outputs={'output': ['tomato', 'lettuce', 'onion']}, reference_example_id=None, parent_run_id=UUID('00000000-0000-4000-8000-000000000000'), tags=['seq:step:3'], execution_order=None, child_execution_order=None, child_runs=[], trace_id=UUID('00000000-0000-4000-8000-000000000000'), dotted_order='20230101T000000000000Z00000000-0000-4000-8000-000000000000.20230101T000000000000Z00000000-0000-4000-8000-000000000003')], trace_id=UUID('00000000-0000-4000-8000-000000000000'), dotted_order='20230101T000000000000Z00000000-0000-4000-8000-000000000000'), - Run(id=UUID('00000000-0000-4000-8000-000000000004'), name='RunnableSequence', start_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), run_type='chain', end_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), extra={}, error=None, serialized={'lc': 1, 'type': 'constructor', 'id': ['langchain', 'schema', 'runnable', 'RunnableSequence'], 'kwargs': {'first': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'kwargs': {'messages': [{'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'SystemMessagePromptTemplate'], 'kwargs': {'prompt': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'kwargs': {'input_variables': [], 'template': 'You are a nice assistant.', 'template_format': 'f-string', 'partial_variables': {}}, 'name': 'PromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'PromptInput', 'type': 'object', 'properties': {}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'name': 'PromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': {'title': 'PromptTemplateOutput', 'anyOf': [{'$ref': '#/definitions/StringPromptValue'}, {'$ref': '#/definitions/ChatPromptValueConcrete'}], 'definitions': {'StringPromptValue': {'title': 'StringPromptValue', 'description': 'String prompt value.', 'type': 'object', 'properties': {'text': {'title': 'Text', 'type': 'string'}, 'type': {'title': 'Type', 'default': 'StringPromptValue', 'enum': ['StringPromptValue'], 'type': 'string'}}, 'required': ['text']}, 'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}, 'ChatPromptValueConcrete': {'title': 'ChatPromptValueConcrete', 'description': 'Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.', 'type': 'object', 'properties': {'messages': {'title': 'Messages', 'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}, 'type': {'title': 'Type', 'default': 'ChatPromptValueConcrete', 'enum': ['ChatPromptValueConcrete'], 'type': 'string'}}, 'required': ['messages']}}}}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}}}, {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'HumanMessagePromptTemplate'], 'kwargs': {'prompt': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'kwargs': {'input_variables': ['question'], 'template': '{question}', 'template_format': 'f-string', 'partial_variables': {}}, 'name': 'PromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'PromptInput', 'type': 'object', 'properties': {'question': {'title': 'Question', 'type': 'string'}}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'name': 'PromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': {'title': 'PromptTemplateOutput', 'anyOf': [{'$ref': '#/definitions/StringPromptValue'}, {'$ref': '#/definitions/ChatPromptValueConcrete'}], 'definitions': {'StringPromptValue': {'title': 'StringPromptValue', 'description': 'String prompt value.', 'type': 'object', 'properties': {'text': {'title': 'Text', 'type': 'string'}, 'type': {'title': 'Type', 'default': 'StringPromptValue', 'enum': ['StringPromptValue'], 'type': 'string'}}, 'required': ['text']}, 'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}, 'ChatPromptValueConcrete': {'title': 'ChatPromptValueConcrete', 'description': 'Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.', 'type': 'object', 'properties': {'messages': {'title': 'Messages', 'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}, 'type': {'title': 'Type', 'default': 'ChatPromptValueConcrete', 'enum': ['ChatPromptValueConcrete'], 'type': 'string'}}, 'required': ['messages']}}}}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}}}], 'input_variables': ['question']}, 'name': 'ChatPromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'PromptInput', 'type': 'object', 'properties': {'question': {'title': 'Question', 'type': 'string'}}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'name': 'ChatPromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': {'title': 'ChatPromptTemplateOutput', 'anyOf': [{'$ref': '#/definitions/StringPromptValue'}, {'$ref': '#/definitions/ChatPromptValueConcrete'}], 'definitions': {'StringPromptValue': {'title': 'StringPromptValue', 'description': 'String prompt value.', 'type': 'object', 'properties': {'text': {'title': 'Text', 'type': 'string'}, 'type': {'title': 'Type', 'default': 'StringPromptValue', 'enum': ['StringPromptValue'], 'type': 'string'}}, 'required': ['text']}, 'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}, 'ChatPromptValueConcrete': {'title': 'ChatPromptValueConcrete', 'description': 'Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.', 'type': 'object', 'properties': {'messages': {'title': 'Messages', 'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}, 'type': {'title': 'Type', 'default': 'ChatPromptValueConcrete', 'enum': ['ChatPromptValueConcrete'], 'type': 'string'}}, 'required': ['messages']}}}}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}, 'middle': [{'lc': 1, 'type': 'not_implemented', 'id': ['langchain_core', 'language_models', 'fake', 'FakeStreamingListLLM'], 'repr': "FakeStreamingListLLM(responses=['bear, dog, cat', 'tomato, lettuce, onion'], i=1)", 'name': 'FakeStreamingListLLM', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'FakeStreamingListLLMInput', 'anyOf': [{'type': 'string'}, {'$ref': '#/definitions/StringPromptValue'}, {'$ref': '#/definitions/ChatPromptValueConcrete'}, {'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}], 'definitions': {'StringPromptValue': {'title': 'StringPromptValue', 'description': 'String prompt value.', 'type': 'object', 'properties': {'text': {'title': 'Text', 'type': 'string'}, 'type': {'title': 'Type', 'default': 'StringPromptValue', 'enum': ['StringPromptValue'], 'type': 'string'}}, 'required': ['text']}, 'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}, 'ChatPromptValueConcrete': {'title': 'ChatPromptValueConcrete', 'description': 'Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.', 'type': 'object', 'properties': {'messages': {'title': 'Messages', 'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}, 'type': {'title': 'Type', 'default': 'ChatPromptValueConcrete', 'enum': ['ChatPromptValueConcrete'], 'type': 'string'}}, 'required': ['messages']}}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain_core', 'language_models', 'fake', 'FakeStreamingListLLM'], 'name': 'FakeStreamingListLLM'}}, {'id': 2, 'type': 'schema', 'data': {'title': 'FakeStreamingListLLMOutput', 'type': 'string'}}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}], 'last': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'output_parsers', 'list', 'CommaSeparatedListOutputParser'], 'kwargs': {}, 'name': 'CommaSeparatedListOutputParser', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'CommaSeparatedListOutputParserInput', 'anyOf': [{'type': 'string'}, {'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}], 'definitions': {'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'output_parsers', 'list', 'CommaSeparatedListOutputParser'], 'name': 'CommaSeparatedListOutputParser'}}, {'id': 2, 'type': 'schema', 'data': {'title': 'CommaSeparatedListOutputParserOutput', 'type': 'array', 'items': {'type': 'string'}}}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}, 'name': None}, 'name': 'RunnableSequence', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'PromptInput', 'type': 'object', 'properties': {'question': {'title': 'Question', 'type': 'string'}}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'name': 'ChatPromptTemplate'}}, {'id': 2, 'type': 'runnable', 'data': {'id': ['langchain_core', 'language_models', 'fake', 'FakeStreamingListLLM'], 'name': 'FakeStreamingListLLM'}}, {'id': 3, 'type': 'runnable', 'data': {'id': ['langchain', 'output_parsers', 'list', 'CommaSeparatedListOutputParser'], 'name': 'CommaSeparatedListOutputParser'}}, {'id': 4, 'type': 'schema', 'data': {'title': 'CommaSeparatedListOutputParserOutput', 'type': 'array', 'items': {'type': 'string'}}}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}, {'source': 3, 'target': 4}, {'source': 2, 'target': 3}]}}, events=[{'name': 'start', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}, {'name': 'end', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}], inputs={'question': 'What is your favorite color?'}, outputs={'output': ['bear', 'dog', 'cat']}, reference_example_id=None, parent_run_id=None, tags=[], execution_order=None, child_execution_order=None, child_runs=[Run(id=UUID('00000000-0000-4000-8000-000000000005'), name='ChatPromptTemplate', start_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), run_type='prompt', end_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), extra={}, error=None, serialized={'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'kwargs': {'messages': [{'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'SystemMessagePromptTemplate'], 'kwargs': {'prompt': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'kwargs': {'input_variables': [], 'template': 'You are a nice assistant.', 'template_format': 'f-string', 'partial_variables': {}}, 'name': 'PromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'PromptInput', 'type': 'object', 'properties': {}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'name': 'PromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': {'title': 'PromptTemplateOutput', 'anyOf': [{'$ref': '#/definitions/StringPromptValue'}, {'$ref': '#/definitions/ChatPromptValueConcrete'}], 'definitions': {'StringPromptValue': {'title': 'StringPromptValue', 'description': 'String prompt value.', 'type': 'object', 'properties': {'text': {'title': 'Text', 'type': 'string'}, 'type': {'title': 'Type', 'default': 'StringPromptValue', 'enum': ['StringPromptValue'], 'type': 'string'}}, 'required': ['text']}, 'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}, 'ChatPromptValueConcrete': {'title': 'ChatPromptValueConcrete', 'description': 'Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.', 'type': 'object', 'properties': {'messages': {'title': 'Messages', 'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}, 'type': {'title': 'Type', 'default': 'ChatPromptValueConcrete', 'enum': ['ChatPromptValueConcrete'], 'type': 'string'}}, 'required': ['messages']}}}}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}}}, {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'HumanMessagePromptTemplate'], 'kwargs': {'prompt': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'kwargs': {'input_variables': ['question'], 'template': '{question}', 'template_format': 'f-string', 'partial_variables': {}}, 'name': 'PromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'PromptInput', 'type': 'object', 'properties': {'question': {'title': 'Question', 'type': 'string'}}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'name': 'PromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': {'title': 'PromptTemplateOutput', 'anyOf': [{'$ref': '#/definitions/StringPromptValue'}, {'$ref': '#/definitions/ChatPromptValueConcrete'}], 'definitions': {'StringPromptValue': {'title': 'StringPromptValue', 'description': 'String prompt value.', 'type': 'object', 'properties': {'text': {'title': 'Text', 'type': 'string'}, 'type': {'title': 'Type', 'default': 'StringPromptValue', 'enum': ['StringPromptValue'], 'type': 'string'}}, 'required': ['text']}, 'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}, 'ChatPromptValueConcrete': {'title': 'ChatPromptValueConcrete', 'description': 'Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.', 'type': 'object', 'properties': {'messages': {'title': 'Messages', 'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}, 'type': {'title': 'Type', 'default': 'ChatPromptValueConcrete', 'enum': ['ChatPromptValueConcrete'], 'type': 'string'}}, 'required': ['messages']}}}}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}}}], 'input_variables': ['question']}, 'name': 'ChatPromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'PromptInput', 'type': 'object', 'properties': {'question': {'title': 'Question', 'type': 'string'}}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'name': 'ChatPromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': {'title': 'ChatPromptTemplateOutput', 'anyOf': [{'$ref': '#/definitions/StringPromptValue'}, {'$ref': '#/definitions/ChatPromptValueConcrete'}], 'definitions': {'StringPromptValue': {'title': 'StringPromptValue', 'description': 'String prompt value.', 'type': 'object', 'properties': {'text': {'title': 'Text', 'type': 'string'}, 'type': {'title': 'Type', 'default': 'StringPromptValue', 'enum': ['StringPromptValue'], 'type': 'string'}}, 'required': ['text']}, 'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}, 'ChatPromptValueConcrete': {'title': 'ChatPromptValueConcrete', 'description': 'Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.', 'type': 'object', 'properties': {'messages': {'title': 'Messages', 'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}, 'type': {'title': 'Type', 'default': 'ChatPromptValueConcrete', 'enum': ['ChatPromptValueConcrete'], 'type': 'string'}}, 'required': ['messages']}}}}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}, events=[{'name': 'start', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}, {'name': 'end', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}], inputs={'question': 'What is your favorite color?'}, outputs={'output': ChatPromptValue(messages=[SystemMessage(content='You are a nice assistant.'), HumanMessage(content='What is your favorite color?')])}, reference_example_id=None, parent_run_id=UUID('00000000-0000-4000-8000-000000000004'), tags=['seq:step:1'], execution_order=None, child_execution_order=None, child_runs=[], trace_id=UUID('00000000-0000-4000-8000-000000000004'), dotted_order='20230101T000000000000Z00000000-0000-4000-8000-000000000004.20230101T000000000000Z00000000-0000-4000-8000-000000000005'), Run(id=UUID('00000000-0000-4000-8000-000000000006'), name='FakeStreamingListLLM', start_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), run_type='llm', end_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), extra={'invocation_params': {'responses': ['bear, dog, cat', 'tomato, lettuce, onion'], '_type': 'fake-list', 'stop': None}, 'options': {'stop': None}, 'batch_size': 2}, error=None, serialized={'lc': 1, 'type': 'not_implemented', 'id': ['langchain_core', 'language_models', 'fake', 'FakeStreamingListLLM'], 'repr': "FakeStreamingListLLM(responses=['bear, dog, cat', 'tomato, lettuce, onion'], i=1)", 'name': 'FakeStreamingListLLM', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'FakeStreamingListLLMInput', 'anyOf': [{'type': 'string'}, {'$ref': '#/definitions/StringPromptValue'}, {'$ref': '#/definitions/ChatPromptValueConcrete'}, {'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}], 'definitions': {'StringPromptValue': {'title': 'StringPromptValue', 'description': 'String prompt value.', 'type': 'object', 'properties': {'text': {'title': 'Text', 'type': 'string'}, 'type': {'title': 'Type', 'default': 'StringPromptValue', 'enum': ['StringPromptValue'], 'type': 'string'}}, 'required': ['text']}, 'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}, 'ChatPromptValueConcrete': {'title': 'ChatPromptValueConcrete', 'description': 'Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.', 'type': 'object', 'properties': {'messages': {'title': 'Messages', 'type': 'array', 'items': {'anyOf': [{'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}]}}, 'type': {'title': 'Type', 'default': 'ChatPromptValueConcrete', 'enum': ['ChatPromptValueConcrete'], 'type': 'string'}}, 'required': ['messages']}}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain_core', 'language_models', 'fake', 'FakeStreamingListLLM'], 'name': 'FakeStreamingListLLM'}}, {'id': 2, 'type': 'schema', 'data': {'title': 'FakeStreamingListLLMOutput', 'type': 'string'}}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}, events=[{'name': 'start', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}, {'name': 'end', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}], inputs={'prompts': ['System: You are a nice assistant.\nHuman: What is your favorite color?']}, outputs={'generations': [[{'text': 'bear, dog, cat', 'generation_info': None, 'type': 'Generation'}]], 'llm_output': None, 'run': None}, reference_example_id=None, parent_run_id=UUID('00000000-0000-4000-8000-000000000004'), tags=['seq:step:2'], execution_order=None, child_execution_order=None, child_runs=[], trace_id=UUID('00000000-0000-4000-8000-000000000004'), dotted_order='20230101T000000000000Z00000000-0000-4000-8000-000000000004.20230101T000000000000Z00000000-0000-4000-8000-000000000006'), Run(id=UUID('00000000-0000-4000-8000-000000000007'), name='CommaSeparatedListOutputParser', start_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), run_type='parser', end_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), extra={}, error=None, serialized={'lc': 1, 'type': 'constructor', 'id': ['langchain', 'output_parsers', 'list', 'CommaSeparatedListOutputParser'], 'kwargs': {}, 'name': 'CommaSeparatedListOutputParser', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': {'title': 'CommaSeparatedListOutputParserInput', 'anyOf': [{'type': 'string'}, {'$ref': '#/definitions/AIMessage'}, {'$ref': '#/definitions/HumanMessage'}, {'$ref': '#/definitions/ChatMessage'}, {'$ref': '#/definitions/SystemMessage'}, {'$ref': '#/definitions/FunctionMessage'}, {'$ref': '#/definitions/ToolMessage'}], 'definitions': {'AIMessage': {'title': 'AIMessage', 'description': 'Message from an AI.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'ai', 'enum': ['ai'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'HumanMessage': {'title': 'HumanMessage', 'description': 'Message from a human.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'human', 'enum': ['human'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'example': {'title': 'Example', 'default': False, 'type': 'boolean'}}, 'required': ['content']}, 'ChatMessage': {'title': 'ChatMessage', 'description': 'Message that can be assigned an arbitrary speaker (i.e. role).', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'chat', 'enum': ['chat'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'role': {'title': 'Role', 'type': 'string'}}, 'required': ['content', 'role']}, 'SystemMessage': {'title': 'SystemMessage', 'description': 'Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'system', 'enum': ['system'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content']}, 'FunctionMessage': {'title': 'FunctionMessage', 'description': 'Message for passing the result of executing a function back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'function', 'enum': ['function'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}}, 'required': ['content', 'name']}, 'ToolMessage': {'title': 'ToolMessage', 'description': 'Message for passing the result of executing a tool back to a model.', 'type': 'object', 'properties': {'content': {'title': 'Content', 'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'anyOf': [{'type': 'string'}, {'type': 'object'}]}}]}, 'additional_kwargs': {'title': 'Additional Kwargs', 'type': 'object'}, 'response_metadata': {'title': 'Response Metadata', 'type': 'object'}, 'type': {'title': 'Type', 'default': 'tool', 'enum': ['tool'], 'type': 'string'}, 'name': {'title': 'Name', 'type': 'string'}, 'id': {'title': 'Id', 'type': 'string'}, 'tool_call_id': {'title': 'Tool Call Id', 'type': 'string'}}, 'required': ['content', 'tool_call_id']}}}}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'output_parsers', 'list', 'CommaSeparatedListOutputParser'], 'name': 'CommaSeparatedListOutputParser'}}, {'id': 2, 'type': 'schema', 'data': {'title': 'CommaSeparatedListOutputParserOutput', 'type': 'array', 'items': {'type': 'string'}}}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}, events=[{'name': 'start', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}, {'name': 'end', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}], inputs={'input': 'bear, dog, cat'}, outputs={'output': ['bear', 'dog', 'cat']}, reference_example_id=None, parent_run_id=UUID('00000000-0000-4000-8000-000000000004'), tags=['seq:step:3'], execution_order=None, child_execution_order=None, child_runs=[], trace_id=UUID('00000000-0000-4000-8000-000000000004'), dotted_order='20230101T000000000000Z00000000-0000-4000-8000-000000000004.20230101T000000000000Z00000000-0000-4000-8000-000000000007')], trace_id=UUID('00000000-0000-4000-8000-000000000004'), dotted_order='20230101T000000000000Z00000000-0000-4000-8000-000000000004'), + Run(id=UUID('00000000-0000-4000-8000-000000000000'), name='RunnableSequence', start_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), run_type='chain', end_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), extra={}, error=None, serialized={'lc': 1, 'type': 'constructor', 'id': ['langchain', 'schema', 'runnable', 'RunnableSequence'], 'kwargs': {'first': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'kwargs': {'messages': [{'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'SystemMessagePromptTemplate'], 'kwargs': {'prompt': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'kwargs': {'input_variables': [], 'template': 'You are a nice assistant.', 'template_format': 'f-string', 'partial_variables': {}}, 'name': 'PromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'PromptInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'name': 'PromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': 'PromptTemplateOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}}}, {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'HumanMessagePromptTemplate'], 'kwargs': {'prompt': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'kwargs': {'input_variables': ['question'], 'template': '{question}', 'template_format': 'f-string', 'partial_variables': {}}, 'name': 'PromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'PromptInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'name': 'PromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': 'PromptTemplateOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}}}], 'input_variables': ['question']}, 'name': 'ChatPromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'PromptInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'name': 'ChatPromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': 'ChatPromptTemplateOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}, 'middle': [{'lc': 1, 'type': 'not_implemented', 'id': ['langchain_core', 'language_models', 'fake', 'FakeStreamingListLLM'], 'repr': "FakeStreamingListLLM(responses=['bear, dog, cat', 'tomato, lettuce, onion'], i=1)", 'name': 'FakeStreamingListLLM', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'FakeStreamingListLLMInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain_core', 'language_models', 'fake', 'FakeStreamingListLLM'], 'name': 'FakeStreamingListLLM'}}, {'id': 2, 'type': 'schema', 'data': 'FakeStreamingListLLMOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}], 'last': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'output_parsers', 'list', 'CommaSeparatedListOutputParser'], 'kwargs': {}, 'name': 'CommaSeparatedListOutputParser', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'CommaSeparatedListOutputParserInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'output_parsers', 'list', 'CommaSeparatedListOutputParser'], 'name': 'CommaSeparatedListOutputParser'}}, {'id': 2, 'type': 'schema', 'data': 'CommaSeparatedListOutputParserOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}, 'name': None}, 'name': 'RunnableSequence', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'PromptInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'name': 'ChatPromptTemplate'}}, {'id': 2, 'type': 'runnable', 'data': {'id': ['langchain_core', 'language_models', 'fake', 'FakeStreamingListLLM'], 'name': 'FakeStreamingListLLM'}}, {'id': 3, 'type': 'runnable', 'data': {'id': ['langchain', 'output_parsers', 'list', 'CommaSeparatedListOutputParser'], 'name': 'CommaSeparatedListOutputParser'}}, {'id': 4, 'type': 'schema', 'data': 'CommaSeparatedListOutputParserOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}, {'source': 3, 'target': 4}, {'source': 2, 'target': 3}]}}, events=[{'name': 'start', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}, {'name': 'end', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}], inputs={'question': 'What is your name?'}, outputs={'output': ['tomato', 'lettuce', 'onion']}, reference_example_id=None, parent_run_id=None, tags=[], execution_order=None, child_execution_order=None, child_runs=[Run(id=UUID('00000000-0000-4000-8000-000000000001'), name='ChatPromptTemplate', start_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), run_type='prompt', end_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), extra={}, error=None, serialized={'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'kwargs': {'messages': [{'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'SystemMessagePromptTemplate'], 'kwargs': {'prompt': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'kwargs': {'input_variables': [], 'template': 'You are a nice assistant.', 'template_format': 'f-string', 'partial_variables': {}}, 'name': 'PromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'PromptInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'name': 'PromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': 'PromptTemplateOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}}}, {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'HumanMessagePromptTemplate'], 'kwargs': {'prompt': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'kwargs': {'input_variables': ['question'], 'template': '{question}', 'template_format': 'f-string', 'partial_variables': {}}, 'name': 'PromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'PromptInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'name': 'PromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': 'PromptTemplateOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}}}], 'input_variables': ['question']}, 'name': 'ChatPromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'PromptInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'name': 'ChatPromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': 'ChatPromptTemplateOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}, events=[{'name': 'start', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}, {'name': 'end', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}], inputs={'question': 'What is your name?'}, outputs={'output': ChatPromptValue(messages=[SystemMessage(content='You are a nice assistant.'), HumanMessage(content='What is your name?')])}, reference_example_id=None, parent_run_id=UUID('00000000-0000-4000-8000-000000000000'), tags=['seq:step:1'], execution_order=None, child_execution_order=None, child_runs=[], trace_id=UUID('00000000-0000-4000-8000-000000000000'), dotted_order='20230101T000000000000Z00000000-0000-4000-8000-000000000000.20230101T000000000000Z00000000-0000-4000-8000-000000000001'), Run(id=UUID('00000000-0000-4000-8000-000000000002'), name='FakeStreamingListLLM', start_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), run_type='llm', end_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), extra={'invocation_params': {'responses': ['bear, dog, cat', 'tomato, lettuce, onion'], '_type': 'fake-list', 'stop': None}, 'options': {'stop': None}, 'batch_size': 2}, error=None, serialized={'lc': 1, 'type': 'not_implemented', 'id': ['langchain_core', 'language_models', 'fake', 'FakeStreamingListLLM'], 'repr': "FakeStreamingListLLM(responses=['bear, dog, cat', 'tomato, lettuce, onion'], i=1)", 'name': 'FakeStreamingListLLM', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'FakeStreamingListLLMInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain_core', 'language_models', 'fake', 'FakeStreamingListLLM'], 'name': 'FakeStreamingListLLM'}}, {'id': 2, 'type': 'schema', 'data': 'FakeStreamingListLLMOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}, events=[{'name': 'start', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}, {'name': 'end', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}], inputs={'prompts': ['System: You are a nice assistant.\nHuman: What is your name?']}, outputs={'generations': [[{'text': 'tomato, lettuce, onion', 'generation_info': None, 'type': 'Generation'}]], 'llm_output': None, 'run': None}, reference_example_id=None, parent_run_id=UUID('00000000-0000-4000-8000-000000000000'), tags=['seq:step:2'], execution_order=None, child_execution_order=None, child_runs=[], trace_id=UUID('00000000-0000-4000-8000-000000000000'), dotted_order='20230101T000000000000Z00000000-0000-4000-8000-000000000000.20230101T000000000000Z00000000-0000-4000-8000-000000000002'), Run(id=UUID('00000000-0000-4000-8000-000000000003'), name='CommaSeparatedListOutputParser', start_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), run_type='parser', end_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), extra={}, error=None, serialized={'lc': 1, 'type': 'constructor', 'id': ['langchain', 'output_parsers', 'list', 'CommaSeparatedListOutputParser'], 'kwargs': {}, 'name': 'CommaSeparatedListOutputParser', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'CommaSeparatedListOutputParserInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'output_parsers', 'list', 'CommaSeparatedListOutputParser'], 'name': 'CommaSeparatedListOutputParser'}}, {'id': 2, 'type': 'schema', 'data': 'CommaSeparatedListOutputParserOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}, events=[{'name': 'start', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}, {'name': 'end', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}], inputs={'input': 'tomato, lettuce, onion'}, outputs={'output': ['tomato', 'lettuce', 'onion']}, reference_example_id=None, parent_run_id=UUID('00000000-0000-4000-8000-000000000000'), tags=['seq:step:3'], execution_order=None, child_execution_order=None, child_runs=[], trace_id=UUID('00000000-0000-4000-8000-000000000000'), dotted_order='20230101T000000000000Z00000000-0000-4000-8000-000000000000.20230101T000000000000Z00000000-0000-4000-8000-000000000003')], trace_id=UUID('00000000-0000-4000-8000-000000000000'), dotted_order='20230101T000000000000Z00000000-0000-4000-8000-000000000000'), + Run(id=UUID('00000000-0000-4000-8000-000000000004'), name='RunnableSequence', start_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), run_type='chain', end_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), extra={}, error=None, serialized={'lc': 1, 'type': 'constructor', 'id': ['langchain', 'schema', 'runnable', 'RunnableSequence'], 'kwargs': {'first': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'kwargs': {'messages': [{'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'SystemMessagePromptTemplate'], 'kwargs': {'prompt': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'kwargs': {'input_variables': [], 'template': 'You are a nice assistant.', 'template_format': 'f-string', 'partial_variables': {}}, 'name': 'PromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'PromptInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'name': 'PromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': 'PromptTemplateOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}}}, {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'HumanMessagePromptTemplate'], 'kwargs': {'prompt': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'kwargs': {'input_variables': ['question'], 'template': '{question}', 'template_format': 'f-string', 'partial_variables': {}}, 'name': 'PromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'PromptInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'name': 'PromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': 'PromptTemplateOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}}}], 'input_variables': ['question']}, 'name': 'ChatPromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'PromptInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'name': 'ChatPromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': 'ChatPromptTemplateOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}, 'middle': [{'lc': 1, 'type': 'not_implemented', 'id': ['langchain_core', 'language_models', 'fake', 'FakeStreamingListLLM'], 'repr': "FakeStreamingListLLM(responses=['bear, dog, cat', 'tomato, lettuce, onion'], i=1)", 'name': 'FakeStreamingListLLM', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'FakeStreamingListLLMInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain_core', 'language_models', 'fake', 'FakeStreamingListLLM'], 'name': 'FakeStreamingListLLM'}}, {'id': 2, 'type': 'schema', 'data': 'FakeStreamingListLLMOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}], 'last': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'output_parsers', 'list', 'CommaSeparatedListOutputParser'], 'kwargs': {}, 'name': 'CommaSeparatedListOutputParser', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'CommaSeparatedListOutputParserInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'output_parsers', 'list', 'CommaSeparatedListOutputParser'], 'name': 'CommaSeparatedListOutputParser'}}, {'id': 2, 'type': 'schema', 'data': 'CommaSeparatedListOutputParserOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}, 'name': None}, 'name': 'RunnableSequence', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'PromptInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'name': 'ChatPromptTemplate'}}, {'id': 2, 'type': 'runnable', 'data': {'id': ['langchain_core', 'language_models', 'fake', 'FakeStreamingListLLM'], 'name': 'FakeStreamingListLLM'}}, {'id': 3, 'type': 'runnable', 'data': {'id': ['langchain', 'output_parsers', 'list', 'CommaSeparatedListOutputParser'], 'name': 'CommaSeparatedListOutputParser'}}, {'id': 4, 'type': 'schema', 'data': 'CommaSeparatedListOutputParserOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}, {'source': 3, 'target': 4}, {'source': 2, 'target': 3}]}}, events=[{'name': 'start', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}, {'name': 'end', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}], inputs={'question': 'What is your favorite color?'}, outputs={'output': ['bear', 'dog', 'cat']}, reference_example_id=None, parent_run_id=None, tags=[], execution_order=None, child_execution_order=None, child_runs=[Run(id=UUID('00000000-0000-4000-8000-000000000005'), name='ChatPromptTemplate', start_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), run_type='prompt', end_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), extra={}, error=None, serialized={'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'kwargs': {'messages': [{'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'SystemMessagePromptTemplate'], 'kwargs': {'prompt': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'kwargs': {'input_variables': [], 'template': 'You are a nice assistant.', 'template_format': 'f-string', 'partial_variables': {}}, 'name': 'PromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'PromptInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'name': 'PromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': 'PromptTemplateOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}}}, {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'chat', 'HumanMessagePromptTemplate'], 'kwargs': {'prompt': {'lc': 1, 'type': 'constructor', 'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'kwargs': {'input_variables': ['question'], 'template': '{question}', 'template_format': 'f-string', 'partial_variables': {}}, 'name': 'PromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'PromptInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'prompt', 'PromptTemplate'], 'name': 'PromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': 'PromptTemplateOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}}}], 'input_variables': ['question']}, 'name': 'ChatPromptTemplate', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'PromptInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'prompts', 'chat', 'ChatPromptTemplate'], 'name': 'ChatPromptTemplate'}}, {'id': 2, 'type': 'schema', 'data': 'ChatPromptTemplateOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}, events=[{'name': 'start', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}, {'name': 'end', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}], inputs={'question': 'What is your favorite color?'}, outputs={'output': ChatPromptValue(messages=[SystemMessage(content='You are a nice assistant.'), HumanMessage(content='What is your favorite color?')])}, reference_example_id=None, parent_run_id=UUID('00000000-0000-4000-8000-000000000004'), tags=['seq:step:1'], execution_order=None, child_execution_order=None, child_runs=[], trace_id=UUID('00000000-0000-4000-8000-000000000004'), dotted_order='20230101T000000000000Z00000000-0000-4000-8000-000000000004.20230101T000000000000Z00000000-0000-4000-8000-000000000005'), Run(id=UUID('00000000-0000-4000-8000-000000000006'), name='FakeStreamingListLLM', start_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), run_type='llm', end_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), extra={'invocation_params': {'responses': ['bear, dog, cat', 'tomato, lettuce, onion'], '_type': 'fake-list', 'stop': None}, 'options': {'stop': None}, 'batch_size': 2}, error=None, serialized={'lc': 1, 'type': 'not_implemented', 'id': ['langchain_core', 'language_models', 'fake', 'FakeStreamingListLLM'], 'repr': "FakeStreamingListLLM(responses=['bear, dog, cat', 'tomato, lettuce, onion'], i=1)", 'name': 'FakeStreamingListLLM', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'FakeStreamingListLLMInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain_core', 'language_models', 'fake', 'FakeStreamingListLLM'], 'name': 'FakeStreamingListLLM'}}, {'id': 2, 'type': 'schema', 'data': 'FakeStreamingListLLMOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}, events=[{'name': 'start', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}, {'name': 'end', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}], inputs={'prompts': ['System: You are a nice assistant.\nHuman: What is your favorite color?']}, outputs={'generations': [[{'text': 'bear, dog, cat', 'generation_info': None, 'type': 'Generation'}]], 'llm_output': None, 'run': None}, reference_example_id=None, parent_run_id=UUID('00000000-0000-4000-8000-000000000004'), tags=['seq:step:2'], execution_order=None, child_execution_order=None, child_runs=[], trace_id=UUID('00000000-0000-4000-8000-000000000004'), dotted_order='20230101T000000000000Z00000000-0000-4000-8000-000000000004.20230101T000000000000Z00000000-0000-4000-8000-000000000006'), Run(id=UUID('00000000-0000-4000-8000-000000000007'), name='CommaSeparatedListOutputParser', start_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), run_type='parser', end_time=FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), extra={}, error=None, serialized={'lc': 1, 'type': 'constructor', 'id': ['langchain', 'output_parsers', 'list', 'CommaSeparatedListOutputParser'], 'kwargs': {}, 'name': 'CommaSeparatedListOutputParser', 'graph': {'nodes': [{'id': 0, 'type': 'schema', 'data': 'CommaSeparatedListOutputParserInput'}, {'id': 1, 'type': 'runnable', 'data': {'id': ['langchain', 'output_parsers', 'list', 'CommaSeparatedListOutputParser'], 'name': 'CommaSeparatedListOutputParser'}}, {'id': 2, 'type': 'schema', 'data': 'CommaSeparatedListOutputParserOutput'}], 'edges': [{'source': 0, 'target': 1}, {'source': 1, 'target': 2}]}}, events=[{'name': 'start', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}, {'name': 'end', 'time': FakeDatetime(2023, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)}], inputs={'input': 'bear, dog, cat'}, outputs={'output': ['bear', 'dog', 'cat']}, reference_example_id=None, parent_run_id=UUID('00000000-0000-4000-8000-000000000004'), tags=['seq:step:3'], execution_order=None, child_execution_order=None, child_runs=[], trace_id=UUID('00000000-0000-4000-8000-000000000004'), dotted_order='20230101T000000000000Z00000000-0000-4000-8000-000000000004.20230101T000000000000Z00000000-0000-4000-8000-000000000007')], trace_id=UUID('00000000-0000-4000-8000-000000000004'), dotted_order='20230101T000000000000Z00000000-0000-4000-8000-000000000004'), ]) # --- # name: test_router_runnable @@ -31110,24 +4501,12 @@ { "id": 0, "type": "schema", - "data": { - "title": "RunnableParallelInput", - "type": "object", - "properties": {} - } + "data": "ParallelInput" }, { "id": 1, "type": "schema", - "data": { - "title": "RunnableParallelOutput", - "type": "object", - "properties": { - "question": { - "title": "Question" - } - } - } + "data": "ParallelOutput" }, { "id": 2, @@ -31163,28 +4542,12 @@ { "id": 0, "type": "schema", - "data": { - "title": "RunnableParallelInput", - "type": "object", - "properties": {} - } + "data": "ParallelInput" }, { "id": 1, "type": "schema", - "data": { - "title": "RunnableParallelOutput", - "type": "object", - "properties": { - "key": { - "title": "Key" - }, - "input": { - "title": "Input", - "type": "object" - } - } - } + "data": "ParallelOutput" }, { "id": 2, @@ -31302,16 +4665,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "PromptInput", - "type": "object", - "properties": { - "question": { - "title": "Question", - "type": "string" - } - } - } + "data": "PromptInput" }, { "id": 1, @@ -31329,436 +4683,7 @@ { "id": 2, "type": "schema", - "data": { - "title": "PromptTemplateOutput", - "anyOf": [ - { - "$ref": "#/definitions/StringPromptValue" - }, - { - "$ref": "#/definitions/ChatPromptValueConcrete" - } - ], - "definitions": { - "StringPromptValue": { - "title": "StringPromptValue", - "description": "String prompt value.", - "type": "object", - "properties": { - "text": { - "title": "Text", - "type": "string" - }, - "type": { - "title": "Type", - "default": "StringPromptValue", - "enum": [ - "StringPromptValue" - ], - "type": "string" - } - }, - "required": [ - "text" - ] - }, - "AIMessage": { - "title": "AIMessage", - "description": "Message from an AI.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "ai", - "enum": [ - "ai" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "HumanMessage": { - "title": "HumanMessage", - "description": "Message from a human.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "human", - "enum": [ - "human" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "ChatMessage": { - "title": "ChatMessage", - "description": "Message that can be assigned an arbitrary speaker (i.e. role).", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "chat", - "enum": [ - "chat" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "role": { - "title": "Role", - "type": "string" - } - }, - "required": [ - "content", - "role" - ] - }, - "SystemMessage": { - "title": "SystemMessage", - "description": "Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "system", - "enum": [ - "system" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content" - ] - }, - "FunctionMessage": { - "title": "FunctionMessage", - "description": "Message for passing the result of executing a function back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "function", - "enum": [ - "function" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content", - "name" - ] - }, - "ToolMessage": { - "title": "ToolMessage", - "description": "Message for passing the result of executing a tool back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "tool", - "enum": [ - "tool" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "tool_call_id": { - "title": "Tool Call Id", - "type": "string" - } - }, - "required": [ - "content", - "tool_call_id" - ] - }, - "ChatPromptValueConcrete": { - "title": "ChatPromptValueConcrete", - "description": "Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.", - "type": "object", - "properties": { - "messages": { - "title": "Messages", - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - }, - "type": { - "title": "Type", - "default": "ChatPromptValueConcrete", - "enum": [ - "ChatPromptValueConcrete" - ], - "type": "string" - } - }, - "required": [ - "messages" - ] - } - } - } + "data": "PromptTemplateOutput" } ], "edges": [ @@ -31784,16 +4709,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "PromptInput", - "type": "object", - "properties": { - "question": { - "title": "Question", - "type": "string" - } - } - } + "data": "PromptInput" }, { "id": 1, @@ -31811,436 +4727,7 @@ { "id": 2, "type": "schema", - "data": { - "title": "ChatPromptTemplateOutput", - "anyOf": [ - { - "$ref": "#/definitions/StringPromptValue" - }, - { - "$ref": "#/definitions/ChatPromptValueConcrete" - } - ], - "definitions": { - "StringPromptValue": { - "title": "StringPromptValue", - "description": "String prompt value.", - "type": "object", - "properties": { - "text": { - "title": "Text", - "type": "string" - }, - "type": { - "title": "Type", - "default": "StringPromptValue", - "enum": [ - "StringPromptValue" - ], - "type": "string" - } - }, - "required": [ - "text" - ] - }, - "AIMessage": { - "title": "AIMessage", - "description": "Message from an AI.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "ai", - "enum": [ - "ai" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "HumanMessage": { - "title": "HumanMessage", - "description": "Message from a human.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "human", - "enum": [ - "human" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "ChatMessage": { - "title": "ChatMessage", - "description": "Message that can be assigned an arbitrary speaker (i.e. role).", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "chat", - "enum": [ - "chat" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "role": { - "title": "Role", - "type": "string" - } - }, - "required": [ - "content", - "role" - ] - }, - "SystemMessage": { - "title": "SystemMessage", - "description": "Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "system", - "enum": [ - "system" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content" - ] - }, - "FunctionMessage": { - "title": "FunctionMessage", - "description": "Message for passing the result of executing a function back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "function", - "enum": [ - "function" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content", - "name" - ] - }, - "ToolMessage": { - "title": "ToolMessage", - "description": "Message for passing the result of executing a tool back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "tool", - "enum": [ - "tool" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "tool_call_id": { - "title": "Tool Call Id", - "type": "string" - } - }, - "required": [ - "content", - "tool_call_id" - ] - }, - "ChatPromptValueConcrete": { - "title": "ChatPromptValueConcrete", - "description": "Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.", - "type": "object", - "properties": { - "messages": { - "title": "Messages", - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - }, - "type": { - "title": "Type", - "default": "ChatPromptValueConcrete", - "enum": [ - "ChatPromptValueConcrete" - ], - "type": "string" - } - }, - "required": [ - "messages" - ] - } - } - } + "data": "ChatPromptTemplateOutput" } ], "edges": [ @@ -32272,464 +4759,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "FakeListLLMInput", - "anyOf": [ - { - "type": "string" - }, - { - "$ref": "#/definitions/StringPromptValue" - }, - { - "$ref": "#/definitions/ChatPromptValueConcrete" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - } - ], - "definitions": { - "StringPromptValue": { - "title": "StringPromptValue", - "description": "String prompt value.", - "type": "object", - "properties": { - "text": { - "title": "Text", - "type": "string" - }, - "type": { - "title": "Type", - "default": "StringPromptValue", - "enum": [ - "StringPromptValue" - ], - "type": "string" - } - }, - "required": [ - "text" - ] - }, - "AIMessage": { - "title": "AIMessage", - "description": "Message from an AI.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "ai", - "enum": [ - "ai" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "HumanMessage": { - "title": "HumanMessage", - "description": "Message from a human.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "human", - "enum": [ - "human" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "ChatMessage": { - "title": "ChatMessage", - "description": "Message that can be assigned an arbitrary speaker (i.e. role).", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "chat", - "enum": [ - "chat" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "role": { - "title": "Role", - "type": "string" - } - }, - "required": [ - "content", - "role" - ] - }, - "SystemMessage": { - "title": "SystemMessage", - "description": "Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "system", - "enum": [ - "system" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content" - ] - }, - "FunctionMessage": { - "title": "FunctionMessage", - "description": "Message for passing the result of executing a function back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "function", - "enum": [ - "function" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content", - "name" - ] - }, - "ToolMessage": { - "title": "ToolMessage", - "description": "Message for passing the result of executing a tool back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "tool", - "enum": [ - "tool" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "tool_call_id": { - "title": "Tool Call Id", - "type": "string" - } - }, - "required": [ - "content", - "tool_call_id" - ] - }, - "ChatPromptValueConcrete": { - "title": "ChatPromptValueConcrete", - "description": "Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.", - "type": "object", - "properties": { - "messages": { - "title": "Messages", - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - }, - "type": { - "title": "Type", - "default": "ChatPromptValueConcrete", - "enum": [ - "ChatPromptValueConcrete" - ], - "type": "string" - } - }, - "required": [ - "messages" - ] - } - } - } + "data": "FakeListLLMInput" }, { "id": 1, @@ -32747,10 +4777,7 @@ { "id": 2, "type": "schema", - "data": { - "title": "FakeListLLMOutput", - "type": "string" - } + "data": "FakeListLLMOutput" } ], "edges": [ @@ -32773,16 +4800,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "PromptInput", - "type": "object", - "properties": { - "question": { - "title": "Question", - "type": "string" - } - } - } + "data": "PromptInput" }, { "id": 1, @@ -32813,10 +4831,7 @@ { "id": 3, "type": "schema", - "data": { - "title": "FakeListLLMOutput", - "type": "string" - } + "data": "FakeListLLMOutput" } ], "edges": [ @@ -32892,16 +4907,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "PromptInput", - "type": "object", - "properties": { - "question": { - "title": "Question", - "type": "string" - } - } - } + "data": "PromptInput" }, { "id": 1, @@ -32919,436 +4925,7 @@ { "id": 2, "type": "schema", - "data": { - "title": "PromptTemplateOutput", - "anyOf": [ - { - "$ref": "#/definitions/StringPromptValue" - }, - { - "$ref": "#/definitions/ChatPromptValueConcrete" - } - ], - "definitions": { - "StringPromptValue": { - "title": "StringPromptValue", - "description": "String prompt value.", - "type": "object", - "properties": { - "text": { - "title": "Text", - "type": "string" - }, - "type": { - "title": "Type", - "default": "StringPromptValue", - "enum": [ - "StringPromptValue" - ], - "type": "string" - } - }, - "required": [ - "text" - ] - }, - "AIMessage": { - "title": "AIMessage", - "description": "Message from an AI.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "ai", - "enum": [ - "ai" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "HumanMessage": { - "title": "HumanMessage", - "description": "Message from a human.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "human", - "enum": [ - "human" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "ChatMessage": { - "title": "ChatMessage", - "description": "Message that can be assigned an arbitrary speaker (i.e. role).", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "chat", - "enum": [ - "chat" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "role": { - "title": "Role", - "type": "string" - } - }, - "required": [ - "content", - "role" - ] - }, - "SystemMessage": { - "title": "SystemMessage", - "description": "Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "system", - "enum": [ - "system" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content" - ] - }, - "FunctionMessage": { - "title": "FunctionMessage", - "description": "Message for passing the result of executing a function back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "function", - "enum": [ - "function" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content", - "name" - ] - }, - "ToolMessage": { - "title": "ToolMessage", - "description": "Message for passing the result of executing a tool back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "tool", - "enum": [ - "tool" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "tool_call_id": { - "title": "Tool Call Id", - "type": "string" - } - }, - "required": [ - "content", - "tool_call_id" - ] - }, - "ChatPromptValueConcrete": { - "title": "ChatPromptValueConcrete", - "description": "Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.", - "type": "object", - "properties": { - "messages": { - "title": "Messages", - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - }, - "type": { - "title": "Type", - "default": "ChatPromptValueConcrete", - "enum": [ - "ChatPromptValueConcrete" - ], - "type": "string" - } - }, - "required": [ - "messages" - ] - } - } - } + "data": "PromptTemplateOutput" } ], "edges": [ @@ -33374,16 +4951,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "PromptInput", - "type": "object", - "properties": { - "question": { - "title": "Question", - "type": "string" - } - } - } + "data": "PromptInput" }, { "id": 1, @@ -33401,436 +4969,7 @@ { "id": 2, "type": "schema", - "data": { - "title": "ChatPromptTemplateOutput", - "anyOf": [ - { - "$ref": "#/definitions/StringPromptValue" - }, - { - "$ref": "#/definitions/ChatPromptValueConcrete" - } - ], - "definitions": { - "StringPromptValue": { - "title": "StringPromptValue", - "description": "String prompt value.", - "type": "object", - "properties": { - "text": { - "title": "Text", - "type": "string" - }, - "type": { - "title": "Type", - "default": "StringPromptValue", - "enum": [ - "StringPromptValue" - ], - "type": "string" - } - }, - "required": [ - "text" - ] - }, - "AIMessage": { - "title": "AIMessage", - "description": "Message from an AI.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "ai", - "enum": [ - "ai" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "HumanMessage": { - "title": "HumanMessage", - "description": "Message from a human.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "human", - "enum": [ - "human" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "ChatMessage": { - "title": "ChatMessage", - "description": "Message that can be assigned an arbitrary speaker (i.e. role).", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "chat", - "enum": [ - "chat" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "role": { - "title": "Role", - "type": "string" - } - }, - "required": [ - "content", - "role" - ] - }, - "SystemMessage": { - "title": "SystemMessage", - "description": "Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "system", - "enum": [ - "system" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content" - ] - }, - "FunctionMessage": { - "title": "FunctionMessage", - "description": "Message for passing the result of executing a function back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "function", - "enum": [ - "function" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content", - "name" - ] - }, - "ToolMessage": { - "title": "ToolMessage", - "description": "Message for passing the result of executing a tool back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "tool", - "enum": [ - "tool" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "tool_call_id": { - "title": "Tool Call Id", - "type": "string" - } - }, - "required": [ - "content", - "tool_call_id" - ] - }, - "ChatPromptValueConcrete": { - "title": "ChatPromptValueConcrete", - "description": "Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.", - "type": "object", - "properties": { - "messages": { - "title": "Messages", - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - }, - "type": { - "title": "Type", - "default": "ChatPromptValueConcrete", - "enum": [ - "ChatPromptValueConcrete" - ], - "type": "string" - } - }, - "required": [ - "messages" - ] - } - } - } + "data": "ChatPromptTemplateOutput" } ], "edges": [ @@ -33862,464 +5001,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "FakeListLLMInput", - "anyOf": [ - { - "type": "string" - }, - { - "$ref": "#/definitions/StringPromptValue" - }, - { - "$ref": "#/definitions/ChatPromptValueConcrete" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - } - ], - "definitions": { - "StringPromptValue": { - "title": "StringPromptValue", - "description": "String prompt value.", - "type": "object", - "properties": { - "text": { - "title": "Text", - "type": "string" - }, - "type": { - "title": "Type", - "default": "StringPromptValue", - "enum": [ - "StringPromptValue" - ], - "type": "string" - } - }, - "required": [ - "text" - ] - }, - "AIMessage": { - "title": "AIMessage", - "description": "Message from an AI.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "ai", - "enum": [ - "ai" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "HumanMessage": { - "title": "HumanMessage", - "description": "Message from a human.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "human", - "enum": [ - "human" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "ChatMessage": { - "title": "ChatMessage", - "description": "Message that can be assigned an arbitrary speaker (i.e. role).", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "chat", - "enum": [ - "chat" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "role": { - "title": "Role", - "type": "string" - } - }, - "required": [ - "content", - "role" - ] - }, - "SystemMessage": { - "title": "SystemMessage", - "description": "Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "system", - "enum": [ - "system" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content" - ] - }, - "FunctionMessage": { - "title": "FunctionMessage", - "description": "Message for passing the result of executing a function back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "function", - "enum": [ - "function" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content", - "name" - ] - }, - "ToolMessage": { - "title": "ToolMessage", - "description": "Message for passing the result of executing a tool back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "tool", - "enum": [ - "tool" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "tool_call_id": { - "title": "Tool Call Id", - "type": "string" - } - }, - "required": [ - "content", - "tool_call_id" - ] - }, - "ChatPromptValueConcrete": { - "title": "ChatPromptValueConcrete", - "description": "Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.", - "type": "object", - "properties": { - "messages": { - "title": "Messages", - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - }, - "type": { - "title": "Type", - "default": "ChatPromptValueConcrete", - "enum": [ - "ChatPromptValueConcrete" - ], - "type": "string" - } - }, - "required": [ - "messages" - ] - } - } - } + "data": "FakeListLLMInput" }, { "id": 1, @@ -34337,10 +5019,7 @@ { "id": 2, "type": "schema", - "data": { - "title": "FakeListLLMOutput", - "type": "string" - } + "data": "FakeListLLMOutput" } ], "edges": [ @@ -34363,16 +5042,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "PromptInput", - "type": "object", - "properties": { - "question": { - "title": "Question", - "type": "string" - } - } - } + "data": "PromptInput" }, { "id": 1, @@ -34403,10 +5073,7 @@ { "id": 3, "type": "schema", - "data": { - "title": "FakeListLLMOutput", - "type": "string" - } + "data": "FakeListLLMOutput" } ], "edges": [ @@ -34433,29 +5100,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "RouterRunnableInput", - "$ref": "#/definitions/RouterInput", - "definitions": { - "RouterInput": { - "title": "RouterInput", - "type": "object", - "properties": { - "key": { - "title": "Key", - "type": "string" - }, - "input": { - "title": "Input" - } - }, - "required": [ - "key", - "input" - ] - } - } - } + "data": "RouterRunnableInput" }, { "id": 1, @@ -34473,9 +5118,7 @@ { "id": 2, "type": "schema", - "data": { - "title": "RouterRunnableOutput" - } + "data": "RouterRunnableOutput" } ], "edges": [ @@ -34498,28 +5141,12 @@ { "id": 0, "type": "schema", - "data": { - "title": "RunnableParallelInput", - "type": "object", - "properties": {} - } + "data": "ParallelInput" }, { "id": 1, "type": "schema", - "data": { - "title": "RunnableParallelOutput", - "type": "object", - "properties": { - "key": { - "title": "Key" - }, - "input": { - "title": "Input", - "type": "object" - } - } - } + "data": "ParallelOutput" }, { "id": 2, @@ -34563,9 +5190,7 @@ { "id": 5, "type": "schema", - "data": { - "title": "RouterRunnableOutput" - } + "data": "RouterRunnableOutput" } ], "edges": [ @@ -37683,9 +8308,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "RunnablePassthroughInput" - } + "data": "PassthroughInput" }, { "id": 1, @@ -37703,9 +8326,7 @@ { "id": 2, "type": "schema", - "data": { - "title": "RunnablePassthroughOutput" - } + "data": "PassthroughOutput" } ], "edges": [ @@ -37740,9 +8361,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "RunnablePassthroughInput" - } + "data": "PassthroughInput" }, { "id": 1, @@ -37773,9 +8392,7 @@ { "id": 3, "type": "schema", - "data": { - "title": "RunnableLambdaOutput" - } + "data": "LambdaOutput" } ], "edges": [ @@ -37833,10 +8450,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "FakeRetrieverInput", - "type": "string" - } + "data": "FakeRetrieverInput" }, { "id": 1, @@ -37855,41 +8469,7 @@ { "id": 2, "type": "schema", - "data": { - "title": "FakeRetrieverOutput", - "type": "array", - "items": { - "$ref": "#/definitions/Document" - }, - "definitions": { - "Document": { - "title": "Document", - "description": "Class for storing a piece of text and associated metadata.", - "type": "object", - "properties": { - "page_content": { - "title": "Page Content", - "type": "string" - }, - "metadata": { - "title": "Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "Document", - "enum": [ - "Document" - ], - "type": "string" - } - }, - "required": [ - "page_content" - ] - } - } - } + "data": "FakeRetrieverOutput" } ], "edges": [ @@ -37912,9 +8492,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "RunnableLambdaInput" - } + "data": "LambdaInput" }, { "id": 1, @@ -37946,41 +8524,7 @@ { "id": 3, "type": "schema", - "data": { - "title": "FakeRetrieverOutput", - "type": "array", - "items": { - "$ref": "#/definitions/Document" - }, - "definitions": { - "Document": { - "title": "Document", - "description": "Class for storing a piece of text and associated metadata.", - "type": "object", - "properties": { - "page_content": { - "title": "Page Content", - "type": "string" - }, - "metadata": { - "title": "Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "Document", - "enum": [ - "Document" - ], - "type": "string" - } - }, - "required": [ - "page_content" - ] - } - } - } + "data": "FakeRetrieverOutput" } ], "edges": [ @@ -38018,62 +8562,12 @@ { "id": 0, "type": "schema", - "data": { - "title": "RunnableParallelInput", - "type": "object", - "properties": {} - } + "data": "ParallelInput" }, { "id": 1, "type": "schema", - "data": { - "title": "RunnableParallelOutput", - "type": "object", - "properties": { - "question": { - "title": "Question" - }, - "documents": { - "title": "Documents", - "type": "array", - "items": { - "$ref": "#/definitions/Document" - } - }, - "just_to_test_lambda": { - "title": "Just To Test Lambda" - } - }, - "definitions": { - "Document": { - "title": "Document", - "description": "Class for storing a piece of text and associated metadata.", - "type": "object", - "properties": { - "page_content": { - "title": "Page Content", - "type": "string" - }, - "metadata": { - "title": "Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "Document", - "enum": [ - "Document" - ], - "type": "string" - } - }, - "required": [ - "page_content" - ] - } - } - } + "data": "ParallelOutput" }, { "id": 2, @@ -38221,11 +8715,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "PromptInput", - "type": "object", - "properties": {} - } + "data": "PromptInput" }, { "id": 1, @@ -38243,436 +8733,7 @@ { "id": 2, "type": "schema", - "data": { - "title": "PromptTemplateOutput", - "anyOf": [ - { - "$ref": "#/definitions/StringPromptValue" - }, - { - "$ref": "#/definitions/ChatPromptValueConcrete" - } - ], - "definitions": { - "StringPromptValue": { - "title": "StringPromptValue", - "description": "String prompt value.", - "type": "object", - "properties": { - "text": { - "title": "Text", - "type": "string" - }, - "type": { - "title": "Type", - "default": "StringPromptValue", - "enum": [ - "StringPromptValue" - ], - "type": "string" - } - }, - "required": [ - "text" - ] - }, - "AIMessage": { - "title": "AIMessage", - "description": "Message from an AI.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "ai", - "enum": [ - "ai" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "HumanMessage": { - "title": "HumanMessage", - "description": "Message from a human.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "human", - "enum": [ - "human" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "ChatMessage": { - "title": "ChatMessage", - "description": "Message that can be assigned an arbitrary speaker (i.e. role).", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "chat", - "enum": [ - "chat" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "role": { - "title": "Role", - "type": "string" - } - }, - "required": [ - "content", - "role" - ] - }, - "SystemMessage": { - "title": "SystemMessage", - "description": "Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "system", - "enum": [ - "system" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content" - ] - }, - "FunctionMessage": { - "title": "FunctionMessage", - "description": "Message for passing the result of executing a function back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "function", - "enum": [ - "function" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content", - "name" - ] - }, - "ToolMessage": { - "title": "ToolMessage", - "description": "Message for passing the result of executing a tool back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "tool", - "enum": [ - "tool" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "tool_call_id": { - "title": "Tool Call Id", - "type": "string" - } - }, - "required": [ - "content", - "tool_call_id" - ] - }, - "ChatPromptValueConcrete": { - "title": "ChatPromptValueConcrete", - "description": "Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.", - "type": "object", - "properties": { - "messages": { - "title": "Messages", - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - }, - "type": { - "title": "Type", - "default": "ChatPromptValueConcrete", - "enum": [ - "ChatPromptValueConcrete" - ], - "type": "string" - } - }, - "required": [ - "messages" - ] - } - } - } + "data": "PromptTemplateOutput" } ], "edges": [ @@ -38723,20 +8784,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "PromptInput", - "type": "object", - "properties": { - "documents": { - "title": "Documents", - "type": "string" - }, - "question": { - "title": "Question", - "type": "string" - } - } - } + "data": "PromptInput" }, { "id": 1, @@ -38754,436 +8802,7 @@ { "id": 2, "type": "schema", - "data": { - "title": "PromptTemplateOutput", - "anyOf": [ - { - "$ref": "#/definitions/StringPromptValue" - }, - { - "$ref": "#/definitions/ChatPromptValueConcrete" - } - ], - "definitions": { - "StringPromptValue": { - "title": "StringPromptValue", - "description": "String prompt value.", - "type": "object", - "properties": { - "text": { - "title": "Text", - "type": "string" - }, - "type": { - "title": "Type", - "default": "StringPromptValue", - "enum": [ - "StringPromptValue" - ], - "type": "string" - } - }, - "required": [ - "text" - ] - }, - "AIMessage": { - "title": "AIMessage", - "description": "Message from an AI.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "ai", - "enum": [ - "ai" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "HumanMessage": { - "title": "HumanMessage", - "description": "Message from a human.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "human", - "enum": [ - "human" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "ChatMessage": { - "title": "ChatMessage", - "description": "Message that can be assigned an arbitrary speaker (i.e. role).", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "chat", - "enum": [ - "chat" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "role": { - "title": "Role", - "type": "string" - } - }, - "required": [ - "content", - "role" - ] - }, - "SystemMessage": { - "title": "SystemMessage", - "description": "Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "system", - "enum": [ - "system" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content" - ] - }, - "FunctionMessage": { - "title": "FunctionMessage", - "description": "Message for passing the result of executing a function back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "function", - "enum": [ - "function" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content", - "name" - ] - }, - "ToolMessage": { - "title": "ToolMessage", - "description": "Message for passing the result of executing a tool back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "tool", - "enum": [ - "tool" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "tool_call_id": { - "title": "Tool Call Id", - "type": "string" - } - }, - "required": [ - "content", - "tool_call_id" - ] - }, - "ChatPromptValueConcrete": { - "title": "ChatPromptValueConcrete", - "description": "Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.", - "type": "object", - "properties": { - "messages": { - "title": "Messages", - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - }, - "type": { - "title": "Type", - "default": "ChatPromptValueConcrete", - "enum": [ - "ChatPromptValueConcrete" - ], - "type": "string" - } - }, - "required": [ - "messages" - ] - } - } - } + "data": "PromptTemplateOutput" } ], "edges": [ @@ -39212,20 +8831,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "PromptInput", - "type": "object", - "properties": { - "documents": { - "title": "Documents", - "type": "string" - }, - "question": { - "title": "Question", - "type": "string" - } - } - } + "data": "PromptInput" }, { "id": 1, @@ -39243,436 +8849,7 @@ { "id": 2, "type": "schema", - "data": { - "title": "ChatPromptTemplateOutput", - "anyOf": [ - { - "$ref": "#/definitions/StringPromptValue" - }, - { - "$ref": "#/definitions/ChatPromptValueConcrete" - } - ], - "definitions": { - "StringPromptValue": { - "title": "StringPromptValue", - "description": "String prompt value.", - "type": "object", - "properties": { - "text": { - "title": "Text", - "type": "string" - }, - "type": { - "title": "Type", - "default": "StringPromptValue", - "enum": [ - "StringPromptValue" - ], - "type": "string" - } - }, - "required": [ - "text" - ] - }, - "AIMessage": { - "title": "AIMessage", - "description": "Message from an AI.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "ai", - "enum": [ - "ai" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "HumanMessage": { - "title": "HumanMessage", - "description": "Message from a human.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "human", - "enum": [ - "human" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "ChatMessage": { - "title": "ChatMessage", - "description": "Message that can be assigned an arbitrary speaker (i.e. role).", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "chat", - "enum": [ - "chat" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "role": { - "title": "Role", - "type": "string" - } - }, - "required": [ - "content", - "role" - ] - }, - "SystemMessage": { - "title": "SystemMessage", - "description": "Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "system", - "enum": [ - "system" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content" - ] - }, - "FunctionMessage": { - "title": "FunctionMessage", - "description": "Message for passing the result of executing a function back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "function", - "enum": [ - "function" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content", - "name" - ] - }, - "ToolMessage": { - "title": "ToolMessage", - "description": "Message for passing the result of executing a tool back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "tool", - "enum": [ - "tool" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "tool_call_id": { - "title": "Tool Call Id", - "type": "string" - } - }, - "required": [ - "content", - "tool_call_id" - ] - }, - "ChatPromptValueConcrete": { - "title": "ChatPromptValueConcrete", - "description": "Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.", - "type": "object", - "properties": { - "messages": { - "title": "Messages", - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - }, - "type": { - "title": "Type", - "default": "ChatPromptValueConcrete", - "enum": [ - "ChatPromptValueConcrete" - ], - "type": "string" - } - }, - "required": [ - "messages" - ] - } - } - } + "data": "ChatPromptTemplateOutput" } ], "edges": [ @@ -39703,464 +8880,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "FakeListChatModelInput", - "anyOf": [ - { - "type": "string" - }, - { - "$ref": "#/definitions/StringPromptValue" - }, - { - "$ref": "#/definitions/ChatPromptValueConcrete" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - } - ], - "definitions": { - "StringPromptValue": { - "title": "StringPromptValue", - "description": "String prompt value.", - "type": "object", - "properties": { - "text": { - "title": "Text", - "type": "string" - }, - "type": { - "title": "Type", - "default": "StringPromptValue", - "enum": [ - "StringPromptValue" - ], - "type": "string" - } - }, - "required": [ - "text" - ] - }, - "AIMessage": { - "title": "AIMessage", - "description": "Message from an AI.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "ai", - "enum": [ - "ai" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "HumanMessage": { - "title": "HumanMessage", - "description": "Message from a human.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "human", - "enum": [ - "human" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "ChatMessage": { - "title": "ChatMessage", - "description": "Message that can be assigned an arbitrary speaker (i.e. role).", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "chat", - "enum": [ - "chat" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "role": { - "title": "Role", - "type": "string" - } - }, - "required": [ - "content", - "role" - ] - }, - "SystemMessage": { - "title": "SystemMessage", - "description": "Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "system", - "enum": [ - "system" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content" - ] - }, - "FunctionMessage": { - "title": "FunctionMessage", - "description": "Message for passing the result of executing a function back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "function", - "enum": [ - "function" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content", - "name" - ] - }, - "ToolMessage": { - "title": "ToolMessage", - "description": "Message for passing the result of executing a tool back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "tool", - "enum": [ - "tool" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "tool_call_id": { - "title": "Tool Call Id", - "type": "string" - } - }, - "required": [ - "content", - "tool_call_id" - ] - }, - "ChatPromptValueConcrete": { - "title": "ChatPromptValueConcrete", - "description": "Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.", - "type": "object", - "properties": { - "messages": { - "title": "Messages", - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - }, - "type": { - "title": "Type", - "default": "ChatPromptValueConcrete", - "enum": [ - "ChatPromptValueConcrete" - ], - "type": "string" - } - }, - "required": [ - "messages" - ] - } - } - } + "data": "FakeListChatModelInput" }, { "id": 1, @@ -40178,382 +8898,7 @@ { "id": 2, "type": "schema", - "data": { - "title": "FakeListChatModelOutput", - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ], - "definitions": { - "AIMessage": { - "title": "AIMessage", - "description": "Message from an AI.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "ai", - "enum": [ - "ai" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "HumanMessage": { - "title": "HumanMessage", - "description": "Message from a human.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "human", - "enum": [ - "human" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "ChatMessage": { - "title": "ChatMessage", - "description": "Message that can be assigned an arbitrary speaker (i.e. role).", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "chat", - "enum": [ - "chat" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "role": { - "title": "Role", - "type": "string" - } - }, - "required": [ - "content", - "role" - ] - }, - "SystemMessage": { - "title": "SystemMessage", - "description": "Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "system", - "enum": [ - "system" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content" - ] - }, - "FunctionMessage": { - "title": "FunctionMessage", - "description": "Message for passing the result of executing a function back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "function", - "enum": [ - "function" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content", - "name" - ] - }, - "ToolMessage": { - "title": "ToolMessage", - "description": "Message for passing the result of executing a tool back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "tool", - "enum": [ - "tool" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "tool_call_id": { - "title": "Tool Call Id", - "type": "string" - } - }, - "required": [ - "content", - "tool_call_id" - ] - } - } - } + "data": "FakeListChatModelOutput" } ], "edges": [ @@ -40585,385 +8930,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "CommaSeparatedListOutputParserInput", - "anyOf": [ - { - "type": "string" - }, - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ], - "definitions": { - "AIMessage": { - "title": "AIMessage", - "description": "Message from an AI.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "ai", - "enum": [ - "ai" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "HumanMessage": { - "title": "HumanMessage", - "description": "Message from a human.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "human", - "enum": [ - "human" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "ChatMessage": { - "title": "ChatMessage", - "description": "Message that can be assigned an arbitrary speaker (i.e. role).", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "chat", - "enum": [ - "chat" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "role": { - "title": "Role", - "type": "string" - } - }, - "required": [ - "content", - "role" - ] - }, - "SystemMessage": { - "title": "SystemMessage", - "description": "Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "system", - "enum": [ - "system" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content" - ] - }, - "FunctionMessage": { - "title": "FunctionMessage", - "description": "Message for passing the result of executing a function back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "function", - "enum": [ - "function" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content", - "name" - ] - }, - "ToolMessage": { - "title": "ToolMessage", - "description": "Message for passing the result of executing a tool back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "tool", - "enum": [ - "tool" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "tool_call_id": { - "title": "Tool Call Id", - "type": "string" - } - }, - "required": [ - "content", - "tool_call_id" - ] - } - } - } + "data": "CommaSeparatedListOutputParserInput" }, { "id": 1, @@ -40981,13 +8948,7 @@ { "id": 2, "type": "schema", - "data": { - "title": "CommaSeparatedListOutputParserOutput", - "type": "array", - "items": { - "type": "string" - } - } + "data": "CommaSeparatedListOutputParserOutput" } ], "edges": [ @@ -41010,62 +8971,12 @@ { "id": 0, "type": "schema", - "data": { - "title": "RunnableParallelInput", - "type": "object", - "properties": {} - } + "data": "ParallelInput" }, { "id": 1, "type": "schema", - "data": { - "title": "RunnableParallelOutput", - "type": "object", - "properties": { - "question": { - "title": "Question" - }, - "documents": { - "title": "Documents", - "type": "array", - "items": { - "$ref": "#/definitions/Document" - } - }, - "just_to_test_lambda": { - "title": "Just To Test Lambda" - } - }, - "definitions": { - "Document": { - "title": "Document", - "description": "Class for storing a piece of text and associated metadata.", - "type": "object", - "properties": { - "page_content": { - "title": "Page Content", - "type": "string" - }, - "metadata": { - "title": "Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "Document", - "enum": [ - "Document" - ], - "type": "string" - } - }, - "required": [ - "page_content" - ] - } - } - } + "data": "ParallelOutput" }, { "id": 2, @@ -41175,13 +9086,7 @@ { "id": 10, "type": "schema", - "data": { - "title": "CommaSeparatedListOutputParserOutput", - "type": "array", - "items": { - "type": "string" - } - } + "data": "CommaSeparatedListOutputParserOutput" } ], "edges": [ @@ -41302,11 +9207,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "PromptInput", - "type": "object", - "properties": {} - } + "data": "PromptInput" }, { "id": 1, @@ -41324,436 +9225,7 @@ { "id": 2, "type": "schema", - "data": { - "title": "PromptTemplateOutput", - "anyOf": [ - { - "$ref": "#/definitions/StringPromptValue" - }, - { - "$ref": "#/definitions/ChatPromptValueConcrete" - } - ], - "definitions": { - "StringPromptValue": { - "title": "StringPromptValue", - "description": "String prompt value.", - "type": "object", - "properties": { - "text": { - "title": "Text", - "type": "string" - }, - "type": { - "title": "Type", - "default": "StringPromptValue", - "enum": [ - "StringPromptValue" - ], - "type": "string" - } - }, - "required": [ - "text" - ] - }, - "AIMessage": { - "title": "AIMessage", - "description": "Message from an AI.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "ai", - "enum": [ - "ai" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "HumanMessage": { - "title": "HumanMessage", - "description": "Message from a human.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "human", - "enum": [ - "human" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "ChatMessage": { - "title": "ChatMessage", - "description": "Message that can be assigned an arbitrary speaker (i.e. role).", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "chat", - "enum": [ - "chat" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "role": { - "title": "Role", - "type": "string" - } - }, - "required": [ - "content", - "role" - ] - }, - "SystemMessage": { - "title": "SystemMessage", - "description": "Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "system", - "enum": [ - "system" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content" - ] - }, - "FunctionMessage": { - "title": "FunctionMessage", - "description": "Message for passing the result of executing a function back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "function", - "enum": [ - "function" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content", - "name" - ] - }, - "ToolMessage": { - "title": "ToolMessage", - "description": "Message for passing the result of executing a tool back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "tool", - "enum": [ - "tool" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "tool_call_id": { - "title": "Tool Call Id", - "type": "string" - } - }, - "required": [ - "content", - "tool_call_id" - ] - }, - "ChatPromptValueConcrete": { - "title": "ChatPromptValueConcrete", - "description": "Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.", - "type": "object", - "properties": { - "messages": { - "title": "Messages", - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - }, - "type": { - "title": "Type", - "default": "ChatPromptValueConcrete", - "enum": [ - "ChatPromptValueConcrete" - ], - "type": "string" - } - }, - "required": [ - "messages" - ] - } - } - } + "data": "PromptTemplateOutput" } ], "edges": [ @@ -41803,16 +9275,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "PromptInput", - "type": "object", - "properties": { - "question": { - "title": "Question", - "type": "string" - } - } - } + "data": "PromptInput" }, { "id": 1, @@ -41830,436 +9293,7 @@ { "id": 2, "type": "schema", - "data": { - "title": "PromptTemplateOutput", - "anyOf": [ - { - "$ref": "#/definitions/StringPromptValue" - }, - { - "$ref": "#/definitions/ChatPromptValueConcrete" - } - ], - "definitions": { - "StringPromptValue": { - "title": "StringPromptValue", - "description": "String prompt value.", - "type": "object", - "properties": { - "text": { - "title": "Text", - "type": "string" - }, - "type": { - "title": "Type", - "default": "StringPromptValue", - "enum": [ - "StringPromptValue" - ], - "type": "string" - } - }, - "required": [ - "text" - ] - }, - "AIMessage": { - "title": "AIMessage", - "description": "Message from an AI.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "ai", - "enum": [ - "ai" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "HumanMessage": { - "title": "HumanMessage", - "description": "Message from a human.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "human", - "enum": [ - "human" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "ChatMessage": { - "title": "ChatMessage", - "description": "Message that can be assigned an arbitrary speaker (i.e. role).", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "chat", - "enum": [ - "chat" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "role": { - "title": "Role", - "type": "string" - } - }, - "required": [ - "content", - "role" - ] - }, - "SystemMessage": { - "title": "SystemMessage", - "description": "Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "system", - "enum": [ - "system" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content" - ] - }, - "FunctionMessage": { - "title": "FunctionMessage", - "description": "Message for passing the result of executing a function back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "function", - "enum": [ - "function" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content", - "name" - ] - }, - "ToolMessage": { - "title": "ToolMessage", - "description": "Message for passing the result of executing a tool back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "tool", - "enum": [ - "tool" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "tool_call_id": { - "title": "Tool Call Id", - "type": "string" - } - }, - "required": [ - "content", - "tool_call_id" - ] - }, - "ChatPromptValueConcrete": { - "title": "ChatPromptValueConcrete", - "description": "Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.", - "type": "object", - "properties": { - "messages": { - "title": "Messages", - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - }, - "type": { - "title": "Type", - "default": "ChatPromptValueConcrete", - "enum": [ - "ChatPromptValueConcrete" - ], - "type": "string" - } - }, - "required": [ - "messages" - ] - } - } - } + "data": "PromptTemplateOutput" } ], "edges": [ @@ -42287,16 +9321,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "PromptInput", - "type": "object", - "properties": { - "question": { - "title": "Question", - "type": "string" - } - } - } + "data": "PromptInput" }, { "id": 1, @@ -42314,436 +9339,7 @@ { "id": 2, "type": "schema", - "data": { - "title": "ChatPromptTemplateOutput", - "anyOf": [ - { - "$ref": "#/definitions/StringPromptValue" - }, - { - "$ref": "#/definitions/ChatPromptValueConcrete" - } - ], - "definitions": { - "StringPromptValue": { - "title": "StringPromptValue", - "description": "String prompt value.", - "type": "object", - "properties": { - "text": { - "title": "Text", - "type": "string" - }, - "type": { - "title": "Type", - "default": "StringPromptValue", - "enum": [ - "StringPromptValue" - ], - "type": "string" - } - }, - "required": [ - "text" - ] - }, - "AIMessage": { - "title": "AIMessage", - "description": "Message from an AI.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "ai", - "enum": [ - "ai" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "HumanMessage": { - "title": "HumanMessage", - "description": "Message from a human.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "human", - "enum": [ - "human" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "ChatMessage": { - "title": "ChatMessage", - "description": "Message that can be assigned an arbitrary speaker (i.e. role).", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "chat", - "enum": [ - "chat" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "role": { - "title": "Role", - "type": "string" - } - }, - "required": [ - "content", - "role" - ] - }, - "SystemMessage": { - "title": "SystemMessage", - "description": "Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "system", - "enum": [ - "system" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content" - ] - }, - "FunctionMessage": { - "title": "FunctionMessage", - "description": "Message for passing the result of executing a function back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "function", - "enum": [ - "function" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content", - "name" - ] - }, - "ToolMessage": { - "title": "ToolMessage", - "description": "Message for passing the result of executing a tool back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "tool", - "enum": [ - "tool" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "tool_call_id": { - "title": "Tool Call Id", - "type": "string" - } - }, - "required": [ - "content", - "tool_call_id" - ] - }, - "ChatPromptValueConcrete": { - "title": "ChatPromptValueConcrete", - "description": "Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.", - "type": "object", - "properties": { - "messages": { - "title": "Messages", - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - }, - "type": { - "title": "Type", - "default": "ChatPromptValueConcrete", - "enum": [ - "ChatPromptValueConcrete" - ], - "type": "string" - } - }, - "required": [ - "messages" - ] - } - } - } + "data": "ChatPromptTemplateOutput" } ], "edges": [ @@ -42798,464 +9394,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "FakeListChatModelInput", - "anyOf": [ - { - "type": "string" - }, - { - "$ref": "#/definitions/StringPromptValue" - }, - { - "$ref": "#/definitions/ChatPromptValueConcrete" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - } - ], - "definitions": { - "StringPromptValue": { - "title": "StringPromptValue", - "description": "String prompt value.", - "type": "object", - "properties": { - "text": { - "title": "Text", - "type": "string" - }, - "type": { - "title": "Type", - "default": "StringPromptValue", - "enum": [ - "StringPromptValue" - ], - "type": "string" - } - }, - "required": [ - "text" - ] - }, - "AIMessage": { - "title": "AIMessage", - "description": "Message from an AI.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "ai", - "enum": [ - "ai" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "HumanMessage": { - "title": "HumanMessage", - "description": "Message from a human.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "human", - "enum": [ - "human" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "ChatMessage": { - "title": "ChatMessage", - "description": "Message that can be assigned an arbitrary speaker (i.e. role).", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "chat", - "enum": [ - "chat" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "role": { - "title": "Role", - "type": "string" - } - }, - "required": [ - "content", - "role" - ] - }, - "SystemMessage": { - "title": "SystemMessage", - "description": "Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "system", - "enum": [ - "system" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content" - ] - }, - "FunctionMessage": { - "title": "FunctionMessage", - "description": "Message for passing the result of executing a function back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "function", - "enum": [ - "function" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content", - "name" - ] - }, - "ToolMessage": { - "title": "ToolMessage", - "description": "Message for passing the result of executing a tool back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "tool", - "enum": [ - "tool" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "tool_call_id": { - "title": "Tool Call Id", - "type": "string" - } - }, - "required": [ - "content", - "tool_call_id" - ] - }, - "ChatPromptValueConcrete": { - "title": "ChatPromptValueConcrete", - "description": "Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.", - "type": "object", - "properties": { - "messages": { - "title": "Messages", - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - }, - "type": { - "title": "Type", - "default": "ChatPromptValueConcrete", - "enum": [ - "ChatPromptValueConcrete" - ], - "type": "string" - } - }, - "required": [ - "messages" - ] - } - } - } + "data": "FakeListChatModelInput" }, { "id": 1, @@ -43273,382 +9412,7 @@ { "id": 2, "type": "schema", - "data": { - "title": "FakeListChatModelOutput", - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ], - "definitions": { - "AIMessage": { - "title": "AIMessage", - "description": "Message from an AI.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "ai", - "enum": [ - "ai" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "HumanMessage": { - "title": "HumanMessage", - "description": "Message from a human.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "human", - "enum": [ - "human" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "ChatMessage": { - "title": "ChatMessage", - "description": "Message that can be assigned an arbitrary speaker (i.e. role).", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "chat", - "enum": [ - "chat" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "role": { - "title": "Role", - "type": "string" - } - }, - "required": [ - "content", - "role" - ] - }, - "SystemMessage": { - "title": "SystemMessage", - "description": "Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "system", - "enum": [ - "system" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content" - ] - }, - "FunctionMessage": { - "title": "FunctionMessage", - "description": "Message for passing the result of executing a function back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "function", - "enum": [ - "function" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content", - "name" - ] - }, - "ToolMessage": { - "title": "ToolMessage", - "description": "Message for passing the result of executing a tool back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "tool", - "enum": [ - "tool" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "tool_call_id": { - "title": "Tool Call Id", - "type": "string" - } - }, - "required": [ - "content", - "tool_call_id" - ] - } - } - } + "data": "FakeListChatModelOutput" } ], "edges": [ @@ -43679,464 +9443,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "FakeListLLMInput", - "anyOf": [ - { - "type": "string" - }, - { - "$ref": "#/definitions/StringPromptValue" - }, - { - "$ref": "#/definitions/ChatPromptValueConcrete" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - } - ], - "definitions": { - "StringPromptValue": { - "title": "StringPromptValue", - "description": "String prompt value.", - "type": "object", - "properties": { - "text": { - "title": "Text", - "type": "string" - }, - "type": { - "title": "Type", - "default": "StringPromptValue", - "enum": [ - "StringPromptValue" - ], - "type": "string" - } - }, - "required": [ - "text" - ] - }, - "AIMessage": { - "title": "AIMessage", - "description": "Message from an AI.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "ai", - "enum": [ - "ai" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "HumanMessage": { - "title": "HumanMessage", - "description": "Message from a human.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "human", - "enum": [ - "human" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "ChatMessage": { - "title": "ChatMessage", - "description": "Message that can be assigned an arbitrary speaker (i.e. role).", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "chat", - "enum": [ - "chat" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "role": { - "title": "Role", - "type": "string" - } - }, - "required": [ - "content", - "role" - ] - }, - "SystemMessage": { - "title": "SystemMessage", - "description": "Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "system", - "enum": [ - "system" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content" - ] - }, - "FunctionMessage": { - "title": "FunctionMessage", - "description": "Message for passing the result of executing a function back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "function", - "enum": [ - "function" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content", - "name" - ] - }, - "ToolMessage": { - "title": "ToolMessage", - "description": "Message for passing the result of executing a tool back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "tool", - "enum": [ - "tool" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "tool_call_id": { - "title": "Tool Call Id", - "type": "string" - } - }, - "required": [ - "content", - "tool_call_id" - ] - }, - "ChatPromptValueConcrete": { - "title": "ChatPromptValueConcrete", - "description": "Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.", - "type": "object", - "properties": { - "messages": { - "title": "Messages", - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - }, - "type": { - "title": "Type", - "default": "ChatPromptValueConcrete", - "enum": [ - "ChatPromptValueConcrete" - ], - "type": "string" - } - }, - "required": [ - "messages" - ] - } - } - } + "data": "FakeListLLMInput" }, { "id": 1, @@ -44154,10 +9461,7 @@ { "id": 2, "type": "schema", - "data": { - "title": "FakeListLLMOutput", - "type": "string" - } + "data": "FakeListLLMOutput" } ], "edges": [ @@ -44180,401 +9484,12 @@ { "id": 0, "type": "schema", - "data": { - "title": "RunnableParallelInput", - "type": "object", - "properties": {} - } + "data": "ParallelInput" }, { "id": 1, "type": "schema", - "data": { - "title": "RunnableParallelOutput", - "type": "object", - "properties": { - "chat": { - "title": "Chat", - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - }, - "llm": { - "title": "Llm", - "type": "string" - } - }, - "definitions": { - "AIMessage": { - "title": "AIMessage", - "description": "Message from an AI.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "ai", - "enum": [ - "ai" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "HumanMessage": { - "title": "HumanMessage", - "description": "Message from a human.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "human", - "enum": [ - "human" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "ChatMessage": { - "title": "ChatMessage", - "description": "Message that can be assigned an arbitrary speaker (i.e. role).", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "chat", - "enum": [ - "chat" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "role": { - "title": "Role", - "type": "string" - } - }, - "required": [ - "content", - "role" - ] - }, - "SystemMessage": { - "title": "SystemMessage", - "description": "Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "system", - "enum": [ - "system" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content" - ] - }, - "FunctionMessage": { - "title": "FunctionMessage", - "description": "Message for passing the result of executing a function back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "function", - "enum": [ - "function" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content", - "name" - ] - }, - "ToolMessage": { - "title": "ToolMessage", - "description": "Message for passing the result of executing a tool back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "tool", - "enum": [ - "tool" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "tool_call_id": { - "title": "Tool Call Id", - "type": "string" - } - }, - "required": [ - "content", - "tool_call_id" - ] - } - } - } + "data": "ParallelOutput" }, { "id": 2, @@ -44631,16 +9546,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "PromptInput", - "type": "object", - "properties": { - "question": { - "title": "Question", - "type": "string" - } - } - } + "data": "PromptInput" }, { "id": 1, @@ -44671,401 +9577,12 @@ { "id": 3, "type": "schema", - "data": { - "title": "RunnableParallelInput", - "type": "object", - "properties": {} - } + "data": "ParallelInput" }, { "id": 4, "type": "schema", - "data": { - "title": "RunnableParallelOutput", - "type": "object", - "properties": { - "chat": { - "title": "Chat", - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - }, - "llm": { - "title": "Llm", - "type": "string" - } - }, - "definitions": { - "AIMessage": { - "title": "AIMessage", - "description": "Message from an AI.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "ai", - "enum": [ - "ai" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "HumanMessage": { - "title": "HumanMessage", - "description": "Message from a human.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "human", - "enum": [ - "human" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "ChatMessage": { - "title": "ChatMessage", - "description": "Message that can be assigned an arbitrary speaker (i.e. role).", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "chat", - "enum": [ - "chat" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "role": { - "title": "Role", - "type": "string" - } - }, - "required": [ - "content", - "role" - ] - }, - "SystemMessage": { - "title": "SystemMessage", - "description": "Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "system", - "enum": [ - "system" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content" - ] - }, - "FunctionMessage": { - "title": "FunctionMessage", - "description": "Message for passing the result of executing a function back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "function", - "enum": [ - "function" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content", - "name" - ] - }, - "ToolMessage": { - "title": "ToolMessage", - "description": "Message for passing the result of executing a tool back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "tool", - "enum": [ - "tool" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "tool_call_id": { - "title": "Tool Call Id", - "type": "string" - } - }, - "required": [ - "content", - "tool_call_id" - ] - } - } - } + "data": "ParallelOutput" }, { "id": 5, @@ -45182,11 +9699,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "PromptInput", - "type": "object", - "properties": {} - } + "data": "PromptInput" }, { "id": 1, @@ -45204,436 +9717,7 @@ { "id": 2, "type": "schema", - "data": { - "title": "PromptTemplateOutput", - "anyOf": [ - { - "$ref": "#/definitions/StringPromptValue" - }, - { - "$ref": "#/definitions/ChatPromptValueConcrete" - } - ], - "definitions": { - "StringPromptValue": { - "title": "StringPromptValue", - "description": "String prompt value.", - "type": "object", - "properties": { - "text": { - "title": "Text", - "type": "string" - }, - "type": { - "title": "Type", - "default": "StringPromptValue", - "enum": [ - "StringPromptValue" - ], - "type": "string" - } - }, - "required": [ - "text" - ] - }, - "AIMessage": { - "title": "AIMessage", - "description": "Message from an AI.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "ai", - "enum": [ - "ai" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "HumanMessage": { - "title": "HumanMessage", - "description": "Message from a human.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "human", - "enum": [ - "human" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "ChatMessage": { - "title": "ChatMessage", - "description": "Message that can be assigned an arbitrary speaker (i.e. role).", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "chat", - "enum": [ - "chat" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "role": { - "title": "Role", - "type": "string" - } - }, - "required": [ - "content", - "role" - ] - }, - "SystemMessage": { - "title": "SystemMessage", - "description": "Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "system", - "enum": [ - "system" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content" - ] - }, - "FunctionMessage": { - "title": "FunctionMessage", - "description": "Message for passing the result of executing a function back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "function", - "enum": [ - "function" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content", - "name" - ] - }, - "ToolMessage": { - "title": "ToolMessage", - "description": "Message for passing the result of executing a tool back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "tool", - "enum": [ - "tool" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "tool_call_id": { - "title": "Tool Call Id", - "type": "string" - } - }, - "required": [ - "content", - "tool_call_id" - ] - }, - "ChatPromptValueConcrete": { - "title": "ChatPromptValueConcrete", - "description": "Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.", - "type": "object", - "properties": { - "messages": { - "title": "Messages", - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - }, - "type": { - "title": "Type", - "default": "ChatPromptValueConcrete", - "enum": [ - "ChatPromptValueConcrete" - ], - "type": "string" - } - }, - "required": [ - "messages" - ] - } - } - } + "data": "PromptTemplateOutput" } ], "edges": [ @@ -45683,16 +9767,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "PromptInput", - "type": "object", - "properties": { - "question": { - "title": "Question", - "type": "string" - } - } - } + "data": "PromptInput" }, { "id": 1, @@ -45710,436 +9785,7 @@ { "id": 2, "type": "schema", - "data": { - "title": "PromptTemplateOutput", - "anyOf": [ - { - "$ref": "#/definitions/StringPromptValue" - }, - { - "$ref": "#/definitions/ChatPromptValueConcrete" - } - ], - "definitions": { - "StringPromptValue": { - "title": "StringPromptValue", - "description": "String prompt value.", - "type": "object", - "properties": { - "text": { - "title": "Text", - "type": "string" - }, - "type": { - "title": "Type", - "default": "StringPromptValue", - "enum": [ - "StringPromptValue" - ], - "type": "string" - } - }, - "required": [ - "text" - ] - }, - "AIMessage": { - "title": "AIMessage", - "description": "Message from an AI.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "ai", - "enum": [ - "ai" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "HumanMessage": { - "title": "HumanMessage", - "description": "Message from a human.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "human", - "enum": [ - "human" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "ChatMessage": { - "title": "ChatMessage", - "description": "Message that can be assigned an arbitrary speaker (i.e. role).", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "chat", - "enum": [ - "chat" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "role": { - "title": "Role", - "type": "string" - } - }, - "required": [ - "content", - "role" - ] - }, - "SystemMessage": { - "title": "SystemMessage", - "description": "Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "system", - "enum": [ - "system" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content" - ] - }, - "FunctionMessage": { - "title": "FunctionMessage", - "description": "Message for passing the result of executing a function back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "function", - "enum": [ - "function" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content", - "name" - ] - }, - "ToolMessage": { - "title": "ToolMessage", - "description": "Message for passing the result of executing a tool back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "tool", - "enum": [ - "tool" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "tool_call_id": { - "title": "Tool Call Id", - "type": "string" - } - }, - "required": [ - "content", - "tool_call_id" - ] - }, - "ChatPromptValueConcrete": { - "title": "ChatPromptValueConcrete", - "description": "Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.", - "type": "object", - "properties": { - "messages": { - "title": "Messages", - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - }, - "type": { - "title": "Type", - "default": "ChatPromptValueConcrete", - "enum": [ - "ChatPromptValueConcrete" - ], - "type": "string" - } - }, - "required": [ - "messages" - ] - } - } - } + "data": "PromptTemplateOutput" } ], "edges": [ @@ -46167,16 +9813,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "PromptInput", - "type": "object", - "properties": { - "question": { - "title": "Question", - "type": "string" - } - } - } + "data": "PromptInput" }, { "id": 1, @@ -46194,436 +9831,7 @@ { "id": 2, "type": "schema", - "data": { - "title": "ChatPromptTemplateOutput", - "anyOf": [ - { - "$ref": "#/definitions/StringPromptValue" - }, - { - "$ref": "#/definitions/ChatPromptValueConcrete" - } - ], - "definitions": { - "StringPromptValue": { - "title": "StringPromptValue", - "description": "String prompt value.", - "type": "object", - "properties": { - "text": { - "title": "Text", - "type": "string" - }, - "type": { - "title": "Type", - "default": "StringPromptValue", - "enum": [ - "StringPromptValue" - ], - "type": "string" - } - }, - "required": [ - "text" - ] - }, - "AIMessage": { - "title": "AIMessage", - "description": "Message from an AI.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "ai", - "enum": [ - "ai" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "HumanMessage": { - "title": "HumanMessage", - "description": "Message from a human.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "human", - "enum": [ - "human" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "ChatMessage": { - "title": "ChatMessage", - "description": "Message that can be assigned an arbitrary speaker (i.e. role).", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "chat", - "enum": [ - "chat" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "role": { - "title": "Role", - "type": "string" - } - }, - "required": [ - "content", - "role" - ] - }, - "SystemMessage": { - "title": "SystemMessage", - "description": "Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "system", - "enum": [ - "system" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content" - ] - }, - "FunctionMessage": { - "title": "FunctionMessage", - "description": "Message for passing the result of executing a function back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "function", - "enum": [ - "function" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content", - "name" - ] - }, - "ToolMessage": { - "title": "ToolMessage", - "description": "Message for passing the result of executing a tool back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "tool", - "enum": [ - "tool" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "tool_call_id": { - "title": "Tool Call Id", - "type": "string" - } - }, - "required": [ - "content", - "tool_call_id" - ] - }, - "ChatPromptValueConcrete": { - "title": "ChatPromptValueConcrete", - "description": "Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.", - "type": "object", - "properties": { - "messages": { - "title": "Messages", - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - }, - "type": { - "title": "Type", - "default": "ChatPromptValueConcrete", - "enum": [ - "ChatPromptValueConcrete" - ], - "type": "string" - } - }, - "required": [ - "messages" - ] - } - } - } + "data": "ChatPromptTemplateOutput" } ], "edges": [ @@ -46688,464 +9896,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "FakeListChatModelInput", - "anyOf": [ - { - "type": "string" - }, - { - "$ref": "#/definitions/StringPromptValue" - }, - { - "$ref": "#/definitions/ChatPromptValueConcrete" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - } - ], - "definitions": { - "StringPromptValue": { - "title": "StringPromptValue", - "description": "String prompt value.", - "type": "object", - "properties": { - "text": { - "title": "Text", - "type": "string" - }, - "type": { - "title": "Type", - "default": "StringPromptValue", - "enum": [ - "StringPromptValue" - ], - "type": "string" - } - }, - "required": [ - "text" - ] - }, - "AIMessage": { - "title": "AIMessage", - "description": "Message from an AI.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "ai", - "enum": [ - "ai" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "HumanMessage": { - "title": "HumanMessage", - "description": "Message from a human.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "human", - "enum": [ - "human" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "ChatMessage": { - "title": "ChatMessage", - "description": "Message that can be assigned an arbitrary speaker (i.e. role).", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "chat", - "enum": [ - "chat" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "role": { - "title": "Role", - "type": "string" - } - }, - "required": [ - "content", - "role" - ] - }, - "SystemMessage": { - "title": "SystemMessage", - "description": "Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "system", - "enum": [ - "system" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content" - ] - }, - "FunctionMessage": { - "title": "FunctionMessage", - "description": "Message for passing the result of executing a function back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "function", - "enum": [ - "function" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content", - "name" - ] - }, - "ToolMessage": { - "title": "ToolMessage", - "description": "Message for passing the result of executing a tool back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "tool", - "enum": [ - "tool" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "tool_call_id": { - "title": "Tool Call Id", - "type": "string" - } - }, - "required": [ - "content", - "tool_call_id" - ] - }, - "ChatPromptValueConcrete": { - "title": "ChatPromptValueConcrete", - "description": "Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.", - "type": "object", - "properties": { - "messages": { - "title": "Messages", - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - }, - "type": { - "title": "Type", - "default": "ChatPromptValueConcrete", - "enum": [ - "ChatPromptValueConcrete" - ], - "type": "string" - } - }, - "required": [ - "messages" - ] - } - } - } + "data": "FakeListChatModelInput" }, { "id": 1, @@ -47163,382 +9914,7 @@ { "id": 2, "type": "schema", - "data": { - "title": "FakeListChatModelOutput", - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ], - "definitions": { - "AIMessage": { - "title": "AIMessage", - "description": "Message from an AI.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "ai", - "enum": [ - "ai" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "HumanMessage": { - "title": "HumanMessage", - "description": "Message from a human.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "human", - "enum": [ - "human" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "ChatMessage": { - "title": "ChatMessage", - "description": "Message that can be assigned an arbitrary speaker (i.e. role).", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "chat", - "enum": [ - "chat" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "role": { - "title": "Role", - "type": "string" - } - }, - "required": [ - "content", - "role" - ] - }, - "SystemMessage": { - "title": "SystemMessage", - "description": "Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "system", - "enum": [ - "system" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content" - ] - }, - "FunctionMessage": { - "title": "FunctionMessage", - "description": "Message for passing the result of executing a function back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "function", - "enum": [ - "function" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content", - "name" - ] - }, - "ToolMessage": { - "title": "ToolMessage", - "description": "Message for passing the result of executing a tool back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "tool", - "enum": [ - "tool" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "tool_call_id": { - "title": "Tool Call Id", - "type": "string" - } - }, - "required": [ - "content", - "tool_call_id" - ] - } - } - } + "data": "FakeListChatModelOutput" } ], "edges": [ @@ -47569,464 +9945,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "FakeListChatModelInput", - "anyOf": [ - { - "type": "string" - }, - { - "$ref": "#/definitions/StringPromptValue" - }, - { - "$ref": "#/definitions/ChatPromptValueConcrete" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - } - ], - "definitions": { - "StringPromptValue": { - "title": "StringPromptValue", - "description": "String prompt value.", - "type": "object", - "properties": { - "text": { - "title": "Text", - "type": "string" - }, - "type": { - "title": "Type", - "default": "StringPromptValue", - "enum": [ - "StringPromptValue" - ], - "type": "string" - } - }, - "required": [ - "text" - ] - }, - "AIMessage": { - "title": "AIMessage", - "description": "Message from an AI.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "ai", - "enum": [ - "ai" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "HumanMessage": { - "title": "HumanMessage", - "description": "Message from a human.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "human", - "enum": [ - "human" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "ChatMessage": { - "title": "ChatMessage", - "description": "Message that can be assigned an arbitrary speaker (i.e. role).", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "chat", - "enum": [ - "chat" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "role": { - "title": "Role", - "type": "string" - } - }, - "required": [ - "content", - "role" - ] - }, - "SystemMessage": { - "title": "SystemMessage", - "description": "Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "system", - "enum": [ - "system" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content" - ] - }, - "FunctionMessage": { - "title": "FunctionMessage", - "description": "Message for passing the result of executing a function back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "function", - "enum": [ - "function" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content", - "name" - ] - }, - "ToolMessage": { - "title": "ToolMessage", - "description": "Message for passing the result of executing a tool back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "tool", - "enum": [ - "tool" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "tool_call_id": { - "title": "Tool Call Id", - "type": "string" - } - }, - "required": [ - "content", - "tool_call_id" - ] - }, - "ChatPromptValueConcrete": { - "title": "ChatPromptValueConcrete", - "description": "Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.", - "type": "object", - "properties": { - "messages": { - "title": "Messages", - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - }, - "type": { - "title": "Type", - "default": "ChatPromptValueConcrete", - "enum": [ - "ChatPromptValueConcrete" - ], - "type": "string" - } - }, - "required": [ - "messages" - ] - } - } - } + "data": "FakeListChatModelInput" }, { "id": 1, @@ -48044,382 +9963,7 @@ { "id": 2, "type": "schema", - "data": { - "title": "FakeListChatModelOutput", - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ], - "definitions": { - "AIMessage": { - "title": "AIMessage", - "description": "Message from an AI.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "ai", - "enum": [ - "ai" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "HumanMessage": { - "title": "HumanMessage", - "description": "Message from a human.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "human", - "enum": [ - "human" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "ChatMessage": { - "title": "ChatMessage", - "description": "Message that can be assigned an arbitrary speaker (i.e. role).", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "chat", - "enum": [ - "chat" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "role": { - "title": "Role", - "type": "string" - } - }, - "required": [ - "content", - "role" - ] - }, - "SystemMessage": { - "title": "SystemMessage", - "description": "Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "system", - "enum": [ - "system" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content" - ] - }, - "FunctionMessage": { - "title": "FunctionMessage", - "description": "Message for passing the result of executing a function back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "function", - "enum": [ - "function" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content", - "name" - ] - }, - "ToolMessage": { - "title": "ToolMessage", - "description": "Message for passing the result of executing a tool back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "tool", - "enum": [ - "tool" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "tool_call_id": { - "title": "Tool Call Id", - "type": "string" - } - }, - "required": [ - "content", - "tool_call_id" - ] - } - } - } + "data": "FakeListChatModelOutput" } ], "edges": [ @@ -48450,464 +9994,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "FakeListLLMInput", - "anyOf": [ - { - "type": "string" - }, - { - "$ref": "#/definitions/StringPromptValue" - }, - { - "$ref": "#/definitions/ChatPromptValueConcrete" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - } - ], - "definitions": { - "StringPromptValue": { - "title": "StringPromptValue", - "description": "String prompt value.", - "type": "object", - "properties": { - "text": { - "title": "Text", - "type": "string" - }, - "type": { - "title": "Type", - "default": "StringPromptValue", - "enum": [ - "StringPromptValue" - ], - "type": "string" - } - }, - "required": [ - "text" - ] - }, - "AIMessage": { - "title": "AIMessage", - "description": "Message from an AI.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "ai", - "enum": [ - "ai" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "HumanMessage": { - "title": "HumanMessage", - "description": "Message from a human.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "human", - "enum": [ - "human" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "ChatMessage": { - "title": "ChatMessage", - "description": "Message that can be assigned an arbitrary speaker (i.e. role).", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "chat", - "enum": [ - "chat" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "role": { - "title": "Role", - "type": "string" - } - }, - "required": [ - "content", - "role" - ] - }, - "SystemMessage": { - "title": "SystemMessage", - "description": "Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "system", - "enum": [ - "system" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content" - ] - }, - "FunctionMessage": { - "title": "FunctionMessage", - "description": "Message for passing the result of executing a function back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "function", - "enum": [ - "function" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content", - "name" - ] - }, - "ToolMessage": { - "title": "ToolMessage", - "description": "Message for passing the result of executing a tool back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "tool", - "enum": [ - "tool" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "tool_call_id": { - "title": "Tool Call Id", - "type": "string" - } - }, - "required": [ - "content", - "tool_call_id" - ] - }, - "ChatPromptValueConcrete": { - "title": "ChatPromptValueConcrete", - "description": "Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.", - "type": "object", - "properties": { - "messages": { - "title": "Messages", - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - }, - "type": { - "title": "Type", - "default": "ChatPromptValueConcrete", - "enum": [ - "ChatPromptValueConcrete" - ], - "type": "string" - } - }, - "required": [ - "messages" - ] - } - } - } + "data": "FakeListLLMInput" }, { "id": 1, @@ -48925,10 +10012,7 @@ { "id": 2, "type": "schema", - "data": { - "title": "FakeListLLMOutput", - "type": "string" - } + "data": "FakeListLLMOutput" } ], "edges": [ @@ -48962,404 +10046,12 @@ { "id": 0, "type": "schema", - "data": { - "title": "RunnableParallelInput", - "type": "object", - "properties": {} - } + "data": "ParallelInput" }, { "id": 1, "type": "schema", - "data": { - "title": "RunnableParallelOutput", - "type": "object", - "properties": { - "chat": { - "title": "Chat", - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - }, - "llm": { - "title": "Llm", - "type": "string" - }, - "passthrough": { - "title": "Passthrough" - } - }, - "definitions": { - "AIMessage": { - "title": "AIMessage", - "description": "Message from an AI.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "ai", - "enum": [ - "ai" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "HumanMessage": { - "title": "HumanMessage", - "description": "Message from a human.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "human", - "enum": [ - "human" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "ChatMessage": { - "title": "ChatMessage", - "description": "Message that can be assigned an arbitrary speaker (i.e. role).", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "chat", - "enum": [ - "chat" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "role": { - "title": "Role", - "type": "string" - } - }, - "required": [ - "content", - "role" - ] - }, - "SystemMessage": { - "title": "SystemMessage", - "description": "Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "system", - "enum": [ - "system" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content" - ] - }, - "FunctionMessage": { - "title": "FunctionMessage", - "description": "Message for passing the result of executing a function back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "function", - "enum": [ - "function" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content", - "name" - ] - }, - "ToolMessage": { - "title": "ToolMessage", - "description": "Message for passing the result of executing a tool back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "tool", - "enum": [ - "tool" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "tool_call_id": { - "title": "Tool Call Id", - "type": "string" - } - }, - "required": [ - "content", - "tool_call_id" - ] - } - } - } + "data": "ParallelOutput" }, { "id": 2, @@ -49437,16 +10129,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "PromptInput", - "type": "object", - "properties": { - "question": { - "title": "Question", - "type": "string" - } - } - } + "data": "PromptInput" }, { "id": 1, @@ -49477,404 +10160,12 @@ { "id": 3, "type": "schema", - "data": { - "title": "RunnableParallelInput", - "type": "object", - "properties": {} - } + "data": "ParallelInput" }, { "id": 4, "type": "schema", - "data": { - "title": "RunnableParallelOutput", - "type": "object", - "properties": { - "chat": { - "title": "Chat", - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - }, - "llm": { - "title": "Llm", - "type": "string" - }, - "passthrough": { - "title": "Passthrough" - } - }, - "definitions": { - "AIMessage": { - "title": "AIMessage", - "description": "Message from an AI.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "ai", - "enum": [ - "ai" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "HumanMessage": { - "title": "HumanMessage", - "description": "Message from a human.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "human", - "enum": [ - "human" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "ChatMessage": { - "title": "ChatMessage", - "description": "Message that can be assigned an arbitrary speaker (i.e. role).", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "chat", - "enum": [ - "chat" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "role": { - "title": "Role", - "type": "string" - } - }, - "required": [ - "content", - "role" - ] - }, - "SystemMessage": { - "title": "SystemMessage", - "description": "Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "system", - "enum": [ - "system" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content" - ] - }, - "FunctionMessage": { - "title": "FunctionMessage", - "description": "Message for passing the result of executing a function back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "function", - "enum": [ - "function" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content", - "name" - ] - }, - "ToolMessage": { - "title": "ToolMessage", - "description": "Message for passing the result of executing a tool back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "tool", - "enum": [ - "tool" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "tool_call_id": { - "title": "Tool Call Id", - "type": "string" - } - }, - "required": [ - "content", - "tool_call_id" - ] - } - } - } + "data": "ParallelOutput" }, { "id": 5, diff --git a/libs/core/tests/unit_tests/runnables/test_graph.py b/libs/core/tests/unit_tests/runnables/test_graph.py index 3bee036acc..f4a6a5ee2a 100644 --- a/libs/core/tests/unit_tests/runnables/test_graph.py +++ b/libs/core/tests/unit_tests/runnables/test_graph.py @@ -33,6 +33,55 @@ def test_graph_sequence(snapshot: SnapshotAssertion) -> None: sequence = prompt | fake_llm | list_parser graph = sequence.get_graph() assert graph.to_json() == { + "nodes": [ + { + "id": 0, + "type": "schema", + "data": "PromptInput", + }, + { + "id": 1, + "type": "runnable", + "data": { + "id": ["langchain", "prompts", "prompt", "PromptTemplate"], + "name": "PromptTemplate", + }, + }, + { + "id": 2, + "type": "runnable", + "data": { + "id": ["langchain_core", "language_models", "fake", "FakeListLLM"], + "name": "FakeListLLM", + }, + }, + { + "id": 3, + "type": "runnable", + "data": { + "id": [ + "langchain", + "output_parsers", + "list", + "CommaSeparatedListOutputParser", + ], + "name": "CommaSeparatedListOutputParser", + }, + }, + { + "id": 4, + "type": "schema", + "data": "CommaSeparatedListOutputParserOutput", + }, + ], + "edges": [ + {"source": 0, "target": 1}, + {"source": 1, "target": 2}, + {"source": 3, "target": 4}, + {"source": 2, "target": 3}, + ], + } + assert graph.to_json(with_schemas=True) == { "nodes": [ { "id": 0, @@ -76,9 +125,9 @@ def test_graph_sequence(snapshot: SnapshotAssertion) -> None: "id": 4, "type": "schema", "data": { + "items": {"type": "string"}, "title": "CommaSeparatedListOutputParserOutput", "type": "array", - "items": {"type": "string"}, }, }, ], @@ -115,7 +164,7 @@ def test_graph_sequence_map(snapshot: SnapshotAssertion) -> None: } ) graph = sequence.get_graph() - assert graph.to_json() == { + assert graph.to_json(with_schemas=True) == { "nodes": [ { "id": 0, @@ -484,5 +533,97 @@ def test_graph_sequence_map(snapshot: SnapshotAssertion) -> None: {"source": 2, "target": 3}, ], } + assert graph.to_json() == { + "nodes": [ + { + "id": 0, + "type": "schema", + "data": "PromptInput", + }, + { + "id": 1, + "type": "runnable", + "data": { + "id": ["langchain", "prompts", "prompt", "PromptTemplate"], + "name": "PromptTemplate", + }, + }, + { + "id": 2, + "type": "runnable", + "data": { + "id": ["langchain_core", "language_models", "fake", "FakeListLLM"], + "name": "FakeListLLM", + }, + }, + { + "id": 3, + "type": "schema", + "data": "ParallelInput", + }, + { + "id": 4, + "type": "schema", + "data": "ParallelOutput", + }, + { + "id": 5, + "type": "runnable", + "data": { + "id": [ + "langchain", + "output_parsers", + "list", + "CommaSeparatedListOutputParser", + ], + "name": "CommaSeparatedListOutputParser", + }, + }, + { + "id": 6, + "type": "schema", + "data": "conditional_str_parser_input", + }, + { + "id": 7, + "type": "schema", + "data": "conditional_str_parser_output", + }, + { + "id": 8, + "type": "runnable", + "data": { + "id": ["langchain", "schema", "output_parser", "StrOutputParser"], + "name": "StrOutputParser", + }, + }, + { + "id": 9, + "type": "runnable", + "data": { + "id": [ + "langchain_core", + "output_parsers", + "xml", + "XMLOutputParser", + ], + "name": "XMLOutputParser", + }, + }, + ], + "edges": [ + {"source": 0, "target": 1}, + {"source": 1, "target": 2}, + {"source": 3, "target": 5}, + {"source": 5, "target": 4}, + {"source": 6, "target": 8}, + {"source": 8, "target": 7}, + {"source": 6, "target": 9}, + {"source": 9, "target": 7}, + {"source": 3, "target": 6}, + {"source": 7, "target": 4}, + {"source": 2, "target": 3}, + ], + } assert graph.draw_ascii() == snapshot(name="ascii") assert graph.draw_mermaid() == snapshot(name="mermaid") diff --git a/libs/core/tests/unit_tests/runnables/test_runnable.py b/libs/core/tests/unit_tests/runnables/test_runnable.py index 80b5dfa054..3a860642c3 100644 --- a/libs/core/tests/unit_tests/runnables/test_runnable.py +++ b/libs/core/tests/unit_tests/runnables/test_runnable.py @@ -41,6 +41,7 @@ from langchain_core.messages import ( HumanMessage, SystemMessage, ) +from langchain_core.messages.base import BaseMessage from langchain_core.output_parsers import ( BaseOutputParser, CommaSeparatedListOutputParser, @@ -86,6 +87,7 @@ from langchain_core.tracers import ( RunLogPatch, ) from langchain_core.tracers.context import collect_runs +from tests.unit_tests.stubs import AnyStr class FakeTracer(BaseTracer): @@ -106,6 +108,12 @@ class FakeTracer(BaseTracer): self.uuids_map[uuid] = next(self.uuids_generator) return self.uuids_map[uuid] + def _replace_message_id(self, maybe_message: Any) -> Any: + if isinstance(maybe_message, BaseMessage): + maybe_message.id = AnyStr() + + return maybe_message + def _copy_run(self, run: Run) -> Run: if run.dotted_order: levels = run.dotted_order.split(".") @@ -129,6 +137,16 @@ class FakeTracer(BaseTracer): "child_execution_order": None, "trace_id": self._replace_uuid(run.trace_id) if run.trace_id else None, "dotted_order": new_dotted_order, + "inputs": { + k: self._replace_message_id(v) for k, v in run.inputs.items() + } + if isinstance(run.inputs, dict) + else run.inputs, + "outputs": { + k: self._replace_message_id(v) for k, v in run.outputs.items() + } + if isinstance(run.outputs, dict) + else run.outputs, } ) @@ -1922,7 +1940,7 @@ def test_prompt_with_chat_model( tracer = FakeTracer() assert chain.invoke( {"question": "What is your name?"}, dict(callbacks=[tracer]) - ) == AIMessage(content="foo") + ) == AIMessage(content="foo", id=AnyStr()) assert prompt_spy.call_args.args[1] == {"question": "What is your name?"} assert chat_spy.call_args.args[1] == ChatPromptValue( messages=[ @@ -1947,8 +1965,8 @@ def test_prompt_with_chat_model( ], dict(callbacks=[tracer]), ) == [ - AIMessage(content="foo"), - AIMessage(content="foo"), + AIMessage(content="foo", id=AnyStr()), + AIMessage(content="foo", id=AnyStr()), ] assert prompt_spy.call_args.args[1] == [ {"question": "What is your name?"}, @@ -1988,9 +2006,9 @@ def test_prompt_with_chat_model( assert [ *chain.stream({"question": "What is your name?"}, dict(callbacks=[tracer])) ] == [ - AIMessageChunk(content="f"), - AIMessageChunk(content="o"), - AIMessageChunk(content="o"), + AIMessageChunk(content="f", id=AnyStr()), + AIMessageChunk(content="o", id=AnyStr()), + AIMessageChunk(content="o", id=AnyStr()), ] assert prompt_spy.call_args.args[1] == {"question": "What is your name?"} assert chat_spy.call_args.args[1] == ChatPromptValue( @@ -2026,7 +2044,7 @@ async def test_prompt_with_chat_model_async( tracer = FakeTracer() assert await chain.ainvoke( {"question": "What is your name?"}, dict(callbacks=[tracer]) - ) == AIMessage(content="foo") + ) == AIMessage(content="foo", id=AnyStr()) assert prompt_spy.call_args.args[1] == {"question": "What is your name?"} assert chat_spy.call_args.args[1] == ChatPromptValue( messages=[ @@ -2051,8 +2069,8 @@ async def test_prompt_with_chat_model_async( ], dict(callbacks=[tracer]), ) == [ - AIMessage(content="foo"), - AIMessage(content="foo"), + AIMessage(content="foo", id=AnyStr()), + AIMessage(content="foo", id=AnyStr()), ] assert prompt_spy.call_args.args[1] == [ {"question": "What is your name?"}, @@ -2095,9 +2113,9 @@ async def test_prompt_with_chat_model_async( {"question": "What is your name?"}, dict(callbacks=[tracer]) ) ] == [ - AIMessageChunk(content="f"), - AIMessageChunk(content="o"), - AIMessageChunk(content="o"), + AIMessageChunk(content="f", id=AnyStr()), + AIMessageChunk(content="o", id=AnyStr()), + AIMessageChunk(content="o", id=AnyStr()), ] assert prompt_spy.call_args.args[1] == {"question": "What is your name?"} assert chat_spy.call_args.args[1] == ChatPromptValue( @@ -2762,7 +2780,7 @@ def test_prompt_with_chat_model_and_parser( HumanMessage(content="What is your name?"), ] ) - assert parser_spy.call_args.args[1] == AIMessage(content="foo, bar") + assert parser_spy.call_args.args[1] == AIMessage(content="foo, bar", id=AnyStr()) assert tracer.runs == snapshot @@ -2895,7 +2913,7 @@ What is your name?""" ), ] ) - assert parser_spy.call_args.args[1] == AIMessage(content="foo, bar") + assert parser_spy.call_args.args[1] == AIMessage(content="foo, bar", id=AnyStr()) assert len([r for r in tracer.runs if r.parent_run_id is None]) == 1 parent_run = next(r for r in tracer.runs if r.parent_run_id is None) assert len(parent_run.child_runs) == 4 @@ -2941,7 +2959,7 @@ def test_seq_prompt_dict(mocker: MockerFixture, snapshot: SnapshotAssertion) -> assert chain.invoke( {"question": "What is your name?"}, dict(callbacks=[tracer]) ) == { - "chat": AIMessage(content="i'm a chatbot"), + "chat": AIMessage(content="i'm a chatbot", id=AnyStr()), "llm": "i'm a textbot", } assert prompt_spy.call_args.args[1] == {"question": "What is your name?"} @@ -3151,7 +3169,7 @@ def test_seq_prompt_map(mocker: MockerFixture, snapshot: SnapshotAssertion) -> N assert chain.invoke( {"question": "What is your name?"}, dict(callbacks=[tracer]) ) == { - "chat": AIMessage(content="i'm a chatbot"), + "chat": AIMessage(content="i'm a chatbot", id=AnyStr()), "llm": "i'm a textbot", "passthrough": ChatPromptValue( messages=[ @@ -3360,12 +3378,13 @@ async def test_map_astream() -> None: assert streamed_chunks[0] in [ {"passthrough": prompt.invoke({"question": "What is your name?"})}, {"llm": "i"}, - {"chat": AIMessageChunk(content="i")}, + {"chat": AIMessageChunk(content="i", id=AnyStr())}, ] assert len(streamed_chunks) == len(chat_res) + len(llm_res) + 1 assert all(len(c.keys()) == 1 for c in streamed_chunks) assert final_value is not None assert final_value.get("chat").content == "i'm a chatbot" + final_value["chat"].id = AnyStr() assert final_value.get("llm") == "i'm a textbot" assert final_value.get("passthrough") == prompt.invoke( {"question": "What is your name?"} diff --git a/libs/core/tests/unit_tests/runnables/test_runnable_events.py b/libs/core/tests/unit_tests/runnables/test_runnable_events.py index bc5d6102ec..8d81f6c347 100644 --- a/libs/core/tests/unit_tests/runnables/test_runnable_events.py +++ b/libs/core/tests/unit_tests/runnables/test_runnable_events.py @@ -29,6 +29,7 @@ from langchain_core.runnables import ( from langchain_core.runnables.history import RunnableWithMessageHistory from langchain_core.runnables.schema import StreamEvent from langchain_core.tools import tool +from tests.unit_tests.stubs import AnyStr def _with_nulled_run_id(events: Sequence[StreamEvent]) -> List[StreamEvent]: @@ -340,7 +341,7 @@ async def test_astream_events_from_model() -> None: "tags": ["my_model"], }, { - "data": {"chunk": AIMessageChunk(content="hello")}, + "data": {"chunk": AIMessageChunk(content="hello", id=AnyStr())}, "event": "on_chat_model_stream", "metadata": {"a": "b"}, "name": "my_model", @@ -348,7 +349,7 @@ async def test_astream_events_from_model() -> None: "tags": ["my_model"], }, { - "data": {"chunk": AIMessageChunk(content=" ")}, + "data": {"chunk": AIMessageChunk(content=" ", id=AnyStr())}, "event": "on_chat_model_stream", "metadata": {"a": "b"}, "name": "my_model", @@ -356,7 +357,7 @@ async def test_astream_events_from_model() -> None: "tags": ["my_model"], }, { - "data": {"chunk": AIMessageChunk(content="world!")}, + "data": {"chunk": AIMessageChunk(content="world!", id=AnyStr())}, "event": "on_chat_model_stream", "metadata": {"a": "b"}, "name": "my_model", @@ -364,7 +365,7 @@ async def test_astream_events_from_model() -> None: "tags": ["my_model"], }, { - "data": {"output": AIMessageChunk(content="hello world!")}, + "data": {"output": AIMessageChunk(content="hello world!", id=AnyStr())}, "event": "on_chat_model_end", "metadata": {"a": "b"}, "name": "my_model", @@ -399,7 +400,7 @@ async def test_astream_events_from_model() -> None: "tags": ["my_model"], }, { - "data": {"chunk": AIMessageChunk(content="hello")}, + "data": {"chunk": AIMessageChunk(content="hello", id=AnyStr())}, "event": "on_chat_model_stream", "metadata": {"a": "b"}, "name": "my_model", @@ -407,7 +408,7 @@ async def test_astream_events_from_model() -> None: "tags": ["my_model"], }, { - "data": {"chunk": AIMessageChunk(content=" ")}, + "data": {"chunk": AIMessageChunk(content=" ", id=AnyStr())}, "event": "on_chat_model_stream", "metadata": {"a": "b"}, "name": "my_model", @@ -415,7 +416,7 @@ async def test_astream_events_from_model() -> None: "tags": ["my_model"], }, { - "data": {"chunk": AIMessageChunk(content="world!")}, + "data": {"chunk": AIMessageChunk(content="world!", id=AnyStr())}, "event": "on_chat_model_stream", "metadata": {"a": "b"}, "name": "my_model", @@ -430,7 +431,9 @@ async def test_astream_events_from_model() -> None: [ { "generation_info": None, - "message": AIMessage(content="hello world!"), + "message": AIMessage( + content="hello world!", id=AnyStr() + ), "text": "hello world!", "type": "ChatGeneration", } @@ -447,7 +450,7 @@ async def test_astream_events_from_model() -> None: "tags": ["my_model"], }, { - "data": {"chunk": AIMessage(content="hello world!")}, + "data": {"chunk": AIMessage(content="hello world!", id=AnyStr())}, "event": "on_chain_stream", "metadata": {}, "name": "i_dont_stream", @@ -455,7 +458,7 @@ async def test_astream_events_from_model() -> None: "tags": [], }, { - "data": {"output": AIMessage(content="hello world!")}, + "data": {"output": AIMessage(content="hello world!", id=AnyStr())}, "event": "on_chain_end", "metadata": {}, "name": "i_dont_stream", @@ -490,7 +493,7 @@ async def test_astream_events_from_model() -> None: "tags": ["my_model"], }, { - "data": {"chunk": AIMessageChunk(content="hello")}, + "data": {"chunk": AIMessageChunk(content="hello", id=AnyStr())}, "event": "on_chat_model_stream", "metadata": {"a": "b"}, "name": "my_model", @@ -498,7 +501,7 @@ async def test_astream_events_from_model() -> None: "tags": ["my_model"], }, { - "data": {"chunk": AIMessageChunk(content=" ")}, + "data": {"chunk": AIMessageChunk(content=" ", id=AnyStr())}, "event": "on_chat_model_stream", "metadata": {"a": "b"}, "name": "my_model", @@ -506,7 +509,7 @@ async def test_astream_events_from_model() -> None: "tags": ["my_model"], }, { - "data": {"chunk": AIMessageChunk(content="world!")}, + "data": {"chunk": AIMessageChunk(content="world!", id=AnyStr())}, "event": "on_chat_model_stream", "metadata": {"a": "b"}, "name": "my_model", @@ -521,7 +524,9 @@ async def test_astream_events_from_model() -> None: [ { "generation_info": None, - "message": AIMessage(content="hello world!"), + "message": AIMessage( + content="hello world!", id=AnyStr() + ), "text": "hello world!", "type": "ChatGeneration", } @@ -538,7 +543,7 @@ async def test_astream_events_from_model() -> None: "tags": ["my_model"], }, { - "data": {"chunk": AIMessage(content="hello world!")}, + "data": {"chunk": AIMessage(content="hello world!", id=AnyStr())}, "event": "on_chain_stream", "metadata": {}, "name": "ai_dont_stream", @@ -546,7 +551,7 @@ async def test_astream_events_from_model() -> None: "tags": [], }, { - "data": {"output": AIMessage(content="hello world!")}, + "data": {"output": AIMessage(content="hello world!", id=AnyStr())}, "event": "on_chain_end", "metadata": {}, "name": "ai_dont_stream", @@ -563,7 +568,10 @@ async def test_event_stream_with_simple_chain() -> None: ).with_config({"run_name": "my_template", "tags": ["my_template"]}) infinite_cycle = cycle( - [AIMessage(content="hello world!"), AIMessage(content="goodbye world!")] + [ + AIMessage(content="hello world!", id="ai1"), + AIMessage(content="goodbye world!", id="ai2"), + ] ) # When streaming GenericFakeChatModel breaks AIMessage into chunks based on spaces model = ( @@ -640,7 +648,7 @@ async def test_event_stream_with_simple_chain() -> None: "tags": ["my_chain", "my_model", "seq:step:2"], }, { - "data": {"chunk": AIMessageChunk(content="hello")}, + "data": {"chunk": AIMessageChunk(content="hello", id="ai1")}, "event": "on_chat_model_stream", "metadata": {"a": "b", "foo": "bar"}, "name": "my_model", @@ -648,7 +656,7 @@ async def test_event_stream_with_simple_chain() -> None: "tags": ["my_chain", "my_model", "seq:step:2"], }, { - "data": {"chunk": AIMessageChunk(content="hello")}, + "data": {"chunk": AIMessageChunk(content="hello", id="ai1")}, "event": "on_chain_stream", "metadata": {"foo": "bar"}, "name": "my_chain", @@ -656,7 +664,7 @@ async def test_event_stream_with_simple_chain() -> None: "tags": ["my_chain"], }, { - "data": {"chunk": AIMessageChunk(content=" ")}, + "data": {"chunk": AIMessageChunk(content=" ", id="ai1")}, "event": "on_chat_model_stream", "metadata": {"a": "b", "foo": "bar"}, "name": "my_model", @@ -664,7 +672,7 @@ async def test_event_stream_with_simple_chain() -> None: "tags": ["my_chain", "my_model", "seq:step:2"], }, { - "data": {"chunk": AIMessageChunk(content=" ")}, + "data": {"chunk": AIMessageChunk(content=" ", id="ai1")}, "event": "on_chain_stream", "metadata": {"foo": "bar"}, "name": "my_chain", @@ -672,7 +680,7 @@ async def test_event_stream_with_simple_chain() -> None: "tags": ["my_chain"], }, { - "data": {"chunk": AIMessageChunk(content="world!")}, + "data": {"chunk": AIMessageChunk(content="world!", id="ai1")}, "event": "on_chat_model_stream", "metadata": {"a": "b", "foo": "bar"}, "name": "my_model", @@ -680,7 +688,7 @@ async def test_event_stream_with_simple_chain() -> None: "tags": ["my_chain", "my_model", "seq:step:2"], }, { - "data": {"chunk": AIMessageChunk(content="world!")}, + "data": {"chunk": AIMessageChunk(content="world!", id="ai1")}, "event": "on_chain_stream", "metadata": {"foo": "bar"}, "name": "my_chain", @@ -702,7 +710,9 @@ async def test_event_stream_with_simple_chain() -> None: [ { "generation_info": None, - "message": AIMessageChunk(content="hello world!"), + "message": AIMessageChunk( + content="hello world!", id="ai1" + ), "text": "hello world!", "type": "ChatGenerationChunk", } @@ -719,7 +729,7 @@ async def test_event_stream_with_simple_chain() -> None: "tags": ["my_chain", "my_model", "seq:step:2"], }, { - "data": {"output": AIMessageChunk(content="hello world!")}, + "data": {"output": AIMessageChunk(content="hello world!", id="ai1")}, "event": "on_chain_end", "metadata": {"foo": "bar"}, "name": "my_chain", @@ -1332,8 +1342,8 @@ async def test_runnable_each() -> None: async def test_events_astream_config() -> None: """Test that astream events support accepting config""" - infinite_cycle = cycle([AIMessage(content="hello world!")]) - good_world_on_repeat = cycle([AIMessage(content="Goodbye world")]) + infinite_cycle = cycle([AIMessage(content="hello world!", id="ai1")]) + good_world_on_repeat = cycle([AIMessage(content="Goodbye world", id="ai2")]) model = GenericFakeChatModel(messages=infinite_cycle).configurable_fields( messages=ConfigurableField( id="messages", @@ -1343,7 +1353,7 @@ async def test_events_astream_config() -> None: ) model_02 = model.with_config({"configurable": {"messages": good_world_on_repeat}}) - assert model_02.invoke("hello") == AIMessage(content="Goodbye world") + assert model_02.invoke("hello") == AIMessage(content="Goodbye world", id="ai2") events = await _collect_events(model_02.astream_events("hello", version="v1")) assert events == [ @@ -1356,7 +1366,7 @@ async def test_events_astream_config() -> None: "tags": [], }, { - "data": {"chunk": AIMessageChunk(content="Goodbye")}, + "data": {"chunk": AIMessageChunk(content="Goodbye", id="ai2")}, "event": "on_chat_model_stream", "metadata": {}, "name": "RunnableConfigurableFields", @@ -1364,7 +1374,7 @@ async def test_events_astream_config() -> None: "tags": [], }, { - "data": {"chunk": AIMessageChunk(content=" ")}, + "data": {"chunk": AIMessageChunk(content=" ", id="ai2")}, "event": "on_chat_model_stream", "metadata": {}, "name": "RunnableConfigurableFields", @@ -1372,7 +1382,7 @@ async def test_events_astream_config() -> None: "tags": [], }, { - "data": {"chunk": AIMessageChunk(content="world")}, + "data": {"chunk": AIMessageChunk(content="world", id="ai2")}, "event": "on_chat_model_stream", "metadata": {}, "name": "RunnableConfigurableFields", @@ -1380,7 +1390,7 @@ async def test_events_astream_config() -> None: "tags": [], }, { - "data": {"output": AIMessageChunk(content="Goodbye world")}, + "data": {"output": AIMessageChunk(content="Goodbye world", id="ai2")}, "event": "on_chat_model_end", "metadata": {}, "name": "RunnableConfigurableFields", @@ -1418,7 +1428,9 @@ async def test_runnable_with_message_history() -> None: store[session_id] = [] return InMemoryHistory(messages=store[session_id]) - infinite_cycle = cycle([AIMessage(content="hello"), AIMessage(content="world")]) + infinite_cycle = cycle( + [AIMessage(content="hello", id="ai3"), AIMessage(content="world", id="ai4")] + ) prompt = ChatPromptTemplate.from_messages( [ @@ -1441,7 +1453,10 @@ async def test_runnable_with_message_history() -> None: ).ainvoke({"question": "hello"}) assert store == { - "session-123": [HumanMessage(content="hello"), AIMessage(content="hello")] + "session-123": [ + HumanMessage(content="hello"), + AIMessage(content="hello", id="ai3"), + ] } with_message_history.with_config( @@ -1450,8 +1465,8 @@ async def test_runnable_with_message_history() -> None: assert store == { "session-123": [ HumanMessage(content="hello"), - AIMessage(content="hello"), + AIMessage(content="hello", id="ai3"), HumanMessage(content="meow"), - AIMessage(content="world"), + AIMessage(content="world", id="ai4"), ] } diff --git a/libs/core/tests/unit_tests/stubs.py b/libs/core/tests/unit_tests/stubs.py new file mode 100644 index 0000000000..38e84a3a7a --- /dev/null +++ b/libs/core/tests/unit_tests/stubs.py @@ -0,0 +1,6 @@ +from typing import Any + + +class AnyStr(str): + def __eq__(self, other: Any) -> bool: + return isinstance(other, str) diff --git a/libs/core/tests/unit_tests/test_messages.py b/libs/core/tests/unit_tests/test_messages.py index 7cd7c9a913..aeb480e206 100644 --- a/libs/core/tests/unit_tests/test_messages.py +++ b/libs/core/tests/unit_tests/test_messages.py @@ -23,15 +23,16 @@ from langchain_core.messages import ( def test_message_chunks() -> None: - assert AIMessageChunk(content="I am") + AIMessageChunk( + assert AIMessageChunk(content="I am", id="ai3") + AIMessageChunk( content=" indeed." ) == AIMessageChunk( - content="I am indeed." + content="I am indeed.", id="ai3" ), "MessageChunk + MessageChunk should be a MessageChunk" assert ( - AIMessageChunk(content="I am") + HumanMessageChunk(content=" indeed.") - == AIMessageChunk(content="I am indeed.") + AIMessageChunk(content="I am", id="ai2") + + HumanMessageChunk(content=" indeed.", id="human1") + == AIMessageChunk(content="I am indeed.", id="ai2") ), "MessageChunk + MessageChunk should be a MessageChunk of same class as the left side" # noqa: E501 assert ( @@ -69,10 +70,10 @@ def test_message_chunks() -> None: def test_chat_message_chunks() -> None: - assert ChatMessageChunk(role="User", content="I am") + ChatMessageChunk( + assert ChatMessageChunk(role="User", content="I am", id="ai4") + ChatMessageChunk( role="User", content=" indeed." ) == ChatMessageChunk( - role="User", content="I am indeed." + id="ai4", role="User", content="I am indeed." ), "ChatMessageChunk + ChatMessageChunk should be a ChatMessageChunk" with pytest.raises(ValueError): @@ -94,10 +95,10 @@ def test_chat_message_chunks() -> None: def test_function_message_chunks() -> None: - assert FunctionMessageChunk(name="hello", content="I am") + FunctionMessageChunk( - name="hello", content=" indeed." - ) == FunctionMessageChunk( - name="hello", content="I am indeed." + assert FunctionMessageChunk( + name="hello", content="I am", id="ai5" + ) + FunctionMessageChunk(name="hello", content=" indeed.") == FunctionMessageChunk( + id="ai5", name="hello", content="I am indeed." ), "FunctionMessageChunk + FunctionMessageChunk should be a FunctionMessageChunk" with pytest.raises(ValueError): diff --git a/libs/langchain/Makefile b/libs/langchain/Makefile index cff2f34854..119e15422f 100644 --- a/libs/langchain/Makefile +++ b/libs/langchain/Makefile @@ -25,7 +25,7 @@ extended_tests: poetry run pytest --disable-socket --allow-unix-socket --only-extended tests/unit_tests test_watch: - poetry run ptw --snapshot-update --now . -- -x --disable-socket --allow-unix-socket tests/unit_tests + poetry run ptw --snapshot-update --now . -- -x --disable-socket --allow-unix-socket --disable-warnings tests/unit_tests test_watch_extended: poetry run ptw --snapshot-update --now . -- -x --disable-socket --allow-unix-socket --only-extended tests/unit_tests diff --git a/libs/langchain/tests/unit_tests/agents/test_agent.py b/libs/langchain/tests/unit_tests/agents/test_agent.py index 5ce9def909..9dc3198d0b 100644 --- a/libs/langchain/tests/unit_tests/agents/test_agent.py +++ b/libs/langchain/tests/unit_tests/agents/test_agent.py @@ -35,6 +35,7 @@ from langchain.prompts import ChatPromptTemplate from langchain.tools import tool from tests.unit_tests.callbacks.fake_callback_handler import FakeCallbackHandler from tests.unit_tests.llms.fake_chat_model import GenericFakeChatModel +from tests.unit_tests.stubs import AnyStr class FakeListLLM(LLM): @@ -839,6 +840,7 @@ async def test_openai_agent_with_streaming() -> None: log="\nInvoking: `find_pet` with `{'pet': 'cat'}`\n\n\n", message_log=[ AIMessageChunk( + id=AnyStr(), content="", additional_kwargs={ "function_call": { @@ -852,6 +854,7 @@ async def test_openai_agent_with_streaming() -> None: ], "messages": [ AIMessageChunk( + id=AnyStr(), content="", additional_kwargs={ "function_call": { @@ -874,6 +877,7 @@ async def test_openai_agent_with_streaming() -> None: log="\nInvoking: `find_pet` with `{'pet': 'cat'}`\n\n\n", message_log=[ AIMessageChunk( + id=AnyStr(), content="", additional_kwargs={ "function_call": { @@ -1014,6 +1018,7 @@ async def test_openai_agent_tools_agent() -> None: log="\nInvoking: `find_pet` with `{'pet': 'cat'}`\n\n\n", message_log=[ AIMessageChunk( + id=AnyStr(), content="", additional_kwargs={ "tool_calls": [ @@ -1040,6 +1045,7 @@ async def test_openai_agent_tools_agent() -> None: ], "messages": [ AIMessageChunk( + id=AnyStr(), content="", additional_kwargs={ "tool_calls": [ @@ -1067,6 +1073,7 @@ async def test_openai_agent_tools_agent() -> None: log="\nInvoking: `check_time` with `{}`\n\n\n", message_log=[ AIMessageChunk( + id=AnyStr(), content="", additional_kwargs={ "tool_calls": [ @@ -1093,6 +1100,7 @@ async def test_openai_agent_tools_agent() -> None: ], "messages": [ AIMessageChunk( + id=AnyStr(), content="", additional_kwargs={ "tool_calls": [ @@ -1124,6 +1132,7 @@ async def test_openai_agent_tools_agent() -> None: log="\nInvoking: `find_pet` with `{'pet': 'cat'}`\n\n\n", message_log=[ AIMessageChunk( + id=AnyStr(), content="", additional_kwargs={ "tool_calls": [ @@ -1166,6 +1175,7 @@ async def test_openai_agent_tools_agent() -> None: log="\nInvoking: `check_time` with `{}`\n\n\n", message_log=[ AIMessageChunk( + id=AnyStr(), content="", additional_kwargs={ "tool_calls": [ diff --git a/libs/langchain/tests/unit_tests/llms/fake_chat_model.py b/libs/langchain/tests/unit_tests/llms/fake_chat_model.py index ffc80bf683..fe0d1c9c61 100644 --- a/libs/langchain/tests/unit_tests/llms/fake_chat_model.py +++ b/libs/langchain/tests/unit_tests/llms/fake_chat_model.py @@ -119,7 +119,9 @@ class GenericFakeChatModel(BaseChatModel): content_chunks = cast(List[str], re.split(r"(\s)", content)) for token in content_chunks: - chunk = ChatGenerationChunk(message=AIMessageChunk(content=token)) + chunk = ChatGenerationChunk( + message=AIMessageChunk(id=message.id, content=token) + ) if run_manager: run_manager.on_llm_new_token(token, chunk=chunk) yield chunk @@ -136,6 +138,7 @@ class GenericFakeChatModel(BaseChatModel): for fvalue_chunk in fvalue_chunks: chunk = ChatGenerationChunk( message=AIMessageChunk( + id=message.id, content="", additional_kwargs={ "function_call": {fkey: fvalue_chunk} @@ -151,6 +154,7 @@ class GenericFakeChatModel(BaseChatModel): else: chunk = ChatGenerationChunk( message=AIMessageChunk( + id=message.id, content="", additional_kwargs={"function_call": {fkey: fvalue}}, ) @@ -164,7 +168,7 @@ class GenericFakeChatModel(BaseChatModel): else: chunk = ChatGenerationChunk( message=AIMessageChunk( - content="", additional_kwargs={key: value} + id=message.id, content="", additional_kwargs={key: value} ) ) if run_manager: diff --git a/libs/langchain/tests/unit_tests/llms/test_fake_chat_model.py b/libs/langchain/tests/unit_tests/llms/test_fake_chat_model.py index db658736e8..7a0362740c 100644 --- a/libs/langchain/tests/unit_tests/llms/test_fake_chat_model.py +++ b/libs/langchain/tests/unit_tests/llms/test_fake_chat_model.py @@ -8,6 +8,7 @@ from langchain_core.outputs import ChatGenerationChunk, GenerationChunk from langchain.callbacks.base import AsyncCallbackHandler from tests.unit_tests.llms.fake_chat_model import GenericFakeChatModel +from tests.unit_tests.stubs import AnyStr def test_generic_fake_chat_model_invoke() -> None: @@ -15,11 +16,11 @@ def test_generic_fake_chat_model_invoke() -> None: infinite_cycle = cycle([AIMessage(content="hello"), AIMessage(content="goodbye")]) model = GenericFakeChatModel(messages=infinite_cycle) response = model.invoke("meow") - assert response == AIMessage(content="hello") + assert response == AIMessage(content="hello", id=AnyStr()) response = model.invoke("kitty") - assert response == AIMessage(content="goodbye") + assert response == AIMessage(content="goodbye", id=AnyStr()) response = model.invoke("meow") - assert response == AIMessage(content="hello") + assert response == AIMessage(content="hello", id=AnyStr()) async def test_generic_fake_chat_model_ainvoke() -> None: @@ -27,11 +28,11 @@ async def test_generic_fake_chat_model_ainvoke() -> None: infinite_cycle = cycle([AIMessage(content="hello"), AIMessage(content="goodbye")]) model = GenericFakeChatModel(messages=infinite_cycle) response = await model.ainvoke("meow") - assert response == AIMessage(content="hello") + assert response == AIMessage(content="hello", id=AnyStr()) response = await model.ainvoke("kitty") - assert response == AIMessage(content="goodbye") + assert response == AIMessage(content="goodbye", id=AnyStr()) response = await model.ainvoke("meow") - assert response == AIMessage(content="hello") + assert response == AIMessage(content="hello", id=AnyStr()) async def test_generic_fake_chat_model_stream() -> None: @@ -44,16 +45,16 @@ async def test_generic_fake_chat_model_stream() -> None: model = GenericFakeChatModel(messages=infinite_cycle) chunks = [chunk async for chunk in model.astream("meow")] assert chunks == [ - AIMessageChunk(content="hello"), - AIMessageChunk(content=" "), - AIMessageChunk(content="goodbye"), + AIMessageChunk(content="hello", id=AnyStr()), + AIMessageChunk(content=" ", id=AnyStr()), + AIMessageChunk(content="goodbye", id=AnyStr()), ] chunks = [chunk for chunk in model.stream("meow")] assert chunks == [ - AIMessageChunk(content="hello"), - AIMessageChunk(content=" "), - AIMessageChunk(content="goodbye"), + AIMessageChunk(content="hello", id=AnyStr()), + AIMessageChunk(content=" ", id=AnyStr()), + AIMessageChunk(content="goodbye", id=AnyStr()), ] # Test streaming of additional kwargs. @@ -62,11 +63,12 @@ async def test_generic_fake_chat_model_stream() -> None: model = GenericFakeChatModel(messages=cycle([message])) chunks = [chunk async for chunk in model.astream("meow")] assert chunks == [ - AIMessageChunk(content="", additional_kwargs={"foo": 42}), - AIMessageChunk(content="", additional_kwargs={"bar": 24}), + AIMessageChunk(content="", additional_kwargs={"foo": 42}, id=AnyStr()), + AIMessageChunk(content="", additional_kwargs={"bar": 24}, id=AnyStr()), ] message = AIMessage( + id="a1", content="", additional_kwargs={ "function_call": { @@ -81,18 +83,22 @@ async def test_generic_fake_chat_model_stream() -> None: assert chunks == [ AIMessageChunk( - content="", additional_kwargs={"function_call": {"name": "move_file"}} + content="", + additional_kwargs={"function_call": {"name": "move_file"}}, + id="a1", ), AIMessageChunk( + id="a1", content="", additional_kwargs={ "function_call": {"arguments": '{\n "source_path": "foo"'} }, ), AIMessageChunk( - content="", additional_kwargs={"function_call": {"arguments": ","}} + id="a1", content="", additional_kwargs={"function_call": {"arguments": ","}} ), AIMessageChunk( + id="a1", content="", additional_kwargs={ "function_call": {"arguments": '\n "destination_path": "bar"\n}'} @@ -108,6 +114,7 @@ async def test_generic_fake_chat_model_stream() -> None: accumulate_chunks += chunk assert accumulate_chunks == AIMessageChunk( + id="a1", content="", additional_kwargs={ "function_call": { @@ -128,9 +135,9 @@ async def test_generic_fake_chat_model_astream_log() -> None: ] final = log_patches[-1] assert final.state["streamed_output"] == [ - AIMessageChunk(content="hello"), - AIMessageChunk(content=" "), - AIMessageChunk(content="goodbye"), + AIMessageChunk(content="hello", id=AnyStr()), + AIMessageChunk(content=" ", id=AnyStr()), + AIMessageChunk(content="goodbye", id=AnyStr()), ] @@ -178,8 +185,8 @@ async def test_callback_handlers() -> None: # New model results = list(model.stream("meow", {"callbacks": [MyCustomAsyncHandler(tokens)]})) assert results == [ - AIMessageChunk(content="hello"), - AIMessageChunk(content=" "), - AIMessageChunk(content="goodbye"), + AIMessageChunk(content="hello", id=AnyStr()), + AIMessageChunk(content=" ", id=AnyStr()), + AIMessageChunk(content="goodbye", id=AnyStr()), ] assert tokens == ["hello", " ", "goodbye"] diff --git a/libs/langchain/tests/unit_tests/load/__snapshots__/test_dump.ambr b/libs/langchain/tests/unit_tests/load/__snapshots__/test_dump.ambr index 11d73a7c63..e6d27fada5 100644 --- a/libs/langchain/tests/unit_tests/load/__snapshots__/test_dump.ambr +++ b/libs/langchain/tests/unit_tests/load/__snapshots__/test_dump.ambr @@ -97,464 +97,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "OpenAIInput", - "anyOf": [ - { - "type": "string" - }, - { - "$ref": "#/definitions/StringPromptValue" - }, - { - "$ref": "#/definitions/ChatPromptValueConcrete" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - } - ], - "definitions": { - "StringPromptValue": { - "title": "StringPromptValue", - "description": "String prompt value.", - "type": "object", - "properties": { - "text": { - "title": "Text", - "type": "string" - }, - "type": { - "title": "Type", - "default": "StringPromptValue", - "enum": [ - "StringPromptValue" - ], - "type": "string" - } - }, - "required": [ - "text" - ] - }, - "AIMessage": { - "title": "AIMessage", - "description": "Message from an AI.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "ai", - "enum": [ - "ai" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "HumanMessage": { - "title": "HumanMessage", - "description": "Message from a human.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "human", - "enum": [ - "human" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "ChatMessage": { - "title": "ChatMessage", - "description": "Message that can be assigned an arbitrary speaker (i.e. role).", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "chat", - "enum": [ - "chat" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "role": { - "title": "Role", - "type": "string" - } - }, - "required": [ - "content", - "role" - ] - }, - "SystemMessage": { - "title": "SystemMessage", - "description": "Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "system", - "enum": [ - "system" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content" - ] - }, - "FunctionMessage": { - "title": "FunctionMessage", - "description": "Message for passing the result of executing a function back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "function", - "enum": [ - "function" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content", - "name" - ] - }, - "ToolMessage": { - "title": "ToolMessage", - "description": "Message for passing the result of executing a tool back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "tool", - "enum": [ - "tool" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "tool_call_id": { - "title": "Tool Call Id", - "type": "string" - } - }, - "required": [ - "content", - "tool_call_id" - ] - }, - "ChatPromptValueConcrete": { - "title": "ChatPromptValueConcrete", - "description": "Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.", - "type": "object", - "properties": { - "messages": { - "title": "Messages", - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - }, - "type": { - "title": "Type", - "default": "ChatPromptValueConcrete", - "enum": [ - "ChatPromptValueConcrete" - ], - "type": "string" - } - }, - "required": [ - "messages" - ] - } - } - } + "data": "OpenAIInput" }, { "id": 1, @@ -572,10 +115,7 @@ { "id": 2, "type": "schema", - "data": { - "title": "OpenAIOutput", - "type": "string" - } + "data": "OpenAIOutput" } ], "edges": [ @@ -613,16 +153,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "PromptInput", - "type": "object", - "properties": { - "name": { - "title": "Name", - "type": "string" - } - } - } + "data": "PromptInput" }, { "id": 1, @@ -640,436 +171,7 @@ { "id": 2, "type": "schema", - "data": { - "title": "PromptTemplateOutput", - "anyOf": [ - { - "$ref": "#/definitions/StringPromptValue" - }, - { - "$ref": "#/definitions/ChatPromptValueConcrete" - } - ], - "definitions": { - "StringPromptValue": { - "title": "StringPromptValue", - "description": "String prompt value.", - "type": "object", - "properties": { - "text": { - "title": "Text", - "type": "string" - }, - "type": { - "title": "Type", - "default": "StringPromptValue", - "enum": [ - "StringPromptValue" - ], - "type": "string" - } - }, - "required": [ - "text" - ] - }, - "AIMessage": { - "title": "AIMessage", - "description": "Message from an AI.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "ai", - "enum": [ - "ai" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "HumanMessage": { - "title": "HumanMessage", - "description": "Message from a human.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "human", - "enum": [ - "human" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "ChatMessage": { - "title": "ChatMessage", - "description": "Message that can be assigned an arbitrary speaker (i.e. role).", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "chat", - "enum": [ - "chat" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "role": { - "title": "Role", - "type": "string" - } - }, - "required": [ - "content", - "role" - ] - }, - "SystemMessage": { - "title": "SystemMessage", - "description": "Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "system", - "enum": [ - "system" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content" - ] - }, - "FunctionMessage": { - "title": "FunctionMessage", - "description": "Message for passing the result of executing a function back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "function", - "enum": [ - "function" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content", - "name" - ] - }, - "ToolMessage": { - "title": "ToolMessage", - "description": "Message for passing the result of executing a tool back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "tool", - "enum": [ - "tool" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "tool_call_id": { - "title": "Tool Call Id", - "type": "string" - } - }, - "required": [ - "content", - "tool_call_id" - ] - }, - "ChatPromptValueConcrete": { - "title": "ChatPromptValueConcrete", - "description": "Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.", - "type": "object", - "properties": { - "messages": { - "title": "Messages", - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - }, - "type": { - "title": "Type", - "default": "ChatPromptValueConcrete", - "enum": [ - "ChatPromptValueConcrete" - ], - "type": "string" - } - }, - "required": [ - "messages" - ] - } - } - } + "data": "PromptTemplateOutput" } ], "edges": [ @@ -1091,15 +193,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "ChainInput", - "type": "object", - "properties": { - "name": { - "title": "Name" - } - } - } + "data": "ChainInput" }, { "id": 1, @@ -1117,15 +211,7 @@ { "id": 2, "type": "schema", - "data": { - "title": "ChainOutput", - "type": "object", - "properties": { - "text": { - "title": "Text" - } - } - } + "data": "ChainOutput" } ], "edges": [ @@ -1180,464 +266,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "ChatOpenAIInput", - "anyOf": [ - { - "type": "string" - }, - { - "$ref": "#/definitions/StringPromptValue" - }, - { - "$ref": "#/definitions/ChatPromptValueConcrete" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - } - ], - "definitions": { - "StringPromptValue": { - "title": "StringPromptValue", - "description": "String prompt value.", - "type": "object", - "properties": { - "text": { - "title": "Text", - "type": "string" - }, - "type": { - "title": "Type", - "default": "StringPromptValue", - "enum": [ - "StringPromptValue" - ], - "type": "string" - } - }, - "required": [ - "text" - ] - }, - "AIMessage": { - "title": "AIMessage", - "description": "Message from an AI.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "ai", - "enum": [ - "ai" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "HumanMessage": { - "title": "HumanMessage", - "description": "Message from a human.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "human", - "enum": [ - "human" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "ChatMessage": { - "title": "ChatMessage", - "description": "Message that can be assigned an arbitrary speaker (i.e. role).", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "chat", - "enum": [ - "chat" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "role": { - "title": "Role", - "type": "string" - } - }, - "required": [ - "content", - "role" - ] - }, - "SystemMessage": { - "title": "SystemMessage", - "description": "Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "system", - "enum": [ - "system" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content" - ] - }, - "FunctionMessage": { - "title": "FunctionMessage", - "description": "Message for passing the result of executing a function back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "function", - "enum": [ - "function" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content", - "name" - ] - }, - "ToolMessage": { - "title": "ToolMessage", - "description": "Message for passing the result of executing a tool back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "tool", - "enum": [ - "tool" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "tool_call_id": { - "title": "Tool Call Id", - "type": "string" - } - }, - "required": [ - "content", - "tool_call_id" - ] - }, - "ChatPromptValueConcrete": { - "title": "ChatPromptValueConcrete", - "description": "Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.", - "type": "object", - "properties": { - "messages": { - "title": "Messages", - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - }, - "type": { - "title": "Type", - "default": "ChatPromptValueConcrete", - "enum": [ - "ChatPromptValueConcrete" - ], - "type": "string" - } - }, - "required": [ - "messages" - ] - } - } - } + "data": "ChatOpenAIInput" }, { "id": 1, @@ -1655,382 +284,7 @@ { "id": 2, "type": "schema", - "data": { - "title": "ChatOpenAIOutput", - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ], - "definitions": { - "AIMessage": { - "title": "AIMessage", - "description": "Message from an AI.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "ai", - "enum": [ - "ai" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "HumanMessage": { - "title": "HumanMessage", - "description": "Message from a human.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "human", - "enum": [ - "human" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "ChatMessage": { - "title": "ChatMessage", - "description": "Message that can be assigned an arbitrary speaker (i.e. role).", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "chat", - "enum": [ - "chat" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "role": { - "title": "Role", - "type": "string" - } - }, - "required": [ - "content", - "role" - ] - }, - "SystemMessage": { - "title": "SystemMessage", - "description": "Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "system", - "enum": [ - "system" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content" - ] - }, - "FunctionMessage": { - "title": "FunctionMessage", - "description": "Message for passing the result of executing a function back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "function", - "enum": [ - "function" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content", - "name" - ] - }, - "ToolMessage": { - "title": "ToolMessage", - "description": "Message for passing the result of executing a tool back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "tool", - "enum": [ - "tool" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "tool_call_id": { - "title": "Tool Call Id", - "type": "string" - } - }, - "required": [ - "content", - "tool_call_id" - ] - } - } - } + "data": "ChatOpenAIOutput" } ], "edges": [ @@ -2092,16 +346,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "PromptInput", - "type": "object", - "properties": { - "name": { - "title": "Name", - "type": "string" - } - } - } + "data": "PromptInput" }, { "id": 1, @@ -2119,436 +364,7 @@ { "id": 2, "type": "schema", - "data": { - "title": "PromptTemplateOutput", - "anyOf": [ - { - "$ref": "#/definitions/StringPromptValue" - }, - { - "$ref": "#/definitions/ChatPromptValueConcrete" - } - ], - "definitions": { - "StringPromptValue": { - "title": "StringPromptValue", - "description": "String prompt value.", - "type": "object", - "properties": { - "text": { - "title": "Text", - "type": "string" - }, - "type": { - "title": "Type", - "default": "StringPromptValue", - "enum": [ - "StringPromptValue" - ], - "type": "string" - } - }, - "required": [ - "text" - ] - }, - "AIMessage": { - "title": "AIMessage", - "description": "Message from an AI.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "ai", - "enum": [ - "ai" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "HumanMessage": { - "title": "HumanMessage", - "description": "Message from a human.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "human", - "enum": [ - "human" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "ChatMessage": { - "title": "ChatMessage", - "description": "Message that can be assigned an arbitrary speaker (i.e. role).", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "chat", - "enum": [ - "chat" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "role": { - "title": "Role", - "type": "string" - } - }, - "required": [ - "content", - "role" - ] - }, - "SystemMessage": { - "title": "SystemMessage", - "description": "Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "system", - "enum": [ - "system" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content" - ] - }, - "FunctionMessage": { - "title": "FunctionMessage", - "description": "Message for passing the result of executing a function back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "function", - "enum": [ - "function" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content", - "name" - ] - }, - "ToolMessage": { - "title": "ToolMessage", - "description": "Message for passing the result of executing a tool back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "tool", - "enum": [ - "tool" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "tool_call_id": { - "title": "Tool Call Id", - "type": "string" - } - }, - "required": [ - "content", - "tool_call_id" - ] - }, - "ChatPromptValueConcrete": { - "title": "ChatPromptValueConcrete", - "description": "Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.", - "type": "object", - "properties": { - "messages": { - "title": "Messages", - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - }, - "type": { - "title": "Type", - "default": "ChatPromptValueConcrete", - "enum": [ - "ChatPromptValueConcrete" - ], - "type": "string" - } - }, - "required": [ - "messages" - ] - } - } - } + "data": "PromptTemplateOutput" } ], "edges": [ @@ -2574,16 +390,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "PromptInput", - "type": "object", - "properties": { - "name": { - "title": "Name", - "type": "string" - } - } - } + "data": "PromptInput" }, { "id": 1, @@ -2601,436 +408,7 @@ { "id": 2, "type": "schema", - "data": { - "title": "ChatPromptTemplateOutput", - "anyOf": [ - { - "$ref": "#/definitions/StringPromptValue" - }, - { - "$ref": "#/definitions/ChatPromptValueConcrete" - } - ], - "definitions": { - "StringPromptValue": { - "title": "StringPromptValue", - "description": "String prompt value.", - "type": "object", - "properties": { - "text": { - "title": "Text", - "type": "string" - }, - "type": { - "title": "Type", - "default": "StringPromptValue", - "enum": [ - "StringPromptValue" - ], - "type": "string" - } - }, - "required": [ - "text" - ] - }, - "AIMessage": { - "title": "AIMessage", - "description": "Message from an AI.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "ai", - "enum": [ - "ai" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "HumanMessage": { - "title": "HumanMessage", - "description": "Message from a human.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "human", - "enum": [ - "human" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "ChatMessage": { - "title": "ChatMessage", - "description": "Message that can be assigned an arbitrary speaker (i.e. role).", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "chat", - "enum": [ - "chat" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "role": { - "title": "Role", - "type": "string" - } - }, - "required": [ - "content", - "role" - ] - }, - "SystemMessage": { - "title": "SystemMessage", - "description": "Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "system", - "enum": [ - "system" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content" - ] - }, - "FunctionMessage": { - "title": "FunctionMessage", - "description": "Message for passing the result of executing a function back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "function", - "enum": [ - "function" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content", - "name" - ] - }, - "ToolMessage": { - "title": "ToolMessage", - "description": "Message for passing the result of executing a tool back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "tool", - "enum": [ - "tool" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "tool_call_id": { - "title": "Tool Call Id", - "type": "string" - } - }, - "required": [ - "content", - "tool_call_id" - ] - }, - "ChatPromptValueConcrete": { - "title": "ChatPromptValueConcrete", - "description": "Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.", - "type": "object", - "properties": { - "messages": { - "title": "Messages", - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - }, - "type": { - "title": "Type", - "default": "ChatPromptValueConcrete", - "enum": [ - "ChatPromptValueConcrete" - ], - "type": "string" - } - }, - "required": [ - "messages" - ] - } - } - } + "data": "ChatPromptTemplateOutput" } ], "edges": [ @@ -3052,15 +430,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "ChainInput", - "type": "object", - "properties": { - "name": { - "title": "Name" - } - } - } + "data": "ChainInput" }, { "id": 1, @@ -3078,15 +448,7 @@ { "id": 2, "type": "schema", - "data": { - "title": "ChainOutput", - "type": "object", - "properties": { - "text": { - "title": "Text" - } - } - } + "data": "ChainOutput" } ], "edges": [ @@ -3141,464 +503,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "OpenAIInput", - "anyOf": [ - { - "type": "string" - }, - { - "$ref": "#/definitions/StringPromptValue" - }, - { - "$ref": "#/definitions/ChatPromptValueConcrete" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - } - ], - "definitions": { - "StringPromptValue": { - "title": "StringPromptValue", - "description": "String prompt value.", - "type": "object", - "properties": { - "text": { - "title": "Text", - "type": "string" - }, - "type": { - "title": "Type", - "default": "StringPromptValue", - "enum": [ - "StringPromptValue" - ], - "type": "string" - } - }, - "required": [ - "text" - ] - }, - "AIMessage": { - "title": "AIMessage", - "description": "Message from an AI.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "ai", - "enum": [ - "ai" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "HumanMessage": { - "title": "HumanMessage", - "description": "Message from a human.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "human", - "enum": [ - "human" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "ChatMessage": { - "title": "ChatMessage", - "description": "Message that can be assigned an arbitrary speaker (i.e. role).", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "chat", - "enum": [ - "chat" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "role": { - "title": "Role", - "type": "string" - } - }, - "required": [ - "content", - "role" - ] - }, - "SystemMessage": { - "title": "SystemMessage", - "description": "Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "system", - "enum": [ - "system" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content" - ] - }, - "FunctionMessage": { - "title": "FunctionMessage", - "description": "Message for passing the result of executing a function back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "function", - "enum": [ - "function" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content", - "name" - ] - }, - "ToolMessage": { - "title": "ToolMessage", - "description": "Message for passing the result of executing a tool back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "tool", - "enum": [ - "tool" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "tool_call_id": { - "title": "Tool Call Id", - "type": "string" - } - }, - "required": [ - "content", - "tool_call_id" - ] - }, - "ChatPromptValueConcrete": { - "title": "ChatPromptValueConcrete", - "description": "Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.", - "type": "object", - "properties": { - "messages": { - "title": "Messages", - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - }, - "type": { - "title": "Type", - "default": "ChatPromptValueConcrete", - "enum": [ - "ChatPromptValueConcrete" - ], - "type": "string" - } - }, - "required": [ - "messages" - ] - } - } - } + "data": "OpenAIInput" }, { "id": 1, @@ -3616,10 +521,7 @@ { "id": 2, "type": "schema", - "data": { - "title": "OpenAIOutput", - "type": "string" - } + "data": "OpenAIOutput" } ], "edges": [ @@ -3657,16 +559,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "PromptInput", - "type": "object", - "properties": { - "name": { - "title": "Name", - "type": "string" - } - } - } + "data": "PromptInput" }, { "id": 1, @@ -3684,436 +577,7 @@ { "id": 2, "type": "schema", - "data": { - "title": "PromptTemplateOutput", - "anyOf": [ - { - "$ref": "#/definitions/StringPromptValue" - }, - { - "$ref": "#/definitions/ChatPromptValueConcrete" - } - ], - "definitions": { - "StringPromptValue": { - "title": "StringPromptValue", - "description": "String prompt value.", - "type": "object", - "properties": { - "text": { - "title": "Text", - "type": "string" - }, - "type": { - "title": "Type", - "default": "StringPromptValue", - "enum": [ - "StringPromptValue" - ], - "type": "string" - } - }, - "required": [ - "text" - ] - }, - "AIMessage": { - "title": "AIMessage", - "description": "Message from an AI.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "ai", - "enum": [ - "ai" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "HumanMessage": { - "title": "HumanMessage", - "description": "Message from a human.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "human", - "enum": [ - "human" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "ChatMessage": { - "title": "ChatMessage", - "description": "Message that can be assigned an arbitrary speaker (i.e. role).", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "chat", - "enum": [ - "chat" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "role": { - "title": "Role", - "type": "string" - } - }, - "required": [ - "content", - "role" - ] - }, - "SystemMessage": { - "title": "SystemMessage", - "description": "Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "system", - "enum": [ - "system" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content" - ] - }, - "FunctionMessage": { - "title": "FunctionMessage", - "description": "Message for passing the result of executing a function back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "function", - "enum": [ - "function" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content", - "name" - ] - }, - "ToolMessage": { - "title": "ToolMessage", - "description": "Message for passing the result of executing a tool back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "tool", - "enum": [ - "tool" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "tool_call_id": { - "title": "Tool Call Id", - "type": "string" - } - }, - "required": [ - "content", - "tool_call_id" - ] - }, - "ChatPromptValueConcrete": { - "title": "ChatPromptValueConcrete", - "description": "Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.", - "type": "object", - "properties": { - "messages": { - "title": "Messages", - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - }, - "type": { - "title": "Type", - "default": "ChatPromptValueConcrete", - "enum": [ - "ChatPromptValueConcrete" - ], - "type": "string" - } - }, - "required": [ - "messages" - ] - } - } - } + "data": "PromptTemplateOutput" } ], "edges": [ @@ -4135,15 +599,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "ChainInput", - "type": "object", - "properties": { - "name": { - "title": "Name" - } - } - } + "data": "ChainInput" }, { "id": 1, @@ -4161,15 +617,7 @@ { "id": 2, "type": "schema", - "data": { - "title": "ChainOutput", - "type": "object", - "properties": { - "text": { - "title": "Text" - } - } - } + "data": "ChainOutput" } ], "edges": [ @@ -4214,464 +662,7 @@ { "id": 0, "type": "schema", - "data": { - "title": "OpenAIInput", - "anyOf": [ - { - "type": "string" - }, - { - "$ref": "#/definitions/StringPromptValue" - }, - { - "$ref": "#/definitions/ChatPromptValueConcrete" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - } - ], - "definitions": { - "StringPromptValue": { - "title": "StringPromptValue", - "description": "String prompt value.", - "type": "object", - "properties": { - "text": { - "title": "Text", - "type": "string" - }, - "type": { - "title": "Type", - "default": "StringPromptValue", - "enum": [ - "StringPromptValue" - ], - "type": "string" - } - }, - "required": [ - "text" - ] - }, - "AIMessage": { - "title": "AIMessage", - "description": "Message from an AI.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "ai", - "enum": [ - "ai" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "HumanMessage": { - "title": "HumanMessage", - "description": "Message from a human.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "human", - "enum": [ - "human" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "example": { - "title": "Example", - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ] - }, - "ChatMessage": { - "title": "ChatMessage", - "description": "Message that can be assigned an arbitrary speaker (i.e. role).", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "chat", - "enum": [ - "chat" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "role": { - "title": "Role", - "type": "string" - } - }, - "required": [ - "content", - "role" - ] - }, - "SystemMessage": { - "title": "SystemMessage", - "description": "Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "system", - "enum": [ - "system" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content" - ] - }, - "FunctionMessage": { - "title": "FunctionMessage", - "description": "Message for passing the result of executing a function back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "function", - "enum": [ - "function" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "content", - "name" - ] - }, - "ToolMessage": { - "title": "ToolMessage", - "description": "Message for passing the result of executing a tool back to a model.", - "type": "object", - "properties": { - "content": { - "title": "Content", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ] - } - } - ] - }, - "additional_kwargs": { - "title": "Additional Kwargs", - "type": "object" - }, - "response_metadata": { - "title": "Response Metadata", - "type": "object" - }, - "type": { - "title": "Type", - "default": "tool", - "enum": [ - "tool" - ], - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "tool_call_id": { - "title": "Tool Call Id", - "type": "string" - } - }, - "required": [ - "content", - "tool_call_id" - ] - }, - "ChatPromptValueConcrete": { - "title": "ChatPromptValueConcrete", - "description": "Chat prompt value which explicitly lists out the message types it accepts.\nFor use in external schemas.", - "type": "object", - "properties": { - "messages": { - "title": "Messages", - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/AIMessage" - }, - { - "$ref": "#/definitions/HumanMessage" - }, - { - "$ref": "#/definitions/ChatMessage" - }, - { - "$ref": "#/definitions/SystemMessage" - }, - { - "$ref": "#/definitions/FunctionMessage" - }, - { - "$ref": "#/definitions/ToolMessage" - } - ] - } - }, - "type": { - "title": "Type", - "default": "ChatPromptValueConcrete", - "enum": [ - "ChatPromptValueConcrete" - ], - "type": "string" - } - }, - "required": [ - "messages" - ] - } - } - } + "data": "OpenAIInput" }, { "id": 1, @@ -4689,10 +680,7 @@ { "id": 2, "type": "schema", - "data": { - "title": "OpenAIOutput", - "type": "string" - } + "data": "OpenAIOutput" } ], "edges": [ diff --git a/libs/langchain/tests/unit_tests/stubs.py b/libs/langchain/tests/unit_tests/stubs.py new file mode 100644 index 0000000000..38e84a3a7a --- /dev/null +++ b/libs/langchain/tests/unit_tests/stubs.py @@ -0,0 +1,6 @@ +from typing import Any + + +class AnyStr(str): + def __eq__(self, other: Any) -> bool: + return isinstance(other, str)