Commit graph

7,638 commits

Author SHA1 Message Date
Igor Carvalho
838e5b2af7 feat[tailwind colors]: Change all tailwind default colors to variables colors 2023-06-20 19:21:00 -03:00
Valerio Capozio
372463912c feat: add support for DirectoryLoader 2023-06-20 23:51:41 +02:00
Gabriel Luiz Freitas Almeida
2029b08d2e Merge remote-tracking branch 'origin/main' into dev 2023-06-20 16:18:37 -03:00
Gabriel Luiz Freitas Almeida
f0c507a660 🐛 fix(loading.py): include "config" in the list of keys to check for *kwargs
 feat(constants.py): add default config for CTransformers
🚀 feat(llms.py): add method to format ctransformers field in LLMFrontendNode
The fix in loading.py ensures that the *kwargs are converted to a dictionary when the key contains "config". The addition of the default config for CTransformers in constants.py provides a default configuration for the CTransformers model. The new method in llms.py formats the ctransformers field in the LLMFrontendNode.
2023-06-20 16:14:16 -03:00
Gabriel Luiz Freitas Almeida
5f5bf06ab2 🐛 fix(flows.py): fix conditional statement in update_flow function
The conditional statement in the update_flow function was incorrect. The if statement was checking for the opposite of what was intended. The fix changes the if statement to check for the correct condition.
2023-06-20 16:11:33 -03:00
anovazzi1
46a30cf92e zoom out 10x bigger 2023-06-20 15:45:48 -03:00
Cristhian Zanforlin Lousa
625f22c024 Adding progress bar on build 2023-06-19 22:45:55 -03:00
gustavoschaedler
6d78aefa62 Add random SECRET_KEY to test
Changed the SECRET_KEY to a randomly generated one using the command `openssl rand -hex 32`. Additionally, added code to raise an exception when facing JWTError in `get_current_user`. Added a new user in `fake_users_db` who is currently disabled. Finally, changed the endpoint to show all users instead of `me`.
2023-06-20 00:19:30 +01:00
gustavoschaedler
ddd795b2f4 Add authentication and authorization functionality
The commit adds the auth module and updates dependencies. It includes authentication and authorization functionality and models to create access tokens. The endpoints for login and users/me have been removed and moved to the appropriate modules. These changes have improved security and code organization.
2023-06-19 23:50:19 +01:00
Igor Carvalho
3ac3bfbf1f ~ 2023-06-19 19:33:09 -03:00
Lucas Oliveira
c969bcca78 Fixed spearator 2023-06-19 19:33:07 -03:00
Igor Carvalho
662564653e feat[tailwind.config.js]: Add new colors variables and remove hex colors from the code 2023-06-19 19:29:18 -03:00
gustavoschaedler
866398111f WIP: Login auth and JWT encode/decode 2023-06-19 23:02:06 +01:00
Gabriel Luiz Freitas Almeida
f511ddc20f Merge remote-tracking branch 'origin/main' into dev 2023-06-19 17:17:07 -03:00
Lucas Oliveira
b616e0dd42 fixed twitter link 2023-06-19 16:16:58 -03:00
Lucas Oliveira
9be559397b removed api key 2023-06-19 16:14:25 -03:00
Gabriel Luiz Freitas Almeida
825f2798c3 🐛 fix(chat.py): fix node to vertex variable name in stream_build function
 feat(chat.py): add progress logging to stream_build function
The variable node was renamed to vertex to improve semantics and consistency with the naming conventions. Progress logging was added to the stream_build function to provide feedback to the user on the progress of the build process.

🐛 fix(index.tsx): fix typo in setSuccessData function call
 feat(index.tsx): add success logging to handleBuild function
A typo in the setSuccessData function call was fixed. Success logging was added to the handleBuild function to provide feedback to the user on the success of the build process.
2023-06-19 16:03:25 -03:00
Lucas Oliveira
0dcd93ef92 added discord and twitter icons, added github stars 2023-06-19 15:45:26 -03:00
Gabriel Luiz Freitas Almeida
f180fa6f26 🐛 fix(process.py): change input parameter type hint to include Path type
The input parameter now accepts a Path object in addition to a string or dictionary. This improves the flexibility of the function and allows for easier file handling.
2023-06-19 14:25:10 -03:00
Gabriel Luiz Freitas Almeida
8a5525f465 🚀 feat(constants.tsx): add tweaks parameter to getPythonCode function to allow for customization of flow behavior
The `getPythonCode` function now accepts a `tweaks` parameter which is used to customize the behavior of the flow. The `buildTweaks` function is called to generate the `tweaks` object which is then passed to the `load_flow_from_json` function. This allows for more flexibility in the usage of the flow.
2023-06-19 14:24:48 -03:00
Gabriel Luiz Freitas Almeida
11185affdd 🐛 fix(process.py): refactor fix_memory_inputs function to improve readability and reduce nesting
The fix_memory_inputs function was refactored to reduce nesting and improve readability. The function now checks if the langchain_object has a memory attribute and if it is not None before proceeding. The try-except block was also refactored to reduce nesting.
2023-06-19 12:02:15 -03:00
Gabriel Luiz Freitas Almeida
83c28dcabe 🔨 refactor(process.py): refactor process_tweaks function to improve readability and maintainability
 feat(process.py): add input validation to process_tweaks function
