Commit graph

2,485 commits

Author SHA1 Message Date
Gabriel Luiz Freitas Almeida
5924aa4442 📦 chore(field_formatters.py): add field formatters for template frontend_node
🔧 refactor(field_formatters.py): refactor field formatters for template frontend_node
The commit adds a new file `field_formatters.py` to the `frontend_node/formatter` directory in the `langflow/template` backend. This file contains multiple field formatters for the template frontend_node. The formatters handle various formatting tasks such as formatting field names, setting field options, handling special fields, and formatting field types. The commit aims to improve the code organization and maintainability by separating the field formatting logic into dedicated formatters.
2023-06-29 08:52:26 -03:00
Gabriel Luiz Freitas Almeida
75f0a80ded 🎉 feat(formatter): add base FieldFormatter class for formatting template fields
The base.py file is a new addition to the project. It introduces the FieldFormatter class, which is an abstract base class (ABC) for formatting template fields. This class provides a format() method that takes a TemplateField object as input and is meant to be implemented by subclasses. This addition allows for the creation of custom field formatters in the project.
2023-06-29 08:52:21 -03:00
Gabriel Luiz Freitas Almeida
d272a682be 🔧 chore(chains.py): update field properties for "RetrievalQA" memory field
The "RetrievalQA" memory field in the template frontend node is updated to have the "show" and "required" properties set to False. This change is made to hide the memory field and make it optional. Additionally, the "advanced" property is set to False for all fields, and the "password" property is set to False for fields containing the word "key" in their name.
2023-06-29 08:26:23 -03:00
Gabriel Luiz Freitas Almeida
df0b316040 🔀 chore(pyproject.toml): update dependencies versions
⬆️ feat(pyproject.toml): update beautifulsoup4 to version 4.12.2
⬆️ feat(pyproject.toml): update langchain to version 0.0.219
⬆️ feat(pyproject.toml): update pandas to version 2.0.0
⬆️ feat(pyproject.toml): update huggingface-hub to version 0.15.0
⬆️ feat(pyproject.toml): update unstructured to version 0.7.0
⬆️ feat(pyproject.toml): update pypdf to version 3.11.0
⬆️ feat(pyproject.toml): update langchain-serve to version >0.0.47
⬆️ feat(pyproject.toml): update qdrant-client to version 1.3.0
⬆️ feat(pyproject.toml): update ctransformers to version 0.2.10
⬆️ feat(pyproject.toml): update cohere to version 4.11.0
⬆️ feat(pyproject.toml): update anthropic to version 0.3.0
⬆️ feat(pyproject.toml): update types-pyyaml to version 6.0.12.8

