Commit graph

5,500 commits

Author SHA1 Message Date
Gabriel Luiz Freitas Almeida
f427e17166 🔀 refactor(endpoints.py): rename import of build_langchain_types_dict to langchain_types_dict for consistency
🔀 refactor(types.py): add langchain_types_dict as a separate variable to improve code readability and maintainability

The import statement in `endpoints.py` has been updated to import `langchain_types_dict` instead of `build_langchain_types_dict` for consistency with the variable name. This change improves code readability and maintainability.

In `types.py`, a new variable `langchain_types_dict` has been added as a separate variable to store the result of `build_langchain_types_dict()`. This change improves code readability and makes it easier to understand the purpose of the variable.
2023-06-29 09:55:59 -03:00
Gabriel Luiz Freitas Almeida
8a28fdf497 📝 docs(config.yaml): add documentation link for MultiQueryRetriever
🔧 chore(settings.py): add retrievers attribute to Settings class
The config.yaml file now includes a documentation link for the MultiQueryRetriever in the retrievers section. This link provides additional information on how to use the MultiQueryRetriever. In the settings.py file, the Settings class now includes a retrievers attribute to store retriever-related settings. This allows for easier management and configuration of retrievers in the application.
2023-06-29 09:54:38 -03:00
anovazzi1
97d5996353 fix(codeAreaModal): fix tabs rendering issue and add support for multiple tabs in CodeAreaModal component
feat(codeAreaModal): add functionality to switch between "code" and "errors" tabs in CodeAreaModal component
2023-06-29 09:50:25 -03:00
Gabriel Luiz Freitas Almeida
c9f8a27983 🔀 chore(NodeModal): update import and variable name for nodeIconsLucide to improve code readability
💄 style(NodeModal): remove unused import and variable to clean up code
The import and variable name for `nodeIconsLucide` has been updated to improve code readability. The unused import and variable `nodeIcons` and `toNormalCase` have been removed to clean up the code.
2023-06-29 09:34:19 -03:00
Gabriel Luiz Freitas Almeida
197f1f9e71 🔥 refactor(utils.ts): remove unused imports and icons to improve code cleanliness and reduce bundle size
🎨 style(utils.ts): reorganize nodeColors and nodeNames objects to improve readability and maintainability
The changes in this commit remove unused imports and icons from the `utils.ts` file, which helps improve code cleanliness and reduces the bundle size. Additionally, the `nodeColors` and `nodeNames` objects have been reorganized to improve readability and maintainability.
2023-06-29 09:34:01 -03:00
Gabriel Luiz Freitas Almeida
8ed5287ac4 🔧 chore(base.py): refactor field formatting logic into a separate class
💡 refactor(base.py): The field formatting logic in the FrontendNode class has been refactored into a separate class called FieldFormatters. This improves code organization and separation of concerns, making it easier to maintain and extend the field formatting functionality in the future.
2023-06-29 09:01:28 -03:00
Gabriel Luiz Freitas Almeida
3845a60bcf 🚀 feat(memories.py): add default value for connection_string field in PostgresChatMessageHistoryFrontendNode
The trailing whitespace has been removed for consistency and readability. The unused import of `DEFAULT_CONNECTION_STRING` from `langchain.memory.chat_message_histories.postgres` has been removed. The `PostgresChatMessageHistoryFrontendNode` now has a default value for the `connection_string` field, which is set to `DEFAULT_CONNECTION_STRING`. This ensures that the field has a default value when creating instances of the class.
🔧 chore(memories.py): remove trailing whitespace and unused import
2023-06-29 08:52:45 -03:00
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
Lazy
e23f4bef1b
Fix broken link 2023-06-29 04:50:57 -04:00
Rodrigo Nader
b9e9f3ba4c refactor(frontend): Adjust styling in chatComponent, buildTrigger, dropdownComponent, and other components
- Adjusted styling in chatComponent, buildTrigger, dropdownComponent, and other components to improve visual consistency and enhance user experience.
- Updated button styles, background colors, and text colors to create a more cohesive design across the application.
- Fixed incorrect color values and replaced them with appropriate color variables from the tailwind configuration.
- Removed redundant styles and optimized the code for better maintainability.
2023-06-29 02:39:35 -03:00
zhenjianpeng
78831f1051 remove memory support and make it a proposal 2023-06-29 11:54:28 +08:00
Rodrigo Nader
05d2e82f2d feat: Update class names and colors in various components
- Update class names and colors in parameterComponent, GenericNode, alertDropDown, error, notice, success, buildTrigger, dropdownComponent, headerComponent, and inputListComponent to improve consistency and visual appeal.
2023-06-29 00:50:58 -03: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
5a69b479ff
Merge branch 'main' into vertex_ai 2023-06-28 22:10:43 -03:00
gustavoschaedler
82b76840e3 feat: Add CustomComponent tool to Langflow API
- Added support for the CustomComponent tool in the Langflow API.
- The tool has been added to the config.yaml file.
- The CustomComponentNode class has been implemented in the frontend nodes.
- The code changes include modifications in various files for the implementation of the CustomComponent tool.
- The code changes include the addition of a new field "code" in the TemplateField class.
- The build_langchain_template_custom_component function has been implemented to build the template for the CustomComponent tool.
- New custom fields "my_id", "year", and "other_field" have been added to the template for the CustomComponent tool.
2023-06-29 01:57:53 +01:00
Sean Javiya
e1872be728
Fix: Required input llm for module LLMChain not found
There is a recurring intermittent bug, where Chains fail to validate, with an error "Required module ____ for module ____ not found". This happens frequently for all LLMs that inherit from the LLM class (example Cohere's wrapper).

This is caused by this chunk of code.
This also explains why the bug is intermittent and not every time.
"in" is matching LLM from source_types with BaseLLM from target_reqs. Also, this doesn't need to be a nested loop, it can be done with one loop.

I'm a user of LangFlow, and a first time contributor. Thanks!
2023-06-28 17:09:58 -07:00
Gabriel Luiz Freitas Almeida
98fb7c84c7
Hotfix: 0.2.6 -> Docs and TextSplitter bug (#564) 2023-06-28 18:32:51 -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
Lucas Oliveira
dadaaa895d 🔥 refactor(chatComponent/index.tsx): remove unnecessary console.log statements for 'open' and 'isBuilt' variables 2023-06-28 18:17:37 -03:00
Lucas Oliveira
657dfa1bb6 Merge branch 'form_io' of github.com:logspace-ai/langflow into form_io 2023-06-28 18:17:21 -03:00
Lucas Oliveira
7b2763a1af 🐛 fix(parameterComponent): set isPending to true for each tab in the parameter component state to fix a bug
🐛 fix(chatComponent): remove console.log statements for 'open' and 'isBuilt' variables to clean up code
🐛 fix(formModal): remove unnecessary console.log statement for 'tabsState[id.current]' variable to clean up code
🐛 fix(PageComponent): set isPending to true for each tab in the Page component state to fix a bug
2023-06-28 18:16:59 -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
Gabriel Luiz Freitas Almeida
a445b079e0 🔧 refactor(loading.py): simplify instantiation of prompt and format_kwargs assignment
💡 chore(loading.py): improve code readability and maintainability by simplifying the instantiation of the prompt object and assignment of format_kwargs dictionary.

The code has been refactored to use a dictionary comprehension to create the format_kwargs dictionary. This simplifies the logic and improves code readability. The commented out code for the prompt.partial() method has been removed as it is no longer necessary.
2023-06-28 17:59:57 -03:00
Lucas Oliveira
3bd103dbc5 🔨 refactor(promptComponent): move postValidatePrompt import statement to the top of the file for better organization
🔥 chore(promptModal): remove unused promptModal component

🔨 refactor(promptComponent): use useEffect to make a POST request to validate the prompt value and update the nodeClass state if the API returns data
2023-06-28 17:42:58 -03:00
Lucas Oliveira
a50e089401 Merge branch 'form_io' of github.com:logspace-ai/langflow into form_io 2023-06-28 17:31:14 -03:00
Lucas Oliveira
18acd7e257 🐛 fix(formModal/index.tsx): add missing setTabsState function to TabsContext to fix error
🐛 fix(formModal/index.tsx): update formKeysData.input_keys value when chatValue changes to reflect user input
2023-06-28 17:31:10 -03:00
Gabriel Luiz Freitas Almeida
bb377d4935 🐛 fix(utils.py): set input keys values from artifacts in build_input_keys_response function
 feat(utils.py): add support for setting input keys values from artifacts in build_input_keys_response function
The build_input_keys_response function now takes an additional parameter, artifacts, which is a dictionary containing key-value pairs. The function sets the values of the input keys in the input_keys_response dictionary based on the corresponding keys in the artifacts dictionary. This allows for more flexibility in setting the input keys values dynamically based on the provided artifacts.
2023-06-28 17:27:28 -03:00