mirror of
https://github.com/hwchase17/langchain.git
synced 2025-07-31 08:32:32 +00:00
x
This commit is contained in:
parent
c0c6d61fa5
commit
33b3e22083
@ -5217,7 +5217,7 @@ class RunnableBindingBase(RunnableSerializable[Input, Output]):
|
||||
kwargs.
|
||||
"""
|
||||
|
||||
config: RunnableConfig = Field(default_factory=dict)
|
||||
config: RunnableConfig = Field(default_factory=RunnableConfig)
|
||||
"""The config to bind to the underlying Runnable."""
|
||||
|
||||
config_factories: list[Callable[[RunnableConfig], RunnableConfig]] = Field(
|
||||
|
@ -211,7 +211,7 @@ def pre_init(func: Callable) -> Any:
|
||||
name not in values or values[name] is None
|
||||
) and not field_info.is_required():
|
||||
if field_info.default_factory is not None:
|
||||
values[name] = field_info.default_factory()
|
||||
values[name] = field_info.default_factory() # type: ignore
|
||||
else:
|
||||
values[name] = field_info.default
|
||||
|
||||
|
@ -14047,7 +14047,8 @@
|
||||
"stop": [
|
||||
"Thought:"
|
||||
]
|
||||
}
|
||||
},
|
||||
"config": {}
|
||||
},
|
||||
"name": "FakeListChatModel"
|
||||
},
|
||||
|
@ -2949,7 +2949,9 @@ def test_seq_prompt_map(mocker: MockerFixture, snapshot: SnapshotAssertion) -> N
|
||||
assert chain.first == prompt
|
||||
assert chain.middle == [RunnableLambda(passthrough)]
|
||||
assert isinstance(chain.last, RunnableParallel)
|
||||
assert dumps(chain, pretty=True) == snapshot
|
||||
|
||||
if (PYDANTIC_MAJOR_VERSION, PYDANTIC_MINOR_VERSION) >= (2, 10):
|
||||
assert dumps(chain, pretty=True) == snapshot
|
||||
|
||||
# Test invoke
|
||||
prompt_spy = mocker.spy(prompt.__class__, "invoke")
|
||||
|
Loading…
Reference in New Issue
Block a user