This commit refactors the `utils.py` module in the `base/prompts` directory and the `message.py` module in the `schema` directory. The changes include:
- Importing the `Message` class from `langflow.schema.message` in `utils.py`
- Importing various modules and classes from `langchain_core` in `message.py`
- Adding a new method `load_lc_prompt` to the `Message` class in `message.py`
- Adding a new class method `from_lc_prompt` to the `Message` class in `message.py`
- Adding a new method `format_text` to the `Message` class in `message.py`
- Adding a new class method `from_template_and_variables` to the `Message` class in `message.py`
These changes improve the organization and functionality of the code in the mentioned modules.
* Fix: center command icon for macOS
* Fix: Add visual shortcut to undo and redo
* code format
---------
Co-authored-by: anovazzi1 <otavio2204@gmail.com>
Prevent duplicate message storage in Chat components
Introduce `_message_stored` flag to `ChatInput` and `ChatOutput` components to prevent storing the same message multiple times during a single session. This change ensures that each message is stored only once, enhancing data integrity and reducing redundant operations.
```
Refactor the `timestamp` field in the `Message` schema to use the `datetime.now(timezone.utc)` function instead of the `utc_now` utility. This change ensures consistency with other modules and reduces redundancy.
No behavioral changes are intended; only the implementation detail is modified to leverage the built-in function for getting the current UTC datetime.
Refactor datetime handling to use utc_now utility
Replaced multiple occurrences of `datetime.now(timezone.utc)` with
a single `utc_now` utility function across various modules. This
enhances code consistency and reusability, and reduces redundancy.
No behavioral changes are intended; only the implementation detail
is modified to leverage the utility function for getting the current
UTC datetime.
Fixes#1234
```
* add first astra integ test framework
* use fixtures
* remove old tests from merge
* Add correct sender type
* chore: Update unit test command in GitHub workflow
---------
Co-authored-by: ogabrielluiz <gabriel@langflow.org>
* Update to use non-deprecated output parser imports
* Update documentation
* Revert "Update to use non-deprecated output parser imports"
This reverts commit 11a969d82b6b2b3659eb7c3c26b5b29a98815834.
* Update rag-with-astradb.mdx
* Update chat.py to clarify error message
vertex in the exception message appears to be confusing with google vertex and causes confusion when used with other providers.
* Minor formatting to highlight the vscode launch file
update the error message
* Fix a couple more error texts