Commit graph

10,603 commits

Author SHA1 Message Date
cristhianzl
d670ec8d64 🐛 (service.py): add missing 'id' column in SQL query to fix data retrieval issue
💡 (service.py): add print statement for debugging SQL query
♻️ (index.tsx): reorder imports for better readability and maintainability

♻️ (flowStore.ts): remove trailing commas to improve code consistency and readability

💡 (index.ts, storeUtils.ts): format type definitions for better readability
2024-06-03 18:17:15 -03:00
cristhianzl
895df8c050 ♻️ (monitor.py, service.py): remove trailing whitespace to improve code cleanliness 2024-06-03 17:05:50 -03:00
cristhianzl
0e56617e26 ♻️ (monitor.py): refactor update_message to return MessageModelResponse
♻️ (service.py): update SQL query to use index instead of id
♻️ (api.tsx): refactor duplicate request check logic
 (check-duplicate-requests.ts): add helper to check and store duplicate requests
🐛 (messagesStore.ts): fix message update logic to use index instead of id
2024-06-03 17:05:39 -03:00
anovazzi1
41c2d7feb5 start history in playgroundModal 2024-06-03 14:48:05 -03:00
cristhianzl
93568b4c0d (tableComponent): add editable prop to TableComponent for column editing
 (API): add updateMessageApi function to update messages via API
 (chatView): add select dropdown for clearing builds and sessions
♻️ (use-messages-table): refactor to use messages store for setting messages
♻️ (use-remove-messages): remove setRows and use messages store for deletion
 (use-updateMessage): add hook for updating messages with API integration
📝 (headerMessages): update header message text in messages page

 (messagesPage): add cell edit request handling for message updates
♻️ (messagesPage): refactor state management and hooks usage
 (types): add new types for chat and message handling
2024-06-03 10:31:46 -03:00
cristhianzl
21a8545ddb ♻️ (monitor.py): change POST to DELETE for delete_messages endpoint
♻️ (schemas.py): remove unused MessageIds schema
♻️ (api.tsx): add missing commas in ApiInterceptor function
🐛 (api.tsx): fix duplicate request check to include method "get"
♻️ (index.ts): change deleteMessagesFn to use DELETE method instead of POST
♻️ (use-remove-messages.tsx): clean up comments and improve error handling
2024-06-03 10:29:58 -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
729150a5a4 refactor(headerMessages): update text content in HeaderMessagesComponent 2024-05-31 22:40:53 -03:00
anovazzi1
1d06969364 Merge remote-tracking branch 'origin/ic/flow_eraser_dropdown' into SessionManagment 2024-05-31 17:47:08 -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
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
anovazzi1
a99d0c7eb0 refactor(tableComponent): update column definitions to include checkbox selection logic for first column
feat(API): add support for excluding specific columns in getMessagesTable function

fix(flowLogsModal): pass excludedFields parameter to getMessagesTable function

refactor(GlobalVariablesPage): remove unnecessary checkbox selection properties from column definitions

fix(messagesPage): pass excludedFields parameter to getMessagesTable function

