Commit graph

11,619 commits

Author SHA1 Message Date
Lucas Oliveira
06a568f114 Disabled accordion when it is empty 2024-06-02 23:55:20 -03:00
Lucas Oliveira
3b8e72ff1a Removed shadow from card 2024-06-02 23:18:24 -03:00
Lucas Oliveira
22775cc005 Added description column to advanced tab 2024-06-02 23:16:04 -03:00
Lucas Oliveira
6e5530336c Merge remote-tracking branch 'origin/dev' into fix/minor_bugs 2024-06-02 23:00:27 -03:00
ogabrielluiz
758d6af7ef refactor: Update factory_restart_space.py to use environment variable for Hugging Face API token
The factory_restart_space.py script has been updated to use the value of the HUGGINFACE_API_TOKEN environment variable for the HfApi client token. This change improves security by avoiding hardcoding the token in the script and allows for flexibility in different environments.

Note: The commit message has been generated based on the provided code changes and recent commits.
2024-06-02 20:36:59 -03:00
ogabrielluiz
7fb5644a87 refactor: Update langflow custom imports and base classes
This commit updates the langflow custom imports and base classes in the code. It adds the "Component" import and base class to the langflow custom __init__.py file. It also updates the langflow template __init__.py file to include the "Input", "Output", "FrontendNode", and "Template" imports and base classes. Additionally, it modifies the langflow base ChatComponent class to inherit from the Component class. These changes improve the organization and functionality of the langflow custom and template modules.

