* fix: tool calling and openai tools do not include chat history
* fix import
* [autofix.ci] apply automated fixes
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
* ✨ (constants.ts): add BUILDS endpoint to URLs constants
✨ (index.ts): create index file for builds-related queries
✨ (use-delete-builds.ts): implement useDeleteFLowPool hook for deleting builds
* ✨ (chatView): integrate useDeleteFlowPool hook for deleting flow pool
♻️ (chatView): refactor clearChat function to use mutateFlowPool for deletion
* ♻️ (use-delete-builds.ts): rename useDeleteFLowPool to useDeleteBuilds for clarity
♻️ (index.tsx): update import and usage of useDeleteFLowPool to useDeleteBuilds
* ✨ (API): add use-get-builds query to fetch build data
✨ (PageComponent): integrate use-get-builds query for fetching builds
✨ (flowStore): add setters for inputs, outputs, and hasIO in flowStore
* ♻️ (flowStore.ts): refactor hasIO to derive its value from inputs and outputs
🔥 (flowStore.ts): remove unused resetFlow function to clean up the codebase
* ♻️ (use-get-builds.ts): refactor useGetBuildsQuery to remove unused params
✨ (PageComponent): add logic to handle flow state, inputs, outputs, and viewport
♻️ (flowStore): refactor and add resetFlow method to handle flow state reset
* ✅ (chatComponent): add data-testid attributes for better testability
✅ (generalBugs-shard-3.spec.ts): add end-to-end test for playground button state
---------
Co-authored-by: anovazzi1 <otavio2204@gmail.com>
✨ (headerComponent/index.tsx): Add functionality to handle user logout in the header component
🔧 (api.tsx): Add useLogout and useRefreshAccessToken functions to handle user logout and access token refresh
🔧 (use-post-logout.ts): Implement useLogout function to handle user logout functionality
🔧 (use-post-refresh-access.ts): Implement useRefreshAccessToken function to handle access token refresh
🔧 (authStore.ts): Remove unnecessary imports and update the authStore functionality for user logout and access token management.
Co-authored-by: anovazzi1 <otavio2204@gmail.com>
* ♻️ (crud.py): refactor delete_vertex_builds_by_flow_id function to correctly delete vertex builds by flow_id using relationship attribute instead of column comparison.
* 📝 (generalBugs-shard-0.spec.ts): Remove unnecessary test case and add new test case for chat messages clearing functionality
✨ (generalBugs-shard-8.spec.ts): Add new test case for interacting with API request
✨ (generalBugs-shard-9.spec.ts): Add new test case for testing chat memory functionality
* Fixed refresh button and refresh parameter
* Refactored Multiselect component and implemented custom values on it
* Fixed default values
* Made Backend support combobox on Dropdown and Multiselect
* refactor: improve recursive serialization function
Refactor the `recursive_serialize_or_str` function in the `schema.py` file to improve its readability and maintainability. The function now uses a try-except block to handle exceptions and returns a string representation of the object if an exception occurs. This ensures that the function always returns a string, preventing any unexpected errors. Additionally, the function now includes additional checks for different object types, such as dictionaries, lists, and instances of `BaseModel`. These checks ensure that the function correctly serializes complex objects and avoids any potential issues. Overall, this refactoring improves the code quality and reliability of the `recursive_serialize_or_str` function.
* feat(artifact.py): add support for recursive serialization of items in ARRAY artifact type to ensure consistent data handling
* feat(schema.py): add support for serializing arrays in build_output_logs function to handle LogType.ARRAY case
* fix: remove create task call
* feat: Add support for custom component message storage
The code changes in `types.py` add support for storing messages in custom components. If a custom component has the attributes `should_store_message` and `store_message`, the `store_message` method will be called to store the message. This enhancement improves the functionality of the interface vertex in the graph.
The OpenAI client instantiation was removed from the `AssistantsGetAssistantName` and `AssistantsListAssistants` components. This commit fixes the issue by adding back the OpenAI client instantiation in the `process_inputs` method of both components.
* fix: update TextAreaComponent styling for edit node table
Adjust the styling of the TextAreaComponent in the edit node table to fix the positioning of eye icon
* [autofix.ci] apply automated fixes
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
* feat: create useDeleteApiKey hook to handle api keys delete
* refactor: use mutation to handle delete api key
* [autofix.ci] apply automated fixes
* feat: create useGetApiKeys hook
* refactor: use useGetApiKeysQuery hook to get api keys data
* [autofix.ci] apply automated fixes
* refactor: change interface name
* refactor: remove unnused loading state and use react state instead of react ref to ensure component render
* fix: multiple refreshs when auto_login=false
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
* merge
* [autofix.ci] apply automated fixes
* support for MultilineSecretInput
* add support for MultilineSecretInput
* [autofix.ci] apply automated fixes
* ruff
* align eye-icon
* tweaks and modal
* [autofix.ci] apply automated fixes
* textare edit modal hidden text plus eye icon
* fix pydantic serialization warning
* [autofix.ci] apply automated fixes
* chore: Add password visibility toggle to text area components
* [autofix.ci] apply automated fixes
* fix list assistants
* fix: remove extraneous property from is-unicode-supported dependency
* fix: update TextAreaComponent styling for edit node table
Adjust the styling of the TextAreaComponent in the edit node table to fix the positioning of the side-bar button. The right margin of the button was changed from 5.2rem to 4.2rem to align it correctly with the text area. This change improves the visual consistency of the edit node table.
* fix modal not sync with outside state
* add comment for future devs
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: anovazzi1 <otavio2204@gmail.com>
* feat(pyproject.toml): add langchain-core dependency version 0.2.23 to the project
* feat(pyproject.toml): update version 1.0.14 and 0.0.90 for langflow and langflow-base packages
* First implementation of LangWatch tracer
* Remove dependency from backend base internal and add langwatch docs
* Bump langwatch to v0.1.4
* Fix missing log parameter on method
* Move docs to the right folder
* chore: update lock
* Add Vectara RAG component and docs
* [autofix.ci] apply automated fixes
* refactor: update VectaraRAG component to the new component standard
* fix: update VectaraRagComponent filter parameter
Update the filter parameter in the VectaraRagComponent class to use the correct variable name 'self.filter' instead of 'filter'. This ensures that the correct filter value is passed to the VectaraQueryConfig object.
* fix: add condition to set_cache_coro in Graph class
Add a condition to the `set_cache_coro` function call in the `Graph` class. The condition checks if the `cache` variable is true and the `flow_id` is not empty before calling the function. This ensures that the cache is set only when both conditions are met, improving the efficiency of the code.
---------
Co-authored-by: Rogério Chaves <rogeriochaves@users.noreply.github.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
* refactor: add find_runnable_predecessors_for_successor method
* feat: refactor find_next_runnable_vertices method
Refactor the `find_next_runnable_vertices` method in the `Graph` class to improve readability and simplify the logic. Instead of using a list comprehension, the method now uses a for loop to iterate over the `vertex_successors_ids` and determine if each vertex is runnable. If a vertex is not runnable, it calls the `find_runnable_predecessors_for_successor` method to find the runnable predecessors. The runnable vertices are then added to the `next_runnable_vertices` list. This refactoring improves the clarity and maintainability of the code.
* removed console log and fixed nulland
* Fixed ag grid version mismatch
* Fixed unused import
* Fixed ctrl+a not working on edit node and tweaks
* Fixed styling on editnode
* Made it work on mac
* ✅ (generalBugs-shard-7.spec.ts): add end-to-end test for selecting all with ctrl + A on advanced modal to ensure functionality works as expected
---------
Co-authored-by: cristhianzl <cristhian.lousa@gmail.com>
🐛 (App.tsx): Fix logic to correctly display error modal when health data is missing or not "ok"
🔧 (use-get-health.ts): Disable retry option in useGetHealthQuery to prevent unnecessary refetching of health data
* changed column defs to receive handleOnNewValue and use it to change Advanced variable
* Exported function isTargetHandleConnected
* Refactored types of setNodeClass
* Exported type of handleOnNewValue
* Refactored useHandleNodeClass to only handle changes to node data
* Refactored toggleCellRender to handle advanced values by itself with the handleOnNewValue
* changed setNodeClass types and disabled hook
* changed handleNodeClass on parametercomponent
* changed handleNodeClass on the two components that used it
* refactor: Update handleNodeClass to accept newNodeClass and type only
* Refactor EditNodeModal component to use new handleNodeClass and columnDefs
* Changed columnDefs to receive new handleNodeClass and not receive useless parameters
* changed cellTypeStr to strRender
* Refactored inputFileComponent to use the new handleOnNewValue
* Refactored keypairList to convert values on the fly
* added parameterRenderComponent that renders all parameters in one place
* Exported parameterRenderComponent
* Changed tableNodeCellRender to use ParameterRenderComponent
* changed parameterredercomponent to receive name
* changed strrendercomponent to receive name
* changed nodecellrender to pass name and to check if value is undefined before assigning on templateData
* chore: Refactor use-handle-new-value to handle undefined values in changes
* Used ParameterRenderComponent at parameterComponent
* Refactored parameterRenderComponent to include refresh button
* Created refresh parameter component
* Added nodeId to parameterrendercomponent call
* Removed unused variable
* Refactored refreshButton
* Fixed parameters not showing when they dont have a value
* Created a tweakComplnent that renders the tweak individually, with the same table as the EditNode
* Created tweaks component, that renders all tweaks
* Changed tableNodeCellRender to pass setNode as well
* changed handleOnNewValue to use custom setNode if specified
* added editNodeComponent that handles the table and rowData and columnDefs
* changed editNodeModal to use editNodeComponent instead of table
* changed columndefs type to handle setNode and hideVisibility optional parameters
* changed useRowData to not use myData, and just use nodeClass
* Changed codeTabsPropsType tweaks property to include only the ncessary
* changed codeTabsComponent to use TweaksComponent and handle an internal nodes state
* changed apiModal to handle the tweaks build by finding the differences between old and current node
* fix bug on API modal that refresh tweaks table all the time
* Created new tweaks store type
* Added tweaks store with all of the logic needed to get the tweaks on the API page
* refactored TweakComponent to hold an temporary state to prevent the table from rerendering
* Added TweakComponent into TweaksComponent
* Removed external state on tableAdvancedToggle, making every state come from the Stores
* Removed external state from TableNodeCellRender and added isTweaks to choose which store to use
* Added SetNode type on HandleOnNewValue
* Added custom setNode to handleNodeClass
* Removed unused logic from apiModal
* removed unused old code
* Changed type of getChangesTypes
* Transformed string into object on get codes
* Changed getNodesWithDefaultValue to return nodes that will appear on Tweaks, as well as just the allowed parameters
* added hasTweaks to tabs
* added check of template keys to update the local nodeClass state, allowing the table to be updated just when the number of parameters changes
* passed isTweaks to columnDefs
* removed unused state and passed isTweaks to value getters
* Removed unused state
* updated tabsArrayType with hasTweaks and removed unused types
* Added local nodes tweaks state to the codetabscomponent and refactored conditions of display
* removed unused console.log
* changed advanced toggle to use parameterid given by the value
* changed nodecellrender to use parameter id given by the value
* passed parameter id by value to the renderers
* removed nodeClass from columnDefs definition
* Fixed isTargetHandleConnected returning error if field is undefined
* Fix performance issues on edit node modal
* Fixed scroll overflow issues on tweaksComponent
* Revert "Revert "refactor: update template api, handleonnewvalue and handlenodeclass hooks (#2628)""
This reverts commit 236ae82cabba2fa1128f498d781099facd222b57.
* 📝 (tweaksTest.spec.ts): remove redundant code and improve readability by simplifying the interaction with elements in the test case
* added custom id for tests
* ✨ (frontend): Add unique id prop to input components for better testability and accessibility.
✨ (Hierarchical Tasks Agent.spec.ts): Update dropdown element IDs to improve clarity and consistency
✨ (Memory Chatbot.spec.ts): Update dropdown element IDs to improve clarity and consistency
✨ (Sequential Tasks Agent.spec.ts): Update dropdown element IDs to improve clarity and consistency
✨ (chatInputOutputUser-shard-0.spec.ts): Update dropdown element IDs to improve clarity and consistency
✨ (chatInputOutputUser-shard-1.spec.ts): Update dropdown element IDs to improve clarity and consistency
✨ (chatInputOutputUser-shard-2.spec.ts): Update dropdown element IDs to improve clarity and consistency
✨ (decisionFlow.spec.ts): Update input list element IDs to improve clarity and consistency
✨ (decisionFlow.spec.ts): Update prompt area element IDs to improve clarity and consistency
✨ (decisionFlow.spec.ts): Update dropdown element IDs to improve clarity and consistency
✨ (freeze-path.spec.ts): Update dropdown element IDs to improve clarity and consistency
✨ (generalBugs-shard-0.spec.ts): Update dropdown element IDs to improve clarity and consistency
✨ (generalBugs-shard-1.spec.ts): Update dropdown element IDs to improve clarity and consistency
✨ (generalBugs-shard-3.spec.ts): Update dropdown element IDs to improve clarity and consistency
🔧 (logs.spec.ts, textInputOutput.spec.ts): update dropdown test selectors to match changes in the frontend codebase
* Fixed prompt not holding the value when validating
* Fixed range spec on int component
* Fixed OpenAI Model max tokens range spec
* ✨ (dropdownComponent.spec.ts): Update dropdown test cases to use more descriptive test IDs for better clarity and maintainability
📝 (fileUploadComponent.spec.ts): Add explicit wait for "Run Flow" button to ensure it is loaded before clicking
📝 (folders.spec.ts): Update file path in readFileSync function to use an absolute path for better reliability
📝 (freeze-path.spec.ts): Refactor test code to remove commented out code and improve readability by using more descriptive test IDs and removing unnecessary code snippets
✨ (inputListComponent.spec.ts): Update test file to use consistent naming convention for input elements in the InputListComponent
📝 (intComponent.spec.ts): Refactor test file to use consistent naming convention for input elements in the IntComponent
✨ (nestedComponent.spec.ts): Update test steps and interactions for nestedComponent to improve test coverage and accuracy.
📝 (promptModalComponent.spec.ts): Update test selectors for prompt modal component to improve consistency and readability
📝 (textAreaModalComponent.spec.ts): Update test selectors for text area modal component to improve consistency and readability
📝 (toggleComponent.spec.ts): Update test selectors for toggle component to improve consistency and readability
* 🐛 (intComponent.spec.ts): fix incorrect value comparison in test for IntComponent
🐛 (intComponent.spec.ts): fix missing test step for clicking on a specific element in IntComponent test
* 📝 (Vector Store.spec.ts): increase timeout for waiting for "built successfully" text to improve test reliability and prevent false negatives
* Fixed folders test
---------
Co-authored-by: anovazzi1 <otavio2204@gmail.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: cristhianzl <cristhian.lousa@gmail.com>
* changing api key journey
* refactor(api_key.py): remove unnecessary code related to config_dir and secret_key_path
refactor(login.py): refactor setting api_key cookie to use user's store_api_key
refactor(variable/service.py): re-encrypt stored value if secret_key changes to ensure validity
* 📝 (api_key.py): Remove unused imports and clean up code for better readability
📝 (login.py): Remove unused imports and clean up code for better readability
📝 (auth/utils.py): Remove unused imports and clean up code for better readability
📝 (store/service.py): Remove unused imports and clean up code for better readability
* 🔧 (utils.py): replace hashing logic with random key generation for key length less than 32 bytes to ensure key length is always 32 bytes
📝 (utils.py): update comments for clarity and accuracy regarding key generation and encryption process
---------
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
* Added fuzzy search and custom value on search on Dropdown Component
* added allowCustom prop to allow custom values on dropdownComponent
* changed type of allowCustom
* added custom to custom field on dropdown
* Fixed empty search not showing all of the options
* Added Text on the left of the label
* feat(ci.yml): add labeler job to automatically add 'lgtm' label when pull request review is approved
* ci(ci.yml): add dependency on labeler job to ensure it runs before the ci job
* chore(ci.yml): remove unnecessary condition for labeler job in CI workflow
* refactor(ci.yml): remove unnecessary condition for labeler job in CI workflow
* refactor(ci.yml): update CI workflow to include labeled pull requests in the trigger conditions
* refactor: update StateVertex class to inherit from ComponentVertex
The StateVertex class in types.py has been updated to inherit from the ComponentVertex class instead of the Vertex class. This change ensures that the StateVertex class has access to the methods and attributes of the ComponentVertex class, improving code organization and maintainability.
* feat: add _successors_ids attribute to Vertex class
The Vertex class in base.py has been updated to include a new attribute `_successors_ids`. This attribute will store the IDs of the successors of the vertex. This change improves the functionality and flexibility of the Vertex class.
* feat: add _set_successors_ids method to NotifyComponent
This commit adds a new method `_set_successors_ids` to the `NotifyComponent` class in `Notify.py`. This method retrieves the successors of the vertex and sets the `successors_ids` attribute accordingly. This change improves the functionality and flexibility of the `NotifyComponent` class.
* refactor: add _set_successors_ids method to ListenComponent
This commit adds a new method `_set_successors_ids` to the `ListenComponent` class in `Listen.py`. This method retrieves the successors of the vertex and sets the `successors_ids` attribute accordingly. This change improves the functionality and flexibility of the `ListenComponent` class.
* refactor: update StateVertex class to not be a state
This commit updates the StateVertex class in types.py to no longer be considered a state. The `is_state` attribute is set to False, ensuring that the vertex is not treated as a state. This change improves code clarity and aligns with the intended functionality of the class.
* refactor: set is_state attribute to True in ListenComponent
This commit sets the `is_state` attribute to True in the `ListenComponent` class in `Listen.py`. This change ensures that the `ListenComponent` is treated as a state and improves the functionality of the component.
* refactor: set is_state attribute to True in NotifyComponent
* refactor: remove base_type argument from StateVertex constructor
This commit removes the `base_type` argument from the constructor of the `StateVertex` class in `types.py`. The `base_type` argument was not being used and was unnecessary for the functionality of the class. This change improves code clarity and removes unnecessary code.
---------
Co-authored-by: Lucas Oliveira <62335616+lucaseduoli@users.noreply.github.com>
* feat(Makefile): add 'patch' target to bump the version in langflow and langflow-base
* chore: bump langflow and langflow-base versions to 1.0.13 and 0.0.89 respectively
* refactor: add _input_type attribute to dump in BaseInputMixin
* feat: add InputTypesMap and _instantiate_input function
The commit adds the `InputTypesMap` dictionary and `_instantiate_input` function to the `inputs.py` file. The `InputTypesMap` is a dictionary that maps input types to their corresponding classes, and the `_instantiate_input` function is used to instantiate an input object based on its type. This change improves the flexibility and extensibility of the codebase.
* refactor: convert teardown_services function to async
The `teardown_services` function in `utils.py` has been converted to an asynchronous function to ensure proper handling of asynchronous operations during service teardown. This change improves the overall reliability and performance of the codebase.
* refactor: convert teardown method to async
Convert the `teardown` method in the `Service` class to an asynchronous function to handle asynchronous operations during service teardown. This change improves the reliability and performance of the codebase.
* refactor: convert teardown methods to async in services
* feat: add teardown method in TelemetryService
Convert the `teardown` method in the `TelemetryService` class to an asynchronous function to handle asynchronous operations during service teardown. This change improves the reliability and performance of the codebase.
* refactor: update TelemetryService to use optimized payload in get request
The `TelemetryService` class in `service.py` has been updated to use an optimized payload dictionary in the `get` request. This change improves the efficiency and performance of the codebase.
* refactor: convert teardown method to async in utils.py
Update the path filter condition in ci.yml to use strict comparison for the 'should-run-ci' output value. This ensures that the CI job is only executed when the output value is 'true'.
* ✨ (sidebarComponent): Add support for downloading folders in the sidebar component to allow users to download folder data as JSON files
🔧 (sidebarComponent): Remove unused import and function related to downloading folders to clean up the codebase
📝 (use-get-download-folders): Add a new function to handle downloading folders from the API in a separate file for better code organization
♻️ (MainPage/services): Remove unused functions related to downloading and uploading flows from folders to simplify the services file and improve maintainability
🔧 (foldersStore): Remove unused import and function related to uploading flows from folders to clean up the codebase
* 📝 (sideBarFolderButtons/index.tsx): add error handling logic to display error message when downloading folder fails
* update error message
---------
Co-authored-by: anovazzi1 <otavio2204@gmail.com>