refactor(utils): add support for excluding specific columns in extractColumnsFromRows function
2024-05-29 17:48:12 -03:00
anovazzi1
022ef7c028 feat: Add Messages page to SettingsPage
Refactor the SettingsPage component to include a new "Messages" page. This page will be accessible through the "/settings/messages" route and will display messages related to user settings. The necessary changes have been made to the index.tsx file of the SettingsPage component and the routes.tsx file.
2024-05-29 17:15:21 -03:00
ogabrielluiz
6e9b5661c8 feat: Update langflow-base to version 0.0.53 and langflow to 1.0.0a42 2024-05-29 11:07:10 -03:00
Gabriel Luiz Freitas Almeida
92a11b7ce4
Fixed Ollama base url handling and Qdrant component (#2007)
This pull request includes several code refactorings to improve the
readability and maintainability of the codebase. The changes include
reordering and organizing the initialization parameters in the
QdrantComponent class, removing unused imports and cleaning up code
formatting in the OllamaModel.py file, updating comments and docstrings
for clarity and consistency in the OllamaModel.py file, and refactoring
the logic for setting the base URL in the get_model method of the
OllamaModel.py file to improve maintainability and readability. These
changes aim to make the codebase more organized and easier to understand
for future development and maintenance.
2024-05-29 06:40:17 -07:00
ogabrielluiz
32e8da3bf4 ♻️ (OllamaModel.py): Remove unused imports and clean up code formatting for better readability
📝 (OllamaModel.py): Update comments and docstrings for clarity and consistency
🔧 (OllamaModel.py): Refactor the logic for setting the base URL in the get_model method to improve maintainability and readability
2024-05-29 10:33:12 -03:00
ogabrielluiz
642acf8172 ♻️ (Qdrant.py): refactor QdrantComponent class to improve code readability and maintainability by reordering and organizing the initialization parameters. 2024-05-29 10:09:45 -03:00
ogabrielluiz
f9026ba8f6 build(pre-release.yml): dynamically set artifact name based on release type input to ensure correct artifact is downloaded 2024-05-28 22:08:49 -03:00
ogabrielluiz
861955bebe chore: Update dependencies to latest versions 2024-05-28 21:52:31 -03:00
Gabriel Luiz Freitas Almeida
36a6d8d23a
chore: Add domain attribute to cookies in login.py and auth.py (#2003) 2024-05-28 17:45:52 -07:00
ogabrielluiz
2a2483d0ee chore: Add domain attribute to cookies in login.py and auth.py 2024-05-28 21:45:29 -03:00
ogabrielluiz
a112d72fc1 chore: Update docker volume mount path for langflow-data in pre.docker-compose.yml 2024-05-28 20:46:46 -03:00
ogabrielluiz
8bc241267d chore(create-release.yml): remove unnecessary version check step to simplify workflow and improve readability 2024-05-28 19:47:46 -03:00
ogabrielluiz
969ac6eb49 chore(create-release.yml): Update Poetry version to 1.8.2 2024-05-28 19:44:50 -03:00
ogabrielluiz
9df2dc72ac chore(create-release.yml): add 'needs: release' to ensure the 'create_release' job runs after the 'release' job 2024-05-28 19:43:07 -03:00
ogabrielluiz
546dd3dbdf feat(create-release.yml): add support for building and uploading different project versions based on release type (base or main) to streamline release process 2024-05-28 19:40:03 -03:00
ogabrielluiz
ce797dbfa0 chore(create-release.yml): update workflow name to 'pre-release.yml' for consistency and clarity 2024-05-28 19:32:54 -03:00
ogabrielluiz
4f684c851c chore(create-release.yml): update action to download artifact to dawidd6/action-download-artifact@v3 for compatibility with workflow Langflow Pre-release (Unified) and add github_token and workflow inputs for authentication and artifact retrieval. 2024-05-28 19:28:42 -03:00
ogabrielluiz
8902b6d09e chore(create-release.yml): rename job name to 'Create Release Job' for clarity
chore(create-release.yml): rename step name to 'Download Artifact' for better readability
chore(create-release.yml): rename step name to 'Create Release Notes' for better understanding of the action's purpose
2024-05-28 19:24:52 -03:00
ogabrielluiz
6e9e67d5c6 chore(pre-release.yml): remove unnecessary dependency on 'call_docker_build' job for 'create_release' job when release_type is 'main' to simplify workflow logic 2024-05-28 19:00:26 -03:00
ogabrielluiz
8d1295b5a1 fix(pre-release.yml): update artifact path based on release type to correctly upload artifacts for different release types 2024-05-28 18:53:19 -03:00
ogabrielluiz
25767de60d refactor: Update version numbers in pyproject.toml files 2024-05-28 18:46:31 -03:00
ogabrielluiz
9965f9a31a feat: Add release_type input to create-release workflow 2024-05-28 18:44:01 -03:00
ogabrielluiz
6070bbb8fc feat(create-release.yml): add GitHub Actions workflow to create a release with version input and release notes generation 2024-05-28 18:38:58 -03:00
Gabriel Luiz Freitas Almeida
482ac3fbfc
Refactor base.py and Dockerfile, and folder column migration (#2002)
* refactor(base.py): handle ImportError when importing is_pre_release function from langflow.version module to prevent crashing the application
feat(base.py): dynamically determine if the version is a pre-release version by checking for 'a', 'b', or 'rc' in the version number

* fix(Dockerfile): add missing backslash to ensure proper chaining of commands

* refactor: Update get_lifespan function to handle ImportError and dynamically determine the version number

The get_lifespan function in main.py has been updated to handle ImportError when importing the __version__ attribute from the langflow.version module. If the import fails, the version number is dynamically determined using the importlib.metadata.version function. This change ensures that the application does not crash when the langflow.version module is not available.

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

* chore: Add langflow-pre.db and langflow.db to .dockerignore

* chore: Update .dockerignore to include langflow-pre.db and langflow.db

* refactor: Add folder_id column to flow table and handle folder column migration

This commit adds the folder_id column to the flow table in the database. It also handles the migration of the folder column to the new folder_id column. This change allows for better organization and management of flows within folders.

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

* refactor: Update Dockerfiles to include user creation and environment variable

This commit updates the Dockerfiles to include the creation of a user with UID 1000 and the necessary permissions for the /app/langflow directory. It also adds the user's local bin directory to the PATH environment variable. This change improves the security and isolation of the application within the container.

Note: This commit message follows the convention used in the recent user commits.
2024-05-28 14:27:02 -07:00
Gabriel Luiz Freitas Almeida
6d849b449e
update call_docker_build job (#2001)
* refactor: Update SplitTextComponent to store parent and text data in Record object

* chore(pre-release.yml): update call_docker_build job to use langflow-ai/langflow/.github/workflows/docker-build.yml@dev for better workflow organization and consistency

* merge dev
2024-05-28 13:24:12 -07:00
Gabriel Luiz Freitas Almeida
f694f0716f
Fixed freeze implementation (#1983)
* chore: Update utils imports and add cn to nodeToolbarComponent

* fix(utils.py): change key parameter name from 'flow_id' to 'key' for consistency
fix(chat.py): remove unused import 'functools.partial' to improve code readability
refactor(chat.py): remove 'set_cache_coro' partial function and pass 'chat_service' directly to 'build_vertex' method for better code organization
feat(schemas.py): add 'used_frozen_result' field to ResultDataResponse and ResultData classes with default value of False for better tracking of frozen result usage
feat(base.py): add 'chat_service' parameter to 'build_vertex' method in Graph class to allow passing ChatService instance for cache operations
feat(base.py): update 'build_vertex' method in Graph class to handle caching of frozen vertices and set 'used_frozen_result' flag in ResultData class
feat(cache/service.py): change parameter name from 'flow_id' to 'key' in 'set_cache' and 'get_cache' methods for consistency
feat(cache/utils.py): add 'CacheMiss' class to represent cache miss situations for better error handling

* feat: Add check for None before setting 'used_frozen_result' flag in Graph class

* feat: Add frozen effect to buttons and improve code organization

The code changes introduce a frozen effect to buttons by adding new CSS classes and styles. This effect is achieved by applying borders, shadows, and background colors. Additionally, the code is refactored to improve code organization and remove unused imports.

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

* feat: Add frozen effect to buttons and improve code organization

* style(applies.css): Update border styles for frozen state to improve visual appearance and consistency
style(applies.css): Adjust opacity of frosted background for better readability
style(tailwind.config.js): Increase opacity of frozen-ring shadow for better visual effect
style(tailwind.config.js): Increase opacity of frosted-ring shadow for better visual effect

* feat(parameterComponent): add snowflake icon to ParameterComponent when node is frozen and not aligned left

* style(applies.css): Update border styles for frozen state and add border to improve visual appearance and consistency
2024-05-28 12:43:14 -07:00
anovazzi1
ee62bd38b7
Update parent disclosure title in ExtraSidebar component (#1987)
chore: Update parent disclosure title in ExtraSidebar component
2024-05-28 12:41:58 -07:00
Gabriel Luiz Freitas Almeida
0c32bbe182
Refactor SplitTextComponent to store parent and text data in Record object (#1998)
refactor: Update SplitTextComponent to store parent and text data in Record object
2024-05-28 12:41:32 -07:00
Gabriel Luiz Freitas Almeida
8250c2a2eb
Fix column name check in folder_id column (#1999)
* bug: fix column name check in folder_id column
2024-05-28 12:40:11 -07:00
Gabriel Luiz Freitas Almeida
8f6b9d6443
Added API key access to AUTO_LOGIN=True and fixed SecretKeyModal (#1994)
* chore: Add type attribute to button in SecretKeyModal

* chore: Refactor Header component to fix autoLogin button visibility

* docs(api.mdx): update admonition message to remove reference to LANGFLOW_AUTO_LOGIN environment variable
docs(cli.mdx): update CLI command example to use 'run' subcommand instead of no arguments
feat(cli.mdx): add 'api-key' command to create API key for default superuser when LANGFLOW_AUTO_LOGIN is True

* docs(api.mdx): update admonition message to remove reference to LANGFLOW_AUTO_LOGIN environment variable

* chore: Fix typo in get-curl-code.tsx

---------

Co-authored-by: anovazzi1 <otavio2204@gmail.com>
2024-05-28 12:02:40 -07:00
Gabriel Luiz Freitas Almeida
3f5769dd79
Update Dockerfiles to create langflow directory and grant write permissions (#1996)
This pull request updates the Dockerfiles to create a "langflow" directory and grant write permissions to it. This change ensures that the user inside the Docker container has the necessary permissions to write to the "langflow" directory.
2024-05-28 12:01:20 -07:00
ogabrielluiz
4bcc060f75 chore: Update Dockerfiles to create langflow directory and grant write permissions 2024-05-28 16:01:02 -03:00
ogabrielluiz
5dce2cddef chore: Update Python API code to use optional typing and fix formatting 2024-05-28 15:45:16 -03:00
Mendon Kissling
273df44963
[Docs] - Leftnav and syntax items (#1993)
Some docs syntax items @rodrigosnader requested - 
1. Merge canvas and flows/components/projects doc into 1 doc
2. Move HF Spaces to install, remove page and nav item
3. Remove install from starter projects and link to install page
4. All title case nav
2024-05-28 13:01:45 -04:00
Mendon Kissling
43bea36155 remove-install-from-starter-projects 2024-05-28 11:48:31 -04:00
Mendon Kissling
8a6dfae8d7 title-case 2024-05-28 11:26:43 -04:00
ogabrielluiz
701d6e6995 chore: Update package versions in pyproject.toml files 2024-05-28 12:24:43 -03:00