Skip to content

Fix: Handle run_in_parallel=False, simplify pending function call tra… #145

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

Closed
wants to merge 1 commit into from

Conversation

markbackman
Copy link
Contributor

@markbackman markbackman commented Jun 13, 2025

…cking

This is going to conflict with #141 but I wanted to work through how to fix this problem given the current code. We can figure out how to make this work with the new logic, as it offers a way to simplify the logic overall.

Crucially, this defers the pending function calling logic to Pipecat, which offers a means for Pipecat Flows to be simplified.

cc @kompfner happy to discuss!

Copy link

vercel bot commented Jun 13, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
pipecat-flows ✅ Ready (Inspect) Visit Preview Jun 13, 2025 3:28pm


# Check if all function calls are complete using Pipecat's state
assistant_aggregator = self._context_aggregator.assistant()
if not assistant_aggregator._function_calls_in_progress:
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't usually like relying on private state, as implementation can change at any time. If we want Pipecat to be telling us whether function calls are still in progress, should we first expose that as part of the API before relying on it here?

Copy link
Contributor Author

@markbackman markbackman Jun 13, 2025

Choose a reason for hiding this comment

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

Yes, I think we have to. Currently, only Pipecat—in its internal state—knows about which function calls are in progress. I'll expose this via Pipecat in a separate PR.

Copy link
Contributor

@kompfner kompfner left a comment

Choose a reason for hiding this comment

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

Definitely a nice simplification (though admittedly I haven't spent the time yet to fully grok the need for all the in-flight-function tracking in the first place). I've documented one concern I had so far.

You're right that we'll have to do some merge conflict resolution with #141.

@markbackman
Copy link
Contributor Author

Closing in favor of #147

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