Skip to content

Commit

Permalink
fix: Store message should not override sender by default (langflow-ai…
Browse files Browse the repository at this point in the history
  • Loading branch information
nicoloboschi authored Jul 29, 2024
1 parent 9afc6a2 commit 77786d9
Showing 1 changed file with 4 additions and 6 deletions.
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

0 comments on commit 77786d9

Please sign in to comment.