mirror of
https://github.com/hwchase17/langchain.git
synced 2025-08-17 16:39:52 +00:00
Fix issue with runnable schema output + typed_dict
This commit is contained in:
parent
5b9b8fe80f
commit
acffca8bb7
@ -3593,6 +3593,12 @@ class RunnableParallel(RunnableSerializable[Input, dict[str, Any]]):
|
|||||||
== "object"
|
== "object"
|
||||||
for s in self.steps__.values()
|
for s in self.steps__.values()
|
||||||
):
|
):
|
||||||
|
for step in self.steps__.values():
|
||||||
|
for k, v in step.get_input_schema(config).model_fields.items():
|
||||||
|
if v.annotation != Any and k == "root":
|
||||||
|
return super().get_input_schema(config)
|
||||||
|
|
||||||
|
|
||||||
# This is correct, but pydantic typings/mypy don't think so.
|
# This is correct, but pydantic typings/mypy don't think so.
|
||||||
return create_model_v2( # type: ignore[call-overload]
|
return create_model_v2( # type: ignore[call-overload]
|
||||||
self.get_name("Input"),
|
self.get_name("Input"),
|
||||||
|
Loading…
Reference in New Issue
Block a user