Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make flow context explicit #354

Merged
merged 2 commits into from
Oct 9, 2024
Merged

Make flow context explicit #354

merged 2 commits into from
Oct 9, 2024

Conversation

jlowin
Copy link
Member

@jlowin jlowin commented Oct 9, 2024

Rather than automatically putting all flow args in context, users can now opt-in to this behavior:

import controlflow as cf

@cf.flow(context_kwargs=['x'])
def f(x, y):
    # x will be in a global context visible to all agents

Closes #341

@jlowin jlowin added enhancement Enhance an existing feature breaking change The public API changes in a backwards-incompatible way labels Oct 9, 2024
@github-actions github-actions bot added documentation Improvements or additions to documentation tests Adds or improves unit tests labels Oct 9, 2024
@jlowin jlowin merged commit 4fec8c2 into main Oct 9, 2024
5 checks passed
@jlowin jlowin deleted the flow-context branch October 9, 2024 01:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change The public API changes in a backwards-incompatible way documentation Improvements or additions to documentation enhancement Enhance an existing feature tests Adds or improves unit tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make Flow-Level Context Arguments Explicit and Opt-in
1 participant