-
Notifications
You must be signed in to change notification settings - Fork 14
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
Simplify the static flows API #65
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
src/pipecat_flows/manager.py
Outdated
logger.warning("Initial messages ignored for static flow configuration") | ||
|
||
# Set initial system message if present | ||
if hasattr(self, "initial_system_message"): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this could be:
if self.initial_system_message:
We should always have things (i.e. fields) defined, because this is kind of hiding what fields are defined or not depending on something else.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense!
@@ -155,6 +97,7 @@ def __init__( | |||
if flow_config: | |||
self.nodes = flow_config["nodes"] | |||
self.initial_node = flow_config["initial_node"] | |||
self.initial_system_message = flow_config.get("initial_system_message", []) | |||
self.transition_callback = self._handle_static_transition | |||
logger.debug("Initialized in static mode") | |||
else: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in this else block we would have:
self.initial_system_message = None
LGTM! Just made a small comment easy to fix. |
c68cdd5
to
00f9be1
Compare
Added
initial_system_message
field inFlowConfig
, which allows setting aglobal system message for static flows.
Changed
setup in static flows.