Note: The commit message has been generated based on the provided code changes and recent commits.
2024-06-02 20:35:59 -03:00
anovazzi1
f3922dfff6 refactor: Move editable attribute to TableComponent
add update function, need to fix backend
2024-06-02 19:38:33 -03:00
anovazzi1
1a65af7602 move editable attribute to table Component 2024-06-02 18:07:45 -03:00
anovazzi1
bca88b2d1b fix api reference of FlowPool 2024-06-02 17:33:55 -03:00
Rodrigo
aca541e97b Default temperature parameter enhancement 2024-06-01 23:34:08 -03:00
anovazzi1
729150a5a4 refactor(headerMessages): update text content in HeaderMessagesComponent 2024-05-31 22:40:53 -03:00
Lucas Oliveira
82dead782d Fixed border on top of input when image is present 2024-05-31 22:02:11 -03:00
Lucas Oliveira
d2cb5452c9 Fixed scrolling not working in global variables dropdown 2024-05-31 21:24:12 -03:00
Lucas Oliveira
ba779d5ad0 Fixed save with my api keys coming as default 2024-05-31 21:15:44 -03:00
Lucas Oliveira
58008015f5 Implemented unselect on escape 2024-05-31 21:07:00 -03:00
Lucas Oliveira
81f61201be Merge remote-tracking branch 'origin/dev' into fix/minor_bugs 2024-05-31 20:55:38 -03:00
italojohnny
6726960b28 change return to dict for token cases 2024-05-31 19:28:00 -03:00
italojohnny
d68e5a1143 return artifact values into log to frontend 2024-05-31 19:28:00 -03:00
italojohnny
b67ef6ea72 retrieve and store artifact values 2024-05-31 19:28:00 -03:00
italojohnny
a5f9ec0339 add function to determine artifact type 2024-05-31 19:28:00 -03:00
italojohnny
be03ef094d fix stream 2024-05-31 19:28:00 -03:00
anovazzi1
1d06969364 Merge remote-tracking branch 'origin/ic/flow_eraser_dropdown' into SessionManagment 2024-05-31 17:47:08 -03:00
anovazzi1
f1555c41d5 refactor: remove console.log statement and update condition for displaying "NO OUTPUT" message 2024-05-31 17:44:29 -03:00
Gabriel Luiz Freitas Almeida
fce2ca3a9c
Update docker-build.yml 2024-05-31 13:43:16 -07:00
anovazzi1
300be557c2 feat(frontend): add ErrorOutput component to display error messages in output modal
feat(frontend): update SwitchOutputView to render ErrorOutput component for 'ValueError'
fix(frontend): update BaseModal header text in OutputModal component
fix(frontend): update displayOutputPreview logic in ParameterComponent to check for specific log type
2024-05-31 17:42:47 -03:00
cristhianzl
34677b6d3f 🐛 (index.tsx): handle 'valueError' resultType in SwitchOutputView component to display 'NO OUTPUT' for error cases 2024-05-31 16:33:09 -03:00
cristhianzl
87323adaa8 ♻️ (index.tsx): remove console.log statement and update condition for displaying "NO OUTPUT" message 2024-05-31 16:31:03 -03:00
ogabrielluiz
1fa3a6a379 Merge branch 'feature/output_dropdown' into fix_build_fe 2024-05-31 16:25:43 -03:00
anovazzi1
513046caba refactor: Update new output creation logic in reactflowUtils.ts 2024-05-31 16:14:09 -03:00
anovazzi1
4727cae10e fix backward compability 2024-05-31 16:09:41 -03:00
Gabriel Luiz Freitas Almeida
0b584fe731
refactor: Update getCurlRunCode function to export it as a named export (#2037)
The getCurlRunCode function in get-curl-code.tsx has been updated to export it as a named export instead of the default export. This change improves the code organization and allows for better import statements in other modules.

Note: The commit message has been generated based on the provided code changes and recent commits.
2024-05-31 11:21:51 -07:00
ogabrielluiz
20af601ad7 refactor: Update getCurlRunCode function to export it as a named export
The getCurlRunCode function in get-curl-code.tsx has been updated to export it as a named export instead of the default export. This change improves the code organization and allows for better import statements in other modules.

Note: The commit message has been generated based on the provided code changes and recent commits.
2024-05-31 15:21:02 -03:00
Gabriel Luiz Freitas Almeida
5e2f4b8f83
Add webhook endpoint, and other fixes (#1766)
* Update FastAPI app configuration in main.py

* Add webhook endpoint

* Add Observer model and related changes to database models

* Update refresh button text in ParameterComponent

* Update database models and main.py, and add webhook endpoint and utils for flow model

* Add WebhookComponent to langflow data components

* Update webhook component names in flow data and remove unused code in edge/base.py and graph/base.py

* 🐛 (endpoints.py): fix an issue where the user_id was not being correctly assigned based on the api_key_user or flow object

* 📝 (endpoints.py): Update documentation for the webhook_run_flow endpoint to provide clearer information on its purpose, arguments, and return value. Remove outdated request JSON structure and example request sections. Add information on the arguments and exceptions raised for better clarity.

* chore: Remove unnecessary trailing commas in code files

* feat: Add yield statement to get_lifespan function

* feat: Update webhook columns revision ID

* Refactor import statements for OpenAI conversational agent

* refactor(constants.ts): remove unused tabsArray function and update function name to createTabsArray for clarity
feat(constants.ts): add support for including webhook code in tabs array based on flow webhook property
feat(index.tsx): update function calls to use new createTabsArray function and include webhook code in tabs array based on flow webhook property

refactor(utils.ts): remove trailing commas in function parameters to improve code consistency and readability
feat(utils.ts): add support for including webhook cURL code and tweaks code in tabs array creation for better code organization and presentation

* chore: Update folder_id parameter type to str in API endpoints

* feat: Handle invalid JSON payload in WebhookComponent

The code changes in `Webhook.py` modify the `build` method of the `WebhookComponent` class. If an invalid JSON payload is provided, instead of raising a `ValueError`, the code now handles the exception by creating a default payload with the provided data. The commit also includes a message that describes the invalid JSON payload for better error tracking.

Note: This commit message follows the convention used in the recent user commits.

* refactor: Remove unnecessary code in main.py

* refactor: Update Alembic revision IDs for webhook columns

The Alembic revision IDs for adding webhook columns have been updated to reflect the latest changes. This ensures consistency and proper tracking of the database schema modifications.

Note: The commit message has been generated based on the provided code changes and recent commits.

* 🐛 (endpoints.py): Fix handling of flow_id_or_name variable to correctly identify flow ID or endpoint name for running a flow. Improve error handling for invalid UUID strings and flow not found scenarios.

* refactor: Handle invalid JSON payload in WebhookComponent

The code changes in `Webhook.py` modify the `build` method of the `WebhookComponent` class. If an invalid JSON payload is provided, instead of raising a `ValueError`, the code now handles the exception by creating a default payload with the provided data.

* refactor: Update get_flow_by_id function to handle None flow_id parameter

The get_flow_by_id function in utils.py has been updated to handle the case where the flow_id parameter is None. Previously, the function would raise an exception if flow_id was not provided. Now, if flow_id is None, the function returns None instead of querying the database. This change improves the robustness of the function and allows for more flexible usage.

Note: The commit message has been generated based on the provided code changes and recent commits.

* 📝 (endpoints.py): Add import statement for get_flow_by_id_or_endpoint_name function
📝 (flow.py): Add get_flow_by_id_or_endpoint_name function to retrieve a Flow object by ID or endpoint name

* refactor: Update get_flow_by_id_or_endpoint_name function to handle None flow_id parameter

* 🐛 (flow.py): replace ValueError with HTTPException to return a 404 status code when flow identifier is not found

* refactor: Update error message for flow identifier not found

The code changes in `test_endpoints.py` update the error message when a flow identifier is not found. Previously, the error message referenced the flow ID directly, but now it uses the more generic term "Flow identifier" to account for cases where the identifier could be an endpoint name. This change improves the clarity and flexibility of the error message.

Note: This commit message has been generated based on the provided code changes and recent commits.

* 🔧 (endpoints.py): remove unnecessary flow_id_or_name parameter from the simple_run_flow function call to improve code readability and maintainability
2024-05-31 11:02:06 -07:00
ogabrielluiz
1f8d0eb1c0 chore: Update package versions in pyproject.toml files
The package versions in the pyproject.toml files for "langflow" and "langflow-base" have been updated. The version of "langflow" was changed from 1.0.0a42 to 1.0.0a43, and the version of "langflow-base" was changed from 0.0.53 to 0.0.54. This update ensures that the latest versions of the packages are being used in the codebase.

Note: The commit message has been generated based on the provided code changes and recent commits.
2024-05-31 14:35:07 -03:00
cristhianzl
57c38acace 💡 (schemas.py): add newline at end of file to follow PEP 8 guidelines 2024-05-31 13:43:41 -03:00
cristhianzl
602ebf7b15 (monitor.py): add MessageIds schema for structured message deletion
♻️ (monitor.py): change delete_messages endpoint to POST for better semantics
♻️ (monitor.py): update delete_messages to use MessageIds schema
 (schemas.py): add MessageIds schema for structured message deletion
🐛 (service.py): fix SQL query in delete_messages to use correct column name
 (index.tsx): add toTitleCase utility to format column headers
 (API/index.ts): add deleteMessagesFn to handle message deletion via API
 (headerMessages): add HeaderMessagesComponent for message management UI
 (use-messages-table): add useMessagesTable hook to fetch and manage messages
 (use-remove-messages): add useRemoveMessages hook to handle message deletion

♻️ (messagesPage): refactor messages page to use new messages store
 (messagesStore): create zustand store for managing messages state
 (types): add types for messages and zustand messages store
2024-05-31 13:43:28 -03:00
Mendon Kissling
1a569a4cb7
Update README.md (#2036)
For clarity in Python version.
2024-05-31 12:15:51 -04:00
Mendon Kissling
139a3f254f
Update README.md
For clarity in Python version.
2024-05-31 11:55:54 -04:00
ogabrielluiz
a3a09fed3b refactor: Fix serialize_datetime function in model.py 2024-05-31 11:41:17 -03:00
ogabrielluiz
031b82c665 refactor: Update serialize_datetime function in model.py 2024-05-31 11:25:36 -03:00
ogabrielluiz
82404d1ed9 refactor: Update serialize_datetime function in model.py
The serialize_datetime function in model.py has been updated to handle the "updated_at" and "created_at" fields. The function now converts datetime values to ISO 8601 format with timezone information. This change ensures consistent serialization of datetime values in the codebase.

Note: The commit message has been generated based on the provided code changes and recent commits.
2024-05-31 11:22:40 -03:00
ogabrielluiz
f705995311 refactor: Update new output creation logic in reactflowUtils.ts
Simplify the logic for creating new output fields in the `updateNewOutput` function of `reactflowUtils.ts`. Instead of mapping over the `outputTypes` array, directly assign a new output field to `sourceNode.data.node!.outputs`. The new output field includes the `outputTypes` as `types`, sets `selected` based on the `selected` variable, and sets `name` as a string representation of `outputTypes` joined with " | ". This change improves the clarity and efficiency of the code.
2024-05-31 10:30:25 -03:00
ogabrielluiz
f79289f966 feat: Add API endpoints for managing messages
This commit adds new API endpoints for managing messages. It includes the ability to delete messages by their IDs, update a specific message, and delete all messages associated with a session. These changes are implemented in the `monitor.py`, `schema.py`, and `service.py` files.
2024-05-31 09:38:05 -03:00
ogabrielluiz
b7de1ff3bd feat: Add ComponentFrontendNode to CustomComponent
This commit adds the `ComponentFrontendNode` class to the `CustomComponent` module. The `ComponentFrontendNode` class defines a new frontend node for the `Component` type. It includes a template with a code input field. This change enhances the functionality and flexibility of the `CustomComponent` module.
2024-05-31 09:25:48 -03:00
ogabrielluiz
b0432c3802 feat: Add set_attributes method to CustomComponent
This commit adds the set_attributes method to the CustomComponent class in the custom_component.py file. The set_attributes method allows for setting attributes of the CustomComponent instance based on a dictionary of key-value pairs. This change enhances the flexibility and configurability of the CustomComponent class.
2024-05-30 23:05:41 -03:00
ogabrielluiz
98a09174d9 refactor: Add __bool__ method to CacheMiss class
This commit adds the __bool__ method to the CacheMiss class in the utils.py file. The __bool__ method returns False, allowing the CacheMiss object to be treated as False in boolean expressions. This change improves the functionality and usability of the CacheMiss class.
2024-05-30 22:52:53 -03:00
ogabrielluiz
230c4a69ed feat: update template and custom component to load inputs and outputs 2024-05-30 22:47:29 -03:00
ogabrielluiz
5dae23bcb1 feat: Update get_all endpoint to use async/await
This commit updates the `get_all` endpoint in the `endpoints.py` file to use `async` and `await` keywords. By making the `get_all` function asynchronous, it allows for better performance and responsiveness when retrieving all types from the langchain. This change improves the overall efficiency of the codebase.
2024-05-30 22:46:49 -03:00
ogabrielluiz
ff489cb1f5 feat: Add MultipleOutputsComponent to CustomComponent
This commit adds the `MultipleOutputsComponent` class to the `CustomComponent` module. The `MultipleOutputsComponent` class defines multiple inputs and outputs for the component. The `inputs` field includes an input for a string and an input for a number. The `outputs` field includes an output for a certain output and an output for another output. This change enhances the functionality and flexibility of the `CustomComponent` module.
2024-05-30 22:45:58 -03:00
ogabrielluiz
709082f2f0 feat: Update title in GenericNode component
This commit updates the title in the GenericNode component to use the `name` property instead of the `selected` or `types[0]` properties. This change improves the accuracy and clarity of the code.
2024-05-30 22:45:44 -03:00