Commit graph

6,039 commits

Author SHA1 Message Date
anovazzi1
795bf73752
Filter Menu Components on Click Edge (#932)
This branch implements the edge filtering feature.
2023-09-21 21:08:47 -03:00
anovazzi1
8275a9c2c1 chore(parameterComponent): remove unnecessary ts-ignore comments
fix(extraSidebarComponent): remove unnecessary if condition in handleBlur function
2023-09-21 21:00:17 -03:00
anovazzi1
0192d3461d fix(chatComponent): import processFlow function from reactflowUtils to fix reference error
fix(chatComponent): update validation check to use processFlow function to correctly count nodes
fix(formModal): remove unnecessary spread operator on processFlow function call
fix(reactflowUtils): update getGroupStatus function to correctly return status based on ssData
2023-09-21 20:43:02 -03:00
anovazzi1
a12a7fd1cc
New "more" nodeToolbar button (#952)
This PR introduces a new feature to enhance the editing capabilities of
nodes in our application. We've added a "More" button to the
nodeToolbar, which, when clicked, reveals additional options for editing
nodes.
2023-09-21 20:05:41 -03:00
anovazzi1
1796e349c2 fix(nodeToolbarComponent): fix indentation and formatting issues in the code
feat(nodeToolbarComponent): add support for minimal mode in the toolbar
feat(nodeToolbarComponent): add functionality to show/hide advanced options in the toolbar
2023-09-21 20:03:47 -03:00
anovazzi1
b18a91deb0 code format 2023-09-21 19:23:53 -03:00
anovazzi1
187724342f update message format to put api-key as header 2023-09-21 19:23:53 -03:00
igorrCarvalho
ac67fff000 Refactor: Make changes to api_key only show up in codetabs when authenticated 2023-09-21 19:23:53 -03:00
igorrCarvalho
b1ef10e79b Refactor: update Code Tabs PopUp with api_key 2023-09-21 19:23:53 -03:00
igorrCarvalho
7cead25c8b Remove console.log 2023-09-21 19:07:50 -03:00
igorrCarvalho
2c2197ecad Refactor: Make minimize button show up in the More button popup 2023-09-21 19:06:30 -03:00
igorrCarvalho
b7b7a93cdd formated code 2023-09-21 15:20:36 -03:00
igorrCarvalho
e4ba7364bb merge dev into feat-more 2023-09-21 15:17:08 -03:00
Gabriel Luiz Freitas Almeida
0555c6a371 🔀 refactor(base.py): process graph data before building the graph to ensure consistency and correctness
🔀 refactor(base.py): update nodes and edges after processing graph data to reflect changes in the graph structure
2023-09-21 14:51:13 -03:00
Gabriel Luiz Freitas Almeida
aaaa21b5cb 🐛 fix(test_prompts_template.py): set "dynamic" property to True for input_variables, output_parser, partial_variables, template, template_format, and validate_template to enable dynamic behavior in prompt templates 2023-09-21 14:45:27 -03:00
Gabriel Luiz Freitas Almeida
3ea079e562 🚀 feat: add Basic Chat with Prompt and History node
ℹ️ This commit adds a new node called "Basic Chat with Prompt and History" to the project. This node is a simple chat implementation with a custom prompt template and a conversational memory buffer.

The node has the following properties:
- Width: 384
- Height: 621
- ID: ChatOpenAI-N0ogT
- Type: genericNode
- Position: {x: 148.32546232493678, y: 675.5574028128048}

The node contains various configuration options for the ChatOpenAI component, including:
- Callbacks: A list of callback handlers
- Cache: A boolean indicating whether to use caching
- Client: An optional client object
- Max retries: The maximum number of retries
- Max tokens: The maximum number of tokens for the chat response (password field)
- Metadata: Additional metadata for the chat
- Model kwargs: Advanced model configuration options
- Model name: The name of the model to use (options: gpt-3.5-turbo-0613, gpt-3.5-turbo, gpt-3.5-turbo-16k-0613, gpt-3.5-turbo-16k, gpt-4-0613, gpt-4-32k-0613, gpt-4, gpt-4-32k)
- N: The number of chat responses to generate
- OpenAI API Base: The base URL of the OpenAI API
- OpenAI API Key: The API key for the OpenAI API

This node allows for creating a basic chat interface with customizable prompts and a history buffer for maintaining conversation context.

🔧 chore: update OpenAI Chat large language models API configuration
📝 docs: update documentation link for OpenAI Chat large language models API

🔧 chore: update prompt template for language model to fix formatting issue

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

The grouped_chat.json file is added to the tests/data directory. This file contains a large JSON object representing a grouped chat. It is used for testing purposes.

🚀 feat(test_graph.py): add new tests and fixtures to improve test coverage and ensure correctness of graph module functions
🐛 fix(test_graph.py): fix incorrect function name in test_find_last_node
🔧 chore(test_graph.py): refactor test_get_node_neighbors_complex to be commented out for now, as it is incomplete and causing test failures
2023-09-21 14:45:16 -03:00
Gabriel Luiz Freitas Almeida
7b90c6a61f 📦 chore(conftest.py): add fixture and example file for grouped chat JSON data
🔧 refactor(conftest.py): rename fixture `json_flow` to `openapi_json_flow` for better clarity and consistency
2023-09-21 14:44:34 -03:00
Gabriel Luiz Freitas Almeida
72f64caa41 🐛 fix(base.py): import process_flow function to fix NameError in Graph class
 feat(utils.py): add process_flow function to recursively process and ungroup nodes in a flow object
2023-09-21 14:44:10 -03:00
Gabriel Luiz Freitas Almeida
6ec51a0d22 🔀 refactor(endpoints.py): rename process_flow function to process for better naming consistency and clarity 2023-09-21 14:43:47 -03:00
Gabriel Luiz Freitas Almeida
ddd480fb23 🐛 fix(tabsContext.tsx): handle null or undefined flow.description to prevent potential errors 2023-09-21 12:57:08 -03:00
Cristhian Zanforlin Lousa
610e94759a 🐛 fix(api.tsx): update Authorization header to use access_token from cookies instead of accessToken variable to fix authentication issue 2023-09-21 11:50:01 -03:00
anovazzi1
8f01f5c838 chore(example.spec.ts): remove example.spec.ts test file
The example.spec.ts test file was removed as it is no longer needed.
2023-09-21 11:02:37 -03:00
anovazzi1
d9073aba39 refactor(tabsContext.tsx): rename processFlowEdges and processFlowNodes functions to processDataFromFlow to improve clarity and consistency
refactor(tabsContext.tsx): remove console.log statement for old edges
refactor(tabsContext.tsx): add comments to indicate updating edges colors and baseclasses in edges
refactor(tabsContext.tsx): add comments to indicate updating baseclasses in edges
refactor(tabsContext.tsx): add comments to indicate adding animation to text type edges
refactor(tabsContext.tsx): update updateIds function to handle GroupNode type nodes
refactor(reactflowUtils.ts): update updateIds function to handle GroupNode type nodes
refactor(reactflowUtils.ts): update updateIds function to handle sourceHandle and targetHandle ids in edges
2023-09-21 10:56:50 -03:00
igorrCarvalho
3cbe046e08 Refactor: Disable signUp button when form is invalid 2023-09-21 10:54:20 -03:00
anovazzi1
bf1597a9f4 refactor(tabsContext.tsx): simplify code in TabsProvider component
The changes in this commit simplify the code in the TabsProvider component in the tabsContext.tsx file. Here's a summary of the changes:

- In the `createNewFlow` function, the `flowData` parameter is now of type `ReactFlowJsonObject | null` instead of `{ data: ReactFlowJsonObject | null; description: string }`. This simplifies the function signature and removes the need for destructuring the `flowData` object.
- The `extractDataFromFlow` function has been renamed to `processDataFromFlow` to better reflect its purpose. The function now returns only the `data` property from the `flow` object instead of an object with `data` and `description` properties.
- The `description` property in the `createNewFlow` function is now set to `flow.description ?? getRandomDescription()`. This ensures that if the `flow` object has a `description` property, it is used, otherwise a random description is generated.
- The `processFlowEdges` and `processFlowNodes` functions are no longer called in the `createNewFlow` function. It seems that these functions are defined elsewhere and are not necessary in this context.

These changes simplify the code and improve readability by removing unnecessary checks and simplifying function signatures.
2023-09-21 10:30:59 -03:00
anovazzi1
577046523a fix(tabsContext.tsx): change parameter type of newProject in uploadFlow function from optional boolean to required boolean to improve clarity and prevent potential bugs
fix(tabsContext.tsx): change parameter type of newProject in addFlow function from optional Boolean to required Boolean to improve clarity and prevent potential bugs
fix(extraSidebarComponent/index.tsx): change argument of uploadFlow function from undefined to false to fix a bug where uploadFlow was not being called correctly
fix(tabs/index.ts): change parameter type of newFlow in uploadFlow function from optional boolean to required boolean to improve clarity and prevent potential bugs
2023-09-21 10:08:12 -03:00
Gabriel Luiz Freitas Almeida
c10b9927e1
Release 0.4.21 (#950) 2023-09-21 10:05:31 -03:00
Gabriel Luiz Freitas Almeida
1bb9b1c363
Bump version to 0.4.21 (#949) 2023-09-21 10:02:40 -03:00
Gabriel Luiz Freitas Almeida
f6ea541477 🔧 chore(Makefile): update mypy command to exclude .venv folder and only check files in ./src/backend/langflow directory 2023-09-21 10:01:37 -03:00
Gabriel Luiz Freitas Almeida
81e8a0dcc6 📦 chore(pyproject.toml): update langchain dependency to version 0.0.271 for improved functionality
🐛 fix(test_llms_template.py): update description of model["description"] to match the correct format
2023-09-21 09:59:53 -03:00
Gabriel Luiz Freitas Almeida
9920bfd7e0
🔧 chore(langfuse.py): add support for configurable Langfuse host to improve flexibility and maintainability (#948)
Closes #947
2023-09-21 06:42:50 -03:00
Gabriel Luiz Freitas Almeida
1ebf4e5b24 🔧 chore(langfuse.py): add support for configurable Langfuse host to improve flexibility and maintainability 2023-09-21 06:41:23 -03:00
Gabriel Luiz Freitas Almeida
4c6cd57a1f
fix(util.py): fix IndentationError while parsing from source code. (#944) 2023-09-21 06:28:49 -03:00
anovazzi1
fbb6f0839a skip groupNode from node update 2023-09-20 23:22:17 -03:00
anovazzi1
7bc3f9ed30 skip groupNode from node update 2023-09-20 23:19:53 -03:00
anovazzi1
8a416c235b
Expand floatComponent Input Range (#889)
As detailed in OpenAI's documentation and GitHub issue #884, two float
fields in OpenAI have a range of -2 to 2.
For reference, visit:

Presence Penalty:
https://platform.openai.com/docs/api-reference/chat/create#presence_penalty
Frequency Penalty:
https://platform.openai.com/docs/api-reference/chat/create#frequency_penalty
Currently, FloatComponent only accepts values within [0-1]. This pull
request expands its range to [-2 to 2].
2023-09-20 23:14:30 -03:00
anovazzi1
0fe70a8347
Front tests (#945)
finish tests for login
2023-09-20 22:59:00 -03:00
anovazzi1
55b71605ea login tests finished 2023-09-20 22:57:37 -03:00
anovazzi1
21605d09ba test(login.spec.ts): add test case to check if clicking on "Community Examples" button displays the community pages flows panel 2023-09-20 20:49:07 -03:00
anovazzi1
c6f6d69164 fix(login.spec.ts): update test description to be more specific and descriptive
feat(login.spec.ts): add test case for successful login with mocked API response
2023-09-20 20:48:14 -03:00
anovazzi1
b2f14793e3 migrate progress and install playwrite 2023-09-20 19:53:25 -03:00
Gabriel Luiz Freitas Almeida
4aaeda8aa8 🔥 refactor(main.py): remove unused import and initialize_database function call to improve code cleanliness and remove unnecessary database initialization
🔥 refactor(main.py): remove initialize_database function call from app startup event to improve code cleanliness and remove unnecessary database initialization
🔥 refactor(base.py): remove unused teardown method and add set_ready method to improve code cleanliness and provide a way to set service readiness
2023-09-20 18:44:39 -03:00
Gabriel Luiz Freitas Almeida
f5c20ac166 🐛 fix(manager.py): call set_ready() method on the created service to indicate it is ready
🐛 fix(auth.py): validate superuser and superuser_password fields if AUTO_LOGIN is true
 feat(utils.py): add initialize_database() function to initialize the database connection
 feat(utils.py): call initialize_database() before setting up the superuser if the database manager is ready
2023-09-20 18:42:52 -03:00
Gabriel Luiz Freitas Almeida
4bfbb8d3aa 🔧 fix(conftest.py): remove unused imports and commented out code to improve code readability and maintainability
 feat(conftest.py): add support for LANGFLOW_AUTO_LOGIN environment variable to enable auto login during testing
2023-09-20 18:42:18 -03:00
Gabriel Luiz Freitas Almeida
2db9fa8ce8 🔧 chore(Makefile): add install_backend target to tests target to ensure backend dependencies are installed before running tests 2023-09-20 18:41:41 -03:00
Gabriel Luiz Freitas Almeida
20e14d49b4 🐛 fix(test_database.py): remove unused imports to improve code readability
 feat(test_database.py): add support for session management using session_getter to improve code organization and maintainability
🐛 fix(test_endpoints.py): remove unused imports to improve code readability
 feat(test_endpoints.py): add support for session management using session_getter to improve code organization and maintainability
🐛 fix(test_login.py): remove unused imports to improve code readability
 feat(test_login.py): add support for session management using session_getter to improve code organization and maintainability
2023-09-20 18:40:19 -03:00
Gabriel Luiz Freitas Almeida
b441d42559 🐛 fix(test_setup_superuser.py): fix test_setup_superuser to correctly assert the number of calls to mock_create_super_user
 feat(test_setup_superuser.py): add support for testing the creation of superuser with different credentials
2023-09-20 18:36:12 -03:00
Gabriel Luiz Freitas Almeida
b4f48f1ad9 🔧 fix(test_user.py): update imports to match changes in project structure
🔧 fix(test_user.py): update fixtures to use session_getter and get_db_manager functions for session management
 feat(test_user.py): add support for creating and managing database sessions using session_getter and get_db_manager functions
🔧 fix(test_user.py): update test_user_waiting_for_approval function to use session_getter and get_db_manager functions for session management
🔧 fix(test_user.py): update test_data_consistency_after_delete function to use session_getter and get_db_manager functions for session management
🔧 fix(test_user.py): update test_inactive_user function to use session_getter and get_db_manager functions for session management
2023-09-20 18:35:38 -03:00
anovazzi1
2459833b87
Feat: Introducing Node Minimization Feature (#906)
This pull request introduces a new feature that enhances the usability
and organization of our application's flow. We've added a convenient
"Minimize Node" button, empowering users to declutter their workspace
with a single click. This feature allows users to focus on the most
relevant nodes, resulting in a more efficient and visually pleasing
workflow.
2023-09-20 18:21:37 -03:00
anovazzi1
238dbf1b5f format code 2023-09-20 18:20:43 -03:00