Skip to content

Conversation

@devin-ai-integration
Copy link
Contributor

@devin-ai-integration devin-ai-integration bot commented Dec 12, 2025

Adds a test demonstrating that a node can output a Pydantic model and a subsequent node can reference that model output, then access its fields via dot notation in the run method (e.g., self.profile.name).


This test demonstrates that a node can output a Pydantic model and a
subsequent node can reference a specific field from that model using
bracket notation (e.g., FirstNode.Outputs.profile["name"]).

Co-Authored-By: [email protected] <[email protected]>
@devin-ai-integration
Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR that start with 'DevinAI' or '@devin'.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

Copy link
Contributor

@dvargas92495 dvargas92495 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DevinAI if the test fails on main, let it

class SecondNode(BaseNode):
"""A node that references a field from the Pydantic model output."""

user_name = FirstNode.Outputs.profile["name"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DevinAI change this reference to point to the profile directly, eg user = FirstNode.Outputs.profile

greeting: str

def run(self) -> BaseOutputs:
return self.Outputs(greeting=f"Hello, {self.user_name}!")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DevinAI then update the interpolation here to self.profile.name

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants