Commit graph

1,457 commits

Author SHA1 Message Date
Gabriel Almeida
35dce224d7 📝 docs(nodes.py): update SQLAgentNode description to reflect its new implementation
The description of the SQLAgentNode has been updated to reflect its new implementation, which now constructs a SQL agent from an LLM and tools instead of a Vector Store Router. This change was made to improve the accuracy of the description and to better reflect the functionality of the node.
2023-05-27 14:24:19 -03:00
Gabriel Luiz Freitas Almeida
8c14b01d0c
fix: SQLAgent (#370) 2023-05-27 14:22:07 -03:00
Gabriel Ferreira Rosalino
aac6e3f2e9
Merge branch 'logspace-ai:dev' into gabfr-patch-1 2023-05-27 14:15:16 -03:00
Gabriel Ferreira Rosalino
f44e2f97f7
fix: SQLAgent
The queryCheckerTool now needs an extra arg with the LLM instance: https://github.com/hwchase17/langchain/blob/master/langchain/tools/sql_database/tool.py#L108

I added it so the SQLAgent can work normally now
2023-05-27 14:12:18 -03:00
Gabriel Luiz Freitas Almeida
09aa796af0
Changes to accomodate new vector stores (#366) 2023-05-27 14:10:54 -03:00
Gabriel Luiz Freitas Almeida
c224608601
🔨 refactor(base.py): refactor FrontendNode.format_field() method to improve readability and maintainability (#363) 2023-05-27 14:10:38 -03:00
Gabriel Almeida
9e6c4f8d57 🔧 chore(CONTRIBUTING.md): reorganize and clarify instructions for local development
The commit reorganizes the instructions for local development in CONTRIBUTING.md to make them clearer and more concise. It also adds a section on setting up pre-commit hooks to ensure consistent code formatting. Additionally, it updates the instructions for running the backend and frontend to use the `make` command for consistency and ease of use.
2023-05-27 13:09:17 -03:00
Gabriel Almeida
a7749323e4 🔧 chore(frontend): add prettier formatting script to package.json
The `format` script has been added to the `package.json` file in the `frontend` directory. This script uses `prettier` to format all files with the extensions `.js`, `.jsx`, `.ts`, `.tsx`, `.json`, and `.md` in the `src` directory. This ensures that the codebase is consistent and follows a standard formatting style.
2023-05-27 13:03:25 -03:00
Gabriel Almeida
47f440066f 🔥 chore(Makefile): remove pre-push hook installation
The pre-push hook installation command was removed from the Makefile. This was done to avoid conflicts with other hooks that may be installed in the future.
2023-05-27 13:01:58 -03:00
Gabriel Almeida
276a06976d Formatting 2023-05-27 13:01:20 -03:00
Gabriel Almeida
a096e83474 🚀 chore(lint.yml): rename job from 'build' to 'lint' for clarity
The job was renamed from 'build' to 'lint' to better reflect its purpose of running linters and code quality checks.
2023-05-27 13:00:28 -03:00
Gabriel Almeida
d5f2d83511 🚀 feat(githooks, Makefile): add pre-commit hook to run 'make format' before committing
🔧 chore(Makefile): add 'init' target to install pre-commit hooks
The pre-commit hook is added to run 'make format' before committing. This ensures that the code is formatted correctly before it is committed. The Makefile is updated to include an 'init' target that installs the pre-commit hooks.
2023-05-27 12:59:44 -03:00
Gabriel Almeida
de0a581031 🔥 refactor(nodes.py): remove unused import of deepcopy
🔥 refactor(custom_lists.py): remove unused import of vectorstores
The import of deepcopy in nodes.py and vectorstores in custom_lists.py are not used in the codebase and can be safely removed to improve code readability and maintainability.
2023-05-27 12:14:50 -03:00
Gabriel Almeida
9cb52994ad 🔧 chore(langflow): add Weaviate to vectorstores and add TODO comment to fix Weaviate integration
Weaviate has been added to the list of vectorstores in the config.yaml file. A TODO comment has been added to the nodes.py file to fix the integration with Weaviate. Weaviate requires the weaviate_url to be passed as it is not part of the class or from_texts method. The add_extra_fields method needs to be fixed to include the weaviate_url parameter.
2023-05-27 11:03:06 -03:00
Gabriel Almeida
297c518c3b Merge remote-tracking branch 'origin/dev' into new_vec_stores 2023-05-27 09:43:13 -03:00
Gabriel Almeida
e3983da487 🔍 chore(.gitignore): add qdrant_storage to ignore list
🆕 feat(.vscode/launch.json): add launch configuration for FastAPI app
The qdrant_storage directory is now added to the ignore list to prevent it from being tracked by git. A new launch configuration for FastAPI app is added to the .vscode/launch.json file. This configuration allows for debugging the app with uvicorn and sets the port to 7860, reloads the app on changes, and sets the log level to debug.
2023-05-27 09:41:35 -03:00
Gabriel Almeida
194e581417 🚀 feat(pyproject.toml): add weaviate-client dependency to enable integration with Weaviate
The weaviate-client package has been added as a dependency to the project to enable integration with Weaviate. This will allow the application to communicate with Weaviate and perform operations such as adding and retrieving data.
2023-05-27 09:40:55 -03:00
Gabriel Almeida
b42b4e5868 Merge remote-tracking branch 'origin/main' into dev 2023-05-27 09:38:52 -03:00
Gabriel Almeida
56da636915 🔨 refactor(nodes.py): extract common field attributes to variables and set them accordingly
This commit extracts common field attributes to variables and sets them accordingly. The basic_fields and advanced_fields variables are used to set the show and advanced attributes of the fields. The API Key field is now displayed as "API Key" and its value is hidden. The location field now has a default value of ":memory:" and its placeholder is also set to ":memory:". The password attribute of the key fields is set to False.

Issue Implement Qdrant #361
2023-05-26 23:09:56 -03:00
Gabriel Luiz Freitas Almeida
6f94fa60bc
Refactor Vector stores creator to help implementing others (#365) 2023-05-26 22:50:26 -03:00
Gabriel Luiz Freitas Almeida
12c23408e0
Merge branch 'dev' into 335-implement-docarray-vectorstore 2023-05-26 22:50:16 -03:00
Gabriel Almeida
29245d18e2 🔥 chore(pyproject.toml): remove gptcache dependency
The gptcache dependency is no longer needed and has been removed from the project.
2023-05-26 22:45:57 -03:00
Gabriel Luiz Freitas Almeida
ee041f4d91
fix crash when upload large file, not saving files on browser storage (#362) 2023-05-26 22:38:15 -03:00
Gabriel Almeida
e10a21f824 🐛 fix(langflow): add type ignore to node variable in LangChainTypeCreator
🐛 fix(langflow): remove unused imports in base.py files
The variable node in LangChainTypeCreator was causing a type error, so a type ignore was added to fix the issue. Additionally, unused imports were removed from both base.py files.
2023-05-26 22:34:53 -03:00
Gabriel Almeida
bd9d90786a 🔥 chore(base.py): remove unused process_field method from TemplateFieldCreator
The process_field method in the TemplateFieldCreator class is not used anywhere in the codebase and is therefore removed to improve code readability and maintainability.
2023-05-26 22:29:52 -03:00
Gabriel Almeida
342c2eaec7 🔨 refactor(base.py): refactor FrontendNode.format_field() method to improve readability and maintainability
This commit refactors the FrontendNode.format_field() method to improve its readability and maintainability. The method now uses helper methods to handle specific field types and values, and to determine whether a field should be shown, be a password field, or be multiline. The method also uses a dictionary to handle special fields and their respective handlers.
2023-05-26 22:20:08 -03:00
anovazzi1
7e8eea5e87 fix crash when upload large file, not saving files on browser storage 2023-05-26 22:05:47 -03:00
Gabriel Almeida
04579a25a2 🚀 chore(config.yaml): update config.yaml file with new documentloaders, memories, prompts, textsplitters, toolkits, utilities, and vectorstores
 feat(config.yaml): add Qdrant vectorstore and RequestsWrapper to the config.yaml file
The config.yaml file has been updated with new documentloaders, memories, prompts, textsplitters, toolkits, utilities, and vectorstores. The Qdrant vectorstore has been added to the vectorstores section. The RequestsWrapper has been added to the wrappers section.
2023-05-26 18:23:15 -03:00
Gabriel Almeida
7280fae428 Merge branch 'dev' into 335-implement-docarray-vectorstore 2023-05-26 18:22:40 -03:00
Lucas Oliveira
373b599a1a Removed pulse from edges 2023-05-25 20:00:34 -03:00
Lucas Oliveira
bef1cc096c Fixed Copy Paste issues by disabling it when the user clicks at the node 2023-05-25 19:56:42 -03:00
Lucas Oliveira
d299a675a0
Hotfix for Import Flows modal (#357)
Now, the text of the example boxes truncate after 3 lines, and if the
word is bigger than the line the word breaks.

![image](https://github.com/logspace-ai/langflow/assets/62335616/d45cacda-5fb9-4e93-8fd2-96e4b131fef0)
2023-05-25 19:06:34 -03:00
Lucas Oliveira
b53eb683bf Hotfix for Import Flows modal 2023-05-25 18:29:00 -03:00
Lucas Oliveira
41b6a2c6fe Fixed visual bug at Import Flows modal cards 2023-05-25 18:20:17 -03:00
Gabriel Luiz Freitas Almeida
8ed755f6dc
🔖 chore(pyproject.toml): bump version to 0.0.78 (#351) 2023-05-25 10:42:57 -03:00
Gabriel Luiz Freitas Almeida
59694a43d1
Merge branch 'main' into fix_deepcopy 2023-05-25 10:42:36 -03:00
Gabriel Almeida
6d849eeee7 Merge branch 'fix_deepcopy' of https://github.com/logspace-ai/langflow into fix_deepcopy 2023-05-25 10:41:25 -03:00
Gabriel Almeida
6afe35378a 🔖 chore(pyproject.toml): bump version to 0.0.78
The version number in the pyproject.toml file has been updated from 0.0.77 to 0.0.78. This is a chore commit as it does not introduce any new features or fix any bugs, but rather updates the version number to reflect the changes made in the code.
2023-05-25 10:40:11 -03:00
Gabriel Luiz Freitas Almeida
bdbd88c5d3
Hotfix: Deepcopy removal and bump to 0.0.77 (#350) 2023-05-25 10:35:08 -03:00
Gabriel Luiz Freitas Almeida
98f5e9ad56
Merge branch 'main' into fix_deepcopy 2023-05-25 10:34:52 -03:00
Gabriel Luiz Freitas Almeida
a808679b76
Hotfix: remove deepcopy, fixes llm rebuilding (#349)
Fixes #340
2023-05-25 10:22:23 -03:00
Gabriel Almeida
b5cee8d87c 🔖 chore(pyproject.toml): bump up version to 0.0.77
The version number in the pyproject.toml file has been updated from 0.0.76 to 0.0.77. This is a chore commit as it does not introduce any new features or fix any bugs, but only updates the version number.
2023-05-25 10:14:39 -03:00
Gabriel Almeida
3029fe029f 🐛 fix(chat_manager.py): fix is_first_message logic to correctly identify first message
🐛 fix(nodes.py): remove deepcopying of certain objects to improve performance
🐛 fix(loading.py): add error handling for empty documents in instantiate_textsplitter
The is_first_message logic in chat_manager.py was not correctly identifying the first message. The fix in this commit changes the comparison to <= 1 instead of == 0. In nodes.py, deepcopying of certain objects was removed to improve performance. This was done because deepcopying was not necessary for these objects. In loading.py, error handling was added to handle empty documents in instantiate_textsplitter. This was done to prevent errors when the source provided did not load correctly or was empty.
2023-05-25 10:10:56 -03:00
Gabriel Almeida
d89e4bc985 🐛 fix(__main__.py): pass dev flag to update_settings function
 feat(__main__.py): add serve_on_jcloud function to deploy Langflow server on Jina AI Cloud
🐛 fix(config.yaml): remove duplicate entries and fix indentation
The update_settings function now accepts a dev flag to enable running the app in development mode. The serve_on_jcloud function has been added to deploy the Langflow server on Jina AI Cloud. The config.yaml file has been cleaned up by removing duplicate entries and fixing indentation.
2023-05-25 09:03:28 -03:00
Gabriel Luiz Freitas Almeida
3791247545
add useEffect to prevent chat lock on fail of onClose method (#342) 2023-05-25 06:29:39 -03:00
anovazzi1
2866e4ea78 fix size of import on dev 2023-05-24 16:27:21 -03:00
anovazzi1
59951a3f68 add useEffect to prevent chat lock on fail of onClose method 2023-05-24 16:26:51 -03:00
Gabriel Almeida
a66adff004 🔥 refactor(custom_lists.py): remove unused vectorstores_type_to_cls_dict variable
🔨 refactor(vector_store/base.py): refactor VectorstoreCreator to use import_class from langflow.interface.importing.utils
The `vectorstores_type_to_cls_dict` variable was not being used, so it was removed. The `VectorstoreCreator` class was refactored to use the `import_class` function from `langflow.interface.importing.utils` instead of importing it directly. This improves the code's readability and maintainability.
2023-05-24 09:27:00 -03:00
anovazzi1
0c45186fcb
hot fix for dinamic size of font for buttonBox component (#337)
## Dynamic Font Size for ButtonBox Component

### Description
The ButtonBox component, which is used in the examples modal, has been
enhanced to have a dynamic font size that adjusts based on the length of
the text and the dimensions of its parent element. This improvement
ensures that the text within the ButtonBox component remains readable
and properly fits within its container.

### Changes Made
- Added a new `fontSize` state variable to track the font size within
the ButtonBox component.
- Utilized the `useEffect` hook to calculate and update the font size
dynamically.
- Implemented logic to check for both vertical and horizontal overflow
of the text within the parent container.
- Decreased the font size incrementally until the text fits within the
parent element's dimensions.
- Updated the component to apply the calculated font size to the text
element.

### Testing Done
- Manually tested the ButtonBox component with various text lengths and
parent container dimensions.
- Verified that the font size was adjusted correctly to fit the text
within the parent element without overflowing.
2023-05-24 01:41:20 -03:00
Lucas Oliveira
62701de9b8 Fixed Undo and Redo on different pages 2023-05-23 21:00:12 -03:00