-
Checked other resources
Commit to Help
Example Codechain = joke_template | anthropic_client | json_validation_output_parser | db
result = await chain.ainvoke({"user_input": "joke"}, config=RunnableConfig(run_name="test_run")) DescriptionThis is my code. chain = joke_template | anthropic_client | json_validation_output_parser | db
result = await chain.ainvoke({"user_input": "joke"}, config=RunnableConfig(run_name="test_run")) I want to use the try:
for i, step in enumerate(self.steps):
# mark each step as a child run
config = patch_config(
config, callbacks=run_manager.get_child(f"seq:step:{i+1}")
)
if i == 0:
input = await step.ainvoke(input, config, **kwargs)
else:
input = await step.ainvoke(input, config) The if callbacks is not None:
# If we're replacing callbacks, we need to unset run_name
# As that should apply only to the same run as the original callbacks
config["callbacks"] = callbacks
if "run_name" in config:
del config["run_name"]
if "run_id" in config:
del config["run_id"] Why does System Infolangchain==0.2.7 |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
The If you want to share a parameter across the entire chain, using the |
Beta Was this translation helpful? Give feedback.
-
I solved it by simply adding a new key like config={"col_id":"test_run"}. |
Beta Was this translation helpful? Give feedback.
I solved it by simply adding a new key like config={"col_id":"test_run"}.