Update LangSmith Walkthrough (#11043)

pull/11052/head
William FH 1 year ago committed by GitHub
parent bea78b3271
commit 4aec587979
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

Binary file not shown.

After

Width:  |  Height:  |  Size: 766 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 815 KiB

File diff suppressed because it is too large Load Diff

@ -640,7 +640,12 @@ async def _arun_chain(
) -> Union[dict, str]:
"""Run a chain asynchronously on inputs."""
inputs_ = inputs if input_mapper is None else input_mapper(inputs)
if isinstance(chain, Chain) and isinstance(inputs_, dict) and len(inputs_) == 1:
if (
isinstance(chain, Chain)
and isinstance(inputs_, dict)
and len(inputs_) == 1
and chain.input_keys
):
val = next(iter(inputs_.values()))
output = await chain.acall(val, callbacks=callbacks, tags=tags)
else:
@ -765,7 +770,12 @@ def _run_chain(
) -> Union[Dict, str]:
"""Run a chain on inputs."""
inputs_ = inputs if input_mapper is None else input_mapper(inputs)
if isinstance(chain, Chain) and isinstance(inputs_, dict) and len(inputs_) == 1:
if (
isinstance(chain, Chain)
and isinstance(inputs_, dict)
and len(inputs_) == 1
and chain.input_keys
):
val = next(iter(inputs_.values()))
output = chain(val, callbacks=callbacks, tags=tags)
else:

Loading…
Cancel
Save