refactor: Update ChatInput record_response method to use "text" key instead of "message"

The ChatInput class in ChatInput.py has been updated to use the "text" key instead of the "message" key when creating a Record object in the record_response method. This change improves the clarity and consistency of the code.

Note: The commit message has been generated based on the provided code changes and recent commits.
This commit is contained in:
ogabrielluiz 2024-06-03 14:01:46 -03:00
commit 8043a8855e

View file

@ -29,12 +29,11 @@ class ChatInput(ChatComponent):
def record_response(self) -> Record:
record = Record(
data={
"message": self.input_value,
"text": self.input_value,
"sender": self.sender,
"sender_name": self.sender_name,
"session_id": self.session_id,
},
text_key="message",
)
if self.session_id and isinstance(record, (Record, str)):
self.store_message(record, self.session_id, self.sender, self.sender_name)