langflow-ai / langflow

Langflow is a low-code app builder for RAG and multi-agent AI applications. It’s Python-based and agnostic to any model, API, or database.
http://www.langflow.org
MIT License
35.41k stars 4.21k forks source link

refactor: Improve error messaging for missing message fields in memory module #4779

Closed ogabrielluiz closed 1 day ago

ogabrielluiz commented 2 days ago

This pull request enhances the error messaging in the memory module by providing clearer feedback when required fields are missing from a message. Specifically, it checks for the presence of session_id, sender, and sender_name, and if any are absent, it informs the user about the missing fields along with their expected formats. This improvement aims to facilitate better user understanding and reduce confusion when submitting messages.

codspeed-hq[bot] commented 2 days ago

CodSpeed Performance Report

Merging #4779 will improve performances by 38.31%

Comparing message-error-improve (fba1adb) with main (ef2199b)

Summary

⚡ 2 improvements
✅ 13 untouched benchmarks

Benchmarks breakdown

Benchmark main message-error-improve Change
test_successful_run_with_input_type_any 323.4 ms 233.9 ms +38.31%
test_successful_run_with_output_type_any 311.8 ms 263 ms +18.56%