log_inputs#
- langsmith.testing._internal.log_inputs(inputs: dict, /) None [源]#
在 pytest 测试运行中记录运行输入。
警告
此 API 处于 Beta 阶段,未来版本可能会发生变化。
应仅在带有 @pytest.mark.langsmith 装饰器的 pytest 测试中使用。
- 参数:
inputs (dict) – 要记录的输入。
- 返回类型:
无
示例
from langsmith import testing as t @pytest.mark.langsmith def test_foo() -> None: x = 0 y = 1 t.log_inputs({"x": x, "y": y}) assert foo(x, y) == 2