Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ref: Rename component modules to lower case (ruff N999) #4220

Merged
merged 7 commits into from
Oct 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 20 additions & 6 deletions src/backend/base/langflow/components/agents/__init__.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,28 @@
from .CSVAgent import CSVAgentComponent
from .JsonAgent import JsonAgentComponent
from .SQLAgent import SQLAgentComponent
from .VectorStoreAgent import VectorStoreAgentComponent
from .VectorStoreRouterAgent import VectorStoreRouterAgentComponent
from .XMLAgent import XMLAgentComponent
from .crewai import CrewAIAgentComponent
from .csv import CSVAgentComponent
from .hierarchical_crew import HierarchicalCrewComponent
from .json import JsonAgentComponent
from .openai_tools import OpenAIToolsAgentComponent
from .openapi import OpenAPIAgentComponent
from .sequential_crew import SequentialCrewComponent
from .sequential_task import SequentialTaskAgentComponent
from .sql import SQLAgentComponent
from .tool_calling import ToolCallingAgentComponent
from .vector_store import VectorStoreAgentComponent
from .vector_store_router import VectorStoreRouterAgentComponent
from .xml import XMLAgentComponent

__all__ = [
"CSVAgentComponent",
"CrewAIAgentComponent",
"HierarchicalCrewComponent",
"JsonAgentComponent",
"OpenAIToolsAgentComponent",
"OpenAPIAgentComponent",
"SQLAgentComponent",
"SequentialCrewComponent",
"SequentialTaskAgentComponent",
"ToolCallingAgentComponent",
"VectorStoreAgentComponent",
"VectorStoreRouterAgentComponent",
"XMLAgentComponent",
Expand Down
10 changes: 5 additions & 5 deletions src/backend/base/langflow/components/chains/__init__.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from .ConversationChain import ConversationChainComponent
from .LLMCheckerChain import LLMCheckerChainComponent
from .LLMMathChain import LLMMathChainComponent
from .RetrievalQA import RetrievalQAComponent
from .SQLGenerator import SQLGeneratorComponent
from .conversation import ConversationChainComponent
from .llm_checker import LLMCheckerChainComponent
from .llm_math import LLMMathChainComponent
from .retrieval_qa import RetrievalQAComponent
from .sql_generator import SQLGeneratorComponent

__all__ = [
"ConversationChainComponent",
Expand Down
10 changes: 5 additions & 5 deletions src/backend/base/langflow/components/data/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from .APIRequest import APIRequestComponent
from .Directory import DirectoryComponent
from .File import FileComponent
from .URL import URLComponent
from .Webhook import WebhookComponent
from .api_request import APIRequestComponent
from .directory import DirectoryComponent
from .file import FileComponent
from .url import URLComponent
from .webhook import WebhookComponent

__all__ = ["APIRequestComponent", "DirectoryComponent", "FileComponent", "URLComponent", "WebhookComponent"]
11 changes: 6 additions & 5 deletions src/backend/base/langflow/components/deactivated/__init__.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
from .ExtractKeyFromData import ExtractKeyFromDataComponent
from .ListFlows import ListFlowsComponent
from .MergeData import MergeDataComponent
from .SelectivePassThrough import SelectivePassThroughComponent
from .SubFlow import SubFlowComponent
from .extract_key_from_data import ExtractKeyFromDataComponent
from .list_flows import ListFlowsComponent
from .merge_data import MergeDataComponent
from .selective_passthrough import SelectivePassThroughComponent
from .split_text import SplitTextComponent
from .sub_flow import SubFlowComponent

__all__ = [
"ConditionalRouterComponent",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from .Confluence import ConfluenceComponent
from .GitLoader import GitLoaderComponent
from .Unstructured import UnstructuredComponent
from .confluence import ConfluenceComponent
from .git import GitLoaderComponent
from .unstructured import UnstructuredComponent

__all__ = ["ConfluenceComponent", "GitLoaderComponent", "UnstructuredComponent"]
20 changes: 10 additions & 10 deletions src/backend/base/langflow/components/embeddings/__init__.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
from .AIMLEmbeddings import AIMLEmbeddingsComponent
from .AmazonBedrockEmbeddings import AmazonBedrockEmbeddingsComponent
from .AstraVectorize import AstraVectorizeComponent
from .AzureOpenAIEmbeddings import AzureOpenAIEmbeddingsComponent
from .CohereEmbeddings import CohereEmbeddingsComponent
from .GoogleGenerativeAIEmbeddings import GoogleGenerativeAIEmbeddingsComponent
from .HuggingFaceInferenceAPIEmbeddings import HuggingFaceInferenceAPIEmbeddingsComponent
from .OllamaEmbeddings import OllamaEmbeddingsComponent
from .OpenAIEmbeddings import OpenAIEmbeddingsComponent
from .VertexAIEmbeddings import VertexAIEmbeddingsComponent
from .aiml import AIMLEmbeddingsComponent
from .amazon_bedrock import AmazonBedrockEmbeddingsComponent
from .astra_vectorize import AstraVectorizeComponent
from .azure_openai import AzureOpenAIEmbeddingsComponent
from .cohere import CohereEmbeddingsComponent
from .google_generative_ai import GoogleGenerativeAIEmbeddingsComponent
from .huggingface_inference_api import HuggingFaceInferenceAPIEmbeddingsComponent
from .ollama import OllamaEmbeddingsComponent
from .openai import OpenAIEmbeddingsComponent
from .vertexai import VertexAIEmbeddingsComponent

__all__ = [
"AIMLEmbeddingsComponent",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from langflow.base.embeddings.model import LCEmbeddingsModel
from langflow.base.models.aiml_constants import AIML_EMBEDDING_MODELS
from langflow.components.embeddings.util.AIMLEmbeddingsImpl import AIMLEmbeddingsImpl
from langflow.components.embeddings.util import AIMLEmbeddingsImpl
from langflow.field_typing import Embeddings
from langflow.inputs.inputs import DropdownInput
from langflow.io import SecretStrInput
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from .aiml import AIMLEmbeddingsImpl

__all__ = ["AIMLEmbeddingsImpl"]
45 changes: 34 additions & 11 deletions src/backend/base/langflow/components/helpers/__init__.py
Original file line number Diff line number Diff line change
@@ -1,24 +1,47 @@
from .CombineText import CombineTextComponent
from .CreateList import CreateListComponent
from .CustomComponent import CustomComponent
from .FilterData import FilterDataComponent
from .IDGenerator import IDGeneratorComponent
from .Memory import MemoryComponent
from .MergeData import MergeDataComponent
from .ParseData import ParseDataComponent
from .SplitText import SplitTextComponent
from .StoreMessage import StoreMessageComponent
from .combine_text import CombineTextComponent
from .create_list import CreateListComponent
from .csv_to_data import CSVToDataComponent
from .current_date import CurrentDateComponent
from .custom_component import CustomComponent
from .data_conditional_router import DataConditionalRouterComponent
from .extract_key import ExtractDataKeyComponent
from .filter_data import FilterDataComponent
from .filter_data_values import DataFilterComponent
from .hierarchical_task import HierarchicalTaskComponent
from .id_generator import IDGeneratorComponent
from .json_to_data import JSONToDataComponent
from .memory import MemoryComponent
from .merge_data import MergeDataComponent
from .message_to_data import MessageToDataComponent
from .parse_data import ParseDataComponent
from .parse_json_data import ParseJSONDataComponent
from .sequential_task import SequentialTaskComponent
from .split_text import SplitTextComponent
from .store_message import StoreMessageComponent
from .structured_output import StructuredOutputComponent

__all__ = [
"CSVToDataComponent",
"CombineTextComponent",
"CreateListComponent",
"CurrentDateComponent",
"CustomComponent",
"DataConditionalRouterComponent",
"DataFilterComponent",
"ExtractDataKeyComponent",
"FilterDataComponent",
"FilterDataComponent",
"HierarchicalTaskComponent",
"IDGeneratorComponent",
"IDGeneratorComponent",
"ListComponent",
"JSONToDataComponent",
"MemoryComponent",
"MergeDataComponent",
"MessageToDataComponent",
"ParseDataComponent",
"ParseJSONDataComponent",
"SequentialTaskComponent",
"SplitTextComponent",
"StoreMessageComponent",
"StructuredOutputComponent",
]
4 changes: 2 additions & 2 deletions src/backend/base/langflow/components/inputs/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from .ChatInput import ChatInput
from .TextInput import TextInputComponent
from .chat import ChatInput
from .text import TextInputComponent

__all__ = ["ChatInput", "TextInputComponent"]
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from .HtmlLinkExtractor import HtmlLinkExtractorComponent
from .html_link_extractor import HtmlLinkExtractorComponent

__all__ = [
"HtmlLinkExtractorComponent",
Expand Down
24 changes: 12 additions & 12 deletions src/backend/base/langflow/components/models/__init__.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
from .AIMLModel import AIMLModelComponent
from .AmazonBedrockModel import AmazonBedrockComponent
from .AnthropicModel import AnthropicModelComponent
from .AzureOpenAIModel import AzureChatOpenAIComponent
from .BaiduQianfanChatModel import QianfanChatEndpointComponent
from .CohereModel import CohereComponent
from .GoogleGenerativeAIModel import GoogleGenerativeAIComponent
from .HuggingFaceModel import HuggingFaceEndpointsComponent
from .OllamaModel import ChatOllamaComponent
from .OpenAIModel import OpenAIModelComponent
from .PerplexityModel import PerplexityComponent
from .VertexAiModel import ChatVertexAIComponent
from .aiml import AIMLModelComponent
from .amazon_bedrock import AmazonBedrockComponent
from .anthropic import AnthropicModelComponent
from .azure_openai import AzureChatOpenAIComponent
from .baidu_qianfan_chat import QianfanChatEndpointComponent
from .cohere import CohereComponent
from .google_generative_ai import GoogleGenerativeAIComponent
from .huggingface import HuggingFaceEndpointsComponent
from .ollama import ChatOllamaComponent
from .openai import OpenAIModelComponent
from .perplexity import PerplexityComponent
from .vertexai import ChatVertexAIComponent

__all__ = [
"AIMLModelComponent",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
from .OutputParser import OutputParserComponent
from .output_parser import OutputParserComponent

__all__ = ["OutputParserComponent"]
4 changes: 2 additions & 2 deletions src/backend/base/langflow/components/outputs/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from .ChatOutput import ChatOutput
from .TextOutput import TextOutputComponent
from .chat import ChatOutput
from .text import TextOutputComponent

__all__ = ["ChatOutput", "TextOutputComponent"]
4 changes: 2 additions & 2 deletions src/backend/base/langflow/components/prompts/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from .LangChainHubPrompt import LangChainHubPromptComponent
from .Prompt import PromptComponent
from .langchain_hub import LangChainHubPromptComponent
from .prompt import PromptComponent

__all__ = ["LangChainHubPromptComponent", "PromptComponent"]
24 changes: 12 additions & 12 deletions src/backend/base/langflow/components/prototypes/__init__.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
from .ConditionalRouter import ConditionalRouterComponent
from .CreateData import CreateDataComponent
from .FlowTool import FlowToolComponent
from .Listen import ListenComponent
from .Notify import NotifyComponent
from .Pass import PassMessageComponent
from .PythonFunction import PythonFunctionComponent
from .RunFlow import RunFlowComponent
from .RunnableExecutor import RunnableExecComponent
from .SQLExecutor import SQLExecutorComponent
from .SubFlow import SubFlowComponent
from .UpdateData import UpdateDataComponent
from .conditional_router import ConditionalRouterComponent
from .create_data import CreateDataComponent
from .flow_tool import FlowToolComponent
from .listen import ListenComponent
from .notify import NotifyComponent
from .pass_message import PassMessageComponent
from .python_function import PythonFunctionComponent
from .run_flow import RunFlowComponent
from .runnable_executor import RunnableExecComponent
from .sql_executor import SQLExecutorComponent
from .sub_flow import SubFlowComponent
from .update_data import UpdateDataComponent

__all__ = [
"ConditionalRouterComponent",
Expand Down
10 changes: 5 additions & 5 deletions src/backend/base/langflow/components/retrievers/__init__.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from .AmazonKendra import AmazonKendraRetrieverComponent
from .MetalRetriever import MetalRetrieverComponent
from .MultiQueryRetriever import MultiQueryRetrieverComponent
from .VectaraSelfQueryRetriver import VectaraSelfQueryRetriverComponent
from .VectorStoreRetriever import VectoStoreRetrieverComponent
from .amazon_kendra import AmazonKendraRetrieverComponent
from .metal import MetalRetrieverComponent
from .multi_query import MultiQueryRetrieverComponent
from .vectara_self_query import VectaraSelfQueryRetriverComponent
from .vector_store import VectoStoreRetrieverComponent

__all__ = [
"AmazonKendraRetrieverComponent",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from .CharacterTextSplitter import CharacterTextSplitterComponent
from .LanguageRecursiveTextSplitter import LanguageRecursiveTextSplitterComponent
from .NaturalLanguageTextSplitter import NaturalLanguageTextSplitterComponent
from .RecursiveCharacterTextSplitter import RecursiveCharacterTextSplitterComponent
from .character import CharacterTextSplitterComponent
from .language_recursive import LanguageRecursiveTextSplitterComponent
from .natural_language import NaturalLanguageTextSplitterComponent
from .recursive_character import RecursiveCharacterTextSplitterComponent

__all__ = [
"CharacterTextSplitterComponent",
Expand Down
6 changes: 3 additions & 3 deletions src/backend/base/langflow/components/toolkits/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from .ComposioAPI import ComposioAPIComponent
from .Metaphor import MetaphorToolkit
from .VectorStoreInfo import VectorStoreInfoComponent
from .composio_api import ComposioAPIComponent
from .metaphor import MetaphorToolkit
from .vector_store_info import VectorStoreInfoComponent

__all__ = [
"ComposioAPIComponent",
Expand Down
37 changes: 21 additions & 16 deletions src/backend/base/langflow/components/tools/__init__.py
Original file line number Diff line number Diff line change
@@ -1,25 +1,28 @@
from .AstraDBCQLTool import AstraDBCQLToolComponent
from .AstraDBTool import AstraDBToolComponent
from .BingSearchAPI import BingSearchAPIComponent
from .Calculator import CalculatorToolComponent
from .GleanSearchAPI import GleanSearchAPIComponent
from .GoogleSearchAPI import GoogleSearchAPIComponent
from .GoogleSerperAPI import GoogleSerperAPIComponent
from .PythonCodeStructuredTool import PythonCodeStructuredTool
from .PythonREPLTool import PythonREPLToolComponent
from .RetrieverTool import RetrieverToolComponent
from .SearchAPI import SearchAPIComponent
from .SearXNGTool import SearXNGToolComponent
from .SerpAPI import SerpAPIComponent
from .WikipediaAPI import WikipediaAPIComponent
from .WolframAlphaAPI import WolframAlphaAPIComponent
from .astradb import AstraDBToolComponent
from .astradb_cql import AstraDBCQLToolComponent
from .bing_search_api import BingSearchAPIComponent
from .calculator import CalculatorToolComponent
from .duck_duck_go_search_run import DuckDuckGoSearchComponent
from .glean_search_api import GleanSearchAPIComponent
from .google_search_api import GoogleSearchAPIComponent
from .google_serper_api import GoogleSerperAPIComponent
from .python_code_structured_tool import PythonCodeStructuredTool
from .python_repl import PythonREPLToolComponent
from .retriever import RetrieverToolComponent
from .search_api import SearchAPIComponent
from .searxng import SearXNGToolComponent
from .serp_api import SerpAPIComponent
from .tavily_search import TavilySearchToolComponent
from .wikipedia_api import WikipediaAPIComponent
from .wolfram_alpha_api import WolframAlphaAPIComponent
from .yahoo_finance import YfinanceToolComponent

__all__ = [
"AstraDBCQLToolComponent",
"AstraDBToolComponent",
"BingSearchAPIComponent",
"CalculatorToolComponent",
"CalculatorToolComponent",
"DuckDuckGoSearchComponent",
"GleanSearchAPIComponent",
"GoogleSearchAPIComponent",
"GoogleSerperAPIComponent",
Expand All @@ -29,6 +32,8 @@
"SearXNGToolComponent",
"SearchAPIComponent",
"SerpAPIComponent",
"TavilySearchToolComponent",
"WikipediaAPIComponent",
"WolframAlphaAPIComponent",
"YfinanceToolComponent",
]
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
from .AstraDB import AstraVectorStoreComponent
from .astradb import AstraVectorStoreComponent

__all__ = ["AstraVectorStoreComponent"]
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from langflow.components.inputs.ChatInput import ChatInput
from langflow.components.models.OpenAIModel import OpenAIModelComponent
from langflow.components.outputs.ChatOutput import ChatOutput
from langflow.components.prompts.Prompt import PromptComponent
from langflow.graph.graph.base import Graph
from langflow.components.inputs import ChatInput
from langflow.components.models import OpenAIModelComponent
from langflow.components.outputs import ChatOutput
from langflow.components.prompts import PromptComponent
from langflow.graph import Graph


def basic_prompting_graph(template: str | None = None):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
from textwrap import dedent

from langflow.components.data.URL import URLComponent
from langflow.components.helpers.ParseData import ParseDataComponent
from langflow.components.inputs.TextInput import TextInputComponent
from langflow.components.models.OpenAIModel import OpenAIModelComponent
from langflow.components.outputs.ChatOutput import ChatOutput
from langflow.components.prompts.Prompt import PromptComponent
from langflow.graph.graph.base import Graph
from langflow.components.data import URLComponent
from langflow.components.helpers import ParseDataComponent
from langflow.components.inputs import TextInputComponent
from langflow.components.models import OpenAIModelComponent
from langflow.components.outputs import ChatOutput
from langflow.components.prompts import PromptComponent
from langflow.graph import Graph


def blog_writer_graph(template: str | None = None):
Expand Down
Loading
Loading