Commit graph

11,619 commits

Author SHA1 Message Date
Gabriel Luiz Freitas Almeida
b7eab50672 🚀 feat(vectorstores.py): add support for Chroma vector store type
🐛 fix(vectorstores.py): add persist field to Weaviate vector store type
The `VectorStoreFrontendNode` class now supports the Chroma vector store type. A new boolean field `persist` has been added to the Chroma vector store type. The `add_extra_fields` method has been updated to add the `persist` field to the Chroma vector store type. The `format_field` method has been updated to include the `persist` field in the basic fields. Additionally, the `add_extra_fields` method has been updated to add the `weaviate_url` field to the Weaviate vector store type.
2023-06-21 17:27:40 -03:00
Gabriel Luiz Freitas Almeida
100833f40f
🔖 chore(pyproject.toml): bump version to 0.1.7 (#528) 2023-06-21 19:19:20 +00:00
Gabriel Luiz Freitas Almeida
dbbba573e3 style: formatting 2023-06-21 16:18:31 -03:00
Gabriel Luiz Freitas Almeida
860c36146e 🎨 style(documentloaders.py): fix indentation and formatting issues
The changes in this commit are purely cosmetic. The indentation and formatting issues in the code have been fixed to improve readability and maintainability.
2023-06-21 16:18:11 -03:00
Gabriel Luiz Freitas Almeida
3d49b67e3d
Merge branch 'main' into release 2023-06-21 19:17:22 +00:00
Gabriel Luiz Freitas Almeida
c1bb928451 🔖 chore(pyproject.toml): bump version to 0.1.7
The version number has been updated from 0.1.6 to 0.1.7 to reflect the changes made in the package. This is a chore commit as it does not add any new features or fix any bugs, but rather updates the version number.
2023-06-21 16:16:29 -03:00
Gabriel Luiz Freitas Almeida
e0d9b21d28
Update LangChain to the latest version (#527) 2023-06-21 19:13:02 +00:00
Gabriel Luiz Freitas Almeida
10db240a6b 🐛 fix(custom.py): rename QueryCheckerTool to QuerySQLCheckerTool to match the correct class name
The QueryCheckerTool class was renamed to QuerySQLCheckerTool to match the correct class name. This change ensures that the correct class is being used and avoids any potential errors that may arise from using the wrong class name.
2023-06-21 16:08:37 -03:00
Gabriel Luiz Freitas Almeida
19a5eb0467
Merge branch 'main' into release 2023-06-21 19:02:26 +00:00
Gabriel Luiz Freitas Almeida
2650cb013c 🔼 chore(pyproject.toml): bump package version to 0.1.6
The langchain dependency has been updated to version 0.0.208 to ensure compatibility with the latest version of the package. The package version has been bumped to 0.1.6 to reflect the changes made.
🔼 chore(pyproject.toml): update langchain dependency to version 0.0.208
2023-06-21 15:55:13 -03:00
Gabriel Luiz Freitas Almeida
b6c10206e2 📦 chore(pyproject.toml): add appdirs package to dev dependencies
The appdirs package is added to the dev dependencies to support the development of the application.
2023-06-21 15:44:02 -03:00
Gabriel Luiz Freitas Almeida
bdd2076deb 🔒 chore(loading.py): remove code that deletes files after loading in instantiate_documentloader function
The save_uploaded_file function now uses the folder_name parameter instead of file_name to improve semantics. The appdirs library is now used to get the user cache directory and a folder for langflow cache is created. The sha256 hash of the file content is now used as the file name to avoid collisions and improve security. A folder is now created for each flow_id in the save_uploaded_file function. The code that deletes files after loading in the instantiate_documentloader function has been removed as it is unnecessary and can cause issues.
🐛 fix(endpoints.py): change file_name parameter to folder_name in save_uploaded_file function
🔒 chore(utils.py): use appdirs to get user cache directory and create a folder for langflow cache
🔒 chore(utils.py): use sha256 hash of file content as file name to avoid collisions and improve security
🔒 chore(utils.py): create folder for each flow_id in save_uploaded_file function
2023-06-21 15:43:27 -03:00
Cristhian Zanforlin Lousa
1aa91587cc refactor: Use specific event parameter type in BuildTrigger
This change updates an event parameter type in BuildTrigger to improve type safety. Specifically, an event parameter type was modified from 'any' to a more specific type to avoid invalid use of the event parameter.
2023-06-21 15:11:49 -03:00
Gabriel Luiz Freitas Almeida
d3d33162e8 🐛 fix(chat.py): change event name from "node" to "message" in stream_build function
The event name was changed from "node" to "message" to better reflect the nature of the data being sent. The data being sent is a message response from the server, not a node in the graph.
2023-06-21 15:04:36 -03:00
Gabriel Luiz Freitas Almeida
0a1ceba765 🔥 chore(buildTrigger): remove unused TODO comment
The TODO comment regarding the implementation of progress has been removed as it is no longer relevant.
2023-06-21 14:55:22 -03:00
Gabriel Luiz Freitas Almeida
b9231aad8f 🔥 refactor(buildTrigger): remove unused imports and ProgressBarComponent
🐛 fix(buildTrigger): handle error response from server when starting a build
The ProgressBarComponent import was removed as it was not being used. The error handling was improved to handle the case where the server returns an error response when starting a build. The error message is now displayed to the user and the build state is reset.
2023-06-21 14:53:55 -03:00
Gabriel Luiz Freitas Almeida
38c2eaa897 🔥 refactor(chat.py): remove unused import statement
🐛 fix(chat.py): fix StreamData class import statement
 feat(chat.py): add progress tracking and node building events to stream_build function
The unused import statement has been removed to improve code readability. The StreamData class import statement has been fixed to avoid errors. Progress tracking and node building events have been added to the stream_build function to provide more information to the user about the build process.
2023-06-21 14:53:54 -03:00
Gabriel Luiz Freitas Almeida
fae1ca349f 🔧 chore(schemas.py): add StreamData model and __str__ method to improve readability of stream data
The StreamData model is added to represent the data that is streamed from the server. The __str__ method is added to improve the readability of the stream data by returning a formatted string that includes the event and data attributes.
2023-06-21 14:53:53 -03:00
Cristhian Zanforlin Lousa
22e24226a3 Refactor buildTrigger component to use progress state instead of myValue
The buildTrigger component was updated to use progress state instead of myValue to better represent the progress of the building process. This change allowed us to make improvements in the way progress is tracked, which will improve the user experience.
2023-06-21 14:50:38 -03:00
Cristhian Zanforlin Lousa
3a9315ed77 Merge branch 'feat/progressbar' of https://github.com/logspace-ai/langflow into feat/progressbar 2023-06-21 14:05:26 -03:00
Cristhian Zanforlin Lousa
0caab2e9ea Refactor buildTrigger event handling to handle end-of-stream event properly
This commit refactors buildTrigger event handling to ensure that end-of-stream events are handled by closing the connection without logging them.
2023-06-21 14:05:22 -03:00
Gabriel Luiz Freitas Almeida
0fb33825d9 🐛 fix(chat.py): change data to error in yield statement when flow_id is invalid
🐛 fix(chat.py): catch exception when building graph and yield error message
When the flow_id is invalid, the yield statement should return an error message instead of data. Additionally, when building the graph, an exception could occur, so we added a try-except block to catch any exceptions and yield an error message instead of data.
2023-06-21 14:04:45 -03:00
Cristhian Zanforlin Lousa
7a46794f1d Update radial progress & fix build trigger log handling
- The radial progress now displays the percentage value correctly.
- In the build trigger, we now properly handle the end of a stream event and fixed an issue with the RadialProgressComponent when isBuilding is true.
2023-06-21 14:04:35 -03:00
Cristhian Zanforlin Lousa
f2abb531d4 Add RadialProgress value state, remove progressContext
This commit adds a value state to the RadialProgress component, replacing the progressContext previously used. It also removes the progressContext, as it is no longer needed.
2023-06-21 13:50:27 -03:00
Gabriel Luiz Freitas Almeida
59deed4009 🔨 refactor(inputFileComponent): remove unused flows and tabIndex variables, use tabId instead
The flows and tabIndex variables were not being used in the component, so they were removed. The tabId variable from the TabsContext is now being used instead to upload the file to the correct tab.
2023-06-21 13:42:52 -03:00
gustavoschaedler
f855433652 feat(auth-models): Add is_admin field to User model
This commit adds an is_admin field to the User model definition in user.py. It is set to False by default and has been updated in fake_users_db for both users. Also, there were some code formatting changes made in auth.py.
2023-06-21 15:54:56 +01:00
Gabriel Luiz Freitas Almeida
4b1ab3c640 update lock 2023-06-21 11:36:42 -03:00
anovazzi1
37ff0cac4f update version 2023-06-21 11:36:42 -03:00
anovazzi1
770f61294d feat(chatInput): add useEffect hook to focus on chat input when lockChat is false and inputRef is available
fix(chatInput): remove unnecessary comment in useEffect hook
2023-06-21 11:36:41 -03:00
Gabriel Luiz Freitas Almeida
a42b6587c5 🔧 chore(config.yml): update Swagger API overview and paths
The Swagger API overview and paths have been updated to reflect the latest changes in the API. The changes include adding support for a new environment variable, `process.env.PORT`, to allow the application to run on a configurable port. Additionally, the Swagger API documentation has been updated to reflect the latest API version and routes.

🔍 chore(links): update links to use HTTPS instead of HTTP
The links were updated to use HTTPS instead of HTTP to improve security and prevent potential man-in-the-middle attacks.

🚨 fix(Openapi.json): fix invalid JSON syntax by removing trailing comma
The Openapi.json file had an invalid JSON syntax due to a trailing comma in the "file_path" field. This commit removes the trailing comma to fix the syntax error.

🔥 chore(test_graph.py): remove unnecessary comments and assertions
🚀 feat(test_graph.py): add file creation and deletion to test_file_tool_node_build and test_toolkit_node_build
The comments and assertions that were removed were unnecessary and did not add any value to the code. The test_file_tool_node_build and test_toolkit_node_build tests now create a file and delete it after the test is run. This ensures that the tests are self-contained and do not leave any artifacts behind.
2023-06-21 11:17:48 -03:00
Gabriel Luiz Freitas Almeida
66ee979c0b
feat: add support for DirectoryLoader (#520) 2023-06-21 13:57:30 +00:00
Gabriel Luiz Freitas Almeida
fef8324886
Fix: Restore Notion and Slack directory loaders. (#476) 2023-06-21 13:57:00 +00:00
Gabriel Luiz Freitas Almeida
a9816b6dd7
Hotfix: keep focus on chat input (#521) 2023-06-21 13:47:41 +00:00
Gabriel Luiz Freitas Almeida
f92155e68d update lock 2023-06-21 10:37:05 -03:00
Gabriel Luiz Freitas Almeida
57f322a0e6 🔥 refactor(endpoints.py): rename client_id to flow_id in create_upload_file endpoint
 feat(endpoints.py): add UploadFileResponse schema to standardize upload file response
The client_id parameter in the create_upload_file endpoint has been renamed to flow_id to improve semantics. The UploadFileResponse schema has been added to standardize the response of the create_upload_file endpoint. The response now includes the flowId and file_path fields.
2023-06-21 10:33:33 -03:00
Gabriel Luiz Freitas Almeida
c26ecd3bda 🔥 refactor(base.py): remove unused import statement
The import statement for cache_utils in base.py was not being used and has been removed.
2023-06-21 10:29:36 -03:00
Gabriel Luiz Freitas Almeida
5ad0bc6b65 🐛 fix(endpoints.py): add try-except block to handle exceptions when saving uploaded files
 feat(utils.py): remove unused functions and add docstring to save_uploaded_file function
The try-except block in the create_upload_file function handles exceptions that may occur when saving uploaded files. The save_uploaded_file function now has a docstring that explains its purpose and returns the path to the saved file. The unused functions save_cache and load_cache have been removed.
2023-06-21 10:27:56 -03:00
Gabriel Luiz Freitas Almeida
a81a99f1c4 🎨 style(inputFileComponent): refactor file upload to use a separate function
The file upload functionality has been refactored to use a separate function called uploadFile, which is imported from the API controller. This improves the separation of concerns and makes the code more modular.
2023-06-21 10:21:20 -03:00
Gabriel Luiz Freitas Almeida
5216b519e0 🚀 feat(API): add uploadFile function to upload files to the server
The uploadFile function allows the user to upload a file to the server. It takes in a file and an ID of the flow to upload the file to. The function creates a FormData object and appends the file to it. It then sends a POST request to the server with the FormData object as the body. The server responds with a Promise containing the response data.
2023-06-21 10:21:05 -03:00
Gabriel Luiz Freitas Almeida
0d7df8a330 🚀 feat(api): add UploadFileTypeAPI type definition
This commit adds a new type definition for the UploadFileTypeAPI, which includes a single property file_path of type string. This type will be used to define the response of an API endpoint that handles file uploads.
2023-06-21 10:20:48 -03:00
Gabriel Luiz Freitas Almeida
1489da241d update lock 2023-06-21 10:09:02 -03:00
Gabriel Luiz Freitas Almeida
0dd16ee794 Merge remote-tracking branch 'origin/dev' into multipart_endpoint 2023-06-21 10:07:14 -03:00
Cristhian Zanforlin Lousa
da28c2e670 Merge branch 'dev' into feat/progressbar 2023-06-20 21:04:28 -03:00
anovazzi1
3fa6f63fc4 update version 2023-06-20 20:54:56 -03:00
anovazzi1
ce66d753e2 feat(chatInput): add useEffect hook to focus on chat input when lockChat is false and inputRef is available
fix(chatInput): remove unnecessary comment in useEffect hook
2023-06-20 20:49:32 -03:00
Cristhian Zanforlin Lousa
c06fdb1f13 Adding daisyUI radialProgress to project 2023-06-20 20:47:05 -03:00
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
Rodrigo Nader
ba7157f155
Fix remove api key condition (#518)
Condition was reversed.
2023-06-20 16:17:43 -03:00