The dependencies in the pyproject.toml file have been updated to their latest versions. These updates include various bug fixes, performance improvements, and new features. It is important to keep the dependencies up to date to ensure compatibility and take advantage of the latest enhancements and fixes provided by the library maintainers.
2023-06-29 06:49:24 -03:00
Gabriel Luiz Freitas Almeida
15bafe882d
feat: adding Postgres memory for message persistent (#559) 2023-06-29 06:42:44 -03:00
Gabriel Luiz Freitas Almeida
b61a0a624e
Merge branch 'release' into dev 2023-06-29 06:28:14 -03:00
zhenjianpeng
78831f1051 remove memory support and make it a proposal 2023-06-29 11:54:28 +08:00
zhenjianpeng
303c0ff5d2 something wrong about pyproject.toml 2023-06-29 11:31:50 +08:00
zhenjianpeng
ed2d4c549e commit poetry lock 2023-06-29 11:24:12 +08:00
zhenjianpeng
281e6062f4 remove psycopg-c 2023-06-29 11:15:09 +08:00
zhenjianpeng
177b50695d adding dependencies for langchain pg support 2023-06-29 10:44:08 +08:00
zhenjianpeng
83b7ee337f Merge branch 'dev' of https://github.com/PepperYan/langflow into dev 2023-06-29 10:38:50 +08:00
zhenjianpeng
d1fbbd5fff fix bug about extra fields 2023-06-29 10:38:45 +08:00
hibad
c58632ed21
Merge branch 'logspace-ai:dev' into dev 2023-06-29 10:27:18 +08:00
zhenjianpeng
df43dbc6bc add custom nodes for signature, fix some problem 2023-06-29 10:26:27 +08:00
Gabriel Luiz Freitas Almeida
b276cc9dd6
🚀 feat(llms.py): add method to format ctransformers field in LLMFrontendNode (#519) 2023-06-28 22:58:41 -03:00
Gabriel Luiz Freitas Almeida
ce34ac4825 🐛 fix(test_websocket.py): fix the endpoint URL in the test_init_build test
The endpoint URL in the test_init_build test has been fixed to "api/v1/build/init/test" to match the correct URL pattern. This ensures that the test is accurately testing the intended functionality.
2023-06-28 22:50:55 -03:00
Gabriel Luiz Freitas Almeida
85b7ff1d31 🔧 chore(chat.py): update init_build endpoint to include flow_id as a path parameter
The unnecessary imports have been removed from the chat.py file to improve code cleanliness and readability. The init_build endpoint in the chat.py file has been updated to include the flow_id as a path parameter instead of extracting it from the graph_data dictionary. This change allows for a more explicit and consistent API design.
🔧 chore(chat.py): remove unnecessary imports and reformat code for better readability
2023-06-28 22:45:37 -03:00
Gabriel Luiz Freitas Almeida
48d40bfdd3 feat(chat.py): add status field to flow_data_store to track build status of flows
The import statement for the BuildStatus enum in the schemas module has been updated to ensure the correct import. Additionally, a new "status" field has been added to the flow_data_store dictionary to track the build status of flows. The status is set to BuildStatus.IN_PROGRESS when a flow is being built, BuildStatus.SUCCESS when the build is successful, and BuildStatus.FAILURE when there is an error during the build process. This allows for better tracking and management of flow builds.
🐛 fix(chat.py): change import statement for BuildStatus in schemas module
2023-06-28 22:29:56 -03:00
Gabriel Luiz Freitas Almeida
5da374b713 feat(schemas.py): add BuildStatus enum to represent the status of a build
The BuildStatus enum is added to represent the different statuses that a build can have: SUCCESS, FAILURE, and IN_PROGRESS. This enum will be used to provide a more structured and consistent way of handling build statuses in the application.
2023-06-28 22:29:46 -03:00
Gabriel Luiz Freitas Almeida
1bad93c02c Merge branch 'release' into add_params_to_llms 2023-06-28 22:29:37 -03:00
Gabriel Luiz Freitas Almeida
e2a7d860ae
Add CodeQL workflow (#561) 2023-06-28 18:25:21 -03:00
Gabriel Luiz Freitas Almeida
c2e22a6c08
Merge branch 'main' into release 2023-06-28 18:22:44 -03:00
Gabriel Luiz Freitas Almeida
d92db6b638
Hotfix_02 (#563) 2023-06-28 18:21:09 -03:00
Gabriel Luiz Freitas Almeida
14da6494bf 🔖 chore(pyproject.toml): update package version to 0.2.6
The package version has been updated from 0.2.5 to 0.2.6. This change is made to reflect the latest changes and improvements in the package.
2023-06-28 18:17:58 -03:00
Gabriel Luiz Freitas Almeida
36212884e4 🐛 fix(loading.py): refactor instantiate_textsplitter function to improve readability and remove unnecessary code
The `instantiate_textsplitter` function has been refactored to improve readability and remove unnecessary code. The condition for creating the `text_splitter` object has been simplified and the `separator_type` parameter is now removed from the `params` dictionary if it exists. Additionally, the `language` parameter is now passed as an instance of the `Language` class from the `langchain.text_splitter` module. This change ensures that the `text_splitter` object is created correctly and the `split_documents` method is called with the appropriate parameters.
2023-06-28 18:16:13 -03:00
Gabriel Luiz Freitas Almeida
3485893be0 🔀 refactor(textsplitters.py): extract options list into a variable for reusability and sorting
The options list for the separator_type field in the TextSplittersFrontendNode class has been extracted into a variable called options. This improves code readability and allows for easier modification and sorting of the options list.
2023-06-28 18:16:04 -03:00
Gabriel Luiz Freitas Almeida
8c12e17ad0 📝 docs(config.yaml): update documentation link for ConversationBufferMemory in memories section
The documentation link for ConversationBufferMemory in the memories section has been updated to point to the correct URL "https://python.langchain.com/docs/modules/memory/how_to/buffer". This change ensures that users can access the correct documentation for using ConversationBufferMemory.
2023-06-28 18:06:46 -03:00
Jorge
9784817821 Add CodeQL workflow 2023-06-28 18:42:32 +02:00
Gabriel Luiz Freitas Almeida
614bcecec2
Fix: Metadata now updates existing metadata in documents (#560) 2023-06-28 09:32:34 -03:00
Gabriel Luiz Freitas Almeida
e5b12ae05a 🔖 chore(pyproject.toml): update langchain dependency version to ^0.0.218
The langchain dependency version has been updated to ^0.0.218 to ensure compatibility with the latest features and bug fixes.
2023-06-28 09:19:07 -03:00
Gabriel Luiz Freitas Almeida
d79e61f7ed
Merge branch 'main' into release 2023-06-28 09:06:51 -03:00
Gabriel Luiz Freitas Almeida
fe11604976 Merge branch 'release' of https://github.com/logspace-ai/langflow into release 2023-06-28 09:03:30 -03:00
Gabriel Luiz Freitas Almeida
7364ba41f8 🐛 fix(loading.py): handle case where metadata is an empty dict and document already has metadata
🐛 fix(loading.py): handle case where separator_type is not provided in params
The first fix ensures that if the metadata is an empty dict, it will not be added to the documents if they already have metadata. This prevents overwriting existing metadata.

The second fix handles the case where the separator_type is not provided in the params. In this case, the text_splitter will be instantiated using the class_object and the params as is.
2023-06-28 08:59:31 -03:00
hibad
b25207a33a
Merge branch 'logspace-ai:dev' into dev 2023-06-28 15:20:40 +08:00
zhenjianpeng
d157fffee3 adding pg support for external message persistance 2023-06-28 15:20:06 +08:00
Gabriel Luiz Freitas Almeida
f33ad207e7
Fix: docs now open correctly (#556) 2023-06-27 18:33:22 -03:00
Gabriel Luiz Freitas Almeida
c29c813551
Merge branch 'main' into release 2023-06-27 18:32:56 -03:00
Gabriel Luiz Freitas Almeida
8aeb7c5fb1 🔖 chore(pyproject.toml): bump version to 0.2.4
The version number has been updated from 0.2.3 to 0.2.4. This is a chore commit as it does not introduce any new features or bug fixes, but rather updates the version number to reflect changes made in the package.
2023-06-27 18:28:01 -03:00
Gabriel Luiz Freitas Almeida
0200b22189 🎨 style(nodeToolbarComponent): add noopener and noreferrer attributes to documentation link
The noopener and noreferrer attributes were added to the documentation link to improve security by preventing the linked page from having access to the window.opener object and to prevent the referrer header from being sent to the linked page, respectively.
2023-06-27 18:26:01 -03:00
Gabriel Luiz Freitas Almeida
f3e22b0080 fix: docs open in a new tab now 2023-06-27 18:25:05 -03:00
Gabriel Luiz Freitas Almeida
a795632ed6
Adds Info tooltips and links to docs, fixes component duplication (#554) 2023-06-27 16:32:44 -03:00
Gabriel Luiz Freitas Almeida
2ec01afd8b 🎨 style(nodeToolbarComponent): update button colors and icons for better visibility and consistency
🐛 fix(nodeToolbarComponent): fix documentation link not working when no documentation is provided
The button colors and icons have been updated to improve visibility and consistency. The delete and copy buttons now have a darker background color when hovered over. The edit button now has a rounded right corner and a lighter background color when there are no nodes present. The documentation button now shows a "Coming Soon" tooltip when no documentation is provided and has a muted color. The documentation link now works correctly even when no documentation is provided.
2023-06-27 15:39:31 -03:00
Gabriel Luiz Freitas Almeida
37239e27c9 🎨 style(extraSidebarComponent): remove delayDuration from ShadTooltip component
The delayDuration prop was removed from all ShadTooltip components in the ExtraSidebar component. This improves the user experience by removing the delay before the tooltip is displayed.
2023-06-27 15:29:40 -03:00
Gabriel Luiz Freitas Almeida
0a3648c23e 🔨 refactor(GenericNode): remove unused imports and simplify documentation tooltip
The required indicator is now next to the title, which improves readability and makes it easier to see which parameters are required. The documentation tooltip has been simplified to only show the documentation link, which improves the user experience by reducing clutter. Unused imports have been removed to improve code quality.
🔨 refactor(parameterComponent): move required indicator next to title
2023-06-27 15:29:20 -03:00
Gabriel Luiz Freitas Almeida
e10d271e22 🔧 refactor(ShadTooltipComponent): destructure props and add types
The ShadTooltipComponent has been refactored to destructure the props and add types to improve readability and maintainability. The ShadTooltipProps type has been added to the types/components/index.ts file to define the expected props for the ShadTooltipComponent. The delayDuration, side, content, and children props are now destructured from the props object and have their respective types defined.
2023-06-27 15:26:53 -03:00
Gabriel Luiz Freitas Almeida
1880484a6c fix: add info field to tests 2023-06-27 13:25:59 -03:00
Gabriel Luiz Freitas Almeida
23cf37eee5 🔖 chore(pyproject.toml): update package version to 0.2.3
🔥 refactor(manager.py): remove unnecessary blank line at the end of the file
The package version has been updated to 0.2.3 in the pyproject.toml file. This is a chore as it does not affect the functionality of the package. The blank line at the end of the manager.py file has been removed as it is unnecessary and does not add any value to the code. This is a refactor as it improves the code readability.
2023-06-27 13:21:40 -03:00
Gabriel Luiz Freitas Almeida
09a72fa856
Bugfix - Deep-cloning the nodes when duplicate (#547) 2023-06-27 13:16:21 -03:00
Gabriel Luiz Freitas Almeida
ae5f04a1b0
Merge branch 'release' into bugfix-duplicate 2023-06-27 13:15:49 -03:00