The process_tweaks function has been refactored to improve readability and maintainability. The apply_tweaks function has been added to apply the tweaks to the node. The validate_input function has been added to validate the input parameters. The process_tweaks function now raises a ValueError if the input is not in the expected format.
2023-06-19 11:59:34 -03:00
Gabriel Luiz Freitas Almeida
6886828ddd 🔀 refactor(process.py): change load_flow_from_json function signature to accept either a JSON file path or a JSON object
🔀 refactor(base.py): import Chain from langchain.chains.base instead of importing it from langflow.graph.vertex.types
🔀 refactor(process.py): remove print statement from process_tweaks function
🔀 refactor(process.py): change load_flow_from_json function signature to accept optional tweaks parameter
🔀 refactor(process.py): change return type of build method in Graph class from List[Vertex] to Chain
🧪 test(loading.py): add test case for loading a flow from a JSON file and applying tweaks
🧪 test(loading.py): remove unused import statement
The import statement for Chain in base.py is now more explicit and imports it from langchain.chains.base instead of importing it from langflow.graph.vertex.types. The load_flow_from_json function in process.py now accepts either a JSON file path or a JSON object. The print statement in process_tweaks function has been removed. The load_flow_from_json function in process.py now accepts an optional tweaks parameter. The return type of the build method in the Graph class has been changed from List[Vertex] to Chain. A new test case has been added to loading.py to test loading a flow from a JSON file and applying tweaks. An unused import statement has been removed from loading.py.
2023-06-19 11:36:43 -03:00
Gabriel Luiz Freitas Almeida
5ea20aa2f0 🔨 refactor(constants.tsx): remove unnecessary indentation in getPythonCode function
The indentation of the commented line in the getPythonCode function was unnecessary and has been removed to improve code readability.
2023-06-19 10:55:18 -03:00
Gabriel Luiz Freitas Almeida
e01993b7f1 🐛 fix(__main__.py): add support for running Langflow on Windows
 feat(__main__.py): add support for running Langflow on MacOS and Linux using gunicorn
The changes add support for running Langflow on Windows by using uvicorn instead of gunicorn. This is because Windows doesn't support gunicorn. The changes also add support for running Langflow on MacOS and Linux using gunicorn. This is because MacOS requires an env variable to be set to use gunicorn.
2023-06-19 09:55:29 -03:00
Igor Carvalho
f7101f4123 feat[components/chatTrigger/index.tsx]: Add Chat Interface shadTooltip 2023-06-18 11:15:46 -03:00
dependabot[bot]
7111bee8db
build(deps-dev): bump vite from 4.3.5 to 4.3.9 in /src/frontend
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 4.3.5 to 4.3.9.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v4.3.9/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-18 12:05:35 +00:00
Gabriel Luiz Freitas Almeida
b93d5020b3 🐛 fix(process.py): caching objects does not depend on is_first_message anymore 2023-06-17 13:34:35 -03:00
Igor Carvalho
1c55a722fe feat: Add buildTrigger ShadTooltip 2023-06-17 12:05:58 -03:00
Gabriel Luiz Freitas Almeida
7d7986c5bd 🔥 chore(frontend): remove prepare-commit-msg git hook
The prepare-commit-msg git hook was removed from the frontend directory. This hook was not being used and was not necessary for the project's development workflow.
2023-06-16 19:57:33 -03:00
Gabriel Luiz Freitas Almeida
3a324ed45a Merge remote-tracking branch 'origin/main' into dev 2023-06-16 19:28:47 -03:00
Gabriel Luiz Freitas Almeida
fee54b817b 🐛 fix(process.py): fix conditional statement to check if "nodes" is in graph_data
The conditional statement was checking if "nodes" is in "graph_data['data']" instead of checking if "nodes" is in "graph_data". This fix ensures that the correct data is processed and avoids potential errors.
2023-06-16 19:06:46 -03:00
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
c7cbb40c36 format: run make format 2023-06-16 18:54:18 -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
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
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
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
036118011b comment projects on dropdown component 2023-06-16 16:23:35 -03: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