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

fix: Store message should not override sender by default #3024

Merged
merged 1 commit into from
Jul 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions src/backend/base/langflow/components/helpers/StoreMessage.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,13 @@ class StoreMessageComponent(Component):
StrInput(
name="sender",
display_name="Sender",
info="The sender of the message.",
value=MESSAGE_SENDER_AI,
info="The sender of the message. Might be Machine or User. If empty, the current sender parameter will be used.",
advanced=True,
),
StrInput(
name="sender_name",
display_name="Sender Name",
info="The name of the sender.",
value=MESSAGE_SENDER_NAME_AI,
info="The name of the sender. Might be AI or User. If empty, the current sender parameter will be used.",
advanced=True,
),
StrInput(
Expand All @@ -50,8 +48,8 @@ def store_message(self) -> Message:
message = self.message

message.session_id = self.session_id or message.session_id
message.sender = self.sender or message.sender
message.sender_name = self.sender_name or message.sender_name
message.sender = self.sender or message.sender or MESSAGE_SENDER_AI
message.sender_name = self.sender_name or message.sender_name or MESSAGE_SENDER_NAME_AI

if self.memory:
# override session_id
Expand Down
Loading