fix: update storeMessageComponent input types (#3950)

* 📝 (StoreMessage.py): Change StrInput to MessageInput for sender, sender_name, and session_id inputs to improve clarity and consistency in the code.

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
Cristhian Zanforlin Lousa 2024-09-27 14:51:24 -03:00 committed by GitHub
commit 29404c79ba
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,5 +1,5 @@
from langflow.custom import Component
from langflow.inputs import HandleInput, MessageInput, StrInput
from langflow.inputs import HandleInput, MessageInput
from langflow.memory import get_messages, store_message
from langflow.schema.message import Message
from langflow.template import Output
@ -20,19 +20,19 @@ class StoreMessageComponent(Component):
input_types=["BaseChatMessageHistory"],
info="The external memory to store the message. If empty, it will use the Langflow tables.",
),
StrInput(
MessageInput(
name="sender",
display_name="Sender",
info="The sender of the message. Might be Machine or User. If empty, the current sender parameter will be used.",
advanced=True,
),
StrInput(
MessageInput(
name="sender_name",
display_name="Sender Name",
info="The name of the sender. Might be AI or User. If empty, the current sender parameter will be used.",
advanced=True,
),
StrInput(
MessageInput(
name="session_id",
display_name="Session ID",
info="The session ID of the chat. If empty, the current session ID parameter will be used.",