This commit is contained in:
vbarda
2024-12-02 17:44:39 -05:00
parent e6b5e69088
commit 08f5ff6435
4 changed files with 8 additions and 8 deletions
+2 -2
View File
@@ -120,13 +120,13 @@ Your agent might be using a custom input/output schema that doesn't match the da
def transform_dataset_inputs(inputs: dict) -> dict:
"""Transform LangSmith dataset inputs to match the agent's input schema before invoking the agent."""
# see the `Example input` for reference on what `inputs` dict will look like
# see the `Example output` in the README for reference on what the output should look like
return {"my_agent_key": inputs["company"], ...}
def transform_agent_outputs(outputs: dict) -> dict:
"""Transform agent outputs to match the LangSmith dataset output schema."""
# see the `Example output` for reference on what the output from `run_agent` would look like
# see the `Example output` for reference on what the output should look like
return {"info": response["my_agent_output_key"]}
```
+2 -2
View File
@@ -119,14 +119,14 @@ def get_agent_metadata(graph_id: str, agent_url: str):
def transform_dataset_inputs(inputs: dict) -> dict:
"""Transform LangSmith dataset inputs to match the agent's input schema before invoking the agent."""
# see the `Example input` in the README for reference on what `inputs` dict will look like
# see the `Example input` in the README for reference on what `inputs` dict should look like
# the dataset inputs already match the agent's input schema, but you can add any additional processing here
return inputs
def transform_agent_outputs(outputs: dict) -> dict:
"""Transform agent outputs to match the LangSmith dataset output schema."""
# see the `Example output` in the README for reference on what the output from `run_agent` would look like
# see the `Example output` in the README for reference on what the output should look like
# the agent outputs already match the dataset output schema, but you can add any additional processing here
return outputs
+2 -2
View File
@@ -132,13 +132,13 @@ Your agent might be using a custom input/output schema that doesn't match the da
def transform_dataset_inputs(inputs: dict) -> dict:
"""Transform LangSmith dataset inputs to match the agent's input schema before invoking the agent."""
# see the `Example input` for reference on what `inputs` dict will look like
# see the `Example output` in the README for reference on what the output should look like
return {"my_agent_key": inputs["company"], ...}
def transform_agent_outputs(outputs: dict) -> dict:
"""Transform agent outputs to match the LangSmith dataset output schema."""
# see the `Example output` for reference on what the output from `run_agent` would look like
# see the `Example output` for reference on what the output should look like
return {"info": response["my_agent_output_key"]}
```
+2 -2
View File
@@ -125,14 +125,14 @@ def get_agent_metadata(graph_id: str, agent_url: str):
def transform_dataset_inputs(inputs: dict) -> dict:
"""Transform LangSmith dataset inputs to match the agent's input schema before invoking the agent."""
# see the `Example input` in the README for reference on what `inputs` dict will look like
# see the `Example input` in the README for reference on what `inputs` dict should look like
# the dataset inputs already match the agent's input schema, but you can add any additional processing here
return inputs
def transform_agent_outputs(outputs: dict) -> dict:
"""Transform agent outputs to match the LangSmith dataset output schema."""
# see the `Example output` in the README for reference on what the output from `run_agent` would look like
# see the `Example output` in the README for reference on what the output should look like
# the agent outputs already match the dataset output schema, but you can add any additional processing here
return outputs