Commit graph

13,242 commits

Author SHA1 Message Date
Igor Carvalho
b0bdfa211f
refactor: store likes API (#2661)
* feat: create usePostLikeComponent hook to handle store like API

* refactor: use usePostLikeComponent hook to handle store likes

* [autofix.ci] apply automated fixes

* refactor: use mutate loading instead of managing loading with react state

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-07-12 17:53:59 -03:00
Gabriel Luiz Freitas Almeida
f5f5141cc4
fix: check if vertex is in vertices_being_run to check if it is runnable (#2668)
Co-authored-by: Cristhian Zanforlin Lousa <72977554+Cristhianzl@users.noreply.github.com>
2024-07-12 20:26:05 +00:00
Cristhian Zanforlin Lousa
dc5ac092fb
test: Add Test to Prevent Bug on Output Inspection for Grouped Components (#2667)
* add new test for bug on output inspection + grouped components

* [autofix.ci] apply automated fixes

* 🔧 (typescript_test.yml): increase shard count from 14 to 15 to distribute tests more evenly
🔧 (typescript_test.yml): fix syntax issues in conditional expressions

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-07-12 20:10:00 +00:00
Jael Gu
c8d7f47070
feat: Add milvus vector store (#2634)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-07-12 12:47:55 -07:00
anovazzi1
844da96bd2
fix: update starter projects (#2665) 2024-07-12 18:55:00 +00:00
Gabriel Luiz Freitas Almeida
c47c358cad
feat: add payload validation, update Simple API Test fixture, run tests (#2664) 2024-07-12 18:15:43 +00:00
Cristhian Zanforlin Lousa
cdb8c80a7e
fix: prevent to loop on keys of object profile pictures when It's not loaded yet (#2658)
🐛 (use-preload-images.tsx): add null check for profilePictures to prevent errors when profilePictures is undefined

Co-authored-by: anovazzi1 <otavio2204@gmail.com>
2024-07-12 17:43:24 +00:00
Gabriel Luiz Freitas Almeida
6bc0766929
chore: update package versions (#2663) 2024-07-12 17:15:18 +00:00
Cristhian Zanforlin Lousa
eb0a70f646
fix: adjust function that add incremental name on flows that already exists + tests (#2645)
* 🐛 (reactflowUtils.ts): fix addVersionToDuplicates to exclude the updated flow from existing names to prevent naming conflicts

*  (menuBar): add data-testid to flow configuration button for testing
 (sideBarFolderButtons): add data-testid to delete folder button for testing
 (folders.spec.ts): update test to use new data-testid for delete folder button
 (generalBugs-shard-4.spec.ts): add new end-to-end test for flow operations

---------

Co-authored-by: anovazzi1 <otavio2204@gmail.com>
2024-07-12 17:14:38 +00:00
Gabriel Luiz Freitas Almeida
ef6d954357
fix: optimize filtering of vertices in useFlowStore (#2662)
Refactor the filtering logic in the useFlowStore hook to optimize the performance. The code changes ensure that the nextVertices array is filtered correctly by excluding vertices that already exist in the last layer.

Co-authored-by: anovazzi1 <otavio2204@gmail.com>
2024-07-12 16:37:47 +00:00
Nicolò Boschi
c88e9af121
feat: refactor memories (#2621)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-07-12 09:30:04 -07:00
Nicolò Boschi
ccd6d1c666
fix: coroutine is not iterable when using redis (#2655) 2024-07-12 09:29:08 -07:00
Nicolò Boschi
68e9617f54
fix: fix docker compose and add instructions (#2654) 2024-07-12 09:27:13 -07:00
Hamish Arnold
c522a7aae7
feat: Add JSON Cleaner Component (#2584)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2024-07-12 09:26:14 -07:00
Cristhian Zanforlin Lousa
8813143622
fix: add try catch on fenet decrypt to prevent errors (#2660) 2024-07-12 09:25:44 -07:00
anovazzi1
229b8680f7
fix: fix bug on row selection at IO modal (#2627)
* feat: optimize filtering of messages in SessionView component

The code changes in this commit optimize the filtering of messages in the SessionView component. The useMemo hook is used to memoize the filteredMessages array, which improves performance by avoiding unnecessary re-rendering.

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-07-12 15:28:56 +00:00
Gabriel Luiz Freitas Almeida
74252aa76a
fix: handle sender_name passed as data or message (#2653) 2024-07-12 04:59:43 -07:00
Gabriel Luiz Freitas Almeida
28fa012fd6
chore: update HuggingFace Spaces build script to use correct space name (#2649)
The HuggingFace Spaces build script has been updated to use the correct space name "Langflow/Langflow" instead of "Langflow/Langflow-Preview". This ensures that the correct space is restarted when triggered.
2024-07-11 19:56:33 -03:00
Cristhian Zanforlin Lousa
34ef234c42
fix: enable copy when dict is disabled (#2642)
 (dictAreaModal): add customizeCopy function to copy JSON to clipboard
2024-07-11 18:47:00 -03:00
Gabriel Luiz Freitas Almeida
7d7502744e
fix: update Multiselect component to use 'values' prop instead of 'value' (#2640) 2024-07-11 22:21:41 +02:00
Cristhian Zanforlin Lousa
52db335b51
fix: remove unnecessary encode from API key decryption (#2641) 2024-07-11 17:49:01 +00:00
Gabriel Luiz Freitas Almeida
b8cc5a58aa
chore: update dependencies for langflow and langflow-base packages (#2638) 2024-07-11 10:34:11 -07:00
Jordan Frazier
7d3d621045
docs: make astra vectorize provider key advanced param (#2639) 2024-07-11 19:11:38 +02:00
596050
180e475cc3
Frontend Feature: Multiselect ui-component and merge refs hook (#2405)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2024-07-11 09:14:10 -07:00
Nicolò Boschi
feed388857
fix: qdrant with ingest not working (#2636) 2024-07-11 09:12:22 -07:00
Gabriel Luiz Freitas Almeida
2a8bd2347b
feat: update dependencies for Google Authentication Library and Google Calendar API (#2626)
This commit updates the dependencies for the Google Authentication Library and Google Calendar API. It includes the following changes:
- Upgraded google-auth to version 2.15.0
- Added google-auth-oauthlib version 1.2.1
- Added langchain-google-calendar-tools version 0.0.1

These updates ensure compatibility with the latest versions of the libraries and improve the functionality of the application.
2024-07-11 17:59:10 +02:00
Nicolò Boschi
ab0ab5f306
perf: improve /logs concurrent access (#2633)
* perf: improve /logs concurrent access

* perf: improve /logs concurrency access

* fix

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-07-11 15:06:34 +00:00
Igor Carvalho
3d0845c8bd
feat: update starter projects (#2630) 2024-07-11 16:05:08 +02:00
ming
81849d5f8b
feat: log retriever endpoint (#2601)
* log retriever endpoint

* disabled by default

* realtime log stream via http/2 SSE

* read and write lock

* unit test
2024-07-11 11:19:21 +02:00
ming
7bd105007e
feat: add opentelemetry utility functions and unit tests (#2570)
* add opentelemetry utility functions and unit tests

* review comments

* add label validation
2024-07-10 15:01:38 -04:00
anovazzi1
fb39c095da
fix: issue with freeze value on page refresh (#2623) 2024-07-10 18:51:14 +00:00
Ítalo Johnny
aa1958a4ad
feat: refactor graph vertex sorting (#2583)
* refactor: extract method from class to new func

* test: add new tests

* refactor: simplify funcs to improve readability

* refactor: extract new func from larger func

* refactor: remove recursion from func

* refactor: remove coupling with graph and vertex

* refactor: create adapter funcs to use new code

* refactor: add test for sorting up to vertex N with is_start=True

---------

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2024-07-10 07:37:39 -07:00
Gabriel Luiz Freitas Almeida
3406575c67
feat: add Maritalk model component (#2595)
* feat: add Maritalk icon

* feat: add Maritalk model component

* fix: update icon size

* feat: optimize MaritalkModelComponent initialization

This commit optimizes the initialization of the MaritalkModelComponent class in the Maritalk.py file. It updates the default value for the 'temperature' parameter to be within the range of 0 to 1, using the RangeSpec class. This ensures that the temperature value is valid and improves the overall functionality of the component.

* style: format maritalk svg

* feat: optimize MaritalkModelComponent initialization

This commit optimizes the initialization of the MaritalkModelComponent class in the Maritalk.py file. It updates the default value for the 'temperature' parameter to be within the range of 0 to 1, using the RangeSpec class. This ensures that the temperature value is valid and improves the overall functionality of the component.

* feat: update 'stream' parameter to be advanced in MaritalkModelComponent

This commit updates the 'stream' parameter in the MaritalkModelComponent class to be an advanced option. By setting the 'advanced' attribute to True, the 'stream' parameter will only be visible to advanced users. This change improves the usability of the component by hiding this option from regular users who do not need it.
2024-07-10 09:13:19 -03:00
Nicolò Boschi
05044a3434
feat: migrate agents and toolkits to Component syntax (#2579)
* feat: migrate agents and toolkits to Component syntax

* fix mypy

* fix mypy

* [autofix.ci] apply automated fixes

* fix mypy

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-07-10 05:09:14 -07:00
Nicolò Boschi
9c41b0c895
fix: azure embeddings models with fixed dimensions fail (#2619)
* fix: azure embeddings models with fixed dimensions fail

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-07-10 04:53:23 -07:00
himan-k
7414a01235
fixing ThreadingInMemoryCache usage (#2604)
* ThreadingInMemoryCache usage is broken. This commit addresses those issues along with missing documentation about the caching options.

* make lint & make unit_tests fixes

* removing unnecessary changes from unclear test results in  last run

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-07-10 04:52:37 -07:00
Gabriel Luiz Freitas Almeida
d28fe8eedc
fix: Improve vertex filtering and update is_vertex_runnable logic (#2612)
* feat: improve is_vertex_runnable method in RunnableVerticesManager

This commit improves the `is_vertex_runnable` method in the `RunnableVerticesManager` class. It adds an additional parameter `activated_vertices` to the method signature and updates the logic to check if a vertex is runnable based on the presence of activated vertices. This enhancement improves the accuracy of determining whether a vertex is runnable or not.

* fix: add predecessors to vertices_to_run

* style: fix lint issues

* feat: optimize vertex filtering in useFlowStore

This commit optimizes the vertex filtering logic in the `useFlowStore` function in `flowStore.ts`. It introduces a more efficient way to filter out vertices that are already being built, resulting in improved performance and accuracy.

* refactor: add is_active method to Vertex class

This commit adds the `is_active` method to the `Vertex` class in the `base.py` file. The `is_active` method checks if the state of the vertex is set to `ACTIVE` and returns a boolean value accordingly. This enhancement improves the readability and maintainability of the codebase.

* refactor: improve is_vertex_runnable method in RunnableVerticesManager

* refactor: improve find_runnable_predecessors_for_successors method in Graph class

* refactor: move test_create_function
2024-07-10 07:40:16 -03:00
Jordan Frazier
46966d164d
tests: fix up the astra integ tests and add vectorize tests (#2616)
* fix up the astra integ tests and add vectorize tests

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-07-10 11:32:34 +02:00
Gabriel Luiz Freitas Almeida
34c1a4d469
fix: add timeout for unit tests workflows (#2613)
fix: add timeout for unit tests and test CLI in Python workflow
2024-07-09 19:08:39 -07:00
Cristhian Zanforlin Lousa
7174e6ef7d
fix: show loading component state while images arent fully loaded (#2609)
*  (ProfilePictureForm): add loading state to handle initial loading state

* ♻️ (use-get-profile-pictures.ts): refactor profile pictures query to process data on the server side
♻️ (ProfilePictureForm): simplify state management by removing redundant loading state

* ♻️ (use-get-profile-pictures.ts): rename ProfilePicturesResponse to ProfilePicturesQueryResponse for clarity
♻️ (use-preload-images.tsx): add loading check to useEffect to prevent unnecessary execution
♻️ (profilePictureChooserComponent): update profilePictures prop type to handle undefined and add loading to usePreloadImages
♻️ (ProfilePictureForm): remove unnecessary state and use response directly from useGetProfilePicturesQuery

* 🐛 (use-preload-images.tsx): add missing dependency 'loading' to useEffect dependency array to ensure images are preloaded correctly
2024-07-09 19:57:46 -03:00
Cristhian Zanforlin Lousa
0df06c01b0
fix: re-implement logic to correctly save or update flow in the appropriate folder on autologin = false (#2610)
♻️ (frontend): remove unused imports and variables in cardComponent
 (authContext): add setAllFlows and setSelectedFolder to AuthProvider
 (undrawCards): add folderIdUrl for better URL handling
 (collectionCard): add folder URL handling for navigation
 (use-delete-multiple): add setAllFlows and setSelectedFolder to handleDeleteMultiple
 (componentsComponent): add isLoadingFolders and setSelectedFolder
 (tabsComponent): add folder URL handling for tab navigation
 (flowsManagerStore): add folder URL handling in saveFlowDebounce

 (foldersStore.tsx): add setSelectedFolder method to manage selected folder state
♻️ (foldersStore.tsx): move setIsLoadingFolders call to improve loading state management
 (flowsManager/index.ts): add folderId parameter to saveFlow and saveFlowDebounce methods for better flow management
 (folders/index.ts): add setSelectedFolder method to FoldersStoreType for better folder state management
2024-07-09 15:29:52 -07:00
Gabriel Luiz Freitas Almeida
fd36938a03
feat: update custom component attributes on /update endpoint (#2607)
feat: Update custom component attributes with load from DB fields

This commit updates the `custom_component_update` endpoint in `endpoints.py` to include the logic for updating custom component attributes with load from DB fields. The `cc_instance` is checked for the presence of a `set_attributes` method, and if it exists, the template and parameters are extracted from the code request. The load from DB fields are identified and used to update the parameters. Finally, the `set_attributes` method is called with the updated parameters. This enhancement improves the flexibility and functionality of custom components.
2024-07-09 11:29:30 -07:00
Gabriel Luiz Freitas Almeida
06464eda46
feat: adds NVIDIA components (#2591)
* chore: Update langchain-nvidia-ai-endpoints dependency to version 0.1.2

* feat: Add NVIDIAEmbeddingsComponent for generating embeddings using NVIDIA models

* feat: Add NVIDIAModelComponent for generating text using NVIDIA LLMs

* feat: Add NvidiaRerankComponent for reranking documents using the NVIDIA API and a retriever

* fix: add type ignore

* chore: Update NVIDIAEmbeddingsComponent and NVIDIAModelComponent to handle type ignore

* chore(poetry.lock): update lock
2024-07-09 15:26:23 -03:00
João Pedro Miranda C. Hluchan
a6f128c4cf
Add CrewAI Component Documentation (#2519)
* feat: CrewAI components static files

* feat: CrewAI add .md guide files

* feat: CrewAI add CrewAI_components_bundle.json

* chore: Comment out CrewAI section in sidebars.js

---------

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2024-07-09 17:01:11 +00:00
Nicolò Boschi
e7e53abfbe
fix: astra vectorize auth error (#2606) 2024-07-09 17:23:30 +02:00
Gabriel Luiz Freitas Almeida
063cf54495
fix: update test_create_function to use pathlib.Path (#2605)
feat(test_validate_code.py): update test_create_function to use pathlib.Path instead of math.sin to check if it breaks ci
2024-07-09 08:16:50 -07:00
Gabriel Luiz Freitas Almeida
c20630b77d
fix: add vertices in the first layer to the vertices being run (#2594) 2024-07-09 12:03:55 -03:00
Nicolò Boschi
21adbd5531
fix: stream option is not working with tracing enabled (#2602)
* fix: cannot create 'generator' instances

* fix: cannot create 'generator' instances

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-07-09 13:37:47 +00:00
ming
ce9b4b09e5
feat: exception and error middleware (#2590)
exception and error middleware
2024-07-09 06:13:18 -07:00
Gabriel Luiz Freitas Almeida
4c43b4cc82
fix(runnable_vertices_manager.py): add recursive function to find predecessors (#2593)
fix(runnable_vertices_manager.py): add recursive function to find runnable predecessors
2024-07-08 22:14:36 +00:00