Commit graph

5,668 commits

Author SHA1 Message Date
anovazzi1
99662ccc23
New group node (#891) 2023-10-10 13:12:29 -03:00
anovazzi1
a90e5b243f update git ignore 2023-10-09 17:05:03 -03:00
anovazzi1
f7534516ef create shell scripts to run frontend test 2023-10-09 17:04:07 -03:00
Gabriel Luiz Freitas Almeida
4544abe96d
Update README.md (#1020) 2023-10-09 16:53:35 -03:00
Gabriel Luiz Freitas Almeida
c0e25ff911
Valid placeholder name for editFlowSettings component (#1023) 2023-10-09 14:52:24 -03:00
anovazzi1
d419fd6ee4 first shell script to run frontend tests 2023-10-09 12:35:19 -03:00
Cristhian Zanforlin Lousa
9e2b73eac9 🔧 fix(DropdownButtonComponent): add id attribute to Button component to improve accessibility and testing capabilities
🔧 fix(floatComponent): add id attribute to Input component to improve accessibility and testing capabilities
🔧 fix(keypairListComponent): add id attribute to Input components to improve accessibility and testing capabilities
🔧 fix(keypairListComponent): add id attribute to Plus and Minus buttons to improve accessibility and testing capabilities
🔧 fix(toggleShadComponent): add id attribute to Switch component to improve accessibility and testing capabilities
🔧 fix(EditNodeModal): add id attribute to ToggleShadComponent component to improve accessibility and testing capabilities
🔧 fix(PageComponent): add id attribute to div element to improve accessibility and testing capabilities
🔧 fix(extraSidebarComponent): add id attribute to div element to improve accessibility and testing capabilities
🔧 fix(nodeToolbarComponent): add id attribute to div element to improve accessibility and testing capabilities
🔧 fix(nodeToolbarComponent): add id attribute to button element to improve accessibility and testing capabilities
🔧 fix(types/components): add id attribute to ToggleComponentType to improve accessibility and testing capabilities

🚀 feat(keypair.spec.ts): add tests for KeypairListComponent to verify key-value pairs functionality
🚀 feat(float.spec.ts): add tests for FloatComponent to verify float input functionality

🚀 feat: add support for toggling various options in the UI

This commit adds support for toggling various options in the UI. The following options can now be toggled:
- showtemperature
- showtop_k
- showtop_p
- showuse_mlock
- showuse_mmap
- showverbose
- showvocab_only
- showcache
- showecho
- showf16_kv
- showgrammar_path
- showlast_n_tokens_size
- showlogits_all
- showlogprobs
- showlora_base
- showlora_path
- showmax_tokens
- showmetadata
- showmodel_kwargs
- showmodel_path
- shown_batch
- shown_ctx
- shown_gpu_layers
- shown_parts
- shown_threads
- showrepeat_penalty
- showrope_freq_base
- showrope_freq_scale
- showseed
- showstop
- showstreaming
- showsuffix
- showtags

These options can be toggled by clicking on the respective elements in the UI. The commit also includes tests to ensure that the toggling functionality works as expected.
2023-10-09 12:34:35 -03:00
Gabriel Luiz Freitas Almeida
6511522536
Makes workflows run only when needed (#1028) 2023-10-09 11:23:34 -03:00
Gabriel Luiz Freitas Almeida
04ca4ce220 🔧 chore(ci.yml): update CI configuration to include specific paths for push and pull_request events
🔧 chore(ci.yml): update CI configuration to include specific paths for push and pull_request events
2023-10-09 11:22:34 -03:00
Gabriel Luiz Freitas Almeida
4b78140c82 🔧 chore(lint.yml): update lint workflow to include additional paths for linting
🔧 chore(test.yml): update test workflow to include additional paths for testing
2023-10-09 11:22:04 -03:00
Gabriel Luiz Freitas Almeida
5cbf8033df 🎨 style(index.mdx): update image file name to match the actual file name 2023-10-09 11:16:14 -03:00
Gabriel Luiz Freitas Almeida
2b1749e5ce 🎨 chore(docs): update new_langflow.gif image
🗑️ chore(docs): remove new_langflow2.gif image
2023-10-09 11:16:01 -03:00
Gabriel Luiz Freitas Almeida
44bebf7d6b Merge remote-tracking branch 'origin/dev' into newGroupNode 2023-10-09 10:48:35 -03:00
Gabriel Luiz Freitas Almeida
8eae2fa126 🔍 test(graph.py): add assertions to verify expected keywords in source and target fields of processed_flow edges
The test_process_flow_vector_store_grouped function now includes assertions to check if the expected keywords are present in the source and target fields of the edges in the processed_flow dictionary. This ensures that the processing of the flow vector store grouped JSON is correctly generating the edges with the expected connections between nodes.
2023-10-09 10:41:54 -03:00
Gabriel Luiz Freitas Almeida
6f1306887a 🔧 chore(Makefile): simplify frontend target by combining install_frontend and run_frontend commands
🐛 fix(Makefile): handle error in install_frontend command and attempt to fix it by running install_frontendc
🔧 chore(Makefile): simplify backend target by combining install_backend and run_backend commands
 feat(Makefile): add support for login flag to control autologin feature in backend command
2023-10-08 18:44:08 -03:00
Gabriel Luiz Freitas Almeida
419822211f 🔀 chore(README.md): update GIF link to point to the correct branch (dev) to ensure the latest demo is displayed 2023-10-08 18:01:05 -03:00
Gabriel Luiz Freitas Almeida
1ce520026a Fix langflow gif 2023-10-08 17:57:40 -03:00
Gabriel Luiz Freitas Almeida
c941099275 🐛 fix(Makefile): fix typo in make target name 'install_frontendc' to 'install_frontend' to resolve error during frontend installation
 feat(Makefile): add error handling to retry frontend installation if it fails to ensure successful installation
🐛 fix(Makefile): fix typo in make target name 'install_frontendc' to 'install_frontend' to resolve error during frontend installation
 feat(Makefile): add support for running backend with or without autologin based on the value of the 'autologin' variable
2023-10-08 17:50:14 -03:00
Raj Chauhan
4f9ab6516e
valid placeholder name 2023-10-07 22:56:39 +05:30
Gabriel Luiz Freitas Almeida
61a5c9dcdb 🐛 fix(utils.py): improve error handling in initialize_database() function
The `initialize_database()` function now handles two specific exceptions: "overlaps with other requested revisions" and "Can't locate revision identified by". If either of these exceptions occur, they will not be raised and instead the `alembic_version` table will be deleted. This change improves the error handling and ensures that the database is properly initialized.
2023-10-07 12:03:51 -03:00
anovazzi1
be5060b5f7 fix handle on groupNod for minification 2023-10-06 19:48:00 -03:00
anovazzi1
c30026743a feat(tests): add end-to-end tests for Flow Page and Group component
Add end-to-end tests for the Flow Page and Group component in the frontend. The Flow Page tests include a test for saving a custom component and verifying the success alert. The Group component tests include tests for grouping and ungrouping components, editing component properties, and verifying the changes.
2023-10-06 19:12:35 -03:00
anovazzi1
533e4cc47f remove 'null' test value 2023-10-06 17:43:48 -03:00
anovazzi1
2c594894e0 fix(ui/tooltip.tsx): add z-index to tooltip content to ensure it appears above other elements
feat(modals/EditNodeModal/index.tsx): add ShadTooltip component to display tooltip content for template parameters
2023-10-06 17:38:07 -03:00
Gabriel Luiz Freitas Almeida
7a1f06128e 🐛 fix(base.py): fix type hint for nodes parameter in Graph class constructor to improve code readability and maintainability
🔀 refactor(base.py): refactor initialization of top_level_nodes list in Graph class constructor to improve code readability and maintainability
2023-10-06 16:59:29 -03:00
Gabriel Luiz Freitas Almeida
4d6c731a9d 🐛 fix(base.py): change assignment of source_handle and target_handle to use get() method to handle missing keys gracefully
🐛 fix(base.py): change assignment of parent_node_id and parent_is_top_level to use state dictionary instead of _data attribute
🐛 fix(test_graph.py): change arguments passed to update_source_handle() function to match its signature
2023-10-06 16:19:42 -03:00
anovazzi1
1eca5bd40a fix(reactflowUtils.ts): add support for "dict" and "NestedDict" types in updateGroupNodeTemplate function
The updateGroupNodeTemplate function was updated to include support for the "dict" and "NestedDict" types. This allows the function to properly handle these types when checking if they are required or not.
2023-10-06 16:03:26 -03:00
anovazzi1
98afa2192b update poetry lock and package-lock 2023-10-06 15:46:00 -03:00
anovazzi1
88d91c48d8 Merge remote-tracking branch 'origin/dev' into NGNMergeDev 2023-10-06 15:41:42 -03:00
anovazzi1
dbcd19762a update display name of group node 2023-10-06 12:12:21 -03:00
Mark Needham
bc286ff4ee
Update README.md 2023-10-06 09:21:11 +01:00
anovazzi1
3d301a683c fix(GenericNode): update the name prop of IconComponent to conditionally display "Ungroup" if data.node.flow is truthy
fix(reactflowUtils): update the display_name value to "group Component" in the generateNodeFromFlow function

The changes were made to improve the semantics and provide more descriptive names for better understanding and maintainability.
2023-10-05 20:09:52 -03:00
anovazzi1
e97a600ca3 remove console.log 2023-10-05 19:51:35 -03:00
anovazzi1
56fce07318 refactor(reactflowUtils.ts): simplify logic for adding edges to selection in validateSelection function
fix(reactflowUtils.ts): filter edges in validateSelection function based on nodes in the selection to ensure only connected edges are added
2023-10-05 19:51:16 -03:00
Gabriel Luiz Freitas Almeida
c7f8606a72 ⬆️ chore(pyproject.toml): update pandas dependency to version 2.0.3 for compatibility and bug fixes 2023-10-05 18:41:55 -03:00
Gabriel Luiz Freitas Almeida
82ad45847f 🔖 chore(pyproject.toml): bump version from 0.5.0 to 0.5.1 to indicate a new release with updates and bug fixes 2023-10-05 18:27:30 -03:00
anovazzi1
0b1f837c2a fix(api.tsx): remove unnecessary try-catch block and add error logging for better debugging
fix(index.ts): remove console.log statement for error logging
2023-10-05 18:27:30 -03:00
anovazzi1
37f35806a6 fix(formModal/index.tsx): update updateLastMessage function to include prompt value when data.type is "end"
fix(formModal/index.tsx): update template.current value when data.type is "prompt" and data.prompt is provided
fix(formModal/index.tsx): remove unnecessary updateLastMessage call when data.type is "stream" and isStream is true
2023-10-05 18:27:30 -03:00
Gabriel Luiz Freitas Almeida
c3197c30f5 🐛 fix(manager.py): change try-except block to if-elif block to improve code readability and maintainability 2023-10-05 18:27:30 -03:00
Gabriel Luiz Freitas Almeida
aec14bd250 🐛 fix(manager.py): remove unnecessary exception handling and logging for JSON decoding error
🐛 fix(manager.py): fix condition for clearing chat history to only clear if "clear_history" key is present and its value is truthy
2023-10-05 18:27:30 -03:00
Gabriel Luiz Freitas Almeida
10d79fcbec 🔧 refactor(buildTrigger/index.tsx): remove unused processFlow function to improve code readability and maintainability
🔧 refactor(buildTrigger/index.tsx): remove unnecessary 'finished' variable and while loop to simplify code logic
🔧 refactor(buildTrigger/index.tsx): remove unnecessary return statement and resolve/reject promises directly to improve code readability
🔧 refactor(buildTrigger/index.tsx): remove unused 'isValid' variable and directly push validation results to 'validationResults' array
🔧 refactor(buildTrigger/index.tsx): remove unnecessary 'else' statements and simplify code logic
🔧 refactor(buildTrigger/index.tsx): remove unnecessary 'setProgress' function call and directly set progress value
🔧 refactor(buildTrigger/index.tsx): remove unnecessary 'setSuccessData' and 'setErrorData' function calls and directly set success and error data values
🔧 refactor(buildTrigger/index.tsx): remove unnecessary type assertion for 'setTabsState' function call
🔧 refactor(buildTrigger/index.tsx): remove unnecessary 'setIsBuilding' function call
🔧 refactor(buildTrigger/index.tsx): remove unnecessary 'eventSource.close()' function call in 'onerror' event handler
🔧 refactor(buildTrigger/index.tsx): remove unnecessary 'resolve' function call in 'onmessage' event handler
2023-10-05 14:49:58 -03:00
Gabriel Luiz Freitas Almeida
06bbfa2e04 🐛 fix(utils.py): fix find_last_node function to receive nodes and edges as arguments instead of data dictionary
🐛 fix(utils.py): fix update_source_handle function to receive g_nodes and g_edges as arguments instead of flow_data
🐛 fix(utils.py): fix get_updated_edges function to receive g_nodes and g_edges as arguments instead of base_flow and group_node_id
 feat(utils.py): add support for passing nodes and edges as arguments to find_last_node, update_source_handle, and get_updated_edges functions to improve reusability and modularity
2023-10-05 13:08:09 -03:00
Gabriel Luiz Freitas Almeida
01438d82e0 🐛 fix(base.py): add exception logging to provide more information in case of KeyError
🐛 fix(utils.py): fix bug where ungrouped nodes were not added to the queue for future processing
 feat(utils.py): add functionality to keep track of processed nodes to avoid duplicate processing
 feat(utils.py): add functionality to process nodes in a breadth-first manner to ensure correct order of processing
 feat(utils.py): add functionality to update source handles correctly when ungrouping nodes
2023-10-05 12:34:54 -03:00
Gabriel Luiz Freitas Almeida
58548cc242 🔧 chore(conftest.py): add new fixture for vector_store_grouped_json_flow to improve test coverage
🔧 chore(conftest.py): add new path for vector_store_grouped.json file to improve test coverage

🆕 feat(Vector Store): add Vector Store agent and Vector Store Info node

The Vector Store agent allows querying a Vector Store. It can be used to construct an agent from a Vector Store. The Vector Store Info node provides information about a Vector Store.

The Vector Store agent and Vector Store Info node are added to support the functionality of querying a Vector Store.

🔧 chore: update configuration options in the code
📝 docs: add information about the OpenAI API Base configuration option in the code comments

🔧 chore: update configuration for ChatOpenAI and Chroma nodes
📝 docs: update documentation for ChatOpenAI and Chroma nodes

🔧 chore(config): update OpenAIEmbeddings-YwSvx configuration options

The OpenAIEmbeddings-YwSvx configuration options have been updated to include new fields and values. This commit updates the configuration file to reflect these changes.

🔧 chore(config): update configuration options for OpenAIEmbeddings and Chroma

🔧 chore(config): update configuration options for OpenAIEmbeddings and Chroma to improve flexibility and customization

🔧 chore(config): update configuration options for RecursiveCharacterTextSplitter and WebBaseLoader
📝 docs(config): update configuration options for RecursiveCharacterTextSplitter and WebBaseLoader in documentation

🔧 chore(OpenAIEmbeddings): update OpenAIEmbeddings configuration options

The OpenAIEmbeddings node configuration options have been updated to include the following changes:
- `allowed_special` and `disallowed_special` now accept a list of values instead of a single value
- `chunk_size` now accepts an integer value
- `deployment` now accepts a string value
- `embedding_ctx_length` now accepts an integer value
- `headers` now supports multiline values
- `max_retries` now accepts an integer value
- `model` now accepts a string value
- `model_kwargs` now accepts code input
- `openai_api_base` now accepts a password input
- `openai_api_key` now accepts a password input
- `openai_api_type` now accepts a password input
- `openai_api_version` now accepts a password input
- `openai_organization` has been removed from the configuration options

🔧 chore: update OpenAIEmbeddings configuration options in the UI

The OpenAIEmbeddings configuration options in the UI have been updated to include the following changes:
- Added the `openai_organization` option to specify the OpenAI organization.
- Added the `openai_proxy` option to configure the OpenAI proxy.
- Added the `request_timeout` option to set the request timeout.
- Added the `show_progress_bar` option to control the display of progress bars.
- Added the `tiktoken_model_name` option to specify the Tiktoken model name.

These changes improve the flexibility and customization of the OpenAI embedding models.

🔧 chore: clean up unused code and remove unnecessary fields in the configuration file
📝 docs: update documentation link for the Chroma vectorstore module

🔧 fix: fix formatting issue in chunk_size field in RecursiveCharacterTextSplitter node configuration
🔧 fix: fix formatting issue in separator_type field in RecursiveCharacterTextSplitter node configuration
🔧 fix: fix formatting issue in separators field in RecursiveCharacterTextSplitter node configuration

📝 chore(vector_store_grouped.json): add vector_store_grouped.json test data file

🔀 chore(vector_store_grouped.json): add vector_store_grouped.json test data file

 test(graph.py): add test case for processing flow with grouped nodes and vector store
🔍 test(graph.py): add assertions to verify the correctness of the processed flow with grouped nodes and vector store
🔧 test(graph.py): update test case for updating template to make a deep copy of sample_nodes to keep it unchanged
2023-10-05 12:29:29 -03:00
Gabriel Luiz Freitas Almeida
de7c80de3f 🐛 fix(utils.py): refactor update_template function to improve readability and maintainability
 feat(utils.py): add support for nested proxy dictionary in template to handle field and id separately
 test(test_graph.py): add test cases for process_flow function to ensure correct processing of grouped chat data
 test(test_graph.py): add test cases for update_template function to ensure correct updating of template
2023-10-05 11:40:40 -03:00
Gabriel Luiz Freitas Almeida
533edf48f9 🔧 chore(conftest.py): add fixture for one_grouped_chat_json_flow to provide a test data file for one grouped chat
🔧 chore(conftest.py): add one_grouped_chat_json_flow fixture to read and return the contents of the one_group_chat.json file

📝 chore(one_group_chat.json): add one_group_chat.json test data file

This commit adds the one_group_chat.json file to the tests/data directory. The file contains a simple chat with a custom prompt template and conversational memory buffer. It is used for testing purposes.

🔧 chore: update node configuration for ConversationBufferMemory, ChatOpenAI, and LLMChain
📝 docs: update documentation links for ConversationBufferMemory and LLMChain

🔧 fix: update prompt template in LLMChain to include conversation history and text input variables
🔧 fix: update ConversationBufferMemory node to include description and documentation links

🎨 style: format and organize code for better readability and maintainability
2023-10-05 11:39:00 -03:00
anovazzi1
15a6eb58b1 refactor(reactflowUtils.ts): remove unnecessary code that hides the "code" template for CustomComponent
The code was removing the "code" template for CustomComponent by setting its "show" property to false. However, this code is no longer needed and has been removed to simplify the logic and improve maintainability.
2023-10-04 21:46:34 -03:00
anovazzi1
39ddc8eed4 update proxy field on clean edges 2023-10-04 21:12:58 -03:00
Gabriel Luiz Freitas Almeida
fb26d1fedd 🐛 fix(test_graph.py): update expected values in test_find_last_node and test_ungroup_node to reflect changes in the code 2023-10-04 20:46:32 -03:00
Gabriel Luiz Freitas Almeida
29f0fb1e15 Update grouped_chat example 2023-10-04 20:46:17 -03:00