* take 1 WIP
* remove firecrawl dep from langflow package, only usage appears to be in langflow-base
* langchain-google-genai to 2.0.1 which is what we have now in the lock file
* widen ranges based on old lock file
* lock
* Add pyproject.toml config flag to ruff commands in Makefile
* Update ruff exclude path in pyproject.toml
* Remove unused TYPE_CHECKING import from api_key.py
* Remove redundant config flag from 'ruff check' command in Makefile
⬆️ (pyproject.toml): update duckduckgo-search dependency to version 6.3.4
🔧 (duckduckgo.spec.ts): remove test.skip from the test case to enable the test for duckduckgo search component
💡 (duckduckgo.spec.ts): refactor test case to improve readability and remove unnecessary code blocks
* FIX: PyMuPDF for parsing, pass as str instead of posix path
* Switch back to pypdf due to licensing
* Allow specification of the number of threads
* [autofix.ci] apply automated fixes
* Update file.py
* Switch StrInput to IntInput
* ✨ (Document QA.json, Vector Store RAG.json): Update FileComponent class to include IntInput for concurrency_multithreading to control the number of workers for parallel processing. This enhancement allows for better control and optimization of processing tasks.
* ⬆️ (pyproject.toml): upgrade langchain-core dependency from version 0.3.10 to version 0.3.12 to ensure compatibility and leverage new features
* ⬆️ (pyproject.toml): update langchain-core dependency to allow versions greater than or equal to 0.3.12 for compatibility reasons
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: cristhianzl <cristhian.lousa@gmail.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
* fix: update assistants client import (#4150)
* remove unnecessary patch
* remove unnecessary patch
* compatible release operator
* chore: add opensearch-py dependency (#4134)
Add opensearch-py dependency to pyproject.toml
* patch version
* lock
* lock some packages to speed up pip install
* langflow-base version
* fix: fix retrieverTool component (#4201)
♻️ (RetrieverTool.py): refactor build method signature to accept additional keyword arguments for future extensibility
* Fixed save modal not exiting
* fix: object has no attribute 'set_event_manager' (#4200)
* 🐛 (base.py): fix AttributeError by checking if custom_component has set_event_manager method before calling it
* 📝 (base.py): Import Component from langflow.custom to improve code readability and maintainability
♻️ (base.py): Refactor code to use isinstance() method for checking if custom_component is an instance of Component
* Refactor: Eliminate Global Variables for Improved Code Maintainability_fix_release (#4208)
Refactor: Eliminate Global Variables for Improved Code Maintainability
- Replaced global variables with local variables or class attributes.
- Enhanced code readability and reduced potential side effects.
* fix: Update example (#4204)
update example
* fix: avoids error NameError: name 'MAX_NUMBER_OF_FIELDS' is not defin… (#4203)
fix: avoids error NameError: name 'MAX_NUMBER_OF_FIELDS' is not defined and fixes build method
Co-authored-by: Edwin Jose <edwin.jose@datastax.com>
* fix: unexpected keyword argument 'code' -> SQLExecutor and SQLDatabase (#4230)
🔧 (SQLDatabase.py): update build method signature to accept additional keyword arguments for future extensibility
🔧 (SQLExecutor.py): update method signature to accept additional keyword arguments for future extensibility
* lock httptools to 0.6.4
* Move ChatInput import to within flow_component fixture in conftest.py
* Simplify error message formatting in test cases for data components
* Add readme to dockerfile
* build: dockerfile with entrypoint (#4062)
Adds a dockerfile with an entrypoint for use with Datastax Langflow
* fixes the leading v for checking out commits correctly
* fixes on more version checkout for docker build
* ✨ (authContext.tsx): Add functionality to fetch global variables on authentication
🔧 (api.tsx): Replace universal-cookie import with react-cookie for consistency
🔧 (authStore.ts): Replace universal-cookie import with react-cookie for consistency
🔧 (use-get-global-variables.ts): Add check to only fetch global variables if user is authenticated
✨ (use-get-mutation-global-variables.ts): Add mutation function to fetch and update global variables
🔧 (authStore.ts): Replace universal-cookie import with react-cookie for consistency
* [autofix.ci] apply automated fixes
* revert changes to workflows
* upgrade lockfile
* update pyproject versions
* update lockfile again
* ⬆️ (pyproject.toml): upgrade langflow-base dependency to version 0.0.99
* ⬆️ (pyproject.toml): downgrade version from 0.0.99 to 0.0.97 to align with project requirements and dependencies.
* ⬆️ (pyproject.toml): downgrade langflow-base dependency version from 0.0.99 to 0.0.97 to resolve compatibility issues
* ⬆️ (uv.lock): downgrade langchain-core package version from 0.3.15 to 0.3.12 to resolve compatibility issues with dependencies
* ⬆️ (pyproject.toml): upgrade langflow-base dependency to version 0.0.99 to utilize the latest features and improvements
---------
Co-authored-by: Sebastián Estévez <estevezsebastian@gmail.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: Lucas Oliveira <lucas.edu.oli@hotmail.com>
Co-authored-by: Edwin Jose <edwin.jose@datastax.com>
Co-authored-by: anovazzi1 <otavio2204@gmail.com>
Co-authored-by: João <38133825+joaoguilhermeS@users.noreply.github.com>
Co-authored-by: Jordan Frazier <jordan.frazier@datastax.com>
Co-authored-by: Jordan Frazier <122494242+jordanrfrazier@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
* refactor: reorganize langchain dependencies in pyproject.toml
* feat: add langchain-ollama dependency to pyproject.toml
* fix: update imports to use langchain_ollama for OllamaEmbeddings and ChatOllama
* lanfuse upgrade and crew result usage
* ✅ (Dynamic Agent.spec.ts): Enable tests for checking the presence of required environment variables before running the test suite.
✨ (Hierarchical Agent.spec.ts): Add integration test for Hierarchical Tasks Agent to ensure proper functionality and behavior
✨ (Sequential Task Agent.spec.ts): Add integration test for Sequential Tasks Agent to ensure proper functionality and behavior
---------
Co-authored-by: cristhianzl <cristhian.lousa@gmail.com>
* Add pytest-github-actions-annotate-failures to dependencies in pyproject.toml
* feat: add --exclude-warning-annotations option to pytest commands in Makefile
* feat: add pytest-github-actions-annotate-failures to dev dependencies in pyproject.toml and uv.lock
* Add PYTEST_RUN_PATH environment variable to GitHub Actions workflow
* Remove '--exclude-warning-annotations' option from pytest commands in Makefile
* Start on big langchain dep upgrade
* Update pyproject.toml
* add new lock
* Rebase on post1 changes
---------
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
* 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>