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:
parent
daedaae820
commit
8043a8855e
1 changed files with 1 additions and 2 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue