Commit graph

2,135 commits

Author SHA1 Message Date
Gabriel Luiz Freitas Almeida
9ff68eef82 🔥 chore(main.py): remove unnecessary newline at the beginning of the file
The only change in this commit is the removal of an unnecessary newline at the beginning of the file. This improves the code's readability and consistency.
2023-06-16 19:01:41 -03:00
Gabriel Luiz Freitas Almeida
e58d626068 📦 chore(pyproject.toml): add types-cachetools to dev dependencies
The types-cachetools package was added to the dev dependencies to provide type annotations for the cachetools package. This improves the codebase's maintainability and readability by providing better type hints.
2023-06-16 18:54:45 -03:00
Gabriel Luiz Freitas Almeida
c7cbb40c36 format: run make format 2023-06-16 18:54:18 -03:00
Gabriel Luiz Freitas Almeida
08f04d11d0 🔨 refactor(tests): fix formatting and remove unnecessary lines
The changes in this commit are purely cosmetic. The code has been reformatted to improve readability and consistency. Unnecessary lines have been removed to make the code more concise.
2023-06-16 18:53:42 -03:00
Gabriel Luiz Freitas Almeida
b06e7a058a 🐛 fix(chat.py): add type hint to flow_data_store variable
🔥 chore(main.py): remove unused imports and variables
The `flow_data_store` variable in `chat.py` was missing a type hint, which was added to improve code readability and maintainability. In `main.py`, unused imports and variables were removed to improve code cleanliness.
2023-06-16 18:52:55 -03:00
Gabriel Luiz Freitas Almeida
28a902ec15 🚀 chore(MainPage): use constant for header text in user projects section
The changes in headerComponent remove unused imports and update the header text to use a constant instead of a hardcoded string. The constant is added in constants.tsx. The MainPage component is updated to use the constant for the header text in the user projects section. This improves code readability and maintainability.
🎨 style(headerComponent): remove unused imports and update header text to use constant
 feat(constants.tsx): add constant for header text in user projects section
2023-06-16 18:39:06 -03:00
Gabriel Luiz Freitas Almeida
bf621c78b4 🐛 fix(__main__.py): fix issue where app was not serving the index.html file when a 404 error occurred
 feat(main.py): remove static_path argument from create_app function
The fix to the issue where the app was not serving the index.html file when a 404 error occurred was done by adding an exception handler to the app that returns the index.html file when a 404 error occurs. The create_app function was modified to remove the static_path argument as it was not being used in the function.
2023-06-16 18:36:06 -03:00
anovazzi1
e1e5fb14c9 refactor(typesContext.tsx): reverse the order of keys in the types object to avoid overlap with tool world
The keys in the types object were reversed to avoid overlap with the tool world. This was done by modifying the reduce function in the TypesProvider component.
2023-06-16 18:20:06 -03:00
anovazzi1
20b19967da Merge branch 'db' of personal:logspace-ai/langflow into db 2023-06-16 17:52:43 -03:00
anovazzi1
ad6756c06c refactor(chatModal): replace react-icons with lucide-react icons for better performance and smaller bundle size 2023-06-16 17:52:21 -03:00
Gabriel Luiz Freitas Almeida
319a57eb19 🐛 fix(__main__.py): check if port is in use and get a free port if it is
 feat(__main__.py): add support for health check endpoint and use it to check server status
