* refactor: Update MessageBase text attribute based on isinstance check.
* feat: Add update_message function to update a message in the database.
* refactor(chat): Update imports and remove unnecessary config method in ChatComponent.
* refactor: Add stream_message method to ChatComponent.
* refactor: Update method call in ChatOutput component.
* feat: Add callback function to custom component and update build_results signature.
* feat: Add callback parameter to instantiate_class function.
* feat(graph): Add callback functions for sync and async operations.
* feat: Add callback function support to vertex build process.
* feat: Add handling for added message in InterfaceVertex class.
* feat: Add callback support to Graph methods.
* feat(chat): Add callback function to build_vertices function.
* refactor: Simplify update_message function and use session_scope for session management.
* fix: Call set_callback method if available on custom component.
* refactor(chat): Update chat message chunk handling and ID conversion.
* feat: Add null check before setting cache in build_vertex_stream function.
* refactor: Fix send_event_wrapper function and add callback parameter to _build_vertex function.
* refactor: Simplify conditional statement and import order in ChatOutput.
* [autofix.ci] apply automated fixes
* refactor: move log method to Component class.
* refactor: Simplify CallbackFunction definition.
* feat: Initialize _current_output attribute in Component class.
* feat: store current output name in custom component during processing.
* feat: Add current output and component ID to log data.
* fix: Add condition to check current output before invoking callback.
* refactor: Update callback to log_callback in graph methods.
* feat: Add test for callback graph execution with log messages.
* update projects
* fix(chat.py): fix condition to check if message text is a string before updating message text in the database
* refactor(ChatOutput.py): update ChatOutput class to correctly store and assign the message value to ensure consistency and avoid potential bugs
* refactor(chat.py): update return type of store_message method to return a single Message object instead of a list of Messages
refactor(chat.py): update logic to correctly handle updating and returning a single stored message object instead of a list of messages
* update starter projects
* refactor(component.py): update type hint for name parameter in log method to be more explicit
* feat: Add EventManager class for managing events and event registration
* refactor: Update log_callback to event_manager in custom component classes
* refactor(component.py): rename _log_callback to _event_manager and update method call to on_log for better clarity and consistency
* refactor(chat.py): rename _log_callback method to _event_manager.on_token for clarity and consistency in method naming
* refactor: Rename log_callback to event_manager for clarity and consistency
* refactor: Update Vertex class to use EventManager instead of log_callback for better clarity and consistency
* refactor: update build_flow to use EventManager
* refactor: Update EventManager class to use Protocol for event callbacks
* if event_type is not passed, it uses the default send_event
* Add method to register event functions in EventManager
- Introduced `register_event_function` method to allow passing custom event functions.
- Updated `noop` method to accept `event_type` parameter.
- Adjusted `__getattr__` to return `EventCallback` type.
* update test_callback_graph
* Add unit tests for EventManager in test_event_manager.py
- Added tests for event registration, including default event type, empty string names, and specific event types.
- Added tests for custom event functions and unregistered event access.
- Added tests for event sending, including JSON formatting, empty data, and large payloads.
- Added tests for handling JSON serialization errors and the noop function.
* feat: Add callback function support to vertex build process.
* feat: Add callback support to Graph methods.
* feat(chat): Add callback function to build_vertices function.
* [autofix.ci] apply automated fixes
* refactor: Update callback to log_callback in graph methods.
* fetching data from messages and builds at the same time, need to remove duplicates
* refactor: Sort chat history by timestamp in ChatView component
* fix: update serialization and improve error handling (#3516)
* feat(utils): add support for V1BaseModel in serialize_field
Add support for V1BaseModel instances in the serialize_field function by
checking for a "to_json" method. If the method is not present, return the
attribute values as a dictionary.
* refactor: Update field serializer function and error handling in build_flow function
* remove use memo to prevent bugs
* feat: add updateMessagePartial method to MessagesStoreType
* feat: update message partially in MessagesStoreType
This commit adds the `updateMessagePartial` method to the `MessagesStoreType` in `messagesStore.ts`. This method allows updating a specific message by merging the changes with the existing message object.
* feat: add log callback for start message in ChatComponent
* feat: update log_callback name
* feat: add log_callback for message in ChatComponent that are not streaming
* refactor: remove console.log statement in buildFlowVertices function
* refactor: store message in ChatInput after updating flow_id
This commit refactors the `ChatInput` component by moving the logic to store the message after updating the `flow_id` property. This ensures that the message is properly stored in the correct flow. The previous implementation had the logic to store the message before updating the `flow_id`, which could lead to incorrect storage of messages. This change improves the reliability and accuracy of message storage in the `ChatInput` component.
* refactor: move message storage logic in ChatInput after updating flow_id
* refactor: update ChatComponent to use stored_message.id instead of self.graph.flow_id
Update the `ChatComponent` class in `chat.py` to use the `stored_message.id` property instead of `self.graph.flow_id` when logging a message. This ensures that the correct message ID is used for logging purposes. The previous implementation used the flow ID, which could lead to incorrect logging. This change improves the accuracy of message logging in the `ChatComponent`.
* refactor: remove unused code and console.log statements
* raw: temp serializer fix
* streaming working but the message comes in one shot
* refactor: optimize message update in useMessagesStore
Improve the efficiency of updating messages in the `useMessagesStore` function of `messagesStore.ts`. Instead of iterating through the entire message list, this refactor searches for the message to update by iterating backwards from the end. This approach allows for faster message retrieval and update. The code has been modified to use a for loop and break out of the loop once the message is found. This change enhances the performance of the message update process.
* Refactor `serialize_flow_id` method to correctly handle UUID serialization in `message.py`
* Refactor `send_event` method to use `jsonable_encoder` for data serialization
* refactor: optimize message update in useMessagesStore
* streaming working with timeout
* refactor: update buildUtils.ts to use data instead of data.data in addMessage function
* version with reactState for chatHistory
* refactor: update on_message method in ChatComponent
* refactor: update on_message method in ChatComponent
* refactor: Remove unused dependency in package-lock.json
* Refactor chatView component and add hiddenSession prop
* Refactor chatView component and update hiddenSessions prop
* Refactor chatView component to use visibleSessions prop instead of hiddenSessions
* Refactor IOModal component to remove redundant code
* Refactor chatView component to include focusChat prop
* Refactor chatView component to include focusChat prop and trigger focus on chat when new session is set
* Refactor IOModal component to update visible sessions when new session is added
* feat: Add session parameter to buildFlowVertices function
* feat: Add someFlowTemplateFields function
Add the someFlowTemplateFields function to the reactflowUtils module. This function checks if any of the nodes in the provided array have template fields that pass a given validation function.
* feat: Add session parameter to buildFlowVertices function
* feat: Add session parameter to buildFlowVertices function
* update Session logic on ioModal
* Refactor ChatView component: Remove unused eraser button
The eraser button in the ChatView component was removed as it was not being used and served no purpose. This change improves code cleanliness and removes unnecessary code.
* Refactor Vertex class: Inject session_id if provided in inputs
* Refactor build_flow function: Set default session if inputs are empty
* Refactor InputValueRequest schema: Add session parameter
* Refactor IOModal component: Update session logic
* Refactor buildFlowVertices function: Update input handling
* Refactor MessagesStoreType in zustand/messages/index.ts: Remove unused columns property and setColumns method
* Refactor MessagesStoreType: Remove unused columns property and setColumns method
* Refactor SessionView component: Update columns extraction logic
* Refactor ChatView component: Remove unused variables
* Refactor useGetMessagesQuery: Remove unused setColumns method
* Refactor RenderIcons component: Set default value for filteredShortcut prop to prevent bug
* create edit message component for chat view
* Refactor useUpdateMessage: Add refetch option to trigger query refetch
* Refactor IOModal component: Remove unused variables and update useGetMessagesQuery
* Refactor ChatView component: Add session ID to message object
* update chat message to handle message edit
* update types
* fix: Update API call to send entire message object
* Refactor EditMessageField component: Add timeout to onBlur event
* Refactor EditMessageField component: Update layout of edit message field
* create migration
* add fields to data table
* feat: Add "edit" flag to message_dict in update_message API endpoint
* Refactor EditMessageField component: Improve onBlur event handling and add button click flag
* Refactor code to include "edit" flag in message types
* feat: Add EditMessageButton component for editing chat messages
* Refactor ChatMessage component: Add EditMessageButton and improve layout
* fix: Add refetch query for current flow messages not all flows
* Refactor ChatMessage component: Add ShadTooltip for EditMessageButton
* add info into edit message field
* fix: migrate
* fix running chat input directly from the flow
* [autofix.ci] apply automated fixes
* fix edit flag
* Refactor IOModal component to generate a unique session ID based on the current date and time
* [autofix.ci] apply automated fixes
* Refactor IOModal component to improve session management and interaction
* [autofix.ci] apply automated fixes
* Refactor sessionSelector component to improve session management and interaction
* chore: Refactor sessionSelector component to improve session management and interaction
* [autofix.ci] apply automated fixes
* create mutation to handle session rename
* refactor: Rename useUpdateSession to useUpdateSessionName for clarity
* [autofix.ci] apply automated fixes
* Refactor sessionSelector component for improved session management and interaction
* Refactor sessionSelector component to update visible session on session name change
* [autofix.ci] apply automated fixes
* add message related events back
* chore: Add console logs for debugging in buildFlowVertices function
* Refactor IOModal component to update tab trigger label from "Memories" to "Chat"
* improve edit name feature
* Refactor IOModal component button label to "New Chat"
* Refactor sessionSelector component to improve session management and interaction
* Refactor IOModal component to remove unused code and improve session management
* fix typing error
* fix run chat input on component level
* prevent toogle visibility on session menu
* fix bug on rename session while in table view mode
* chore: Update setSelectedView prop type in sessionSelector component
* add first test version not working yet
* fix bug for renaming and deleting session
* refactor: Update sessionSelector component to handle session changes
* improve test
* fix rename session multiple session bugs
* change visible session from array to string
* chore: Update editMessageField component to include margin-right for text span
* [autofix.ci] apply automated fixes
* Update down_revision in Alembic migration script
* Refactor IOModal component to simplify session visibility handling
* Fix comparison operator for filtering error messages in memory.py
* Refactor ChatInput to conditionally store and update messages
* Refactor JSON formatting for improved readability in starter projects
* Add type casting for message_text and import cast from typing module
* Refactor input handling to use direct dictionary access for 'session' and 'input_value' keys
* Allow `update_message` to accept `str` type for `message_id` parameter
* ⬆️ (pyproject.toml): upgrade duckduckgo-search dependency to version 6.3.1 for bug fixes or new features
🔧 (duckduckgo.spec.ts): refactor test to handle multiple possible outcomes when waiting for selectors and improve readability
* Refactor test file: generalBugs-shard-0.spec.ts
* Refactor test file: freeze.spec.ts
* Refactor test files: update element selectors and actions
* Refactor test file: chatInputOutput.spec.ts
* [autofix.ci] apply automated fixes
* Refactor chatMessage component to handle different types of children content on code modal
* [autofix.ci] apply automated fixes
---------
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: italojohnny <italojohnnydosanjos@gmail.com>
Co-authored-by: cristhianzl <cristhian.lousa@gmail.com>
* Remove Poetry references from pyproject.toml and update project metadata
* Remove '--no-update' flag from 'uv lock' commands in Makefile
* Add script metadata with Python version and dependencies
* Remove Poetry references and integrate UV setup in CI workflow
* Remove Poetry setup and installation from integration tests workflow
* Remove Poetry references and update workflow to use custom setup action
* Remove references to Poetry from configuration files
* Add async support and dependencies to pyproject.toml files
- Added `asgi-lifespan>=2.1.0` to dependencies.
- Configured `asyncio_mode` and `asyncio_default_fixture_loop_scope` for pytest.
- Updated `tool.uv` section with `asgi-lifespan` in dev-dependencies.
* Convert test fixtures to async and use AsyncClient for HTTP requests
* Handle 'ImportFrom' nodes in AST validation to support module attribute imports
* Convert test cases to use async HTTP client
- Updated test cases in `test_database.py`, `test_endpoints.py`, `test_user.py`, `test_variable.py`, `test_files.py`, `test_chat_endpoint.py`, `test_misc.py`, `test_messages_endpoints.py`, `test_api_key.py`, `test_webhook.py`, and `test_login.py` to use `httpx.AsyncClient` instead of `fastapi.TestClient`.
- Modified test functions to be asynchronous and use `await` for HTTP requests.
- Adjusted fixtures and helper functions to support asynchronous operations.
- Ensured consistency in endpoint paths and request methods across all test cases.
* Refactor string concatenation to f-string in test_chat_endpoint.py
* [autofix.ci] apply automated fixes
* Refactor import validation to use pattern matching for AST nodes
* Set `startup_timeout` and `shutdown_timeout` to `None` in `LifespanManager` for test files.
* Convert test functions to async in `test_messages_endpoints.py`
* Add `api_key_required` marker to assistant component tests
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
* Update scripts
* update the base dep in uv deps
* update nightly scripts
* Add uv creds for publish
* skip tests for now
* fix version
* only build the wheel
* try again
* add uv to python run
* [autofix.ci] apply automated fixes
* use uv cache
* more version fixe
* fixing versions
* fix base version
* Try no frozen?
* skip everything to try docker build
* tag
* frozen
* separate script for updating uv dep
* [autofix.ci] apply automated fixes
* hardcoded versions
* hardcoded versions
* add version to editable package
* build project before docker file runs
* try again
* fix uv patht o build
* don't know why this would mkae a difference
* debug statements
* debug statements
* debug statements
* change path to whl 🤷
* manually move the wheel...
* make dir
* try no sources
* add back tests
* refactor uv to action
* add uv action
* Update nightly build workflow to include uv lock files in version update commit
* Update lint-py workflow to use specific ref for setup-uv action
* Add checkout step to style-check-py GitHub Actions workflow
* Remove redundant GitHub ref syntax in lint-py.yml workflow
* Update lint-py.yml to use specific ref for setup-uv action
* Update action.yml: standardize quotes and remove redundant checkout step
* Add checkout step to GitHub Actions workflows for specific ref handling
- Introduced `actions/checkout@v4` step to multiple workflows to ensure code is checked out at a specific ref.
- Updated `.github/workflows/docker-build.yml`, `.github/workflows/release_nightly.yml`, `.github/workflows/lint-py.yml`, and `.github/workflows/style-check-py.yml` to include the new checkout step.
- Ensured credentials are persisted during the checkout process.
* Add checkout step to Python test workflow with specific ref
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
* uv sync works
* fist stab at Makefile
* uv treatment for langflow-base
* sqlmodel to 0.0.18
* add reinstall_backend to Makefile
* makefile - reinstall_backend fix and unit_test dependency
* fix dev dependencies
* fix dev dependencies
* fix dev dependencies
* lock
* Makefile
* [autofix.ci] apply automated fixes
* Update Makefile
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
* delete update_dependencies
* fix lint
* Remove Poetry lock check from GitHub Actions workflow
* Switch to 'uv' for dependency management and caching in style-check workflow
* Update style-check workflow to use '--only-dev' flag for Ruff check
* Integrate 'uv' package setup and caching in GitHub Actions workflows
* Update version check in GitHub Actions to use 'uv tree' for langflow-base
* Remove redundant poetry environment setup in GitHub Actions workflow
* Add step to minimize uv cache in GitHub Actions workflow
* Update GitHub Actions workflow to use 'uv' for dependency management and caching
* Remove redundant script execution from build_langflow target in Makefile
* [autofix.ci] apply automated fixes
* Switch build system from Poetry to Hatchling and update dependencies
- Replace `poetry-core` with `hatchling` in build-system requirements
- Update `langflow-base` dependency to version `0.0.96`
- Add `tool.hatch.build.targets.wheel` configuration
- Adjust `tool.uv.sources` paths for `langflow-frontend` and `langflow-base`
* update lock
* Switch build system from Poetry to Hatchling in pyproject.toml
* Add langchain-unstructured dependency to pyproject.toml
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
* 🔧 (pyproject.toml): add duckduckgo-search dependency to the project
✨ (DuckDuckGoSearchRun.py): introduce DuckDuckGoSearchComponent for performing web searches using DuckDuckGo search engine
✨ (DuckDuckGo.jsx): add SVG icon for DuckDuckGo
✨ (index.tsx): create DuckDuckGoIcon component for displaying DuckDuckGo icon
🔧 (styleUtils.ts): import DuckDuckGoIcon for nodeIconsLucide in styleUtils
* 📝 (DuckDuckGoSearchRun.py): remove unnecessary whitespace to improve code readability and consistency
* ✨ (DuckDuckGoSearchRun.py): Add retry logic to DuckDuckGo search component for rate-limited requests
📝 (DuckDuckGoSearchRun.py): Update component description to reflect the addition of retry logic
📝 (DuckDuckGoSearchRun.py): Add new inputs for max_retries and initial_delay to configure retry behavior
📝 (DuckDuckGoSearchRun.py): Update search_response method to use search_with_retry method with retry logic
📝 (DuckDuckGoSearchRun.py): Update format_results method to handle formatted results
📝 (DuckDuckGoSearchRun.py): Add search_with_retry method to handle search with retry logic
📝 (DuckDuckGoSearchRun.py): Update search_response method to use search_with_retry method
📝 (DuckDuckGoSearchRun.py): Update search_response method to set status messages
📝 (DuckDuckGoSearchRun.py): Handle exceptions and set appropriate status messages in search_response method
✨ (duckduckgo.spec.ts): Add integration test for DuckDuckGo search component in frontend
* 📝 (DuckDuckGoSearchRun.py): add newline at the end of the file to follow best practices and avoid potential issues with some tools that expect it
* [autofix.ci] apply automated fixes
* updating duckudckgo
* [autofix.ci] apply automated fixes
* ✨ (DuckDuckGoSearchRun.py): Refactor DuckDuckGoSearchComponent to use pydantic BaseModel for schema definition and improve code structure for better readability and maintainability. Add support for result limiting in search functionality.
* 🔧 (DuckDuckGoSearchRun.py): Remove unnecessary import and update status message for DuckDuckGo Search Tool to improve clarity
* [autofix.ci] apply automated fixes
* ✨ (duckduckgo.spec.ts): update test selectors for duckduckgo search component to match changes in the frontend code and improve test reliability
* 🐛 (linkComponent.spec.ts): fix an issue where the key combination for selecting all text was not working correctly on Mac devices. Updated the key combination to use the correct modifier key based on the user's operating system.
* 📝 (frontend): mark is-unicode-supported package as extraneous in package-lock.json
* rollback lock file
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
* Add CassandraGraphVectorStoreComponent and HtmlLinkExtractorComponent
* Move uuid import to global imports
* fix test with new text spliter
* update poetry lock
* ci: add continue-on-error to py_autofix.yml
---------
Co-authored-by: Ítalo Johnny <italojohnnydosanjos@gmail.com>
Co-authored-by: anovazzi1 <otavio2204@gmail.com>
* refactor: update deprecated call to get_actions
* Update composio-langchain dependency to version 0.5.13 in pyproject.toml
* Downgrade `composio-langchain` dependency to version `0.5.9` in `pyproject.toml`
* Add missing import for CustomComponent in test_custom_component.py
* fix: Problem in the description field when using the MariaDB or MySQL database.
* fix: Problem in the description field when using the MariaDB or MySQL database.
* fix: Add the migration script to update description columns type.
* [autofix.ci] apply automated fixes
* Update src/backend/base/langflow/alembic/versions/1d90f8a0efe1_update_description_columns_type.py
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
* feat: add component clickhouse for vector database
* feat: add component clickhouse for vector database - conflicts resolved
* [autofix.ci] apply automated fixes
* [autofix.ci] apply automated fixes (attempt 2/3)
* feat: add component clickhouse for vector database - conflicts resolved
* feat: add component clickhouse for vector database - update poetry
* feat: add component clickhouse for vector database - conflicts resolved
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
* 🔧 (pyproject.toml): add lark dependency to support parsing and processing of grammars in the project
♻️ (SelfQueryRetriever.py): refactor input types in metadata fields to improve clarity and maintainability
* 📝 (SelfQueryRetriever.py): Update class name and imports for consistency and clarity
📝 (SelfQueryRetriever.py): Refactor input and output definitions for better readability and maintainability
📝 (SelfQueryRetriever.py): Refactor method signatures and variable names for improved code organization and understanding
* [autofix.ci] apply automated fixes
* ♻️ (SelfQueryRetriever.py): Remove unused import 'VectorStore' to clean up the code and improve maintainability.
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
* feat: bump composio version
* [autofix.ci] apply automated fixes
* chore(poetry.lock): update Poetry version from 1.8.2 to 1.8.3
chore(poetry.lock): remove milvus_lite-2.4.9-py3-none-manylinux2014_aarch64.whl package from lock file
* [autofix.ci] apply automated fixes
* fix(poetry.lock): update Poetry version from 1.8.2 to 1.8.3 to reflect the actual version used
---------
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>