Commit graph

11,619 commits

Author SHA1 Message Date
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
italojohnny
d575c97d15 Merge branch 'ij/chatimg' into cz/inspection 2024-05-28 15:59:18 -03:00
Ítalo Johnny
67442774cf
Merge branch 'dev' into ij/chatimg 2024-05-28 15:57:31 -03:00
italojohnny
440f2a9a86 add load_dotenv to tests 2024-05-28 15:55:29 -03:00
italojohnny
0bb19d8933 update json formatting 2024-05-28 15:55:09 -03:00
ogabrielluiz
5dce2cddef chore: Update Python API code to use optional typing and fix formatting 2024-05-28 15:45:16 -03:00
anovazzi1
77cb85b7f2 feat(frontend): refactor OutputComponent to use external dropdown menu component 2024-05-28 15:35:38 -03:00
italojohnny
9c9a7f4aa1 return artifact type to front 2024-05-28 15:30:40 -03:00
italojohnny
0f195b59e1 retrieve and store artifact type 2024-05-28 15:30:35 -03:00
italojohnny
0dcfc21e05 add function to determine artifact type 2024-05-28 15:30:08 -03:00
italojohnny
7f6385a609 update branch with changes from dev 2024-05-28 14:59:56 -03:00
Mendon Kissling
897a18405f strip-old-content 2024-05-28 13:58:06 -04: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
Mendon Kissling
e38123c951 combine-flows-doc-into-canvas 2024-05-28 11:22:49 -04:00
yamonbt
72f09d65b6
A better implementation of the Ollama component (#1701)
* Update OllamaModel.py

A draft to synchronize the model using the latest Langflow architecture and to improve it according to the latest Langchain specifications.

* Update OllamaModel.py

Checkout Models from api

* Update OllamaModel.py

* Update OllamaModel.py

---------

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2024-05-28 08:20:58 -07:00
Lucas Oliveira
7d67f36000
Fix Building timeout and macbook shortcuts (#1964)
* Fixed shortcuts not working on mac

* fixed top level vertices and added timeout

* revert flowStore changes

* chore: Update worker timeout setting

* feat: Add endpoint to retrieve config settings

The commit adds a new endpoint `/config` to retrieve the configuration settings. This endpoint returns the `ConfigResponse` model, which includes the `timeout` value. The implementation handles any exceptions and logs them appropriately.

* feat: Add fetchConfig function to retrieve configuration settings

This commit adds a new function fetchConfig to the API utils module. The function makes an HTTP GET request to the /config endpoint and returns the configuration data. Any errors that occur during the request are logged and rethrown. This function will be used to initialize the application with the fetched configuration.

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>

* revert changes

* feat: Add setupAxiosDefaults function to initialize Axios configurations

This commit adds a new function setupAxiosDefaults to the API utils module. The function fetches the configuration data using the fetchConfig function and sets up default configurations for Axios. It sets the base URL and timeout for Axios requests based on the fetched configuration. This function will be used to initialize Axios with the correct configurations.

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>

* fix(langflow): rename 'timeout' setting to 'worker_timeout' for clarity and consistency
feat(langflow): add 'frontend_timeout' setting to control frontend API call timeout
chore(langflow): reorganize imports and constants in settings module for better readability

* Set frontend_timeout to 0

---------

Co-authored-by: ogabrielluiz <gabriel@langflow.org>
2024-05-28 08:18:36 -07:00
cristhianzl
f1d90110ae feat: Add TextOutputView component for displaying text output
This commit adds a new component called TextOutputView to the shared/components directory. The TextOutputView component is responsible for displaying text output in a textarea. It receives the necessary data from the flowPool and renders the appropriate text. This component improves the code organization and reusability of the text output display logic.
2024-05-28 12:16:47 -03:00
cristhianzl
24ef4034b6 Refactor: Revamp utils Folder Structure 2024-05-28 12:16:38 -03:00
Gabriel Luiz Freitas Almeida
56fc11a99c
feat: Update ChromaSearch and ChromaComponent to use chromadb library (#1992)
The code changes in `ChromaSearch.py` and `Chroma.py` import the `chromadb` library and use it to create a `HttpClient` object. This change enables the components to interact with a Chroma server for vector search functionality.

This commit message follows the established convention of starting with a type (feat for feature) and providing a concise summary of the changes.
2024-05-28 08:16:37 -07:00
cristhianzl
62d7385d65 feat: Add useCheckCodeValidity and useIconNodeRender hooks
This commit adds two new hooks, useCheckCodeValidity and useIconNodeRender, to the customNodes/hooks directory.

The useCheckCodeValidity hook is responsible for checking the validity of the code in a node template and setting the "isOutdated" state accordingly. It improves the code organization and ensures that the code is only checked once.

The useIconNodeRender hook is responsible for rendering the appropriate icon for a node based on its data and type. It improves code reusability and simplifies the rendering logic.
2024-05-28 12:16:28 -03:00
cristhianzl
599e45af9f feat: Add useIconStatus hook for rendering icon status
This commit adds a new hook called useIconStatus to the customNodes/hooks directory. The useIconStatus hook is responsible for rendering the appropriate icon status based on the build status and validation status. It returns the rendered icon status component. This hook improves the code organization and reusability of the icon status logic.

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2024-05-28 12:16:16 -03:00
cristhianzl
9edf4c84e4 Refactor: Revamp utils Folder Structure 2024-05-28 12:15:22 -03:00
cristhianzl
391ed6a001 feat: Add OutputModal component for displaying output visualization
The new OutputModal component is added to the genericNode module. It provides a modal window for displaying the output visualization. The component includes a header, content, and footer sections. The content section includes the SwitchOutputView component, which renders different output views based on the type of results. The footer section includes an "Ok" button for closing the modal.
2024-05-28 12:15:11 -03:00
Mendon Kissling
b916ef0ebc remove-hf-space-page 2024-05-28 11:12:11 -04:00
Mendon Kissling
2d9719946a hf-spaces-and-subfolder 2024-05-28 11:11:11 -04:00
ogabrielluiz
1a4b895509 feat: Enable loading data from database in VectorStore-RAG-Flows.json 2024-05-28 11:39:41 -03:00
ogabrielluiz
1965aa9acf feat: Enable loading data from database in VectorStore-RAG-Flows.json 2024-05-28 11:39:31 -03:00
Mendon Kissling
d8fcdb8d7d
docs integrations notion (#1951)
- docs: add Notion Setup instructions
- docs: Notion Add Content to Page instructions
- docs: Notion List Database Properties instructions
- docs: Notion List Pages instructions
- docs: Notion Page Viewer instructions
- docs: Notion Page Create instructions
- docs: Notion User Lists instructions
- docs: Notion Page Update instructions
2024-05-28 10:23:20 -04:00
Gabriel Luiz Freitas Almeida
b912a71e02
Fixed Sub Flow, Run Flow and Flow as Tool components (#1986)
* feat(langflow): add utility functions to build records from run outputs and result data for better code organization and reusability

* chore: Generate dynamic flow function with user ID parameter for better flow customization and tracking

* chore: Refactor build_records_from_run_outputs and build_records_from_result_data for better code organization and reusability

* chore: Update FlowToolComponent to include user ID parameter in build_function_and_schema method call

* chore: Add conditional check for result_data in build_records_from_run_outputs

* chore: Generate dynamic flow function with optional user ID parameter for better flow customization and tracking

* feat: Add user ID parameter to Graph.from_payload method

* chore: Add FlowTool class for flow processing and customization

* chore: Update FlowToolComponent to use get_flow_inputs instead of build_function_and_schema

* chore: Update FlowTool to handle optional user ID parameter
2024-05-28 07:18:32 -07:00
Mendon Kissling
ccecdbcc98 cleanup 2024-05-28 10:18:01 -04:00
Mendon Kissling
7ff581e90a intro 2024-05-28 09:20:03 -04:00
anovazzi1
3f43958f08 fix dropdown bug 2024-05-28 08:43:48 -03:00
ogabrielluiz
8abab3a930 chore: Set Dockerfile and Tags dynamically in Docker Build and Push workflow 2024-05-28 08:40:40 -03:00
ogabrielluiz
26c85f191e chore: Set Dockerfile and Tags dynamically in Docker Build and Push workflow 2024-05-28 08:02:01 -03:00
igorrCarvalho
70f4fd0770 Feat: Create the first version of the eraser tool 2024-05-27 21:36:00 -03:00
anovazzi1
9d38ccc15d feat(frontend): refactor OutputComponent to use external dropdown menu component 2024-05-27 19:00:26 -03:00
ogabrielluiz
11c874cd96 chore: Update pre-release workflow to include actions/checkout step 2024-05-27 18:27:10 -03:00
anovazzi1
354e1bc126 funcionando mas ainda não ideal 2024-05-27 17:57:22 -03:00
ogabrielluiz
02b7491f2c chore: Update Langflow Pre-release workflow to include release type in run name 2024-05-27 17:10:25 -03:00
Gabriel Luiz Freitas Almeida
9b2fe24abe
Update pyproject.toml versions and add Docker Build and Push workflow (#1985)
* chore: Update pyproject.toml versions for langflow and langflow-base

* feat(workflows): add Docker Build and Push workflow to automate building and pushing Docker images based on release type and version
feat(workflows): add Pre-release workflow to automate releasing Langflow packages based on release type and version
feat(workflows): create workflow to call Docker Build workflow and handle release creation based on release type
2024-05-27 13:08:28 -07:00
Gabriel Luiz Freitas Almeida
ae44092139
Update chromadb import in ChromaSearch.py and Chroma.py (#1984)
* chore: Update chromadb import in ChromaSearch.py and Chroma.py

* chore: Update ChromaSearch.py and Chroma.py to use chroma_server_http_port
2024-05-27 12:41:52 -07:00