langflow icon indicating copy to clipboard operation
langflow copied to clipboard

Disable or hide some components that came by default

Open codenprogressive opened this issue 1 year ago • 2 comments

Context

In my company, we have been exploring and experimenting with Langflow for quite some time. We are considering deploying this framework in our production environment and made available the various components (default ones that come with Langflow + the custom one that our team created to serve various use cases). However, due to our enterprise Privacy & Secuity policies, we would like to be able to remove (or hide) some components that are not approved by the company policies. For example, only VertexAI LLMs and self-hosted open-sources LLMs are allowed to be used. hence, we would like to hide OpenAI, Cohere, etc from the Models marketplace!

Same request applies to Vector Stores technologies

The Ask Is there anyway we can hide some of the components? if yes, can you provide some direction on how to do so?

image

codenprogressive avatar Jul 09 '24 01:07 codenprogressive

@codenprogressive you can directly delete the components file before deploying Langflow. Those you're mentioning are in the components/models directory here: https://github.com/langflow-ai/langflow/tree/main/src/backend/base/langflow/components/models

nicoloboschi avatar Jul 09 '24 07:07 nicoloboschi

Thanks for the hint. By the way I'm deploying Langflow by pip installing. We add our custom components, then we push to our GitLab. Not sure how to remove some default components programmatically?

Suggestion It would be really practical if we can manage the add/remove of components through a variable in .env. something like LANGFLOW_COMPONENTS_TO_REMOVE or LANGFLOW_COMPONENTS_TO_KEEP.

codenprogressive avatar Jul 09 '24 13:07 codenprogressive

@codenprogressive

Do you need any assistance with this case? If not, please let us know if this issue can be closed.

carlosrcoelho avatar Sep 04 '24 14:09 carlosrcoelho

Hi @carlosrcoelho this is more a feature request. I was wondering if we can control what we make available as components through Langflow platform. For example, the company I'm working in is not allowing OpenAI models. The feature I was requesting is: can we manage the add/remove of components through a variable in .env. something like LANGFLOW_COMPONENTS_TO_REMOVE or LANGFLOW_COMPONENTS_TO_KEEP.

codenprogressive avatar Sep 04 '24 18:09 codenprogressive

@codenprogressive You can do this, but you'll have to modify the source code of Langflow. So, you'll need to fork it and then make the changes you want. At least for today, that's how it would be. I hope this helps you.

carlosrcoelho avatar Sep 05 '24 15:09 carlosrcoelho

got it, that's what I ended up doing! thanks!

codenprogressive avatar Sep 05 '24 18:09 codenprogressive