The `serve` function now checks if the specified port is in use and gets a free port if it is. This ensures that the server can run on a free port and avoids conflicts with other running applications. The `serve` function also now uses a health check endpoint to check the status of the server. The `setup_static_files` function now takes a `Path` object instead of a string for the static files directory. The `create_app` function now takes a `Path` object instead of a string for the static files directory.
2023-06-16 17:39:52 -03:00
Gabriel Luiz Freitas Almeida
0686626303 Merge branch 'db' of https://github.com/logspace-ai/langflow into db 2023-06-16 17:25:20 -03:00
Rodrigo Nader
73ee476663 Merge branch 'db' of https://github.com/logspace-ai/langflow into db 2023-06-16 17:23:56 -03:00
Rodrigo Nader
c9c226f464 Refactor the search placeholder and update the collections description
Update the search placeholder to be more general, from 'Search Nodes' to 'Search', in the extra sidebar component, and update the collection description from 'Download or upload your complete project collection' to 'Download or upload your collection' in the main page.
2023-06-16 17:23:29 -03:00
Gabriel Luiz Freitas Almeida
4d209ca21f 🐛 fix(constants.tsx): correct typo in API URL path
The API URL path was incorrectly spelled as "/ap1/v1/predict" instead of "/api/v1/predict". This commit fixes the typo to ensure that the correct API endpoint is used.
2023-06-16 17:23:01 -03:00
gustavoschaedler
69944b6e46 Merge branch 'db' of github.com:logspace-ai/langflow into db 2023-06-16 21:19:55 +01:00
Rodrigo Nader
39707f9f80 Refactor error message for build trigger component
Changed the error message in the build trigger component to clarify which components need to be checked before retrying. Updated the list to include instructions on how to inspect the component status.
2023-06-16 17:19:49 -03:00
gustavoschaedler
78588ba260 Tests fix 2023-06-16 21:19:29 +01:00
anovazzi1
cad24f1f88 fix(chatComponent): add isBuilt dependency to useEffect hook to avoid stale closure and improve performance 2023-06-16 17:16:36 -03:00
Gabriel Luiz Freitas Almeida
b476d0dd74 🐛 fix(endpoints.py): add try-except block when processing tweaks to catch and log exceptions
🐛 fix(process.py): fix KeyError when processing tweaks on graph_data with missing "data" key
The try-except block added in endpoints.py catches any exceptions that occur when processing tweaks and logs them to the logger. This helps with debugging and identifying issues with the processing of tweaks. In process.py, a KeyError was fixed by checking if the "data" key exists in the graph_data dictionary before accessing the "nodes" key.
2023-06-16 16:35:49 -03:00
anovazzi1
eed33f490c feat(App.tsx, FlowPage/index.tsx): add version number to the footer of the app to show the current version of LangFlow
refactor(App.tsx): remove redundant code that initializes the version state variable and fetches the version number from the API in FlowPage component instead
2023-06-16 16:27:13 -03:00
anovazzi1
ecaa0613d5 Merge branch 'db' of personal:logspace-ai/langflow into db 2023-06-16 16:23:46 -03:00
anovazzi1
036118011b comment projects on dropdown component 2023-06-16 16:23:35 -03:00
gustavoschaedler
13d52e4987 Tests fix 2023-06-16 20:22:45 +01:00
Gabriel Luiz Freitas Almeida
46c998be33 🎨 style(menuBar): refactor menu bar to improve readability and add new option
The menu bar has been refactored to improve readability and make it easier to add new options in the future. A new option has been added to create a new flow. The "Edit" label has been changed to "Options" to better reflect the purpose of the dropdown menu.
2023-06-16 16:10:54 -03:00
anovazzi1
31ee0c7609 fix(exportModal): set initial state of checked to false instead of true
refactor(utils.ts): remove console.log statement and simplify if statement in removeApiKeys function
2023-06-16 16:05:19 -03:00
anovazzi1
8fd94f0298 Merge branch 'db' of personal:logspace-ai/langflow into db 2023-06-16 15:54:30 -03:00
anovazzi1
cb5b58b7e4 update remove api key function 2023-06-16 15:54:25 -03:00
gustavoschaedler
ceb6fda4c6 Tests fix 2023-06-16 19:47:35 +01:00
Gabriel Luiz Freitas Almeida
1f135d09ec 🐛 fix(custom.py): handle case where vectorstoreroutertoolkit is already a list
The constructor of VectorStoreRouterAgent expects a non-list object for vectorstoreroutertoolkit. However, in some cases, vectorstoreroutertoolkit is already a list. This commit fixes the issue by checking if vectorstoreroutertoolkit is a list and using it directly if it is.
2023-06-16 15:41:14 -03:00
Gabriel Luiz Freitas Almeida
deb056df32 feat(chat.py): use LRUCache from cachetools to limit the size of flow_data_store
The cachetools package is added as a dependency to improve caching. In chat.py, a ValueError is raised if no ID is provided in init_build to prevent errors. The flow_data_store dictionary is replaced with an LRUCache from cachetools to limit the size of the cache to 10 items. This improves performance by reducing the memory usage of the application.
📦 chore(pyproject.toml): add cachetools dependency to improve caching
🐛 fix(chat.py): raise ValueError if no ID is provided in init_build
2023-06-16 15:07:39 -03:00
Gabriel Luiz Freitas Almeida
f42830ca47 🔨 refactor(endpoints.py): remove unused get_flow_from_token function and HTTPBearer import
🐛 fix(endpoints.py): add check for flow data before processing
🔨 refactor(process.py): add type hints to process_tweaks function
The get_flow_from_token function and HTTPBearer import are removed as they are not used in the code. A check for flow data is added before processing to avoid errors when the flow data is None. The process_tweaks function is updated to include type hints for the graph_data and tweaks parameters.
2023-06-16 14:56:00 -03:00
Gabriel Luiz Freitas Almeida
3a3487dc26 🔥 chore(pyproject.toml): remove dill package
The dill package is no longer needed and has been removed from the project dependencies.
2023-06-16 14:31:33 -03:00
Gabriel Luiz Freitas Almeida
2bd51c6104 🔥 refactor(utils.py): remove unused functions save_cache and load_cache
The functions save_cache and load_cache are not used in the codebase and can be safely removed to improve code readability and maintainability.
2023-06-16 14:31:16 -03:00
Gabriel Luiz Freitas Almeida
a099fd05ad 🔥 refactor(cache/base.py): remove empty pass statement in BaseCache abstract method
🔥 refactor(utils/validate.py): remove try-except block in create_function method
The pass statement in the BaseCache abstract method is redundant and can be removed. Similarly, the try-except block in the create_function method is not necessary as the exception is being suppressed.
2023-06-16 14:22:14 -03:00
Gabriel Luiz Freitas Almeida
93d1c10888 🎨 style(index.css): reformat CSS file to improve readability and consistency
The CSS file has been reformatted to improve readability and consistency. The changes include indentation, whitespace, and line breaks. No functional changes have been made to the code.
2023-06-16 14:01:31 -03:00
Gabriel Luiz Freitas Almeida
95597887b2 🔨 refactor(test_database.py): replace unused variable with underscore
The variable 'i' is not used in the for loop, so it has been replaced with an underscore to improve code readability.
2023-06-16 13:59:59 -03:00
Gabriel Luiz Freitas Almeida
5568db9f1b 🔥 refactor(base.py): remove empty pass statements in BaseCache abstract class methods
The pass statements in the BaseCache abstract class methods are redundant and can be removed as they do not add any value to the code.
2023-06-16 13:58:23 -03:00
Lucas Oliveira
2093a23547 Git button redirecting to new tab 2023-06-16 13:37:17 -03:00
anovazzi1
6abe1e6ba9 fix(alertContext.tsx): prevent empty titles from being added to notification center in setErrorData, setNoticeData and setSuccessData functions 2023-06-16 13:11:55 -03:00
anovazzi1
b47f6aa326 refactor(frontend): add isBuilding state to SSEContext and use it in GenericNode and BuildTrigger components
The isBuilding state was added to the SSEContext to keep track of whether a build is currently in progress. This state was then used in the GenericNode and BuildTrigger components to conditionally render certain elements based on whether a build is in progress or not.
2023-06-16 13:03:38 -03:00
Gabriel Luiz Freitas Almeida
d897de48f9 🎨 style(agents.py): change name and display_name of InitializeAgentNode to improve readability
The name and display_name of the InitializeAgentNode class have been changed to "AgentInitializer" and "AgentInitializer" respectively. This improves the readability of the code and makes it easier to understand the purpose of the class.
2023-06-16 12:24:41 -03:00
Gabriel Luiz Freitas Almeida
fb53522311 🚀 chore(custom.py): rename "initialize_agent" to "AgentInitializer" in CUSTOM_AGENTS dictionary
The "initialize_agent" key in the CUSTOM_AGENTS dictionary has been renamed to "AgentInitializer" to improve naming consistency with the other agents in the dictionary.
2023-06-16 12:13:04 -03:00
gustavoschaedler
92a285bb2e Adjusted the name of the agent AgentInitializer to initialize_agent temporarily to fix a bug in the frontendnode 2023-06-16 15:38:20 +01:00
Gabriel Luiz Freitas Almeida
568813f9da feat(tabsContext.tsx): add functions to generate random names and descriptions for new flows
🐛 fix(utils.ts): fix import statement for ADJECTIVES, DESCRIPTIONS, and NOUNS constants
The constants.tsx file now contains arrays of adjectives, nouns, and descriptions that can be used to generate random names and descriptions for new flows. The tabsContext.tsx file now has functions that use these arrays to generate random names and descriptions for new flows. The utils.ts file has been updated to fix the import statement for the ADJECTIVES, DESCRIPTIONS, and NOUNS constants.
 feat(constants.tsx): add arrays of adjectives, nouns, and descriptions for generating random names and descriptions
