Commit graph

6,039 commits

Author SHA1 Message Date
Deepankar Mahapatro
0a0dc673c1
build: push lcserve image as public (#423) 2023-06-01 10:10:46 +05:30
Deepankar Mahapatro
a9e1fb4eb7 build: push lcserve image as public 2023-06-01 10:00:56 +05:30
Cristhian Zanforlin Lousa
585e94285d Adding title and icon of the parent menu on hover of the handle 2023-06-01 00:27:01 -03:00
anovazzi1
4c901ec022
Changing the mouse cursor on Canva's React Flow (#420)
## Description

This pull request introduces a new feature that allows users to change
the mouse cursor on Canva's React Flow. By updating the CSS and
JavaScript code, the cursor behavior can be modified to provide a
customized experience for users.

## Motivation

The ability to change the mouse cursor provides a way to enhance user
interaction and personalize the user experience within Canva's React
Flow. This feature can be particularly useful for applications or
websites that require specific cursor styles to match the overall design
or functionality.
2023-05-31 23:37:20 -03:00
Cristhian Zanforlin Lousa
2ee0244834 fixing identation warnings spaces - new 2023-05-31 22:20:12 -03:00
Cristhian Zanforlin Lousa
f27d067609 fixing identation warnings spaces 2023-05-31 22:16:16 -03:00
Cristhian Zanforlin Lousa
344b94f9b5 fixing warning identation 2023-05-31 22:06:49 -03:00
Cristhian Zanforlin Lousa
d9cae6b211 fixing identation warnings 2023-05-31 22:00:03 -03:00
Gabriel Luiz Freitas Almeida
08d981822b
Add Chat Icon Animation to the Last AI Message (#418) 2023-05-31 21:54:37 -03:00
Cristhian Zanforlin Lousa
9e4f898f54 Changing the mouse cursor on Canva's React Flow 2023-05-31 21:38:06 -03:00
Cristhian Zanforlin Lousa
6332c4c084 Changing the icon to move just in the last message on chat 2023-05-31 21:22:42 -03:00
Cristhian Zanforlin Lousa
893dc22fc4 Change the icon to move just in the last message 2023-05-31 21:21:51 -03:00
Cristhian Zanforlin Lousa
c33d7b9482 Fixing border edit icon 2023-05-31 21:03:27 -03:00
Cristhian Zanforlin Lousa
6d40575426 Adding tooltip and displaying just icons 2023-05-31 20:40:56 -03:00
Cristhian Zanforlin Lousa
ccd8652253 Removing the copy icon 2023-05-31 19:05:26 -03:00
Cristhian Zanforlin Lousa
14f69d8e56 Removing debugger from code 2023-05-31 16:48:43 -03:00
Cristhian Zanforlin Lousa
8f28531010 make format 2023-05-31 16:46:20 -03:00
Cristhian Zanforlin Lousa
d5cd5bfbd7 Adding githooks fold 2023-05-31 16:45:14 -03:00
Cristhian Zanforlin Lousa
47d6c94161 Adding any type to filter of edges 2023-05-31 16:42:30 -03:00
Gabriel Luiz Freitas Almeida
2b716fb981
fix(chatModal/index.ts) updated validation condition for required properties of nodes, to allow False values to be accepted (#413) 2023-05-31 16:40:30 -03:00
Lucas Oliveira
88095d8896 Fixed handle position when adding parameters to node 2023-05-31 16:12:25 -03:00
Cristhian Zanforlin Lousa
675b0fb2f6 Changing modal layout 2023-05-31 15:55:55 -03:00
Gabriel Luiz Freitas Almeida
e7b4010a7c Merge remote-tracking branch 'origin/dev' into python_function_tool 2023-05-31 15:42:55 -03:00
Gabriel Luiz Freitas Almeida
be09849081 🚀 feat(langflow): rename PythonFunction to PythonFunctionTool for better semantics
🚀 feat(langflow): add PythonFunctionToolNode to the frontend node tools
🚀 feat(langflow): add PythonFunctionTool to the custom tools
🚀 feat(langflow): add get_function to importing utils to get the function from code
🚀 feat(langflow): add func parameter to PythonFunctionTool to store the function
🚀 feat(langflow): add name and description parameters to PythonFunctionTool
🚀 feat(langflow): update instantiate_tool to use PythonFunctionTool instead of PythonFunction
🚀 feat(langflow): update constants to use PythonFunctionTool instead of PythonFunction
🚀 feat(langflow): update custom.py to use PythonFunctionTool instead of PythonFunction
🚀 feat(langflow): update loading.py to use get_function and PythonFunctionTool
🚀 feat(langflow): update utils.py to use get_function
🚀 feat(langflow): update test_custom_types.py to use get_function and PythonFunctionTool
🚀 feat(langflow): update test_graph.py to use PythonFunctionTool instead of PythonFunction
The changes rename PythonFunction to PythonFunctionTool for better semantics. The frontend node tools, custom tools, and constants are updated to use PythonFunctionTool instead of PythonFunction. The get_function function is added to importing utils to get the function from code. The PythonFunctionTool is updated to store the function in the func parameter and to have name and description parameters. The instantiate_tool, loading.py, and utils.py are updated to use get_function and PythonFunctionTool. The test_custom_types.py and test_graph.py are updated to use PythonFunctionTool instead of PythonFunction.
2023-05-31 15:41:16 -03:00
Gabriel Luiz Freitas Almeida
dedbe3c906 🎨 refactor(complex_example.json): rename "PythonFunction" to "PythonFunctionTool" and add "description" and "name" fields
The "PythonFunction" type has been renamed to "PythonFunctionTool" to better reflect its purpose. Additionally, two new fields have been added: "description" and "name". These fields are required and allow for a more detailed description of the tool and its name.
2023-05-31 15:40:20 -03:00
Alexandre Henrique
cd2944bac6 added add_extra_fields method to textsplitters 2023-05-31 15:40:09 -03:00
Lucas Oliveira
70e66a51ec Node edit modal done, bugs with handle and table 2023-05-31 13:29:58 -03:00
Gabriel Luiz Freitas Almeida
2af55dc162 Merge remote-tracking branch 'origin/main' into dev 2023-05-31 12:54:34 -03:00
Rodrigo Nader
647f7b7a16
Add FAISS to vectorstores (#414)
 feat(config.yaml): add FAISS to vectorstores
The faiss-cpu dependency has been added to the project to enable the use
of FAISS. FAISS has been added to the list of vectorstores in the
config.yaml file to allow for the use of FAISS in the project.
2023-05-31 12:50:12 -03:00
Gabriel Luiz Freitas Almeida
b72f46c37a 🔖 chore(pyproject.toml): bump up version to 0.0.80
The version number in the pyproject.toml file has been updated from 0.0.79 to 0.0.80. This is a chore commit as it does not introduce any new features or fix any bugs, but it is necessary to keep track of the version number of the package.
2023-05-31 12:27:57 -03:00
Gabriel Luiz Freitas Almeida
98b1b13d3a 🚀 feat(pyproject.toml): add faiss-cpu dependency
 feat(config.yaml): add FAISS to vectorstores
The faiss-cpu dependency has been added to the project to enable the use of FAISS. FAISS has been added to the list of vectorstores in the config.yaml file to allow for the use of FAISS in the project.
2023-05-31 12:26:55 -03:00
Lucas Oliveira
71cc9092f8 Added duplicate function on menu 2023-05-31 12:25:12 -03:00
Lucas Oliveira
bb62ea25bd Fixed copy button on node toolbar 2023-05-31 12:05:24 -03:00
Jeremy Naccache
d02d11213e fix(chatModal/index.ts) updated validation condition for required properties of nodes, to allow False values to be accepted 2023-05-31 17:00:18 +02:00
Lucas Oliveira
3eaff0b638 Added copy button on toolbar and changed Required indicator 2023-05-31 11:52:56 -03:00
Gabriel Luiz Freitas Almeida
25d77eaf87 🐛 fix(custom.py): fix JsonAgent.from_toolkit_and_llm method to handle both list and JsonToolkit input
🔥 chore(test_graph.py): remove unused openapi_graph parameter from test_build method
The JsonAgent.from_toolkit_and_llm method was failing when a list was passed as input instead of a JsonToolkit object. The fix now handles both cases. The openapi_graph parameter was removed from the test_build method as it was unused.
2023-05-31 11:44:12 -03:00
Gabriel Almeida
fbfcff74c2 🔨 refactor(endpoints.py): remove unused imports and format code
The imports for `File`, `HTTPException`, `UploadFile`, and `cache_manager` were removed as they were not being used in the code. The code was also formatted to follow PEP8 guidelines.

🔧 chore(base.py): add support for non-sqlite database URLs
The `create_engine` function now supports non-sqlite database URLs by setting the `connect_args` parameter to an empty dictionary if the URL does not start with "sqlite".

🔧 chore(flow.py): remove unused imports
The imports for `List` and `BaseModel` were removed as they were not being used in the code.
2023-05-31 11:19:43 -03:00
Gabriel Almeida
ae0cc86a76 🐛 fix(endpoints.py): fix predict endpoint to load flow from database instead of request
 feat(endpoints.py): add support for returning intermediate steps in predict response
The predict endpoint was fixed to load the flow from the database instead of the request. This ensures that the correct flow is used for prediction. Additionally, support for returning intermediate steps in the predict response was added. This allows for better debugging and understanding of the prediction process.
2023-05-31 11:13:22 -03:00
Gabriel Almeida
3e4a81c7ae 🔥 chore(test_graph.py): remove unused imports
The imports for FileToolNode and ToolkitNode were removed as they were not being used in the test file.
2023-05-31 01:14:54 -03:00
Gabriel Almeida
f6dbc97d77 🐛 fix(endpoints.tsx): change returned key from 'filename' to 'file_path' for consistency
🐛 fix(inputFileComponent): update the key used to set the file path to match the change in the backend
The key returned by the endpoint was changed from 'filename' to 'file_path' for consistency. The key used to set the file path in the frontend was updated to match the change in the backend.
2023-05-31 01:14:30 -03:00
anovazzi1
9414ae23df
Adding search functionality to ExtraSideBarComponent (#411)
This pull request aims to enhance the ExtraSideBarComponent by
implementing a search feature. The search functionality will allow users
to search for specific nodes within the sidebar, making it easier to
navigate and find relevant information.

Modified ExtraSideBarComponent to include a search input field.
Implemented search logic to filter nodes based on user input.
Added a search results display section to show the filtered nodes.
Integrated search functionality with the existing node navigation.
Updated relevant tests to ensure proper functionality and coverage.
Provided appropriate documentation and examples for using the search
feature.
2023-05-31 01:05:37 -03:00
Gabriel Almeida
a4312158fa 🔧 chore(pre-commit): add git add command to pre-commit hook
The pre-commit hook now adds the files that were formatted by the make format command to the staging area. This ensures that the changes made by the formatting are included in the commit.
2023-05-31 01:04:40 -03:00
Gabriel Almeida
fca22589a8 🐛 fix(loading.py): remove loaded file after instantiating document loader
When instantiating the document loader, the loaded file is now removed after it has been loaded. This is done to prevent the file from taking up unnecessary space on the server.
2023-05-30 23:56:42 -03:00
Gabriel Almeida
c6e6a5685a 🔥 refactor(base.py): remove unused import statement
🔥 refactor(interface/base.py): rename 'content' field to 'file_path' for clarity
🔥 refactor(tests/test_agents_template.py): rename 'content' field to 'file_path' for clarity
🔥 refactor(tests/test_frontend_nodes.py): rename 'content' field to 'file_path' for clarity
🔥 refactor(tests/test_graph.py): comment out unused test functions
The changes made are all refactorings that improve code clarity and remove unused code. The import statement in base.py was removed as it was unused. The 'content' field in interface/base.py, tests/test_agents_template.py, tests/test_frontend_nodes.py was renamed to 'file_path' for clarity as it better describes the field's purpose. Two test functions in tests/test_graph.py were commented out as they were unused.
2023-05-30 23:48:49 -03:00
Gabriel Almeida
f46cc574f3 📦 chore(pyproject.toml): add python-multipart package to dev dependencies
The python-multipart package is added to the dev dependencies to support file uploads in the application.
2023-05-30 23:41:58 -03:00
Gabriel Almeida
f7671874f0 🐛 fix(parameterComponent): change content field to file_path to match backend API
 feat(inputFileComponent): add file upload functionality and update state and callback with the filename
🔥 chore(tabsContext): remove console.log statements
🔧 chore(vite.config.ts): add upload route to apiRoutes
The content field in the parameterComponent was changed to file_path to match the backend API. The inputFileComponent now allows file uploads and updates the state and callback with the filename. The console.log statements were removed from the tabsContext. The upload route was added to the apiRoutes in the vite.config.ts file.
2023-05-30 23:41:41 -03:00
Gabriel Almeida
28ec8338f0 🐛 fix(endpoints.py): import save_uploaded_file function from cache.base module
🐛 fix(graph/base.py): change file_path assignment to use the new file_path key in value dict
🐛 fix(template/field/base.py): change content key to file_path key in result dict
 feat(endpoints.py): add endpoint to upload file
 feat(cache/base.py): add function to save uploaded file to cache
The save_uploaded_file function was not being imported in the endpoints.py module, causing a NameError when trying to use it. The file_path variable in the Node class was being assigned the value of the content key in the value dict, but it should be assigned the value of the file_path key instead. The content key in the TemplateFieldCreator class was changed to file_path to better reflect its purpose. An endpoint to upload files was added to the endpoints.py module, which uses the save_uploaded_file function from the cache.base module to save the uploaded file to the cache.
2023-05-30 23:40:32 -03:00
Gabriel Almeida
5798750b32 🚀 feat(config.yaml, base.py): enable RecursiveCharacterTextSplitter and update TextSplitterCreator to handle it
The RecursiveCharacterTextSplitter is now enabled in the config.yaml file. The TextSplitterCreator class in base.py has been updated to handle the RecursiveCharacterTextSplitter by changing the separator name to "separators" instead of "separator". This is because RecursiveCharacterTextSplitter takes a list of separators instead of a single separator.
2023-05-30 23:38:57 -03:00
Cristhian Zanforlin Lousa
4160274b29 Adding search nodes to ExtraSideBarComponent 2023-05-30 22:15:01 -03:00
Gabriel Almeida
041748b2fb 🔨 refactor(nodes.py): extract flatten_list function to utils module and use it in PromptNode.build method
🐛 fix(nodes.py): change tools parameter type hint in PromptNode.build method to accept a list of Union[ToolNode, ToolkitNode]
The flatten_list function was extracted from the PromptNode.build method and moved to the utils module to improve code reusability. The PromptNode.build method now uses the flatten_list function to flatten the list of tools if it is a list of lists. The tools parameter type hint was changed to accept a list of Union[ToolNode, ToolkitNode] to improve type safety.
2023-05-30 21:47:42 -03:00