From 6e06b15f746d567d2bbfc45d5057db75e1e3f09c Mon Sep 17 00:00:00 2001 From: Carlos Coelho <80289056+carlosrcoelho@users.noreply.github.com> Date: Thu, 7 Mar 2024 18:43:27 -0300 Subject: [PATCH] Update sidebar order (#1506) * Remove beta flag from components * Remove beta flag from APIRequest class * Add beta flag to experimental components * Remove beta flag from APIRequest, ChromaComponent, ChromaSearchComponent, and LCVectorStoreComponent --- src/backend/langflow/components/data/APIRequest.py | 1 - src/backend/langflow/components/data/FileLoader.py | 1 - .../langflow/components/embeddings/AmazonBedrockEmbeddings.py | 1 - src/backend/langflow/components/embeddings/OllamaEmbeddings.py | 1 - .../langflow/components/experimental/ClearMessageHistory.py | 1 + .../langflow/components/experimental/ExtractDataFromRecord.py | 1 + src/backend/langflow/components/experimental/GetNotified.py | 1 + src/backend/langflow/components/experimental/ListFlows.py | 1 + src/backend/langflow/components/experimental/MergeRecords.py | 1 + src/backend/langflow/components/experimental/MessageHistory.py | 1 + src/backend/langflow/components/experimental/Notify.py | 1 + src/backend/langflow/components/experimental/RunFlow.py | 1 + .../langflow/components/experimental/RunnableExecutor.py | 2 +- src/backend/langflow/components/experimental/SQLExecutor.py | 1 + src/backend/langflow/components/experimental/TextToRecord.py | 1 + src/backend/langflow/components/inputs/Prompt.py | 1 - .../components/langchain_utilities/JSONDocumentBuilder.py | 1 - .../langflow/components/retrievers/VectaraSelfQueryRetriver.py | 1 - src/backend/langflow/components/vectorstores/Chroma.py | 1 - src/backend/langflow/components/vectorstores/ChromaSearch.py | 1 - src/backend/langflow/components/vectorstores/Redis.py | 1 - src/backend/langflow/components/vectorstores/RedisSearch.py | 1 - src/backend/langflow/components/vectorstores/Vectara.py | 1 - src/backend/langflow/components/vectorstores/VectaraSearch.py | 1 - src/backend/langflow/components/vectorstores/Weaviate.py | 1 - src/backend/langflow/components/vectorstores/WeaviateSearch.py | 1 - src/backend/langflow/components/vectorstores/base/model.py | 1 - .../langflow/template/frontend_node/custom_components.py | 2 +- 28 files changed, 12 insertions(+), 18 deletions(-) diff --git a/src/backend/langflow/components/data/APIRequest.py b/src/backend/langflow/components/data/APIRequest.py index 1b8655369..761cc8235 100644 --- a/src/backend/langflow/components/data/APIRequest.py +++ b/src/backend/langflow/components/data/APIRequest.py @@ -13,7 +13,6 @@ class APIRequest(CustomComponent): description: str = "Make an HTTP request to the given URL." output_types: list[str] = ["Record"] documentation: str = "https://docs.langflow.org/components/utilities#api-request" - beta: bool = True field_config = { "url": {"display_name": "URL", "info": "The URL to make the request to."}, "method": { diff --git a/src/backend/langflow/components/data/FileLoader.py b/src/backend/langflow/components/data/FileLoader.py index d513298c6..11406f2c2 100644 --- a/src/backend/langflow/components/data/FileLoader.py +++ b/src/backend/langflow/components/data/FileLoader.py @@ -8,7 +8,6 @@ from langflow.utils.constants import LOADERS_INFO class FileLoaderComponent(CustomComponent): display_name: str = "File Loader" description: str = "Generic File Loader" - beta = True def build_config(self): loader_options = ["Automatic"] + [loader_info["name"] for loader_info in LOADERS_INFO] diff --git a/src/backend/langflow/components/embeddings/AmazonBedrockEmbeddings.py b/src/backend/langflow/components/embeddings/AmazonBedrockEmbeddings.py index 98deefcb8..f9fe70d5b 100644 --- a/src/backend/langflow/components/embeddings/AmazonBedrockEmbeddings.py +++ b/src/backend/langflow/components/embeddings/AmazonBedrockEmbeddings.py @@ -15,7 +15,6 @@ class AmazonBedrockEmeddingsComponent(CustomComponent): display_name: str = "Amazon Bedrock Embeddings" description: str = "Embeddings model from Amazon Bedrock." documentation = "https://python.langchain.com/docs/modules/data_connection/text_embedding/integrations/bedrock" - beta = True def build_config(self): return { diff --git a/src/backend/langflow/components/embeddings/OllamaEmbeddings.py b/src/backend/langflow/components/embeddings/OllamaEmbeddings.py index 65c6aca3b..0e2da2005 100644 --- a/src/backend/langflow/components/embeddings/OllamaEmbeddings.py +++ b/src/backend/langflow/components/embeddings/OllamaEmbeddings.py @@ -13,7 +13,6 @@ class OllamaEmbeddingsComponent(CustomComponent): display_name: str = "Ollama Embeddings" description: str = "Embeddings model from Ollama." documentation = "https://python.langchain.com/docs/integrations/text_embedding/ollama" - beta = True def build_config(self): return { diff --git a/src/backend/langflow/components/experimental/ClearMessageHistory.py b/src/backend/langflow/components/experimental/ClearMessageHistory.py index 6d264422f..be765939a 100644 --- a/src/backend/langflow/components/experimental/ClearMessageHistory.py +++ b/src/backend/langflow/components/experimental/ClearMessageHistory.py @@ -5,6 +5,7 @@ from langflow.memory import delete_messages, get_messages class ClearMessageHistoryComponent(CustomComponent): display_name = "Clear Message History" description = "A component to clear the message history." + beta: bool = True def build_config(self): return { diff --git a/src/backend/langflow/components/experimental/ExtractDataFromRecord.py b/src/backend/langflow/components/experimental/ExtractDataFromRecord.py index 2b28545b5..926ec025a 100644 --- a/src/backend/langflow/components/experimental/ExtractDataFromRecord.py +++ b/src/backend/langflow/components/experimental/ExtractDataFromRecord.py @@ -5,6 +5,7 @@ from langflow.schema import Record class ExtractKeyFromRecordComponent(CustomComponent): display_name = "Extract Key From Record" description = "Extracts a key from a record." + beta: bool = True field_config = { "record": {"display_name": "Record"}, diff --git a/src/backend/langflow/components/experimental/GetNotified.py b/src/backend/langflow/components/experimental/GetNotified.py index d97c30df2..55b014b24 100644 --- a/src/backend/langflow/components/experimental/GetNotified.py +++ b/src/backend/langflow/components/experimental/GetNotified.py @@ -5,6 +5,7 @@ from langflow.schema import Record class GetNotifiedComponent(CustomComponent): display_name = "Get Notified" description = "A component to get notified by Notify component." + beta: bool = True def build_config(self): return { diff --git a/src/backend/langflow/components/experimental/ListFlows.py b/src/backend/langflow/components/experimental/ListFlows.py index 724cd9a82..c0848a1ec 100644 --- a/src/backend/langflow/components/experimental/ListFlows.py +++ b/src/backend/langflow/components/experimental/ListFlows.py @@ -7,6 +7,7 @@ from langflow.schema import Record class ListFlowsComponent(CustomComponent): display_name = "List Flows" description = "A component to list all available flows." + beta: bool = True def build_config(self): return {} diff --git a/src/backend/langflow/components/experimental/MergeRecords.py b/src/backend/langflow/components/experimental/MergeRecords.py index 9c280d12a..64582a1a0 100644 --- a/src/backend/langflow/components/experimental/MergeRecords.py +++ b/src/backend/langflow/components/experimental/MergeRecords.py @@ -5,6 +5,7 @@ from langflow.schema import Record class MergeRecordsComponent(CustomComponent): display_name = "Merge Records" description = "Merges records." + beta: bool = True field_config = { "records": {"display_name": "Records"}, diff --git a/src/backend/langflow/components/experimental/MessageHistory.py b/src/backend/langflow/components/experimental/MessageHistory.py index 8b4d11a5f..dabba3869 100644 --- a/src/backend/langflow/components/experimental/MessageHistory.py +++ b/src/backend/langflow/components/experimental/MessageHistory.py @@ -8,6 +8,7 @@ from langflow.schema import Record class MessageHistoryComponent(CustomComponent): display_name = "Message History" description = "Used to retrieve stored messages." + beta: bool = True def build_config(self): return { diff --git a/src/backend/langflow/components/experimental/Notify.py b/src/backend/langflow/components/experimental/Notify.py index 3b5662355..2ced6194a 100644 --- a/src/backend/langflow/components/experimental/Notify.py +++ b/src/backend/langflow/components/experimental/Notify.py @@ -7,6 +7,7 @@ from langflow.schema import Record class NotifyComponent(CustomComponent): display_name = "Notify" description = "A component to generate a notification to Get Notified component." + beta: bool = True def build_config(self): return { diff --git a/src/backend/langflow/components/experimental/RunFlow.py b/src/backend/langflow/components/experimental/RunFlow.py index 94ba88044..8edb62cef 100644 --- a/src/backend/langflow/components/experimental/RunFlow.py +++ b/src/backend/langflow/components/experimental/RunFlow.py @@ -9,6 +9,7 @@ from langflow.schema import Record class RunFlowComponent(CustomComponent): display_name = "Run Flow" description = "A component to run a flow." + beta: bool = True def get_flow_names(self) -> List[str]: flow_records = self.list_flows() diff --git a/src/backend/langflow/components/experimental/RunnableExecutor.py b/src/backend/langflow/components/experimental/RunnableExecutor.py index 1a3e1fa7f..9d790677b 100644 --- a/src/backend/langflow/components/experimental/RunnableExecutor.py +++ b/src/backend/langflow/components/experimental/RunnableExecutor.py @@ -7,7 +7,7 @@ from langflow.field_typing import Text class RunnableExecComponent(CustomComponent): documentation: str = "http://docs.langflow.org/components/custom" display_name = "Runnable Executor" - beta = True + beta: bool = True def build_config(self): return { diff --git a/src/backend/langflow/components/experimental/SQLExecutor.py b/src/backend/langflow/components/experimental/SQLExecutor.py index e1b4e699f..f8e7b3f9b 100644 --- a/src/backend/langflow/components/experimental/SQLExecutor.py +++ b/src/backend/langflow/components/experimental/SQLExecutor.py @@ -8,6 +8,7 @@ from langflow.field_typing import Text class SQLExecutorComponent(CustomComponent): display_name = "SQL Executor" description = "Execute SQL query." + beta: bool = True def build_config(self): return { diff --git a/src/backend/langflow/components/experimental/TextToRecord.py b/src/backend/langflow/components/experimental/TextToRecord.py index fcb91fdee..1e0032a32 100644 --- a/src/backend/langflow/components/experimental/TextToRecord.py +++ b/src/backend/langflow/components/experimental/TextToRecord.py @@ -9,6 +9,7 @@ class TextToRecordComponent(CustomComponent): display_name = "Text to Record" description = "A component to create a record from key-value pairs." field_order = ["mode", "keys", "n_keys"] + beta: bool = True def set_key_template(self, build_config, field_value): keys_template = TemplateField( diff --git a/src/backend/langflow/components/inputs/Prompt.py b/src/backend/langflow/components/inputs/Prompt.py index 8ee6f0232..71ad12fcf 100644 --- a/src/backend/langflow/components/inputs/Prompt.py +++ b/src/backend/langflow/components/inputs/Prompt.py @@ -8,7 +8,6 @@ from langflow.field_typing import Prompt, TemplateField, Text class PromptComponent(CustomComponent): display_name: str = "Prompt" description: str = "A component for creating prompts using templates" - beta = True icon = "terminal-square" def build_config(self): diff --git a/src/backend/langflow/components/langchain_utilities/JSONDocumentBuilder.py b/src/backend/langflow/components/langchain_utilities/JSONDocumentBuilder.py index 33cc73d73..b287bf40c 100644 --- a/src/backend/langflow/components/langchain_utilities/JSONDocumentBuilder.py +++ b/src/backend/langflow/components/langchain_utilities/JSONDocumentBuilder.py @@ -20,7 +20,6 @@ class JSONDocumentBuilder(CustomComponent): display_name: str = "JSON Document Builder" description: str = "Build a Document containing a JSON object using a key and another Document page content." output_types: list[str] = ["Document"] - beta = True documentation: str = "https://docs.langflow.org/components/utilities#json-document-builder" field_config = { diff --git a/src/backend/langflow/components/retrievers/VectaraSelfQueryRetriver.py b/src/backend/langflow/components/retrievers/VectaraSelfQueryRetriver.py index bb2941158..940ffd237 100644 --- a/src/backend/langflow/components/retrievers/VectaraSelfQueryRetriver.py +++ b/src/backend/langflow/components/retrievers/VectaraSelfQueryRetriver.py @@ -16,7 +16,6 @@ class VectaraSelfQueryRetriverComponent(CustomComponent): display_name: str = "Vectara Self Query Retriever for Vectara Vector Store" description: str = "Implementation of Vectara Self Query Retriever" documentation = "https://python.langchain.com/docs/integrations/retrievers/self_query/vectara_self_query" - beta = True icon = "Vectara" field_config = { diff --git a/src/backend/langflow/components/vectorstores/Chroma.py b/src/backend/langflow/components/vectorstores/Chroma.py index 063ff7cf3..d5afe8b81 100644 --- a/src/backend/langflow/components/vectorstores/Chroma.py +++ b/src/backend/langflow/components/vectorstores/Chroma.py @@ -18,7 +18,6 @@ class ChromaComponent(CustomComponent): display_name: str = "Chroma" description: str = "Implementation of Vector Store using Chroma" documentation = "https://python.langchain.com/docs/integrations/vectorstores/chroma" - beta: bool = True icon = "Chroma" def build_config(self): diff --git a/src/backend/langflow/components/vectorstores/ChromaSearch.py b/src/backend/langflow/components/vectorstores/ChromaSearch.py index baa550472..a7216ed5e 100644 --- a/src/backend/langflow/components/vectorstores/ChromaSearch.py +++ b/src/backend/langflow/components/vectorstores/ChromaSearch.py @@ -15,7 +15,6 @@ class ChromaSearchComponent(LCVectorStoreComponent): display_name: str = "Chroma Search" description: str = "Search a Chroma collection for similar documents." - beta: bool = True icon = "Chroma" def build_config(self): diff --git a/src/backend/langflow/components/vectorstores/Redis.py b/src/backend/langflow/components/vectorstores/Redis.py index 599a697a0..bd1b85e4f 100644 --- a/src/backend/langflow/components/vectorstores/Redis.py +++ b/src/backend/langflow/components/vectorstores/Redis.py @@ -17,7 +17,6 @@ class RedisComponent(CustomComponent): display_name: str = "Redis" description: str = "Implementation of Vector Store using Redis" documentation = "https://python.langchain.com/docs/integrations/vectorstores/redis" - beta = True def build_config(self): """ diff --git a/src/backend/langflow/components/vectorstores/RedisSearch.py b/src/backend/langflow/components/vectorstores/RedisSearch.py index b2b420d3e..17fb03cb3 100644 --- a/src/backend/langflow/components/vectorstores/RedisSearch.py +++ b/src/backend/langflow/components/vectorstores/RedisSearch.py @@ -16,7 +16,6 @@ class RedisSearchComponent(RedisComponent, LCVectorStoreComponent): display_name: str = "Redis Search" description: str = "Search a Redis Vector Store for similar documents." documentation = "https://python.langchain.com/docs/integrations/vectorstores/redis" - beta = True def build_config(self): """ diff --git a/src/backend/langflow/components/vectorstores/Vectara.py b/src/backend/langflow/components/vectorstores/Vectara.py index cd25b2dd9..001658cd3 100644 --- a/src/backend/langflow/components/vectorstores/Vectara.py +++ b/src/backend/langflow/components/vectorstores/Vectara.py @@ -16,7 +16,6 @@ class VectaraComponent(CustomComponent): display_name: str = "Vectara" description: str = "Implementation of Vector Store using Vectara" documentation = "https://python.langchain.com/docs/integrations/vectorstores/vectara" - beta = True icon = "Vectara" field_config = { "vectara_customer_id": { diff --git a/src/backend/langflow/components/vectorstores/VectaraSearch.py b/src/backend/langflow/components/vectorstores/VectaraSearch.py index 3220d1561..3ffbe50b5 100644 --- a/src/backend/langflow/components/vectorstores/VectaraSearch.py +++ b/src/backend/langflow/components/vectorstores/VectaraSearch.py @@ -12,7 +12,6 @@ class VectaraSearchComponent(VectaraComponent, LCVectorStoreComponent): display_name: str = "Vectara Search" description: str = "Search a Vectara Vector Store for similar documents." documentation = "https://python.langchain.com/docs/integrations/vectorstores/vectara" - beta = True icon = "Vectara" field_config = { diff --git a/src/backend/langflow/components/vectorstores/Weaviate.py b/src/backend/langflow/components/vectorstores/Weaviate.py index 8bc46d17b..de309034c 100644 --- a/src/backend/langflow/components/vectorstores/Weaviate.py +++ b/src/backend/langflow/components/vectorstores/Weaviate.py @@ -13,7 +13,6 @@ class WeaviateVectorStoreComponent(CustomComponent): display_name: str = "Weaviate" description: str = "Implementation of Vector Store using Weaviate" documentation = "https://python.langchain.com/docs/integrations/vectorstores/weaviate" - beta = True field_config = { "url": {"display_name": "Weaviate URL", "value": "http://localhost:8080"}, "api_key": { diff --git a/src/backend/langflow/components/vectorstores/WeaviateSearch.py b/src/backend/langflow/components/vectorstores/WeaviateSearch.py index 5713ca26f..fd90fe50b 100644 --- a/src/backend/langflow/components/vectorstores/WeaviateSearch.py +++ b/src/backend/langflow/components/vectorstores/WeaviateSearch.py @@ -12,7 +12,6 @@ class WeaviateSearchVectorStore(WeaviateVectorStoreComponent, LCVectorStoreCompo display_name: str = "Weaviate Search" description: str = "Search a Weaviate Vector Store for similar documents." documentation = "https://python.langchain.com/docs/integrations/vectorstores/weaviate" - beta = True icon = "Weaviate" field_config = { diff --git a/src/backend/langflow/components/vectorstores/base/model.py b/src/backend/langflow/components/vectorstores/base/model.py index de5b5840f..a5f839c47 100644 --- a/src/backend/langflow/components/vectorstores/base/model.py +++ b/src/backend/langflow/components/vectorstores/base/model.py @@ -13,7 +13,6 @@ from langflow.schema import Record class LCVectorStoreComponent(CustomComponent): display_name: str = "LC Vector Store" description: str = "Search a LC Vector Store for similar documents." - beta: bool = True def search_with_vector_store( self, diff --git a/src/backend/langflow/template/frontend_node/custom_components.py b/src/backend/langflow/template/frontend_node/custom_components.py index d604ae055..40acae5ea 100644 --- a/src/backend/langflow/template/frontend_node/custom_components.py +++ b/src/backend/langflow/template/frontend_node/custom_components.py @@ -48,7 +48,7 @@ class CustomComponentFrontendNode(FrontendNode): _format_template: bool = False name: str = "CustomComponent" display_name: Optional[str] = "CustomComponent" - beta: bool = True + beta: bool = False template: Template = Template( type_name="CustomComponent", fields=[