2023-06-16 09:38:11 -03:00
Gabriel Luiz Freitas Almeida
4faa1e7240 🔨 refactor(base.py): add LLMCheckerChain to from_method_nodes dictionary
🔨 refactor(chains.py): comment out unused code block
The `from_method_nodes` dictionary in `base.py` has been updated to include the `LLMCheckerChain` class. This allows the `from_llm` method to be called on the `LLMCheckerChain` class.

The code block in `chains.py` that deals with the `PromptTemplate` field type has been commented out as it is currently unused. This is to prevent confusion and to keep the codebase clean.
2023-06-16 08:55:38 -03:00
Lucas Oliveira
1ecc1247e7 Fixed bug where we cannot move the nodes, removed unused console.logs 2023-06-16 08:37:16 -03:00
Rodrigo Nader
e34587703b Improve chat and build trigger buttons color and shadows
- The code changes consist of modifying the CSS classes of the chat and build trigger buttons, adjusting the hover effects, shadows and icon colors to make them more visually appealing.
2023-06-16 01:43:40 -03:00
Cristhian Zanforlin Lousa
7a6472f103 Merge branch 'db' of https://github.com/logspace-ai/langflow into db 2023-06-15 21:37:27 -03:00
Cristhian Zanforlin Lousa
f61d76cfac rollback position of icons 2023-06-15 21:37:24 -03:00