🐛 fix(chat.py): change event name from "input_keys" to "message" in stream_build function

The event name was changed from "input_keys" to "message" to improve semantics and consistency with the rest of the codebase.
This commit is contained in:
Gabriel Luiz Freitas Almeida 2023-06-27 16:38:42 -03:00
commit 3c1b86ebe6

View file

@ -125,7 +125,7 @@ async def stream_build(flow_id: str):
# Now we need to check the input_keys to send them to the client
if hasattr(langchain_object, "input_keys"):
input_keys_response = build_input_keys_response(langchain_object)
yield str(StreamData(event="input_keys", data=input_keys_response))
yield str(StreamData(event="message", data=input_keys_response))
chat_manager.set_cache(flow_id, langchain_object)
except Exception as exc: