From 148ec3335f4ee8f31edd8b3e43362561b2facc53 Mon Sep 17 00:00:00 2001 From: Christophe Bornet Date: Mon, 21 Oct 2024 13:06:36 +0200 Subject: [PATCH 1/5] Rename component modules to lower case (ruff N999) --- .../base/langflow/base/prompts/utils.py | 2 +- .../langflow/components/agents/__init__.py | 26 ++++++++--- .../agents/{CrewAIAgent.py => crewai.py} | 0 .../components/agents/{CSVAgent.py => csv.py} | 0 ...erarchicalCrew.py => hierarchical_crew.py} | 0 .../agents/{JsonAgent.py => json.py} | 0 .../{OpenAIToolsAgent.py => openai_tools.py} | 0 .../agents/{OpenAPIAgent.py => openapi.py} | 0 .../{SequentialCrew.py => sequential_crew.py} | 0 ...uentialTaskAgent.py => sequential_task.py} | 0 .../components/agents/{SQLAgent.py => sql.py} | 0 .../{ToolCallingAgent.py => tool_calling.py} | 0 .../{VectorStoreAgent.py => vector_store.py} | 0 ...eRouterAgent.py => vector_store_router.py} | 0 .../components/agents/{XMLAgent.py => xml.py} | 0 ...btitles.py => assemblyai_get_subtitles.py} | 0 ...AssemblyAILeMUR.py => assemblyai_lemur.py} | 0 ...ipts.py => assemblyai_list_transcripts.py} | 0 ...cript.py => assemblyai_poll_transcript.py} | 0 ...ript.py => assemblyai_start_transcript.py} | 0 .../langflow/components/chains/__init__.py | 10 ++--- .../{ConversationChain.py => conversation.py} | 0 .../{LLMCheckerChain.py => llm_checker.py} | 0 .../chains/{LLMMathChain.py => llm_math.py} | 0 .../{RetrievalQA.py => retrieval_qa.py} | 0 .../{SQLGenerator.py => sql_generator.py} | 0 .../base/langflow/components/data/__init__.py | 10 ++--- .../data/{APIRequest.py => api_request.py} | 0 .../data/{GoogleDrive.py => google_drive.py} | 0 ...eDriveSearch.py => google_drive_search.py} | 0 .../components/deactivated/__init__.py | 11 ++--- ...tLiteLLMModel.py => chat_litellm_model.py} | 0 ...ckExtractor.py => code_block_extractor.py} | 0 ...ocumentsToData.py => documents_to_data.py} | 0 ...eyFromData.py => extract_key_from_data.py} | 0 .../{ListFlows.py => list_flows.py} | 0 .../{MergeData.py => merge_data.py} | 0 ...assThrough.py => selective_passthrough.py} | 0 .../{ShouldRunNext.py => should_run_next.py} | 0 .../{SplitText.py => split_text.py} | 0 .../{StoreMessage.py => store_message.py} | 0 .../deactivated/{SubFlow.py => sub_flow.py} | 0 .../components/documentloaders/__init__.py | 6 +-- .../documentloaders/{GitLoader.py => git.py} | 0 .../components/embeddings/__init__.py | 20 ++++----- .../embeddings/{AIMLEmbeddings.py => aiml.py} | 2 +- ...BedrockEmbeddings.py => amazon_bedrock.py} | 0 .../{AstraVectorize.py => astra_vectorize.py} | 0 ...ureOpenAIEmbeddings.py => azure_openai.py} | 0 .../{CohereEmbeddings.py => cohere.py} | 0 ...IEmbeddings.py => google_generative_ai.py} | 0 ...ddings.py => huggingface_inference_api.py} | 0 .../{MistalAIEmbeddings.py => mistral.py} | 0 .../{NVIDIAEmbeddings.py => nvidia.py} | 0 .../{OllamaEmbeddings.py => ollama.py} | 0 .../{OpenAIEmbeddings.py => openai.py} | 0 .../{EmbeddingSimilarity.py => similarity.py} | 0 .../{TextEmbedder.py => text_embedder.py} | 0 .../components/embeddings/util/__init__.py | 3 ++ .../util/{AIMLEmbeddingsImpl.py => aiml.py} | 0 .../{VertexAIEmbeddings.py => vertexai.py} | 0 .../langflow/components/helpers/__init__.py | 45 ++++++++++++++----- .../{CombineText.py => combine_text.py} | 0 .../helpers/{CreateList.py => create_list.py} | 0 .../helpers/{CSVtoData.py => csv_to_data.py} | 0 .../{CurrentDate.py => current_date.py} | 0 ...CustomComponent.py => custom_component.py} | 0 ...alRouter.py => data_conditional_router.py} | 0 .../helpers/{ExtractKey.py => extract_key.py} | 0 .../helpers/{FilterData.py => filter_data.py} | 0 ...terDataValues.py => filter_data_values.py} | 0 ...erarchicalTask.py => hierarchical_task.py} | 0 .../{IDGenerator.py => id_generator.py} | 0 .../{JSONtoData.py => json_to_data.py} | 0 .../helpers/{MergeData.py => merge_data.py} | 0 .../{MessageToData.py => message_to_data.py} | 0 .../helpers/{ParseData.py => parse_data.py} | 0 .../{ParseJSONData.py => parse_json_data.py} | 0 .../{SequentialTask.py => sequential_task.py} | 0 .../helpers/{SplitText.py => split_text.py} | 0 .../{StoreMessage.py => store_message.py} | 0 .../langflow/components/inputs/__init__.py | 4 +- .../inputs/{ChatInput.py => chat.py} | 0 .../inputs/{TextInput.py => text.py} | 0 ...rawlCrawlApi.py => firecrawl_crawl_api.py} | 0 ...wlScrapeApi.py => firecrawl_scrape_api.py} | 0 ...entBuilder.py => json_document_builder.py} | 0 .../{SpiderTool.py => spider.py} | 0 .../{SQLDatabase.py => sql_database.py} | 0 .../components/link_extractors/__init__.py | 2 +- ...inkExtractor.py => html_link_extractor.py} | 0 .../{AstraDBChatMemory.py => astra_db.py} | 0 .../{CassandraChatMemory.py => cassandra.py} | 0 .../memories/{RedisChatMemory.py => redis.py} | 0 .../memories/{ZepChatMemory.py => zep.py} | 0 .../langflow/components/models/__init__.py | 24 +++++----- .../models/{AIMLModel.py => aiml.py} | 0 ...mazonBedrockModel.py => amazon_bedrock.py} | 0 .../{AnthropicModel.py => anthropic.py} | 0 .../{AzureOpenAIModel.py => azure_openai.py} | 0 ...nfanChatModel.py => baidu_qianfan_chat.py} | 0 .../models/{CohereModel.py => cohere.py} | 0 ...tiveAIModel.py => google_generative_ai.py} | 0 .../models/{GroqModel.py => groq.py} | 0 .../{HuggingFaceModel.py => huggingface.py} | 0 .../models/{MistralModel.py => mistral.py} | 0 .../models/{NvidiaModel.py => nvidia.py} | 0 .../models/{OllamaModel.py => ollama.py} | 0 .../models/{OpenAIModel.py => openai.py} | 0 .../{PerplexityModel.py => perplexity.py} | 0 .../models/{VertexAiModel.py => vertexai.py} | 0 .../components/output_parsers/__init__.py | 2 +- .../{OutputParser.py => output_parser.py} | 0 .../langflow/components/outputs/__init__.py | 4 +- .../outputs/{ChatOutput.py => chat.py} | 0 .../outputs/{TextOutput.py => text.py} | 0 .../langflow/components/prompts/__init__.py | 4 +- ...LangChainHubPrompt.py => langchain_hub.py} | 0 .../components/prototypes/__init__.py | 24 +++++----- ...itionalRouter.py => conditional_router.py} | 0 .../{CreateData.py => create_data.py} | 0 .../prototypes/{FlowTool.py => flow_tool.py} | 0 .../{JSONCleaner.py => json_cleaner.py} | 0 .../prototypes/{Pass.py => pass_message.py} | 0 .../{PythonFunction.py => python_function.py} | 0 .../prototypes/{RunFlow.py => run_flow.py} | 0 ...nnableExecutor.py => runnable_executor.py} | 0 .../{SelectData.py => select_data.py} | 0 .../{SQLExecutor.py => sql_executor.py} | 0 .../prototypes/{SubFlow.py => sub_flow.py} | 0 .../{UpdateData.py => update_data.py} | 0 .../components/retrievers/__init__.py | 10 ++--- .../{AmazonKendra.py => amazon_kendra.py} | 0 .../{CohereRerank.py => cohere_rerank.py} | 0 .../{MetalRetriever.py => metal.py} | 0 ...{MultiQueryRetriever.py => multi_query.py} | 0 .../{NvidiaRerank.py => nvidia_rerank.py} | 0 .../{SelfQueryRetriever.py => self_query.py} | 0 ...QueryRetriver.py => vectara_self_query.py} | 0 ...ectorStoreRetriever.py => vector_store.py} | 0 .../components/textsplitters/__init__.py | 8 ++-- ...{CharacterTextSplitter.py => character.py} | 0 ...eTextSplitter.py => language_recursive.py} | 0 ...ageTextSplitter.py => natural_language.py} | 0 ...TextSplitter.py => recursive_character.py} | 0 .../langflow/components/toolkits/__init__.py | 6 +-- .../{ComposioAPI.py => composio_api.py} | 0 ...ectorStoreInfo.py => vector_store_info.py} | 0 .../langflow/components/tools/__init__.py | 37 ++++++++------- .../tools/{AstraDBTool.py => astradb.py} | 0 .../{AstraDBCQLTool.py => astradb_cql.py} | 0 .../{BingSearchAPI.py => bing_search_api.py} | 0 .../tools/{Calculator.py => calculator.py} | 0 ...earchRun.py => duck_duck_go_search_run.py} | 0 ...{GleanSearchAPI.py => glean_search_api.py} | 0 ...oogleSearchAPI.py => google_search_api.py} | 0 ...oogleSerperAPI.py => google_serper_api.py} | 0 ...Tool.py => python_code_structured_tool.py} | 0 .../{PythonREPLTool.py => python_repl.py} | 0 .../tools/{RetrieverTool.py => retriever.py} | 0 .../tools/{SearchAPI.py => search_api.py} | 0 .../tools/{SearXNGTool.py => searxng.py} | 0 .../tools/{SerpAPI.py => serp_api.py} | 0 .../{TavilyAISearch.py => tavily_search.py} | 0 .../{WikipediaAPI.py => wikipedia_api.py} | 0 ...olframAlphaAPI.py => wolfram_alpha_api.py} | 0 .../{YfinanceTool.py => yahoo_finance.py} | 0 .../components/vectorstores/__init__.py | 2 +- .../{CassandraGraph.py => cassandra_graph.py} | 0 ...MongoDBAtlasVector.py => mongodb_atlas.py} | 0 .../{SupabaseVectorStore.py => supabase.py} | 0 .../starter_projects/basic_prompting.py | 10 ++--- .../starter_projects/blog_writer.py | 14 +++--- .../starter_projects/complex_agent.py | 18 ++++---- .../starter_projects/document_qa.py | 14 +++--- .../hierarchical_tasks_agent.py | 17 ++++--- .../starter_projects/memory_chatbot.py | 10 ++--- .../sequential_tasks_agent.py | 15 +++---- .../starter_projects/vector_store_rag.py | 19 ++++---- src/backend/base/langflow/schema/__init__.py | 18 +++++++- src/backend/base/langflow/schema/artifact.py | 2 +- src/backend/base/langflow/schema/schema.py | 2 +- src/backend/base/pyproject.toml | 1 - src/backend/tests/conftest.py | 4 +- .../helpers/test_parse_json_data.py | 2 +- .../output_parsers/test_output_parser.py | 6 +-- .../unit/base/tools/test_component_toolkit.py | 10 ++--- .../models/test_chatollama_component.py | 4 +- .../prompts/test_prompt_component.py | 2 +- .../prototypes/test_create_data_component.py | 2 +- .../prototypes/test_update_data_component.py | 2 +- .../components/tools/test_python_repl_tool.py | 4 +- .../components/tools/test_yfinance_tool.py | 4 +- .../component/test_component_to_tool.py | 2 +- .../custom/custom_component/test_component.py | 11 +++-- .../tests/unit/graph/edge/test_edge_base.py | 10 ++--- .../graph/graph/state/test_state_model.py | 4 +- .../tests/unit/graph/graph/test_base.py | 11 +++-- .../unit/graph/graph/test_callback_graph.py | 12 ++--- .../tests/unit/graph/graph/test_cycles.py | 17 ++++--- .../graph/graph/test_graph_state_model.py | 10 ++--- .../starter_projects/test_memory_chatbot.py | 10 ++--- .../starter_projects/test_vector_store_rag.py | 21 +++++---- src/backend/tests/unit/io/test_io_schema.py | 2 +- 204 files changed, 302 insertions(+), 250 deletions(-) rename src/backend/base/langflow/components/agents/{CrewAIAgent.py => crewai.py} (100%) rename src/backend/base/langflow/components/agents/{CSVAgent.py => csv.py} (100%) rename src/backend/base/langflow/components/agents/{HierarchicalCrew.py => hierarchical_crew.py} (100%) rename src/backend/base/langflow/components/agents/{JsonAgent.py => json.py} (100%) rename src/backend/base/langflow/components/agents/{OpenAIToolsAgent.py => openai_tools.py} (100%) rename src/backend/base/langflow/components/agents/{OpenAPIAgent.py => openapi.py} (100%) rename src/backend/base/langflow/components/agents/{SequentialCrew.py => sequential_crew.py} (100%) rename src/backend/base/langflow/components/agents/{SequentialTaskAgent.py => sequential_task.py} (100%) rename src/backend/base/langflow/components/agents/{SQLAgent.py => sql.py} (100%) rename src/backend/base/langflow/components/agents/{ToolCallingAgent.py => tool_calling.py} (100%) rename src/backend/base/langflow/components/agents/{VectorStoreAgent.py => vector_store.py} (100%) rename src/backend/base/langflow/components/agents/{VectorStoreRouterAgent.py => vector_store_router.py} (100%) rename src/backend/base/langflow/components/agents/{XMLAgent.py => xml.py} (100%) rename src/backend/base/langflow/components/assemblyai/{AssemblyAIGetSubtitles.py => assemblyai_get_subtitles.py} (100%) rename src/backend/base/langflow/components/assemblyai/{AssemblyAILeMUR.py => assemblyai_lemur.py} (100%) rename src/backend/base/langflow/components/assemblyai/{AssemblyAIListTranscripts.py => assemblyai_list_transcripts.py} (100%) rename src/backend/base/langflow/components/assemblyai/{AssemblyAIPollTranscript.py => assemblyai_poll_transcript.py} (100%) rename src/backend/base/langflow/components/assemblyai/{AssemblyAIStartTranscript.py => assemblyai_start_transcript.py} (100%) rename src/backend/base/langflow/components/chains/{ConversationChain.py => conversation.py} (100%) rename src/backend/base/langflow/components/chains/{LLMCheckerChain.py => llm_checker.py} (100%) rename src/backend/base/langflow/components/chains/{LLMMathChain.py => llm_math.py} (100%) rename src/backend/base/langflow/components/chains/{RetrievalQA.py => retrieval_qa.py} (100%) rename src/backend/base/langflow/components/chains/{SQLGenerator.py => sql_generator.py} (100%) rename src/backend/base/langflow/components/data/{APIRequest.py => api_request.py} (100%) rename src/backend/base/langflow/components/data/{GoogleDrive.py => google_drive.py} (100%) rename src/backend/base/langflow/components/data/{GoogleDriveSearch.py => google_drive_search.py} (100%) rename src/backend/base/langflow/components/deactivated/{ChatLiteLLMModel.py => chat_litellm_model.py} (100%) rename src/backend/base/langflow/components/deactivated/{CodeBlockExtractor.py => code_block_extractor.py} (100%) rename src/backend/base/langflow/components/deactivated/{DocumentsToData.py => documents_to_data.py} (100%) rename src/backend/base/langflow/components/deactivated/{ExtractKeyFromData.py => extract_key_from_data.py} (100%) rename src/backend/base/langflow/components/deactivated/{ListFlows.py => list_flows.py} (100%) rename src/backend/base/langflow/components/deactivated/{MergeData.py => merge_data.py} (100%) rename src/backend/base/langflow/components/deactivated/{SelectivePassThrough.py => selective_passthrough.py} (100%) rename src/backend/base/langflow/components/deactivated/{ShouldRunNext.py => should_run_next.py} (100%) rename src/backend/base/langflow/components/deactivated/{SplitText.py => split_text.py} (100%) rename src/backend/base/langflow/components/deactivated/{StoreMessage.py => store_message.py} (100%) rename src/backend/base/langflow/components/deactivated/{SubFlow.py => sub_flow.py} (100%) rename src/backend/base/langflow/components/documentloaders/{GitLoader.py => git.py} (100%) rename src/backend/base/langflow/components/embeddings/{AIMLEmbeddings.py => aiml.py} (92%) rename src/backend/base/langflow/components/embeddings/{AmazonBedrockEmbeddings.py => amazon_bedrock.py} (100%) rename src/backend/base/langflow/components/embeddings/{AstraVectorize.py => astra_vectorize.py} (100%) rename src/backend/base/langflow/components/embeddings/{AzureOpenAIEmbeddings.py => azure_openai.py} (100%) rename src/backend/base/langflow/components/embeddings/{CohereEmbeddings.py => cohere.py} (100%) rename src/backend/base/langflow/components/embeddings/{GoogleGenerativeAIEmbeddings.py => google_generative_ai.py} (100%) rename src/backend/base/langflow/components/embeddings/{HuggingFaceInferenceAPIEmbeddings.py => huggingface_inference_api.py} (100%) rename src/backend/base/langflow/components/embeddings/{MistalAIEmbeddings.py => mistral.py} (100%) rename src/backend/base/langflow/components/embeddings/{NVIDIAEmbeddings.py => nvidia.py} (100%) rename src/backend/base/langflow/components/embeddings/{OllamaEmbeddings.py => ollama.py} (100%) rename src/backend/base/langflow/components/embeddings/{OpenAIEmbeddings.py => openai.py} (100%) rename src/backend/base/langflow/components/embeddings/{EmbeddingSimilarity.py => similarity.py} (100%) rename src/backend/base/langflow/components/embeddings/{TextEmbedder.py => text_embedder.py} (100%) rename src/backend/base/langflow/components/embeddings/util/{AIMLEmbeddingsImpl.py => aiml.py} (100%) rename src/backend/base/langflow/components/embeddings/{VertexAIEmbeddings.py => vertexai.py} (100%) rename src/backend/base/langflow/components/helpers/{CombineText.py => combine_text.py} (100%) rename src/backend/base/langflow/components/helpers/{CreateList.py => create_list.py} (100%) rename src/backend/base/langflow/components/helpers/{CSVtoData.py => csv_to_data.py} (100%) rename src/backend/base/langflow/components/helpers/{CurrentDate.py => current_date.py} (100%) rename src/backend/base/langflow/components/helpers/{CustomComponent.py => custom_component.py} (100%) rename src/backend/base/langflow/components/helpers/{DataConditionalRouter.py => data_conditional_router.py} (100%) rename src/backend/base/langflow/components/helpers/{ExtractKey.py => extract_key.py} (100%) rename src/backend/base/langflow/components/helpers/{FilterData.py => filter_data.py} (100%) rename src/backend/base/langflow/components/helpers/{FilterDataValues.py => filter_data_values.py} (100%) rename src/backend/base/langflow/components/helpers/{HierarchicalTask.py => hierarchical_task.py} (100%) rename src/backend/base/langflow/components/helpers/{IDGenerator.py => id_generator.py} (100%) rename src/backend/base/langflow/components/helpers/{JSONtoData.py => json_to_data.py} (100%) rename src/backend/base/langflow/components/helpers/{MergeData.py => merge_data.py} (100%) rename src/backend/base/langflow/components/helpers/{MessageToData.py => message_to_data.py} (100%) rename src/backend/base/langflow/components/helpers/{ParseData.py => parse_data.py} (100%) rename src/backend/base/langflow/components/helpers/{ParseJSONData.py => parse_json_data.py} (100%) rename src/backend/base/langflow/components/helpers/{SequentialTask.py => sequential_task.py} (100%) rename src/backend/base/langflow/components/helpers/{SplitText.py => split_text.py} (100%) rename src/backend/base/langflow/components/helpers/{StoreMessage.py => store_message.py} (100%) rename src/backend/base/langflow/components/inputs/{ChatInput.py => chat.py} (100%) rename src/backend/base/langflow/components/inputs/{TextInput.py => text.py} (100%) rename src/backend/base/langflow/components/langchain_utilities/{FirecrawlCrawlApi.py => firecrawl_crawl_api.py} (100%) rename src/backend/base/langflow/components/langchain_utilities/{FirecrawlScrapeApi.py => firecrawl_scrape_api.py} (100%) rename src/backend/base/langflow/components/langchain_utilities/{JSONDocumentBuilder.py => json_document_builder.py} (100%) rename src/backend/base/langflow/components/langchain_utilities/{SpiderTool.py => spider.py} (100%) rename src/backend/base/langflow/components/langchain_utilities/{SQLDatabase.py => sql_database.py} (100%) rename src/backend/base/langflow/components/link_extractors/{HtmlLinkExtractor.py => html_link_extractor.py} (100%) rename src/backend/base/langflow/components/memories/{AstraDBChatMemory.py => astra_db.py} (100%) rename src/backend/base/langflow/components/memories/{CassandraChatMemory.py => cassandra.py} (100%) rename src/backend/base/langflow/components/memories/{RedisChatMemory.py => redis.py} (100%) rename src/backend/base/langflow/components/memories/{ZepChatMemory.py => zep.py} (100%) rename src/backend/base/langflow/components/models/{AIMLModel.py => aiml.py} (100%) rename src/backend/base/langflow/components/models/{AmazonBedrockModel.py => amazon_bedrock.py} (100%) rename src/backend/base/langflow/components/models/{AnthropicModel.py => anthropic.py} (100%) rename src/backend/base/langflow/components/models/{AzureOpenAIModel.py => azure_openai.py} (100%) rename src/backend/base/langflow/components/models/{BaiduQianfanChatModel.py => baidu_qianfan_chat.py} (100%) rename src/backend/base/langflow/components/models/{CohereModel.py => cohere.py} (100%) rename src/backend/base/langflow/components/models/{GoogleGenerativeAIModel.py => google_generative_ai.py} (100%) rename src/backend/base/langflow/components/models/{GroqModel.py => groq.py} (100%) rename src/backend/base/langflow/components/models/{HuggingFaceModel.py => huggingface.py} (100%) rename src/backend/base/langflow/components/models/{MistralModel.py => mistral.py} (100%) rename src/backend/base/langflow/components/models/{NvidiaModel.py => nvidia.py} (100%) rename src/backend/base/langflow/components/models/{OllamaModel.py => ollama.py} (100%) rename src/backend/base/langflow/components/models/{OpenAIModel.py => openai.py} (100%) rename src/backend/base/langflow/components/models/{PerplexityModel.py => perplexity.py} (100%) rename src/backend/base/langflow/components/models/{VertexAiModel.py => vertexai.py} (100%) rename src/backend/base/langflow/components/output_parsers/{OutputParser.py => output_parser.py} (100%) rename src/backend/base/langflow/components/outputs/{ChatOutput.py => chat.py} (100%) rename src/backend/base/langflow/components/outputs/{TextOutput.py => text.py} (100%) rename src/backend/base/langflow/components/prompts/{LangChainHubPrompt.py => langchain_hub.py} (100%) rename src/backend/base/langflow/components/prototypes/{ConditionalRouter.py => conditional_router.py} (100%) rename src/backend/base/langflow/components/prototypes/{CreateData.py => create_data.py} (100%) rename src/backend/base/langflow/components/prototypes/{FlowTool.py => flow_tool.py} (100%) rename src/backend/base/langflow/components/prototypes/{JSONCleaner.py => json_cleaner.py} (100%) rename src/backend/base/langflow/components/prototypes/{Pass.py => pass_message.py} (100%) rename src/backend/base/langflow/components/prototypes/{PythonFunction.py => python_function.py} (100%) rename src/backend/base/langflow/components/prototypes/{RunFlow.py => run_flow.py} (100%) rename src/backend/base/langflow/components/prototypes/{RunnableExecutor.py => runnable_executor.py} (100%) rename src/backend/base/langflow/components/prototypes/{SelectData.py => select_data.py} (100%) rename src/backend/base/langflow/components/prototypes/{SQLExecutor.py => sql_executor.py} (100%) rename src/backend/base/langflow/components/prototypes/{SubFlow.py => sub_flow.py} (100%) rename src/backend/base/langflow/components/prototypes/{UpdateData.py => update_data.py} (100%) rename src/backend/base/langflow/components/retrievers/{AmazonKendra.py => amazon_kendra.py} (100%) rename src/backend/base/langflow/components/retrievers/{CohereRerank.py => cohere_rerank.py} (100%) rename src/backend/base/langflow/components/retrievers/{MetalRetriever.py => metal.py} (100%) rename src/backend/base/langflow/components/retrievers/{MultiQueryRetriever.py => multi_query.py} (100%) rename src/backend/base/langflow/components/retrievers/{NvidiaRerank.py => nvidia_rerank.py} (100%) rename src/backend/base/langflow/components/retrievers/{SelfQueryRetriever.py => self_query.py} (100%) rename src/backend/base/langflow/components/retrievers/{VectaraSelfQueryRetriver.py => vectara_self_query.py} (100%) rename src/backend/base/langflow/components/retrievers/{VectorStoreRetriever.py => vector_store.py} (100%) rename src/backend/base/langflow/components/textsplitters/{CharacterTextSplitter.py => character.py} (100%) rename src/backend/base/langflow/components/textsplitters/{LanguageRecursiveTextSplitter.py => language_recursive.py} (100%) rename src/backend/base/langflow/components/textsplitters/{NaturalLanguageTextSplitter.py => natural_language.py} (100%) rename src/backend/base/langflow/components/textsplitters/{RecursiveCharacterTextSplitter.py => recursive_character.py} (100%) rename src/backend/base/langflow/components/toolkits/{ComposioAPI.py => composio_api.py} (100%) rename src/backend/base/langflow/components/toolkits/{VectorStoreInfo.py => vector_store_info.py} (100%) rename src/backend/base/langflow/components/tools/{AstraDBTool.py => astradb.py} (100%) rename src/backend/base/langflow/components/tools/{AstraDBCQLTool.py => astradb_cql.py} (100%) rename src/backend/base/langflow/components/tools/{BingSearchAPI.py => bing_search_api.py} (100%) rename src/backend/base/langflow/components/tools/{Calculator.py => calculator.py} (100%) rename src/backend/base/langflow/components/tools/{DuckDuckGoSearchRun.py => duck_duck_go_search_run.py} (100%) rename src/backend/base/langflow/components/tools/{GleanSearchAPI.py => glean_search_api.py} (100%) rename src/backend/base/langflow/components/tools/{GoogleSearchAPI.py => google_search_api.py} (100%) rename src/backend/base/langflow/components/tools/{GoogleSerperAPI.py => google_serper_api.py} (100%) rename src/backend/base/langflow/components/tools/{PythonCodeStructuredTool.py => python_code_structured_tool.py} (100%) rename src/backend/base/langflow/components/tools/{PythonREPLTool.py => python_repl.py} (100%) rename src/backend/base/langflow/components/tools/{RetrieverTool.py => retriever.py} (100%) rename src/backend/base/langflow/components/tools/{SearchAPI.py => search_api.py} (100%) rename src/backend/base/langflow/components/tools/{SearXNGTool.py => searxng.py} (100%) rename src/backend/base/langflow/components/tools/{SerpAPI.py => serp_api.py} (100%) rename src/backend/base/langflow/components/tools/{TavilyAISearch.py => tavily_search.py} (100%) rename src/backend/base/langflow/components/tools/{WikipediaAPI.py => wikipedia_api.py} (100%) rename src/backend/base/langflow/components/tools/{WolframAlphaAPI.py => wolfram_alpha_api.py} (100%) rename src/backend/base/langflow/components/tools/{YfinanceTool.py => yahoo_finance.py} (100%) rename src/backend/base/langflow/components/vectorstores/{CassandraGraph.py => cassandra_graph.py} (100%) rename src/backend/base/langflow/components/vectorstores/{MongoDBAtlasVector.py => mongodb_atlas.py} (100%) rename src/backend/base/langflow/components/vectorstores/{SupabaseVectorStore.py => supabase.py} (100%) diff --git a/src/backend/base/langflow/base/prompts/utils.py b/src/backend/base/langflow/base/prompts/utils.py index 07bc692b6eb..cac903a157a 100644 --- a/src/backend/base/langflow/base/prompts/utils.py +++ b/src/backend/base/langflow/base/prompts/utils.py @@ -2,7 +2,7 @@ from langchain_core.documents import Document -from langflow.schema import Data +from langflow.schema.data import Data def data_to_string(record: Data) -> str: diff --git a/src/backend/base/langflow/components/agents/__init__.py b/src/backend/base/langflow/components/agents/__init__.py index 8bd64bab03d..245c38a9760 100644 --- a/src/backend/base/langflow/components/agents/__init__.py +++ b/src/backend/base/langflow/components/agents/__init__.py @@ -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", diff --git a/src/backend/base/langflow/components/agents/CrewAIAgent.py b/src/backend/base/langflow/components/agents/crewai.py similarity index 100% rename from src/backend/base/langflow/components/agents/CrewAIAgent.py rename to src/backend/base/langflow/components/agents/crewai.py diff --git a/src/backend/base/langflow/components/agents/CSVAgent.py b/src/backend/base/langflow/components/agents/csv.py similarity index 100% rename from src/backend/base/langflow/components/agents/CSVAgent.py rename to src/backend/base/langflow/components/agents/csv.py diff --git a/src/backend/base/langflow/components/agents/HierarchicalCrew.py b/src/backend/base/langflow/components/agents/hierarchical_crew.py similarity index 100% rename from src/backend/base/langflow/components/agents/HierarchicalCrew.py rename to src/backend/base/langflow/components/agents/hierarchical_crew.py diff --git a/src/backend/base/langflow/components/agents/JsonAgent.py b/src/backend/base/langflow/components/agents/json.py similarity index 100% rename from src/backend/base/langflow/components/agents/JsonAgent.py rename to src/backend/base/langflow/components/agents/json.py diff --git a/src/backend/base/langflow/components/agents/OpenAIToolsAgent.py b/src/backend/base/langflow/components/agents/openai_tools.py similarity index 100% rename from src/backend/base/langflow/components/agents/OpenAIToolsAgent.py rename to src/backend/base/langflow/components/agents/openai_tools.py diff --git a/src/backend/base/langflow/components/agents/OpenAPIAgent.py b/src/backend/base/langflow/components/agents/openapi.py similarity index 100% rename from src/backend/base/langflow/components/agents/OpenAPIAgent.py rename to src/backend/base/langflow/components/agents/openapi.py diff --git a/src/backend/base/langflow/components/agents/SequentialCrew.py b/src/backend/base/langflow/components/agents/sequential_crew.py similarity index 100% rename from src/backend/base/langflow/components/agents/SequentialCrew.py rename to src/backend/base/langflow/components/agents/sequential_crew.py diff --git a/src/backend/base/langflow/components/agents/SequentialTaskAgent.py b/src/backend/base/langflow/components/agents/sequential_task.py similarity index 100% rename from src/backend/base/langflow/components/agents/SequentialTaskAgent.py rename to src/backend/base/langflow/components/agents/sequential_task.py diff --git a/src/backend/base/langflow/components/agents/SQLAgent.py b/src/backend/base/langflow/components/agents/sql.py similarity index 100% rename from src/backend/base/langflow/components/agents/SQLAgent.py rename to src/backend/base/langflow/components/agents/sql.py diff --git a/src/backend/base/langflow/components/agents/ToolCallingAgent.py b/src/backend/base/langflow/components/agents/tool_calling.py similarity index 100% rename from src/backend/base/langflow/components/agents/ToolCallingAgent.py rename to src/backend/base/langflow/components/agents/tool_calling.py diff --git a/src/backend/base/langflow/components/agents/VectorStoreAgent.py b/src/backend/base/langflow/components/agents/vector_store.py similarity index 100% rename from src/backend/base/langflow/components/agents/VectorStoreAgent.py rename to src/backend/base/langflow/components/agents/vector_store.py diff --git a/src/backend/base/langflow/components/agents/VectorStoreRouterAgent.py b/src/backend/base/langflow/components/agents/vector_store_router.py similarity index 100% rename from src/backend/base/langflow/components/agents/VectorStoreRouterAgent.py rename to src/backend/base/langflow/components/agents/vector_store_router.py diff --git a/src/backend/base/langflow/components/agents/XMLAgent.py b/src/backend/base/langflow/components/agents/xml.py similarity index 100% rename from src/backend/base/langflow/components/agents/XMLAgent.py rename to src/backend/base/langflow/components/agents/xml.py diff --git a/src/backend/base/langflow/components/assemblyai/AssemblyAIGetSubtitles.py b/src/backend/base/langflow/components/assemblyai/assemblyai_get_subtitles.py similarity index 100% rename from src/backend/base/langflow/components/assemblyai/AssemblyAIGetSubtitles.py rename to src/backend/base/langflow/components/assemblyai/assemblyai_get_subtitles.py diff --git a/src/backend/base/langflow/components/assemblyai/AssemblyAILeMUR.py b/src/backend/base/langflow/components/assemblyai/assemblyai_lemur.py similarity index 100% rename from src/backend/base/langflow/components/assemblyai/AssemblyAILeMUR.py rename to src/backend/base/langflow/components/assemblyai/assemblyai_lemur.py diff --git a/src/backend/base/langflow/components/assemblyai/AssemblyAIListTranscripts.py b/src/backend/base/langflow/components/assemblyai/assemblyai_list_transcripts.py similarity index 100% rename from src/backend/base/langflow/components/assemblyai/AssemblyAIListTranscripts.py rename to src/backend/base/langflow/components/assemblyai/assemblyai_list_transcripts.py diff --git a/src/backend/base/langflow/components/assemblyai/AssemblyAIPollTranscript.py b/src/backend/base/langflow/components/assemblyai/assemblyai_poll_transcript.py similarity index 100% rename from src/backend/base/langflow/components/assemblyai/AssemblyAIPollTranscript.py rename to src/backend/base/langflow/components/assemblyai/assemblyai_poll_transcript.py diff --git a/src/backend/base/langflow/components/assemblyai/AssemblyAIStartTranscript.py b/src/backend/base/langflow/components/assemblyai/assemblyai_start_transcript.py similarity index 100% rename from src/backend/base/langflow/components/assemblyai/AssemblyAIStartTranscript.py rename to src/backend/base/langflow/components/assemblyai/assemblyai_start_transcript.py diff --git a/src/backend/base/langflow/components/chains/__init__.py b/src/backend/base/langflow/components/chains/__init__.py index 39faca5e9f7..550a979fd30 100644 --- a/src/backend/base/langflow/components/chains/__init__.py +++ b/src/backend/base/langflow/components/chains/__init__.py @@ -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", diff --git a/src/backend/base/langflow/components/chains/ConversationChain.py b/src/backend/base/langflow/components/chains/conversation.py similarity index 100% rename from src/backend/base/langflow/components/chains/ConversationChain.py rename to src/backend/base/langflow/components/chains/conversation.py diff --git a/src/backend/base/langflow/components/chains/LLMCheckerChain.py b/src/backend/base/langflow/components/chains/llm_checker.py similarity index 100% rename from src/backend/base/langflow/components/chains/LLMCheckerChain.py rename to src/backend/base/langflow/components/chains/llm_checker.py diff --git a/src/backend/base/langflow/components/chains/LLMMathChain.py b/src/backend/base/langflow/components/chains/llm_math.py similarity index 100% rename from src/backend/base/langflow/components/chains/LLMMathChain.py rename to src/backend/base/langflow/components/chains/llm_math.py diff --git a/src/backend/base/langflow/components/chains/RetrievalQA.py b/src/backend/base/langflow/components/chains/retrieval_qa.py similarity index 100% rename from src/backend/base/langflow/components/chains/RetrievalQA.py rename to src/backend/base/langflow/components/chains/retrieval_qa.py diff --git a/src/backend/base/langflow/components/chains/SQLGenerator.py b/src/backend/base/langflow/components/chains/sql_generator.py similarity index 100% rename from src/backend/base/langflow/components/chains/SQLGenerator.py rename to src/backend/base/langflow/components/chains/sql_generator.py diff --git a/src/backend/base/langflow/components/data/__init__.py b/src/backend/base/langflow/components/data/__init__.py index ba037a740f5..023b3211111 100644 --- a/src/backend/base/langflow/components/data/__init__.py +++ b/src/backend/base/langflow/components/data/__init__.py @@ -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"] diff --git a/src/backend/base/langflow/components/data/APIRequest.py b/src/backend/base/langflow/components/data/api_request.py similarity index 100% rename from src/backend/base/langflow/components/data/APIRequest.py rename to src/backend/base/langflow/components/data/api_request.py diff --git a/src/backend/base/langflow/components/data/GoogleDrive.py b/src/backend/base/langflow/components/data/google_drive.py similarity index 100% rename from src/backend/base/langflow/components/data/GoogleDrive.py rename to src/backend/base/langflow/components/data/google_drive.py diff --git a/src/backend/base/langflow/components/data/GoogleDriveSearch.py b/src/backend/base/langflow/components/data/google_drive_search.py similarity index 100% rename from src/backend/base/langflow/components/data/GoogleDriveSearch.py rename to src/backend/base/langflow/components/data/google_drive_search.py diff --git a/src/backend/base/langflow/components/deactivated/__init__.py b/src/backend/base/langflow/components/deactivated/__init__.py index 026cf6f407f..6d127f9565a 100644 --- a/src/backend/base/langflow/components/deactivated/__init__.py +++ b/src/backend/base/langflow/components/deactivated/__init__.py @@ -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", diff --git a/src/backend/base/langflow/components/deactivated/ChatLiteLLMModel.py b/src/backend/base/langflow/components/deactivated/chat_litellm_model.py similarity index 100% rename from src/backend/base/langflow/components/deactivated/ChatLiteLLMModel.py rename to src/backend/base/langflow/components/deactivated/chat_litellm_model.py diff --git a/src/backend/base/langflow/components/deactivated/CodeBlockExtractor.py b/src/backend/base/langflow/components/deactivated/code_block_extractor.py similarity index 100% rename from src/backend/base/langflow/components/deactivated/CodeBlockExtractor.py rename to src/backend/base/langflow/components/deactivated/code_block_extractor.py diff --git a/src/backend/base/langflow/components/deactivated/DocumentsToData.py b/src/backend/base/langflow/components/deactivated/documents_to_data.py similarity index 100% rename from src/backend/base/langflow/components/deactivated/DocumentsToData.py rename to src/backend/base/langflow/components/deactivated/documents_to_data.py diff --git a/src/backend/base/langflow/components/deactivated/ExtractKeyFromData.py b/src/backend/base/langflow/components/deactivated/extract_key_from_data.py similarity index 100% rename from src/backend/base/langflow/components/deactivated/ExtractKeyFromData.py rename to src/backend/base/langflow/components/deactivated/extract_key_from_data.py diff --git a/src/backend/base/langflow/components/deactivated/ListFlows.py b/src/backend/base/langflow/components/deactivated/list_flows.py similarity index 100% rename from src/backend/base/langflow/components/deactivated/ListFlows.py rename to src/backend/base/langflow/components/deactivated/list_flows.py diff --git a/src/backend/base/langflow/components/deactivated/MergeData.py b/src/backend/base/langflow/components/deactivated/merge_data.py similarity index 100% rename from src/backend/base/langflow/components/deactivated/MergeData.py rename to src/backend/base/langflow/components/deactivated/merge_data.py diff --git a/src/backend/base/langflow/components/deactivated/SelectivePassThrough.py b/src/backend/base/langflow/components/deactivated/selective_passthrough.py similarity index 100% rename from src/backend/base/langflow/components/deactivated/SelectivePassThrough.py rename to src/backend/base/langflow/components/deactivated/selective_passthrough.py diff --git a/src/backend/base/langflow/components/deactivated/ShouldRunNext.py b/src/backend/base/langflow/components/deactivated/should_run_next.py similarity index 100% rename from src/backend/base/langflow/components/deactivated/ShouldRunNext.py rename to src/backend/base/langflow/components/deactivated/should_run_next.py diff --git a/src/backend/base/langflow/components/deactivated/SplitText.py b/src/backend/base/langflow/components/deactivated/split_text.py similarity index 100% rename from src/backend/base/langflow/components/deactivated/SplitText.py rename to src/backend/base/langflow/components/deactivated/split_text.py diff --git a/src/backend/base/langflow/components/deactivated/StoreMessage.py b/src/backend/base/langflow/components/deactivated/store_message.py similarity index 100% rename from src/backend/base/langflow/components/deactivated/StoreMessage.py rename to src/backend/base/langflow/components/deactivated/store_message.py diff --git a/src/backend/base/langflow/components/deactivated/SubFlow.py b/src/backend/base/langflow/components/deactivated/sub_flow.py similarity index 100% rename from src/backend/base/langflow/components/deactivated/SubFlow.py rename to src/backend/base/langflow/components/deactivated/sub_flow.py diff --git a/src/backend/base/langflow/components/documentloaders/__init__.py b/src/backend/base/langflow/components/documentloaders/__init__.py index 0bed3869d43..a223723ae75 100644 --- a/src/backend/base/langflow/components/documentloaders/__init__.py +++ b/src/backend/base/langflow/components/documentloaders/__init__.py @@ -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"] diff --git a/src/backend/base/langflow/components/documentloaders/GitLoader.py b/src/backend/base/langflow/components/documentloaders/git.py similarity index 100% rename from src/backend/base/langflow/components/documentloaders/GitLoader.py rename to src/backend/base/langflow/components/documentloaders/git.py diff --git a/src/backend/base/langflow/components/embeddings/__init__.py b/src/backend/base/langflow/components/embeddings/__init__.py index cdc94fd2d1f..afb0ef3490d 100644 --- a/src/backend/base/langflow/components/embeddings/__init__.py +++ b/src/backend/base/langflow/components/embeddings/__init__.py @@ -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", diff --git a/src/backend/base/langflow/components/embeddings/AIMLEmbeddings.py b/src/backend/base/langflow/components/embeddings/aiml.py similarity index 92% rename from src/backend/base/langflow/components/embeddings/AIMLEmbeddings.py rename to src/backend/base/langflow/components/embeddings/aiml.py index e52198ba43c..a5c4e283548 100644 --- a/src/backend/base/langflow/components/embeddings/AIMLEmbeddings.py +++ b/src/backend/base/langflow/components/embeddings/aiml.py @@ -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 diff --git a/src/backend/base/langflow/components/embeddings/AmazonBedrockEmbeddings.py b/src/backend/base/langflow/components/embeddings/amazon_bedrock.py similarity index 100% rename from src/backend/base/langflow/components/embeddings/AmazonBedrockEmbeddings.py rename to src/backend/base/langflow/components/embeddings/amazon_bedrock.py diff --git a/src/backend/base/langflow/components/embeddings/AstraVectorize.py b/src/backend/base/langflow/components/embeddings/astra_vectorize.py similarity index 100% rename from src/backend/base/langflow/components/embeddings/AstraVectorize.py rename to src/backend/base/langflow/components/embeddings/astra_vectorize.py diff --git a/src/backend/base/langflow/components/embeddings/AzureOpenAIEmbeddings.py b/src/backend/base/langflow/components/embeddings/azure_openai.py similarity index 100% rename from src/backend/base/langflow/components/embeddings/AzureOpenAIEmbeddings.py rename to src/backend/base/langflow/components/embeddings/azure_openai.py diff --git a/src/backend/base/langflow/components/embeddings/CohereEmbeddings.py b/src/backend/base/langflow/components/embeddings/cohere.py similarity index 100% rename from src/backend/base/langflow/components/embeddings/CohereEmbeddings.py rename to src/backend/base/langflow/components/embeddings/cohere.py diff --git a/src/backend/base/langflow/components/embeddings/GoogleGenerativeAIEmbeddings.py b/src/backend/base/langflow/components/embeddings/google_generative_ai.py similarity index 100% rename from src/backend/base/langflow/components/embeddings/GoogleGenerativeAIEmbeddings.py rename to src/backend/base/langflow/components/embeddings/google_generative_ai.py diff --git a/src/backend/base/langflow/components/embeddings/HuggingFaceInferenceAPIEmbeddings.py b/src/backend/base/langflow/components/embeddings/huggingface_inference_api.py similarity index 100% rename from src/backend/base/langflow/components/embeddings/HuggingFaceInferenceAPIEmbeddings.py rename to src/backend/base/langflow/components/embeddings/huggingface_inference_api.py diff --git a/src/backend/base/langflow/components/embeddings/MistalAIEmbeddings.py b/src/backend/base/langflow/components/embeddings/mistral.py similarity index 100% rename from src/backend/base/langflow/components/embeddings/MistalAIEmbeddings.py rename to src/backend/base/langflow/components/embeddings/mistral.py diff --git a/src/backend/base/langflow/components/embeddings/NVIDIAEmbeddings.py b/src/backend/base/langflow/components/embeddings/nvidia.py similarity index 100% rename from src/backend/base/langflow/components/embeddings/NVIDIAEmbeddings.py rename to src/backend/base/langflow/components/embeddings/nvidia.py diff --git a/src/backend/base/langflow/components/embeddings/OllamaEmbeddings.py b/src/backend/base/langflow/components/embeddings/ollama.py similarity index 100% rename from src/backend/base/langflow/components/embeddings/OllamaEmbeddings.py rename to src/backend/base/langflow/components/embeddings/ollama.py diff --git a/src/backend/base/langflow/components/embeddings/OpenAIEmbeddings.py b/src/backend/base/langflow/components/embeddings/openai.py similarity index 100% rename from src/backend/base/langflow/components/embeddings/OpenAIEmbeddings.py rename to src/backend/base/langflow/components/embeddings/openai.py diff --git a/src/backend/base/langflow/components/embeddings/EmbeddingSimilarity.py b/src/backend/base/langflow/components/embeddings/similarity.py similarity index 100% rename from src/backend/base/langflow/components/embeddings/EmbeddingSimilarity.py rename to src/backend/base/langflow/components/embeddings/similarity.py diff --git a/src/backend/base/langflow/components/embeddings/TextEmbedder.py b/src/backend/base/langflow/components/embeddings/text_embedder.py similarity index 100% rename from src/backend/base/langflow/components/embeddings/TextEmbedder.py rename to src/backend/base/langflow/components/embeddings/text_embedder.py diff --git a/src/backend/base/langflow/components/embeddings/util/__init__.py b/src/backend/base/langflow/components/embeddings/util/__init__.py index e69de29bb2d..1f85a6f04b6 100644 --- a/src/backend/base/langflow/components/embeddings/util/__init__.py +++ b/src/backend/base/langflow/components/embeddings/util/__init__.py @@ -0,0 +1,3 @@ +from .aiml import AIMLEmbeddingsImpl + +__all__ = ["AIMLEmbeddingsImpl"] diff --git a/src/backend/base/langflow/components/embeddings/util/AIMLEmbeddingsImpl.py b/src/backend/base/langflow/components/embeddings/util/aiml.py similarity index 100% rename from src/backend/base/langflow/components/embeddings/util/AIMLEmbeddingsImpl.py rename to src/backend/base/langflow/components/embeddings/util/aiml.py diff --git a/src/backend/base/langflow/components/embeddings/VertexAIEmbeddings.py b/src/backend/base/langflow/components/embeddings/vertexai.py similarity index 100% rename from src/backend/base/langflow/components/embeddings/VertexAIEmbeddings.py rename to src/backend/base/langflow/components/embeddings/vertexai.py diff --git a/src/backend/base/langflow/components/helpers/__init__.py b/src/backend/base/langflow/components/helpers/__init__.py index 0bc52386e64..c30861d2b19 100644 --- a/src/backend/base/langflow/components/helpers/__init__.py +++ b/src/backend/base/langflow/components/helpers/__init__.py @@ -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", ] diff --git a/src/backend/base/langflow/components/helpers/CombineText.py b/src/backend/base/langflow/components/helpers/combine_text.py similarity index 100% rename from src/backend/base/langflow/components/helpers/CombineText.py rename to src/backend/base/langflow/components/helpers/combine_text.py diff --git a/src/backend/base/langflow/components/helpers/CreateList.py b/src/backend/base/langflow/components/helpers/create_list.py similarity index 100% rename from src/backend/base/langflow/components/helpers/CreateList.py rename to src/backend/base/langflow/components/helpers/create_list.py diff --git a/src/backend/base/langflow/components/helpers/CSVtoData.py b/src/backend/base/langflow/components/helpers/csv_to_data.py similarity index 100% rename from src/backend/base/langflow/components/helpers/CSVtoData.py rename to src/backend/base/langflow/components/helpers/csv_to_data.py diff --git a/src/backend/base/langflow/components/helpers/CurrentDate.py b/src/backend/base/langflow/components/helpers/current_date.py similarity index 100% rename from src/backend/base/langflow/components/helpers/CurrentDate.py rename to src/backend/base/langflow/components/helpers/current_date.py diff --git a/src/backend/base/langflow/components/helpers/CustomComponent.py b/src/backend/base/langflow/components/helpers/custom_component.py similarity index 100% rename from src/backend/base/langflow/components/helpers/CustomComponent.py rename to src/backend/base/langflow/components/helpers/custom_component.py diff --git a/src/backend/base/langflow/components/helpers/DataConditionalRouter.py b/src/backend/base/langflow/components/helpers/data_conditional_router.py similarity index 100% rename from src/backend/base/langflow/components/helpers/DataConditionalRouter.py rename to src/backend/base/langflow/components/helpers/data_conditional_router.py diff --git a/src/backend/base/langflow/components/helpers/ExtractKey.py b/src/backend/base/langflow/components/helpers/extract_key.py similarity index 100% rename from src/backend/base/langflow/components/helpers/ExtractKey.py rename to src/backend/base/langflow/components/helpers/extract_key.py diff --git a/src/backend/base/langflow/components/helpers/FilterData.py b/src/backend/base/langflow/components/helpers/filter_data.py similarity index 100% rename from src/backend/base/langflow/components/helpers/FilterData.py rename to src/backend/base/langflow/components/helpers/filter_data.py diff --git a/src/backend/base/langflow/components/helpers/FilterDataValues.py b/src/backend/base/langflow/components/helpers/filter_data_values.py similarity index 100% rename from src/backend/base/langflow/components/helpers/FilterDataValues.py rename to src/backend/base/langflow/components/helpers/filter_data_values.py diff --git a/src/backend/base/langflow/components/helpers/HierarchicalTask.py b/src/backend/base/langflow/components/helpers/hierarchical_task.py similarity index 100% rename from src/backend/base/langflow/components/helpers/HierarchicalTask.py rename to src/backend/base/langflow/components/helpers/hierarchical_task.py diff --git a/src/backend/base/langflow/components/helpers/IDGenerator.py b/src/backend/base/langflow/components/helpers/id_generator.py similarity index 100% rename from src/backend/base/langflow/components/helpers/IDGenerator.py rename to src/backend/base/langflow/components/helpers/id_generator.py diff --git a/src/backend/base/langflow/components/helpers/JSONtoData.py b/src/backend/base/langflow/components/helpers/json_to_data.py similarity index 100% rename from src/backend/base/langflow/components/helpers/JSONtoData.py rename to src/backend/base/langflow/components/helpers/json_to_data.py diff --git a/src/backend/base/langflow/components/helpers/MergeData.py b/src/backend/base/langflow/components/helpers/merge_data.py similarity index 100% rename from src/backend/base/langflow/components/helpers/MergeData.py rename to src/backend/base/langflow/components/helpers/merge_data.py diff --git a/src/backend/base/langflow/components/helpers/MessageToData.py b/src/backend/base/langflow/components/helpers/message_to_data.py similarity index 100% rename from src/backend/base/langflow/components/helpers/MessageToData.py rename to src/backend/base/langflow/components/helpers/message_to_data.py diff --git a/src/backend/base/langflow/components/helpers/ParseData.py b/src/backend/base/langflow/components/helpers/parse_data.py similarity index 100% rename from src/backend/base/langflow/components/helpers/ParseData.py rename to src/backend/base/langflow/components/helpers/parse_data.py diff --git a/src/backend/base/langflow/components/helpers/ParseJSONData.py b/src/backend/base/langflow/components/helpers/parse_json_data.py similarity index 100% rename from src/backend/base/langflow/components/helpers/ParseJSONData.py rename to src/backend/base/langflow/components/helpers/parse_json_data.py diff --git a/src/backend/base/langflow/components/helpers/SequentialTask.py b/src/backend/base/langflow/components/helpers/sequential_task.py similarity index 100% rename from src/backend/base/langflow/components/helpers/SequentialTask.py rename to src/backend/base/langflow/components/helpers/sequential_task.py diff --git a/src/backend/base/langflow/components/helpers/SplitText.py b/src/backend/base/langflow/components/helpers/split_text.py similarity index 100% rename from src/backend/base/langflow/components/helpers/SplitText.py rename to src/backend/base/langflow/components/helpers/split_text.py diff --git a/src/backend/base/langflow/components/helpers/StoreMessage.py b/src/backend/base/langflow/components/helpers/store_message.py similarity index 100% rename from src/backend/base/langflow/components/helpers/StoreMessage.py rename to src/backend/base/langflow/components/helpers/store_message.py diff --git a/src/backend/base/langflow/components/inputs/__init__.py b/src/backend/base/langflow/components/inputs/__init__.py index 48fc9a18991..311e23f759f 100644 --- a/src/backend/base/langflow/components/inputs/__init__.py +++ b/src/backend/base/langflow/components/inputs/__init__.py @@ -1,4 +1,4 @@ -from .ChatInput import ChatInput -from .TextInput import TextInputComponent +from .chat import ChatInput +from .text import TextInputComponent __all__ = ["ChatInput", "TextInputComponent"] diff --git a/src/backend/base/langflow/components/inputs/ChatInput.py b/src/backend/base/langflow/components/inputs/chat.py similarity index 100% rename from src/backend/base/langflow/components/inputs/ChatInput.py rename to src/backend/base/langflow/components/inputs/chat.py diff --git a/src/backend/base/langflow/components/inputs/TextInput.py b/src/backend/base/langflow/components/inputs/text.py similarity index 100% rename from src/backend/base/langflow/components/inputs/TextInput.py rename to src/backend/base/langflow/components/inputs/text.py diff --git a/src/backend/base/langflow/components/langchain_utilities/FirecrawlCrawlApi.py b/src/backend/base/langflow/components/langchain_utilities/firecrawl_crawl_api.py similarity index 100% rename from src/backend/base/langflow/components/langchain_utilities/FirecrawlCrawlApi.py rename to src/backend/base/langflow/components/langchain_utilities/firecrawl_crawl_api.py diff --git a/src/backend/base/langflow/components/langchain_utilities/FirecrawlScrapeApi.py b/src/backend/base/langflow/components/langchain_utilities/firecrawl_scrape_api.py similarity index 100% rename from src/backend/base/langflow/components/langchain_utilities/FirecrawlScrapeApi.py rename to src/backend/base/langflow/components/langchain_utilities/firecrawl_scrape_api.py diff --git a/src/backend/base/langflow/components/langchain_utilities/JSONDocumentBuilder.py b/src/backend/base/langflow/components/langchain_utilities/json_document_builder.py similarity index 100% rename from src/backend/base/langflow/components/langchain_utilities/JSONDocumentBuilder.py rename to src/backend/base/langflow/components/langchain_utilities/json_document_builder.py diff --git a/src/backend/base/langflow/components/langchain_utilities/SpiderTool.py b/src/backend/base/langflow/components/langchain_utilities/spider.py similarity index 100% rename from src/backend/base/langflow/components/langchain_utilities/SpiderTool.py rename to src/backend/base/langflow/components/langchain_utilities/spider.py diff --git a/src/backend/base/langflow/components/langchain_utilities/SQLDatabase.py b/src/backend/base/langflow/components/langchain_utilities/sql_database.py similarity index 100% rename from src/backend/base/langflow/components/langchain_utilities/SQLDatabase.py rename to src/backend/base/langflow/components/langchain_utilities/sql_database.py diff --git a/src/backend/base/langflow/components/link_extractors/__init__.py b/src/backend/base/langflow/components/link_extractors/__init__.py index c50a133a98f..66ceda375cd 100644 --- a/src/backend/base/langflow/components/link_extractors/__init__.py +++ b/src/backend/base/langflow/components/link_extractors/__init__.py @@ -1,4 +1,4 @@ -from .HtmlLinkExtractor import HtmlLinkExtractorComponent +from .html_link_extractor import HtmlLinkExtractorComponent __all__ = [ "HtmlLinkExtractorComponent", diff --git a/src/backend/base/langflow/components/link_extractors/HtmlLinkExtractor.py b/src/backend/base/langflow/components/link_extractors/html_link_extractor.py similarity index 100% rename from src/backend/base/langflow/components/link_extractors/HtmlLinkExtractor.py rename to src/backend/base/langflow/components/link_extractors/html_link_extractor.py diff --git a/src/backend/base/langflow/components/memories/AstraDBChatMemory.py b/src/backend/base/langflow/components/memories/astra_db.py similarity index 100% rename from src/backend/base/langflow/components/memories/AstraDBChatMemory.py rename to src/backend/base/langflow/components/memories/astra_db.py diff --git a/src/backend/base/langflow/components/memories/CassandraChatMemory.py b/src/backend/base/langflow/components/memories/cassandra.py similarity index 100% rename from src/backend/base/langflow/components/memories/CassandraChatMemory.py rename to src/backend/base/langflow/components/memories/cassandra.py diff --git a/src/backend/base/langflow/components/memories/RedisChatMemory.py b/src/backend/base/langflow/components/memories/redis.py similarity index 100% rename from src/backend/base/langflow/components/memories/RedisChatMemory.py rename to src/backend/base/langflow/components/memories/redis.py diff --git a/src/backend/base/langflow/components/memories/ZepChatMemory.py b/src/backend/base/langflow/components/memories/zep.py similarity index 100% rename from src/backend/base/langflow/components/memories/ZepChatMemory.py rename to src/backend/base/langflow/components/memories/zep.py diff --git a/src/backend/base/langflow/components/models/__init__.py b/src/backend/base/langflow/components/models/__init__.py index 8881996c2c7..87a3be912e3 100644 --- a/src/backend/base/langflow/components/models/__init__.py +++ b/src/backend/base/langflow/components/models/__init__.py @@ -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", diff --git a/src/backend/base/langflow/components/models/AIMLModel.py b/src/backend/base/langflow/components/models/aiml.py similarity index 100% rename from src/backend/base/langflow/components/models/AIMLModel.py rename to src/backend/base/langflow/components/models/aiml.py diff --git a/src/backend/base/langflow/components/models/AmazonBedrockModel.py b/src/backend/base/langflow/components/models/amazon_bedrock.py similarity index 100% rename from src/backend/base/langflow/components/models/AmazonBedrockModel.py rename to src/backend/base/langflow/components/models/amazon_bedrock.py diff --git a/src/backend/base/langflow/components/models/AnthropicModel.py b/src/backend/base/langflow/components/models/anthropic.py similarity index 100% rename from src/backend/base/langflow/components/models/AnthropicModel.py rename to src/backend/base/langflow/components/models/anthropic.py diff --git a/src/backend/base/langflow/components/models/AzureOpenAIModel.py b/src/backend/base/langflow/components/models/azure_openai.py similarity index 100% rename from src/backend/base/langflow/components/models/AzureOpenAIModel.py rename to src/backend/base/langflow/components/models/azure_openai.py diff --git a/src/backend/base/langflow/components/models/BaiduQianfanChatModel.py b/src/backend/base/langflow/components/models/baidu_qianfan_chat.py similarity index 100% rename from src/backend/base/langflow/components/models/BaiduQianfanChatModel.py rename to src/backend/base/langflow/components/models/baidu_qianfan_chat.py diff --git a/src/backend/base/langflow/components/models/CohereModel.py b/src/backend/base/langflow/components/models/cohere.py similarity index 100% rename from src/backend/base/langflow/components/models/CohereModel.py rename to src/backend/base/langflow/components/models/cohere.py diff --git a/src/backend/base/langflow/components/models/GoogleGenerativeAIModel.py b/src/backend/base/langflow/components/models/google_generative_ai.py similarity index 100% rename from src/backend/base/langflow/components/models/GoogleGenerativeAIModel.py rename to src/backend/base/langflow/components/models/google_generative_ai.py diff --git a/src/backend/base/langflow/components/models/GroqModel.py b/src/backend/base/langflow/components/models/groq.py similarity index 100% rename from src/backend/base/langflow/components/models/GroqModel.py rename to src/backend/base/langflow/components/models/groq.py diff --git a/src/backend/base/langflow/components/models/HuggingFaceModel.py b/src/backend/base/langflow/components/models/huggingface.py similarity index 100% rename from src/backend/base/langflow/components/models/HuggingFaceModel.py rename to src/backend/base/langflow/components/models/huggingface.py diff --git a/src/backend/base/langflow/components/models/MistralModel.py b/src/backend/base/langflow/components/models/mistral.py similarity index 100% rename from src/backend/base/langflow/components/models/MistralModel.py rename to src/backend/base/langflow/components/models/mistral.py diff --git a/src/backend/base/langflow/components/models/NvidiaModel.py b/src/backend/base/langflow/components/models/nvidia.py similarity index 100% rename from src/backend/base/langflow/components/models/NvidiaModel.py rename to src/backend/base/langflow/components/models/nvidia.py diff --git a/src/backend/base/langflow/components/models/OllamaModel.py b/src/backend/base/langflow/components/models/ollama.py similarity index 100% rename from src/backend/base/langflow/components/models/OllamaModel.py rename to src/backend/base/langflow/components/models/ollama.py diff --git a/src/backend/base/langflow/components/models/OpenAIModel.py b/src/backend/base/langflow/components/models/openai.py similarity index 100% rename from src/backend/base/langflow/components/models/OpenAIModel.py rename to src/backend/base/langflow/components/models/openai.py diff --git a/src/backend/base/langflow/components/models/PerplexityModel.py b/src/backend/base/langflow/components/models/perplexity.py similarity index 100% rename from src/backend/base/langflow/components/models/PerplexityModel.py rename to src/backend/base/langflow/components/models/perplexity.py diff --git a/src/backend/base/langflow/components/models/VertexAiModel.py b/src/backend/base/langflow/components/models/vertexai.py similarity index 100% rename from src/backend/base/langflow/components/models/VertexAiModel.py rename to src/backend/base/langflow/components/models/vertexai.py diff --git a/src/backend/base/langflow/components/output_parsers/__init__.py b/src/backend/base/langflow/components/output_parsers/__init__.py index 9af69c443aa..09d102a00d7 100644 --- a/src/backend/base/langflow/components/output_parsers/__init__.py +++ b/src/backend/base/langflow/components/output_parsers/__init__.py @@ -1,3 +1,3 @@ -from .OutputParser import OutputParserComponent +from .output_parser import OutputParserComponent __all__ = ["OutputParserComponent"] diff --git a/src/backend/base/langflow/components/output_parsers/OutputParser.py b/src/backend/base/langflow/components/output_parsers/output_parser.py similarity index 100% rename from src/backend/base/langflow/components/output_parsers/OutputParser.py rename to src/backend/base/langflow/components/output_parsers/output_parser.py diff --git a/src/backend/base/langflow/components/outputs/__init__.py b/src/backend/base/langflow/components/outputs/__init__.py index 35200e0feef..0a48af2e4a2 100644 --- a/src/backend/base/langflow/components/outputs/__init__.py +++ b/src/backend/base/langflow/components/outputs/__init__.py @@ -1,4 +1,4 @@ -from .ChatOutput import ChatOutput -from .TextOutput import TextOutputComponent +from .chat import ChatOutput +from .text import TextOutputComponent __all__ = ["ChatOutput", "TextOutputComponent"] diff --git a/src/backend/base/langflow/components/outputs/ChatOutput.py b/src/backend/base/langflow/components/outputs/chat.py similarity index 100% rename from src/backend/base/langflow/components/outputs/ChatOutput.py rename to src/backend/base/langflow/components/outputs/chat.py diff --git a/src/backend/base/langflow/components/outputs/TextOutput.py b/src/backend/base/langflow/components/outputs/text.py similarity index 100% rename from src/backend/base/langflow/components/outputs/TextOutput.py rename to src/backend/base/langflow/components/outputs/text.py diff --git a/src/backend/base/langflow/components/prompts/__init__.py b/src/backend/base/langflow/components/prompts/__init__.py index 3e8f6af1de1..f4a21884995 100644 --- a/src/backend/base/langflow/components/prompts/__init__.py +++ b/src/backend/base/langflow/components/prompts/__init__.py @@ -1,4 +1,4 @@ -from .LangChainHubPrompt import LangChainHubPromptComponent -from .Prompt import PromptComponent +from .langchain_hub import LangChainHubPromptComponent +from .prompt import PromptComponent __all__ = ["LangChainHubPromptComponent", "PromptComponent"] diff --git a/src/backend/base/langflow/components/prompts/LangChainHubPrompt.py b/src/backend/base/langflow/components/prompts/langchain_hub.py similarity index 100% rename from src/backend/base/langflow/components/prompts/LangChainHubPrompt.py rename to src/backend/base/langflow/components/prompts/langchain_hub.py diff --git a/src/backend/base/langflow/components/prototypes/__init__.py b/src/backend/base/langflow/components/prototypes/__init__.py index 7904ae750f1..51b9fa26dbc 100644 --- a/src/backend/base/langflow/components/prototypes/__init__.py +++ b/src/backend/base/langflow/components/prototypes/__init__.py @@ -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", diff --git a/src/backend/base/langflow/components/prototypes/ConditionalRouter.py b/src/backend/base/langflow/components/prototypes/conditional_router.py similarity index 100% rename from src/backend/base/langflow/components/prototypes/ConditionalRouter.py rename to src/backend/base/langflow/components/prototypes/conditional_router.py diff --git a/src/backend/base/langflow/components/prototypes/CreateData.py b/src/backend/base/langflow/components/prototypes/create_data.py similarity index 100% rename from src/backend/base/langflow/components/prototypes/CreateData.py rename to src/backend/base/langflow/components/prototypes/create_data.py diff --git a/src/backend/base/langflow/components/prototypes/FlowTool.py b/src/backend/base/langflow/components/prototypes/flow_tool.py similarity index 100% rename from src/backend/base/langflow/components/prototypes/FlowTool.py rename to src/backend/base/langflow/components/prototypes/flow_tool.py diff --git a/src/backend/base/langflow/components/prototypes/JSONCleaner.py b/src/backend/base/langflow/components/prototypes/json_cleaner.py similarity index 100% rename from src/backend/base/langflow/components/prototypes/JSONCleaner.py rename to src/backend/base/langflow/components/prototypes/json_cleaner.py diff --git a/src/backend/base/langflow/components/prototypes/Pass.py b/src/backend/base/langflow/components/prototypes/pass_message.py similarity index 100% rename from src/backend/base/langflow/components/prototypes/Pass.py rename to src/backend/base/langflow/components/prototypes/pass_message.py diff --git a/src/backend/base/langflow/components/prototypes/PythonFunction.py b/src/backend/base/langflow/components/prototypes/python_function.py similarity index 100% rename from src/backend/base/langflow/components/prototypes/PythonFunction.py rename to src/backend/base/langflow/components/prototypes/python_function.py diff --git a/src/backend/base/langflow/components/prototypes/RunFlow.py b/src/backend/base/langflow/components/prototypes/run_flow.py similarity index 100% rename from src/backend/base/langflow/components/prototypes/RunFlow.py rename to src/backend/base/langflow/components/prototypes/run_flow.py diff --git a/src/backend/base/langflow/components/prototypes/RunnableExecutor.py b/src/backend/base/langflow/components/prototypes/runnable_executor.py similarity index 100% rename from src/backend/base/langflow/components/prototypes/RunnableExecutor.py rename to src/backend/base/langflow/components/prototypes/runnable_executor.py diff --git a/src/backend/base/langflow/components/prototypes/SelectData.py b/src/backend/base/langflow/components/prototypes/select_data.py similarity index 100% rename from src/backend/base/langflow/components/prototypes/SelectData.py rename to src/backend/base/langflow/components/prototypes/select_data.py diff --git a/src/backend/base/langflow/components/prototypes/SQLExecutor.py b/src/backend/base/langflow/components/prototypes/sql_executor.py similarity index 100% rename from src/backend/base/langflow/components/prototypes/SQLExecutor.py rename to src/backend/base/langflow/components/prototypes/sql_executor.py diff --git a/src/backend/base/langflow/components/prototypes/SubFlow.py b/src/backend/base/langflow/components/prototypes/sub_flow.py similarity index 100% rename from src/backend/base/langflow/components/prototypes/SubFlow.py rename to src/backend/base/langflow/components/prototypes/sub_flow.py diff --git a/src/backend/base/langflow/components/prototypes/UpdateData.py b/src/backend/base/langflow/components/prototypes/update_data.py similarity index 100% rename from src/backend/base/langflow/components/prototypes/UpdateData.py rename to src/backend/base/langflow/components/prototypes/update_data.py diff --git a/src/backend/base/langflow/components/retrievers/__init__.py b/src/backend/base/langflow/components/retrievers/__init__.py index 35030bc5ef1..dfafe0806f3 100644 --- a/src/backend/base/langflow/components/retrievers/__init__.py +++ b/src/backend/base/langflow/components/retrievers/__init__.py @@ -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", diff --git a/src/backend/base/langflow/components/retrievers/AmazonKendra.py b/src/backend/base/langflow/components/retrievers/amazon_kendra.py similarity index 100% rename from src/backend/base/langflow/components/retrievers/AmazonKendra.py rename to src/backend/base/langflow/components/retrievers/amazon_kendra.py diff --git a/src/backend/base/langflow/components/retrievers/CohereRerank.py b/src/backend/base/langflow/components/retrievers/cohere_rerank.py similarity index 100% rename from src/backend/base/langflow/components/retrievers/CohereRerank.py rename to src/backend/base/langflow/components/retrievers/cohere_rerank.py diff --git a/src/backend/base/langflow/components/retrievers/MetalRetriever.py b/src/backend/base/langflow/components/retrievers/metal.py similarity index 100% rename from src/backend/base/langflow/components/retrievers/MetalRetriever.py rename to src/backend/base/langflow/components/retrievers/metal.py diff --git a/src/backend/base/langflow/components/retrievers/MultiQueryRetriever.py b/src/backend/base/langflow/components/retrievers/multi_query.py similarity index 100% rename from src/backend/base/langflow/components/retrievers/MultiQueryRetriever.py rename to src/backend/base/langflow/components/retrievers/multi_query.py diff --git a/src/backend/base/langflow/components/retrievers/NvidiaRerank.py b/src/backend/base/langflow/components/retrievers/nvidia_rerank.py similarity index 100% rename from src/backend/base/langflow/components/retrievers/NvidiaRerank.py rename to src/backend/base/langflow/components/retrievers/nvidia_rerank.py diff --git a/src/backend/base/langflow/components/retrievers/SelfQueryRetriever.py b/src/backend/base/langflow/components/retrievers/self_query.py similarity index 100% rename from src/backend/base/langflow/components/retrievers/SelfQueryRetriever.py rename to src/backend/base/langflow/components/retrievers/self_query.py diff --git a/src/backend/base/langflow/components/retrievers/VectaraSelfQueryRetriver.py b/src/backend/base/langflow/components/retrievers/vectara_self_query.py similarity index 100% rename from src/backend/base/langflow/components/retrievers/VectaraSelfQueryRetriver.py rename to src/backend/base/langflow/components/retrievers/vectara_self_query.py diff --git a/src/backend/base/langflow/components/retrievers/VectorStoreRetriever.py b/src/backend/base/langflow/components/retrievers/vector_store.py similarity index 100% rename from src/backend/base/langflow/components/retrievers/VectorStoreRetriever.py rename to src/backend/base/langflow/components/retrievers/vector_store.py diff --git a/src/backend/base/langflow/components/textsplitters/__init__.py b/src/backend/base/langflow/components/textsplitters/__init__.py index 7019b564ce1..8cfc3b29a76 100644 --- a/src/backend/base/langflow/components/textsplitters/__init__.py +++ b/src/backend/base/langflow/components/textsplitters/__init__.py @@ -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", diff --git a/src/backend/base/langflow/components/textsplitters/CharacterTextSplitter.py b/src/backend/base/langflow/components/textsplitters/character.py similarity index 100% rename from src/backend/base/langflow/components/textsplitters/CharacterTextSplitter.py rename to src/backend/base/langflow/components/textsplitters/character.py diff --git a/src/backend/base/langflow/components/textsplitters/LanguageRecursiveTextSplitter.py b/src/backend/base/langflow/components/textsplitters/language_recursive.py similarity index 100% rename from src/backend/base/langflow/components/textsplitters/LanguageRecursiveTextSplitter.py rename to src/backend/base/langflow/components/textsplitters/language_recursive.py diff --git a/src/backend/base/langflow/components/textsplitters/NaturalLanguageTextSplitter.py b/src/backend/base/langflow/components/textsplitters/natural_language.py similarity index 100% rename from src/backend/base/langflow/components/textsplitters/NaturalLanguageTextSplitter.py rename to src/backend/base/langflow/components/textsplitters/natural_language.py diff --git a/src/backend/base/langflow/components/textsplitters/RecursiveCharacterTextSplitter.py b/src/backend/base/langflow/components/textsplitters/recursive_character.py similarity index 100% rename from src/backend/base/langflow/components/textsplitters/RecursiveCharacterTextSplitter.py rename to src/backend/base/langflow/components/textsplitters/recursive_character.py diff --git a/src/backend/base/langflow/components/toolkits/__init__.py b/src/backend/base/langflow/components/toolkits/__init__.py index 24e41812aca..13bbcb328d1 100644 --- a/src/backend/base/langflow/components/toolkits/__init__.py +++ b/src/backend/base/langflow/components/toolkits/__init__.py @@ -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", diff --git a/src/backend/base/langflow/components/toolkits/ComposioAPI.py b/src/backend/base/langflow/components/toolkits/composio_api.py similarity index 100% rename from src/backend/base/langflow/components/toolkits/ComposioAPI.py rename to src/backend/base/langflow/components/toolkits/composio_api.py diff --git a/src/backend/base/langflow/components/toolkits/VectorStoreInfo.py b/src/backend/base/langflow/components/toolkits/vector_store_info.py similarity index 100% rename from src/backend/base/langflow/components/toolkits/VectorStoreInfo.py rename to src/backend/base/langflow/components/toolkits/vector_store_info.py diff --git a/src/backend/base/langflow/components/tools/__init__.py b/src/backend/base/langflow/components/tools/__init__.py index d4fce777fb2..ce623408bca 100644 --- a/src/backend/base/langflow/components/tools/__init__.py +++ b/src/backend/base/langflow/components/tools/__init__.py @@ -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", @@ -29,6 +32,8 @@ "SearXNGToolComponent", "SearchAPIComponent", "SerpAPIComponent", + "TavilySearchToolComponent", "WikipediaAPIComponent", "WolframAlphaAPIComponent", + "YfinanceToolComponent", ] diff --git a/src/backend/base/langflow/components/tools/AstraDBTool.py b/src/backend/base/langflow/components/tools/astradb.py similarity index 100% rename from src/backend/base/langflow/components/tools/AstraDBTool.py rename to src/backend/base/langflow/components/tools/astradb.py diff --git a/src/backend/base/langflow/components/tools/AstraDBCQLTool.py b/src/backend/base/langflow/components/tools/astradb_cql.py similarity index 100% rename from src/backend/base/langflow/components/tools/AstraDBCQLTool.py rename to src/backend/base/langflow/components/tools/astradb_cql.py diff --git a/src/backend/base/langflow/components/tools/BingSearchAPI.py b/src/backend/base/langflow/components/tools/bing_search_api.py similarity index 100% rename from src/backend/base/langflow/components/tools/BingSearchAPI.py rename to src/backend/base/langflow/components/tools/bing_search_api.py diff --git a/src/backend/base/langflow/components/tools/Calculator.py b/src/backend/base/langflow/components/tools/calculator.py similarity index 100% rename from src/backend/base/langflow/components/tools/Calculator.py rename to src/backend/base/langflow/components/tools/calculator.py diff --git a/src/backend/base/langflow/components/tools/DuckDuckGoSearchRun.py b/src/backend/base/langflow/components/tools/duck_duck_go_search_run.py similarity index 100% rename from src/backend/base/langflow/components/tools/DuckDuckGoSearchRun.py rename to src/backend/base/langflow/components/tools/duck_duck_go_search_run.py diff --git a/src/backend/base/langflow/components/tools/GleanSearchAPI.py b/src/backend/base/langflow/components/tools/glean_search_api.py similarity index 100% rename from src/backend/base/langflow/components/tools/GleanSearchAPI.py rename to src/backend/base/langflow/components/tools/glean_search_api.py diff --git a/src/backend/base/langflow/components/tools/GoogleSearchAPI.py b/src/backend/base/langflow/components/tools/google_search_api.py similarity index 100% rename from src/backend/base/langflow/components/tools/GoogleSearchAPI.py rename to src/backend/base/langflow/components/tools/google_search_api.py diff --git a/src/backend/base/langflow/components/tools/GoogleSerperAPI.py b/src/backend/base/langflow/components/tools/google_serper_api.py similarity index 100% rename from src/backend/base/langflow/components/tools/GoogleSerperAPI.py rename to src/backend/base/langflow/components/tools/google_serper_api.py diff --git a/src/backend/base/langflow/components/tools/PythonCodeStructuredTool.py b/src/backend/base/langflow/components/tools/python_code_structured_tool.py similarity index 100% rename from src/backend/base/langflow/components/tools/PythonCodeStructuredTool.py rename to src/backend/base/langflow/components/tools/python_code_structured_tool.py diff --git a/src/backend/base/langflow/components/tools/PythonREPLTool.py b/src/backend/base/langflow/components/tools/python_repl.py similarity index 100% rename from src/backend/base/langflow/components/tools/PythonREPLTool.py rename to src/backend/base/langflow/components/tools/python_repl.py diff --git a/src/backend/base/langflow/components/tools/RetrieverTool.py b/src/backend/base/langflow/components/tools/retriever.py similarity index 100% rename from src/backend/base/langflow/components/tools/RetrieverTool.py rename to src/backend/base/langflow/components/tools/retriever.py diff --git a/src/backend/base/langflow/components/tools/SearchAPI.py b/src/backend/base/langflow/components/tools/search_api.py similarity index 100% rename from src/backend/base/langflow/components/tools/SearchAPI.py rename to src/backend/base/langflow/components/tools/search_api.py diff --git a/src/backend/base/langflow/components/tools/SearXNGTool.py b/src/backend/base/langflow/components/tools/searxng.py similarity index 100% rename from src/backend/base/langflow/components/tools/SearXNGTool.py rename to src/backend/base/langflow/components/tools/searxng.py diff --git a/src/backend/base/langflow/components/tools/SerpAPI.py b/src/backend/base/langflow/components/tools/serp_api.py similarity index 100% rename from src/backend/base/langflow/components/tools/SerpAPI.py rename to src/backend/base/langflow/components/tools/serp_api.py diff --git a/src/backend/base/langflow/components/tools/TavilyAISearch.py b/src/backend/base/langflow/components/tools/tavily_search.py similarity index 100% rename from src/backend/base/langflow/components/tools/TavilyAISearch.py rename to src/backend/base/langflow/components/tools/tavily_search.py diff --git a/src/backend/base/langflow/components/tools/WikipediaAPI.py b/src/backend/base/langflow/components/tools/wikipedia_api.py similarity index 100% rename from src/backend/base/langflow/components/tools/WikipediaAPI.py rename to src/backend/base/langflow/components/tools/wikipedia_api.py diff --git a/src/backend/base/langflow/components/tools/WolframAlphaAPI.py b/src/backend/base/langflow/components/tools/wolfram_alpha_api.py similarity index 100% rename from src/backend/base/langflow/components/tools/WolframAlphaAPI.py rename to src/backend/base/langflow/components/tools/wolfram_alpha_api.py diff --git a/src/backend/base/langflow/components/tools/YfinanceTool.py b/src/backend/base/langflow/components/tools/yahoo_finance.py similarity index 100% rename from src/backend/base/langflow/components/tools/YfinanceTool.py rename to src/backend/base/langflow/components/tools/yahoo_finance.py diff --git a/src/backend/base/langflow/components/vectorstores/__init__.py b/src/backend/base/langflow/components/vectorstores/__init__.py index 724c5d72f49..11af275d7a8 100644 --- a/src/backend/base/langflow/components/vectorstores/__init__.py +++ b/src/backend/base/langflow/components/vectorstores/__init__.py @@ -1,3 +1,3 @@ -from .AstraDB import AstraVectorStoreComponent +from .astradb import AstraVectorStoreComponent __all__ = ["AstraVectorStoreComponent"] diff --git a/src/backend/base/langflow/components/vectorstores/CassandraGraph.py b/src/backend/base/langflow/components/vectorstores/cassandra_graph.py similarity index 100% rename from src/backend/base/langflow/components/vectorstores/CassandraGraph.py rename to src/backend/base/langflow/components/vectorstores/cassandra_graph.py diff --git a/src/backend/base/langflow/components/vectorstores/MongoDBAtlasVector.py b/src/backend/base/langflow/components/vectorstores/mongodb_atlas.py similarity index 100% rename from src/backend/base/langflow/components/vectorstores/MongoDBAtlasVector.py rename to src/backend/base/langflow/components/vectorstores/mongodb_atlas.py diff --git a/src/backend/base/langflow/components/vectorstores/SupabaseVectorStore.py b/src/backend/base/langflow/components/vectorstores/supabase.py similarity index 100% rename from src/backend/base/langflow/components/vectorstores/SupabaseVectorStore.py rename to src/backend/base/langflow/components/vectorstores/supabase.py diff --git a/src/backend/base/langflow/initial_setup/starter_projects/basic_prompting.py b/src/backend/base/langflow/initial_setup/starter_projects/basic_prompting.py index 0115a428c7d..657138ee6b3 100644 --- a/src/backend/base/langflow/initial_setup/starter_projects/basic_prompting.py +++ b/src/backend/base/langflow/initial_setup/starter_projects/basic_prompting.py @@ -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): diff --git a/src/backend/base/langflow/initial_setup/starter_projects/blog_writer.py b/src/backend/base/langflow/initial_setup/starter_projects/blog_writer.py index 813ef05fa4e..e8270fd3631 100644 --- a/src/backend/base/langflow/initial_setup/starter_projects/blog_writer.py +++ b/src/backend/base/langflow/initial_setup/starter_projects/blog_writer.py @@ -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): diff --git a/src/backend/base/langflow/initial_setup/starter_projects/complex_agent.py b/src/backend/base/langflow/initial_setup/starter_projects/complex_agent.py index f94c04dfefc..c70e9ffac70 100644 --- a/src/backend/base/langflow/initial_setup/starter_projects/complex_agent.py +++ b/src/backend/base/langflow/initial_setup/starter_projects/complex_agent.py @@ -1,13 +1,11 @@ -from langflow.components.agents.CrewAIAgent import CrewAIAgentComponent -from langflow.components.agents.HierarchicalCrew import HierarchicalCrewComponent -from langflow.components.helpers.HierarchicalTask import HierarchicalTaskComponent -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.components.tools.SearchAPI import SearchAPIComponent -from langflow.components.tools.YfinanceTool import YfinanceToolComponent -from langflow.graph.graph.base import Graph +from langflow.components.agents import CrewAIAgentComponent, HierarchicalCrewComponent +from langflow.components.helpers import HierarchicalTaskComponent +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.components.tools import SearchAPIComponent, YfinanceToolComponent +from langflow.graph import Graph def complex_agent_graph(): diff --git a/src/backend/base/langflow/initial_setup/starter_projects/document_qa.py b/src/backend/base/langflow/initial_setup/starter_projects/document_qa.py index c85ce9fcb41..4bb1f764fbb 100644 --- a/src/backend/base/langflow/initial_setup/starter_projects/document_qa.py +++ b/src/backend/base/langflow/initial_setup/starter_projects/document_qa.py @@ -1,10 +1,10 @@ -from langflow.components.data.File import FileComponent -from langflow.components.helpers.ParseData import ParseDataComponent -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.data import FileComponent +from langflow.components.helpers import ParseDataComponent +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 document_qa_graph(template: str | None = None): diff --git a/src/backend/base/langflow/initial_setup/starter_projects/hierarchical_tasks_agent.py b/src/backend/base/langflow/initial_setup/starter_projects/hierarchical_tasks_agent.py index 3abe720e1f6..ce3476b0457 100644 --- a/src/backend/base/langflow/initial_setup/starter_projects/hierarchical_tasks_agent.py +++ b/src/backend/base/langflow/initial_setup/starter_projects/hierarchical_tasks_agent.py @@ -1,12 +1,11 @@ -from langflow.components.agents.CrewAIAgent import CrewAIAgentComponent -from langflow.components.agents.HierarchicalCrew import HierarchicalCrewComponent -from langflow.components.helpers.HierarchicalTask import HierarchicalTaskComponent -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.components.tools.SearchAPI import SearchAPIComponent -from langflow.graph.graph.base import Graph +from langflow.components.agents import CrewAIAgentComponent, HierarchicalCrewComponent +from langflow.components.helpers import HierarchicalTaskComponent +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.components.tools import SearchAPIComponent +from langflow.graph import Graph def hierarchical_tasks_agent_graph(): diff --git a/src/backend/base/langflow/initial_setup/starter_projects/memory_chatbot.py b/src/backend/base/langflow/initial_setup/starter_projects/memory_chatbot.py index 412da8cab90..7bf74b126c2 100644 --- a/src/backend/base/langflow/initial_setup/starter_projects/memory_chatbot.py +++ b/src/backend/base/langflow/initial_setup/starter_projects/memory_chatbot.py @@ -1,8 +1,8 @@ -from langflow.components.helpers.Memory import MemoryComponent -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.components.helpers import MemoryComponent +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 diff --git a/src/backend/base/langflow/initial_setup/starter_projects/sequential_tasks_agent.py b/src/backend/base/langflow/initial_setup/starter_projects/sequential_tasks_agent.py index 7e1327f7db2..5b011e8664d 100644 --- a/src/backend/base/langflow/initial_setup/starter_projects/sequential_tasks_agent.py +++ b/src/backend/base/langflow/initial_setup/starter_projects/sequential_tasks_agent.py @@ -1,11 +1,10 @@ -from langflow.components.agents.SequentialCrew import SequentialCrewComponent -from langflow.components.agents.SequentialTaskAgent import SequentialTaskAgentComponent -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.components.tools.SearchAPI import SearchAPIComponent -from langflow.graph.graph.base import Graph +from langflow.components.agents import SequentialCrewComponent, SequentialTaskAgentComponent +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.components.tools import SearchAPIComponent +from langflow.graph import Graph def sequential_tasks_agent_graph(): diff --git a/src/backend/base/langflow/initial_setup/starter_projects/vector_store_rag.py b/src/backend/base/langflow/initial_setup/starter_projects/vector_store_rag.py index b65857d2288..b8ba8aeba0a 100644 --- a/src/backend/base/langflow/initial_setup/starter_projects/vector_store_rag.py +++ b/src/backend/base/langflow/initial_setup/starter_projects/vector_store_rag.py @@ -1,15 +1,14 @@ from textwrap import dedent -from langflow.components.data.File import FileComponent -from langflow.components.embeddings.OpenAIEmbeddings import OpenAIEmbeddingsComponent -from langflow.components.helpers.ParseData import ParseDataComponent -from langflow.components.helpers.SplitText import SplitTextComponent -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.components.vectorstores.AstraDB import AstraVectorStoreComponent -from langflow.graph.graph.base import Graph +from langflow.components.data import FileComponent +from langflow.components.embeddings import OpenAIEmbeddingsComponent +from langflow.components.helpers import ParseDataComponent, SplitTextComponent +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.components.vectorstores import AstraVectorStoreComponent +from langflow.graph import Graph def ingestion_graph(): diff --git a/src/backend/base/langflow/schema/__init__.py b/src/backend/base/langflow/schema/__init__.py index e84ff7dfc1c..0f153f334a4 100644 --- a/src/backend/base/langflow/schema/__init__.py +++ b/src/backend/base/langflow/schema/__init__.py @@ -1,4 +1,20 @@ +from .artifact import ArtifactType from .data import Data from .dotdict import dotdict +from .image import Image +from .log import LogFunctionType, LoggableType +from .message import Message, MessageResponse +from .table import Column, TableSchema -__all__ = ["Data", "dotdict"] +__all__ = [ + "ArtifactType", + "Column", + "Data", + "Image", + "LogFunctionType", + "LoggableType", + "Message", + "MessageResponse", + "TableSchema", + "dotdict", +] diff --git a/src/backend/base/langflow/schema/artifact.py b/src/backend/base/langflow/schema/artifact.py index 94a9d83bb62..8f22e5351d6 100644 --- a/src/backend/base/langflow/schema/artifact.py +++ b/src/backend/base/langflow/schema/artifact.py @@ -5,7 +5,7 @@ from loguru import logger from pydantic import BaseModel -from langflow.schema import Data +from langflow.schema.data import Data from langflow.schema.message import Message from langflow.schema.schema import recursive_serialize_or_str diff --git a/src/backend/base/langflow/schema/schema.py b/src/backend/base/langflow/schema/schema.py index 9404863f369..de1e89f7b84 100644 --- a/src/backend/base/langflow/schema/schema.py +++ b/src/backend/base/langflow/schema/schema.py @@ -7,7 +7,7 @@ from pydantic.v1 import BaseModel as BaseModelV1 from typing_extensions import TypedDict -from langflow.schema import Data +from langflow.schema.data import Data from langflow.schema.message import Message INPUT_FIELD_NAME = "input_value" diff --git a/src/backend/base/pyproject.toml b/src/backend/base/pyproject.toml index 2bfdd4fdaa8..a0ea45b6d0a 100644 --- a/src/backend/base/pyproject.toml +++ b/src/backend/base/pyproject.toml @@ -59,7 +59,6 @@ ignore = [ # Rules that are TODOs "ANN", # Missing type annotations "D1", # Missing docstrings - "N999", # Invalid module names "S", "SLF", ] diff --git a/src/backend/tests/conftest.py b/src/backend/tests/conftest.py index 5a089f7e555..8becf52c2da 100644 --- a/src/backend/tests/conftest.py +++ b/src/backend/tests/conftest.py @@ -15,8 +15,8 @@ from dotenv import load_dotenv from fastapi.testclient import TestClient from httpx import ASGITransport, AsyncClient -from langflow.components.inputs.ChatInput import ChatInput -from langflow.graph.graph.base import Graph +from langflow.components.inputs import ChatInput +from langflow.graph import Graph from langflow.initial_setup.setup import STARTER_FOLDER_NAME from langflow.services.auth.utils import get_password_hash from langflow.services.database.models.api_key.model import ApiKey diff --git a/src/backend/tests/integration/components/helpers/test_parse_json_data.py b/src/backend/tests/integration/components/helpers/test_parse_json_data.py index 48d5ded926f..16e01b90212 100644 --- a/src/backend/tests/integration/components/helpers/test_parse_json_data.py +++ b/src/backend/tests/integration/components/helpers/test_parse_json_data.py @@ -1,5 +1,5 @@ import pytest -from langflow.components.helpers.ParseJSONData import ParseJSONDataComponent +from langflow.components.helpers import ParseJSONDataComponent from langflow.components.inputs import ChatInput from langflow.schema import Data diff --git a/src/backend/tests/integration/components/output_parsers/test_output_parser.py b/src/backend/tests/integration/components/output_parsers/test_output_parser.py index 74c7c2e03ef..83fb487e3e1 100644 --- a/src/backend/tests/integration/components/output_parsers/test_output_parser.py +++ b/src/backend/tests/integration/components/output_parsers/test_output_parser.py @@ -1,9 +1,9 @@ import os import pytest -from langflow.components.models.OpenAIModel import OpenAIModelComponent -from langflow.components.output_parsers.OutputParser import OutputParserComponent -from langflow.components.prompts.Prompt import PromptComponent +from langflow.components.models import OpenAIModelComponent +from langflow.components.output_parsers import OutputParserComponent +from langflow.components.prompts import PromptComponent from tests.integration.utils import ComponentInputHandle, run_single_component diff --git a/src/backend/tests/unit/base/tools/test_component_toolkit.py b/src/backend/tests/unit/base/tools/test_component_toolkit.py index 07b9694fb4d..e3cb3a08726 100644 --- a/src/backend/tests/unit/base/tools/test_component_toolkit.py +++ b/src/backend/tests/unit/base/tools/test_component_toolkit.py @@ -2,12 +2,12 @@ import pytest from langflow.base.tools.component_tool import ComponentToolkit -from langflow.components.agents.ToolCallingAgent import ToolCallingAgentComponent -from langflow.components.inputs.ChatInput import ChatInput -from langflow.components.models.OpenAIModel import OpenAIModelComponent +from langflow.components.agents import ToolCallingAgentComponent +from langflow.components.inputs import ChatInput +from langflow.components.models import OpenAIModelComponent from langflow.components.outputs import ChatOutput -from langflow.graph.graph.base import Graph -from langflow.schema.message import Message +from langflow.graph import Graph +from langflow.schema import Message from langflow.services.settings.feature_flags import FEATURE_FLAGS diff --git a/src/backend/tests/unit/components/models/test_chatollama_component.py b/src/backend/tests/unit/components/models/test_chatollama_component.py index 2970ba4ff93..95d81383a79 100644 --- a/src/backend/tests/unit/components/models/test_chatollama_component.py +++ b/src/backend/tests/unit/components/models/test_chatollama_component.py @@ -2,8 +2,8 @@ from urllib.parse import urljoin import pytest -from langchain_community.chat_models.ollama import ChatOllama -from langflow.components.models.OllamaModel import ChatOllamaComponent +from langchain_community.chat_models import ChatOllama +from langflow.components.models import ChatOllamaComponent @pytest.fixture diff --git a/src/backend/tests/unit/components/prompts/test_prompt_component.py b/src/backend/tests/unit/components/prompts/test_prompt_component.py index 2c1f5cad2cd..912207bcfd4 100644 --- a/src/backend/tests/unit/components/prompts/test_prompt_component.py +++ b/src/backend/tests/unit/components/prompts/test_prompt_component.py @@ -1,4 +1,4 @@ -from langflow.components.prompts.Prompt import PromptComponent +from langflow.components.prompts import PromptComponent class TestPromptComponent: diff --git a/src/backend/tests/unit/components/prototypes/test_create_data_component.py b/src/backend/tests/unit/components/prototypes/test_create_data_component.py index f97b0794f5f..716ea9a4e3f 100644 --- a/src/backend/tests/unit/components/prototypes/test_create_data_component.py +++ b/src/backend/tests/unit/components/prototypes/test_create_data_component.py @@ -1,5 +1,5 @@ import pytest -from langflow.components.prototypes.CreateData import CreateDataComponent +from langflow.components.prototypes import CreateDataComponent from langflow.schema import Data diff --git a/src/backend/tests/unit/components/prototypes/test_update_data_component.py b/src/backend/tests/unit/components/prototypes/test_update_data_component.py index d60bb4c9c5c..0eef004e957 100644 --- a/src/backend/tests/unit/components/prototypes/test_update_data_component.py +++ b/src/backend/tests/unit/components/prototypes/test_update_data_component.py @@ -1,5 +1,5 @@ import pytest -from langflow.components.prototypes.UpdateData import UpdateDataComponent +from langflow.components.prototypes import UpdateDataComponent from langflow.schema import Data diff --git a/src/backend/tests/unit/components/tools/test_python_repl_tool.py b/src/backend/tests/unit/components/tools/test_python_repl_tool.py index 7115e000f4d..d0f0921b7ca 100644 --- a/src/backend/tests/unit/components/tools/test_python_repl_tool.py +++ b/src/backend/tests/unit/components/tools/test_python_repl_tool.py @@ -1,5 +1,5 @@ -from langflow.components.tools.PythonREPLTool import PythonREPLToolComponent -from langflow.custom.custom_component.component import Component +from langflow.components.tools import PythonREPLToolComponent +from langflow.custom import Component from langflow.custom.utils import build_custom_component_template diff --git a/src/backend/tests/unit/components/tools/test_yfinance_tool.py b/src/backend/tests/unit/components/tools/test_yfinance_tool.py index da5b3813bdd..29133929f83 100644 --- a/src/backend/tests/unit/components/tools/test_yfinance_tool.py +++ b/src/backend/tests/unit/components/tools/test_yfinance_tool.py @@ -1,5 +1,5 @@ -from langflow.components.tools.YfinanceTool import YfinanceToolComponent -from langflow.custom.custom_component.component import Component +from langflow.components.tools import YfinanceToolComponent +from langflow.custom import Component from langflow.custom.utils import build_custom_component_template diff --git a/src/backend/tests/unit/custom/component/test_component_to_tool.py b/src/backend/tests/unit/custom/component/test_component_to_tool.py index 55a045a9571..6beb42093db 100644 --- a/src/backend/tests/unit/custom/component/test_component_to_tool.py +++ b/src/backend/tests/unit/custom/component/test_component_to_tool.py @@ -1,6 +1,6 @@ from collections.abc import Callable -from langflow.components.inputs.ChatInput import ChatInput +from langflow.components.inputs import ChatInput def test_component_to_toolkit(): diff --git a/src/backend/tests/unit/custom/custom_component/test_component.py b/src/backend/tests/unit/custom/custom_component/test_component.py index 2dfa9a0220d..4c03f827e9e 100644 --- a/src/backend/tests/unit/custom/custom_component/test_component.py +++ b/src/backend/tests/unit/custom/custom_component/test_component.py @@ -1,11 +1,10 @@ import pytest -from langflow.components.agents.CrewAIAgent import CrewAIAgentComponent -from langflow.components.agents.ToolCallingAgent import ToolCallingAgentComponent -from langflow.components.helpers.SequentialTask import SequentialTaskComponent -from langflow.components.inputs.ChatInput import ChatInput -from langflow.components.models.OpenAIModel import OpenAIModelComponent +from langflow.components.agents import CrewAIAgentComponent, ToolCallingAgentComponent +from langflow.components.helpers import SequentialTaskComponent +from langflow.components.inputs import ChatInput +from langflow.components.models import OpenAIModelComponent from langflow.components.outputs import ChatOutput -from langflow.template.field.base import Output +from langflow.template import Output def test_set_invalid_output(): diff --git a/src/backend/tests/unit/graph/edge/test_edge_base.py b/src/backend/tests/unit/graph/edge/test_edge_base.py index 090b5636789..19037447aad 100644 --- a/src/backend/tests/unit/graph/edge/test_edge_base.py +++ b/src/backend/tests/unit/graph/edge/test_edge_base.py @@ -1,9 +1,9 @@ import pytest -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 @pytest.mark.usefixtures("client") diff --git a/src/backend/tests/unit/graph/graph/state/test_state_model.py b/src/backend/tests/unit/graph/graph/state/test_state_model.py index e5371c39bdf..abe7140de26 100644 --- a/src/backend/tests/unit/graph/graph/state/test_state_model.py +++ b/src/backend/tests/unit/graph/graph/state/test_state_model.py @@ -1,7 +1,7 @@ import pytest from langflow.components.inputs import ChatInput -from langflow.components.outputs.ChatOutput import ChatOutput -from langflow.graph.graph.base import Graph +from langflow.components.outputs import ChatOutput +from langflow.graph import Graph from langflow.graph.graph.constants import Finish from langflow.graph.state.model import create_state_model from langflow.template.field.base import UNDEFINED diff --git a/src/backend/tests/unit/graph/graph/test_base.py b/src/backend/tests/unit/graph/graph/test_base.py index 3d028bc84f7..a434d97e540 100644 --- a/src/backend/tests/unit/graph/graph/test_base.py +++ b/src/backend/tests/unit/graph/graph/test_base.py @@ -2,12 +2,11 @@ from collections import deque import pytest -from langflow.components.agents.ToolCallingAgent import ToolCallingAgentComponent -from langflow.components.inputs.ChatInput import ChatInput -from langflow.components.outputs.ChatOutput import ChatOutput -from langflow.components.outputs.TextOutput import TextOutputComponent -from langflow.components.tools.YfinanceTool import YfinanceToolComponent -from langflow.graph.graph.base import Graph +from langflow.components.agents import ToolCallingAgentComponent +from langflow.components.inputs import ChatInput +from langflow.components.outputs import ChatOutput, TextOutputComponent +from langflow.components.tools import YfinanceToolComponent +from langflow.graph import Graph from langflow.graph.graph.constants import Finish diff --git a/src/backend/tests/unit/graph/graph/test_callback_graph.py b/src/backend/tests/unit/graph/graph/test_callback_graph.py index 4498e70dc97..080322a5d9a 100644 --- a/src/backend/tests/unit/graph/graph/test_callback_graph.py +++ b/src/backend/tests/unit/graph/graph/test_callback_graph.py @@ -1,12 +1,12 @@ import asyncio -from langflow.components.outputs.ChatOutput import ChatOutput -from langflow.custom.custom_component.component import Component +from langflow.components.outputs import ChatOutput +from langflow.custom import Component from langflow.events.event_manager import EventManager -from langflow.graph.graph.base import Graph -from langflow.inputs.inputs import IntInput -from langflow.schema.message import Message -from langflow.template.field.base import Output +from langflow.graph import Graph +from langflow.inputs import IntInput +from langflow.schema import Message +from langflow.template import Output class LogComponent(Component): diff --git a/src/backend/tests/unit/graph/graph/test_cycles.py b/src/backend/tests/unit/graph/graph/test_cycles.py index 3a15d292817..95c9f9297f6 100644 --- a/src/backend/tests/unit/graph/graph/test_cycles.py +++ b/src/backend/tests/unit/graph/graph/test_cycles.py @@ -1,17 +1,16 @@ import os import pytest -from langflow.components.inputs.ChatInput import ChatInput -from langflow.components.models.OpenAIModel import OpenAIModelComponent -from langflow.components.outputs.ChatOutput import ChatOutput -from langflow.components.outputs.TextOutput import TextOutputComponent -from langflow.components.prompts.Prompt import PromptComponent -from langflow.components.prototypes.ConditionalRouter import ConditionalRouterComponent -from langflow.custom.custom_component.component import Component -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, TextOutputComponent +from langflow.components.prompts import PromptComponent +from langflow.components.prototypes import ConditionalRouterComponent +from langflow.custom import Component +from langflow.graph import Graph from langflow.graph.graph.utils import find_cycle_vertices from langflow.io import MessageTextInput, Output -from langflow.schema.message import Message +from langflow.schema import Message class Concatenate(Component): diff --git a/src/backend/tests/unit/graph/graph/test_graph_state_model.py b/src/backend/tests/unit/graph/graph/test_graph_state_model.py index ece9fd113c9..0fbe00adce6 100644 --- a/src/backend/tests/unit/graph/graph/test_graph_state_model.py +++ b/src/backend/tests/unit/graph/graph/test_graph_state_model.py @@ -1,11 +1,11 @@ from typing import TYPE_CHECKING import pytest -from langflow.components.helpers.Memory import MemoryComponent -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.components.helpers import MemoryComponent +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 from langflow.graph.graph.constants import Finish from langflow.graph.graph.state_model import create_state_model_from_graph diff --git a/src/backend/tests/unit/initial_setup/starter_projects/test_memory_chatbot.py b/src/backend/tests/unit/initial_setup/starter_projects/test_memory_chatbot.py index 9077e60ca88..024433335e4 100644 --- a/src/backend/tests/unit/initial_setup/starter_projects/test_memory_chatbot.py +++ b/src/backend/tests/unit/initial_setup/starter_projects/test_memory_chatbot.py @@ -3,11 +3,11 @@ from typing import TYPE_CHECKING import pytest -from langflow.components.helpers.Memory import MemoryComponent -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.components.helpers import MemoryComponent +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 from langflow.graph.graph.constants import Finish diff --git a/src/backend/tests/unit/initial_setup/starter_projects/test_vector_store_rag.py b/src/backend/tests/unit/initial_setup/starter_projects/test_vector_store_rag.py index c898e36b787..36e462c106c 100644 --- a/src/backend/tests/unit/initial_setup/starter_projects/test_vector_store_rag.py +++ b/src/backend/tests/unit/initial_setup/starter_projects/test_vector_store_rag.py @@ -3,18 +3,17 @@ from textwrap import dedent import pytest -from langflow.components.data.File import FileComponent -from langflow.components.embeddings.OpenAIEmbeddings import OpenAIEmbeddingsComponent -from langflow.components.helpers.ParseData import ParseDataComponent -from langflow.components.helpers.SplitText import SplitTextComponent -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.components.vectorstores.AstraDB import AstraVectorStoreComponent -from langflow.graph.graph.base import Graph +from langflow.components.data import FileComponent +from langflow.components.embeddings import OpenAIEmbeddingsComponent +from langflow.components.helpers import ParseDataComponent, SplitTextComponent +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.components.vectorstores import AstraVectorStoreComponent +from langflow.graph import Graph from langflow.graph.graph.constants import Finish -from langflow.schema.data import Data +from langflow.schema import Data @pytest.fixture diff --git a/src/backend/tests/unit/io/test_io_schema.py b/src/backend/tests/unit/io/test_io_schema.py index 45684087506..0c7497a1b94 100644 --- a/src/backend/tests/unit/io/test_io_schema.py +++ b/src/backend/tests/unit/io/test_io_schema.py @@ -1,7 +1,7 @@ from typing import TYPE_CHECKING, Literal import pytest -from langflow.components.inputs.ChatInput import ChatInput +from langflow.components.inputs import ChatInput if TYPE_CHECKING: from pydantic.fields import FieldInfo From 918884aed7c6bb884d3e4d408342795c350a99b9 Mon Sep 17 00:00:00 2001 From: Christophe Bornet Date: Mon, 21 Oct 2024 13:15:46 +0200 Subject: [PATCH 2/5] git rename workaround (1/2) --- .../base/langflow/components/data/{Directory.py => _Directory.py} | 0 src/backend/base/langflow/components/data/{File.py => _File.py} | 0 src/backend/base/langflow/components/data/{Gmail.py => _Gmail.py} | 0 src/backend/base/langflow/components/data/{URL.py => _URL.py} | 0 .../base/langflow/components/data/{Webhook.py => _Webhook.py} | 0 .../base/langflow/components/deactivated/{Embed.py => _Embed.py} | 0 .../langflow/components/deactivated/{Message.py => _Message.py} | 0 .../components/documentloaders/{Confluence.py => _Confluence.py} | 0 .../documentloaders/{Unstructured.py => _Unstructured.py} | 0 .../base/langflow/components/helpers/{Memory.py => _Memory.py} | 0 .../base/langflow/components/models/{Maritalk.py => _Maritalk.py} | 0 .../base/langflow/components/prompts/{Prompt.py => _Prompt.py} | 0 .../base/langflow/components/prototypes/{Listen.py => _Listen.py} | 0 .../base/langflow/components/prototypes/{Notify.py => _Notify.py} | 0 .../langflow/components/toolkits/{Metaphor.py => _Metaphor.py} | 0 .../langflow/components/tools/{calculator.py => _Calculator.py} | 0 .../langflow/components/vectorstores/{AstraDB.py => _AstraDB.py} | 0 .../components/vectorstores/{Cassandra.py => _Cassandra.py} | 0 .../langflow/components/vectorstores/{Chroma.py => _Chroma.py} | 0 .../components/vectorstores/{Clickhouse.py => _Clickhouse.py} | 0 .../components/vectorstores/{Couchbase.py => _Couchbase.py} | 0 .../vectorstores/{Elasticsearch.py => _Elasticsearch.py} | 0 .../base/langflow/components/vectorstores/{FAISS.py => _FAISS.py} | 0 .../base/langflow/components/vectorstores/{HCD.py => _HCD.py} | 0 .../langflow/components/vectorstores/{Milvus.py => _Milvus.py} | 0 .../components/vectorstores/{OpenSearch.py => _OpenSearch.py} | 0 .../components/vectorstores/{Pinecone.py => _Pinecone.py} | 0 .../langflow/components/vectorstores/{Qdrant.py => _Qdrant.py} | 0 .../base/langflow/components/vectorstores/{Redis.py => _Redis.py} | 0 .../langflow/components/vectorstores/{Upstash.py => _Upstash.py} | 0 .../langflow/components/vectorstores/{Vectara.py => _Vectara.py} | 0 .../components/vectorstores/{Weaviate.py => _Weaviate.py} | 0 32 files changed, 0 insertions(+), 0 deletions(-) rename src/backend/base/langflow/components/data/{Directory.py => _Directory.py} (100%) rename src/backend/base/langflow/components/data/{File.py => _File.py} (100%) rename src/backend/base/langflow/components/data/{Gmail.py => _Gmail.py} (100%) rename src/backend/base/langflow/components/data/{URL.py => _URL.py} (100%) rename src/backend/base/langflow/components/data/{Webhook.py => _Webhook.py} (100%) rename src/backend/base/langflow/components/deactivated/{Embed.py => _Embed.py} (100%) rename src/backend/base/langflow/components/deactivated/{Message.py => _Message.py} (100%) rename src/backend/base/langflow/components/documentloaders/{Confluence.py => _Confluence.py} (100%) rename src/backend/base/langflow/components/documentloaders/{Unstructured.py => _Unstructured.py} (100%) rename src/backend/base/langflow/components/helpers/{Memory.py => _Memory.py} (100%) rename src/backend/base/langflow/components/models/{Maritalk.py => _Maritalk.py} (100%) rename src/backend/base/langflow/components/prompts/{Prompt.py => _Prompt.py} (100%) rename src/backend/base/langflow/components/prototypes/{Listen.py => _Listen.py} (100%) rename src/backend/base/langflow/components/prototypes/{Notify.py => _Notify.py} (100%) rename src/backend/base/langflow/components/toolkits/{Metaphor.py => _Metaphor.py} (100%) rename src/backend/base/langflow/components/tools/{calculator.py => _Calculator.py} (100%) rename src/backend/base/langflow/components/vectorstores/{AstraDB.py => _AstraDB.py} (100%) rename src/backend/base/langflow/components/vectorstores/{Cassandra.py => _Cassandra.py} (100%) rename src/backend/base/langflow/components/vectorstores/{Chroma.py => _Chroma.py} (100%) rename src/backend/base/langflow/components/vectorstores/{Clickhouse.py => _Clickhouse.py} (100%) rename src/backend/base/langflow/components/vectorstores/{Couchbase.py => _Couchbase.py} (100%) rename src/backend/base/langflow/components/vectorstores/{Elasticsearch.py => _Elasticsearch.py} (100%) rename src/backend/base/langflow/components/vectorstores/{FAISS.py => _FAISS.py} (100%) rename src/backend/base/langflow/components/vectorstores/{HCD.py => _HCD.py} (100%) rename src/backend/base/langflow/components/vectorstores/{Milvus.py => _Milvus.py} (100%) rename src/backend/base/langflow/components/vectorstores/{OpenSearch.py => _OpenSearch.py} (100%) rename src/backend/base/langflow/components/vectorstores/{Pinecone.py => _Pinecone.py} (100%) rename src/backend/base/langflow/components/vectorstores/{Qdrant.py => _Qdrant.py} (100%) rename src/backend/base/langflow/components/vectorstores/{Redis.py => _Redis.py} (100%) rename src/backend/base/langflow/components/vectorstores/{Upstash.py => _Upstash.py} (100%) rename src/backend/base/langflow/components/vectorstores/{Vectara.py => _Vectara.py} (100%) rename src/backend/base/langflow/components/vectorstores/{Weaviate.py => _Weaviate.py} (100%) diff --git a/src/backend/base/langflow/components/data/Directory.py b/src/backend/base/langflow/components/data/_Directory.py similarity index 100% rename from src/backend/base/langflow/components/data/Directory.py rename to src/backend/base/langflow/components/data/_Directory.py diff --git a/src/backend/base/langflow/components/data/File.py b/src/backend/base/langflow/components/data/_File.py similarity index 100% rename from src/backend/base/langflow/components/data/File.py rename to src/backend/base/langflow/components/data/_File.py diff --git a/src/backend/base/langflow/components/data/Gmail.py b/src/backend/base/langflow/components/data/_Gmail.py similarity index 100% rename from src/backend/base/langflow/components/data/Gmail.py rename to src/backend/base/langflow/components/data/_Gmail.py diff --git a/src/backend/base/langflow/components/data/URL.py b/src/backend/base/langflow/components/data/_URL.py similarity index 100% rename from src/backend/base/langflow/components/data/URL.py rename to src/backend/base/langflow/components/data/_URL.py diff --git a/src/backend/base/langflow/components/data/Webhook.py b/src/backend/base/langflow/components/data/_Webhook.py similarity index 100% rename from src/backend/base/langflow/components/data/Webhook.py rename to src/backend/base/langflow/components/data/_Webhook.py diff --git a/src/backend/base/langflow/components/deactivated/Embed.py b/src/backend/base/langflow/components/deactivated/_Embed.py similarity index 100% rename from src/backend/base/langflow/components/deactivated/Embed.py rename to src/backend/base/langflow/components/deactivated/_Embed.py diff --git a/src/backend/base/langflow/components/deactivated/Message.py b/src/backend/base/langflow/components/deactivated/_Message.py similarity index 100% rename from src/backend/base/langflow/components/deactivated/Message.py rename to src/backend/base/langflow/components/deactivated/_Message.py diff --git a/src/backend/base/langflow/components/documentloaders/Confluence.py b/src/backend/base/langflow/components/documentloaders/_Confluence.py similarity index 100% rename from src/backend/base/langflow/components/documentloaders/Confluence.py rename to src/backend/base/langflow/components/documentloaders/_Confluence.py diff --git a/src/backend/base/langflow/components/documentloaders/Unstructured.py b/src/backend/base/langflow/components/documentloaders/_Unstructured.py similarity index 100% rename from src/backend/base/langflow/components/documentloaders/Unstructured.py rename to src/backend/base/langflow/components/documentloaders/_Unstructured.py diff --git a/src/backend/base/langflow/components/helpers/Memory.py b/src/backend/base/langflow/components/helpers/_Memory.py similarity index 100% rename from src/backend/base/langflow/components/helpers/Memory.py rename to src/backend/base/langflow/components/helpers/_Memory.py diff --git a/src/backend/base/langflow/components/models/Maritalk.py b/src/backend/base/langflow/components/models/_Maritalk.py similarity index 100% rename from src/backend/base/langflow/components/models/Maritalk.py rename to src/backend/base/langflow/components/models/_Maritalk.py diff --git a/src/backend/base/langflow/components/prompts/Prompt.py b/src/backend/base/langflow/components/prompts/_Prompt.py similarity index 100% rename from src/backend/base/langflow/components/prompts/Prompt.py rename to src/backend/base/langflow/components/prompts/_Prompt.py diff --git a/src/backend/base/langflow/components/prototypes/Listen.py b/src/backend/base/langflow/components/prototypes/_Listen.py similarity index 100% rename from src/backend/base/langflow/components/prototypes/Listen.py rename to src/backend/base/langflow/components/prototypes/_Listen.py diff --git a/src/backend/base/langflow/components/prototypes/Notify.py b/src/backend/base/langflow/components/prototypes/_Notify.py similarity index 100% rename from src/backend/base/langflow/components/prototypes/Notify.py rename to src/backend/base/langflow/components/prototypes/_Notify.py diff --git a/src/backend/base/langflow/components/toolkits/Metaphor.py b/src/backend/base/langflow/components/toolkits/_Metaphor.py similarity index 100% rename from src/backend/base/langflow/components/toolkits/Metaphor.py rename to src/backend/base/langflow/components/toolkits/_Metaphor.py diff --git a/src/backend/base/langflow/components/tools/calculator.py b/src/backend/base/langflow/components/tools/_Calculator.py similarity index 100% rename from src/backend/base/langflow/components/tools/calculator.py rename to src/backend/base/langflow/components/tools/_Calculator.py diff --git a/src/backend/base/langflow/components/vectorstores/AstraDB.py b/src/backend/base/langflow/components/vectorstores/_AstraDB.py similarity index 100% rename from src/backend/base/langflow/components/vectorstores/AstraDB.py rename to src/backend/base/langflow/components/vectorstores/_AstraDB.py diff --git a/src/backend/base/langflow/components/vectorstores/Cassandra.py b/src/backend/base/langflow/components/vectorstores/_Cassandra.py similarity index 100% rename from src/backend/base/langflow/components/vectorstores/Cassandra.py rename to src/backend/base/langflow/components/vectorstores/_Cassandra.py diff --git a/src/backend/base/langflow/components/vectorstores/Chroma.py b/src/backend/base/langflow/components/vectorstores/_Chroma.py similarity index 100% rename from src/backend/base/langflow/components/vectorstores/Chroma.py rename to src/backend/base/langflow/components/vectorstores/_Chroma.py diff --git a/src/backend/base/langflow/components/vectorstores/Clickhouse.py b/src/backend/base/langflow/components/vectorstores/_Clickhouse.py similarity index 100% rename from src/backend/base/langflow/components/vectorstores/Clickhouse.py rename to src/backend/base/langflow/components/vectorstores/_Clickhouse.py diff --git a/src/backend/base/langflow/components/vectorstores/Couchbase.py b/src/backend/base/langflow/components/vectorstores/_Couchbase.py similarity index 100% rename from src/backend/base/langflow/components/vectorstores/Couchbase.py rename to src/backend/base/langflow/components/vectorstores/_Couchbase.py diff --git a/src/backend/base/langflow/components/vectorstores/Elasticsearch.py b/src/backend/base/langflow/components/vectorstores/_Elasticsearch.py similarity index 100% rename from src/backend/base/langflow/components/vectorstores/Elasticsearch.py rename to src/backend/base/langflow/components/vectorstores/_Elasticsearch.py diff --git a/src/backend/base/langflow/components/vectorstores/FAISS.py b/src/backend/base/langflow/components/vectorstores/_FAISS.py similarity index 100% rename from src/backend/base/langflow/components/vectorstores/FAISS.py rename to src/backend/base/langflow/components/vectorstores/_FAISS.py diff --git a/src/backend/base/langflow/components/vectorstores/HCD.py b/src/backend/base/langflow/components/vectorstores/_HCD.py similarity index 100% rename from src/backend/base/langflow/components/vectorstores/HCD.py rename to src/backend/base/langflow/components/vectorstores/_HCD.py diff --git a/src/backend/base/langflow/components/vectorstores/Milvus.py b/src/backend/base/langflow/components/vectorstores/_Milvus.py similarity index 100% rename from src/backend/base/langflow/components/vectorstores/Milvus.py rename to src/backend/base/langflow/components/vectorstores/_Milvus.py diff --git a/src/backend/base/langflow/components/vectorstores/OpenSearch.py b/src/backend/base/langflow/components/vectorstores/_OpenSearch.py similarity index 100% rename from src/backend/base/langflow/components/vectorstores/OpenSearch.py rename to src/backend/base/langflow/components/vectorstores/_OpenSearch.py diff --git a/src/backend/base/langflow/components/vectorstores/Pinecone.py b/src/backend/base/langflow/components/vectorstores/_Pinecone.py similarity index 100% rename from src/backend/base/langflow/components/vectorstores/Pinecone.py rename to src/backend/base/langflow/components/vectorstores/_Pinecone.py diff --git a/src/backend/base/langflow/components/vectorstores/Qdrant.py b/src/backend/base/langflow/components/vectorstores/_Qdrant.py similarity index 100% rename from src/backend/base/langflow/components/vectorstores/Qdrant.py rename to src/backend/base/langflow/components/vectorstores/_Qdrant.py diff --git a/src/backend/base/langflow/components/vectorstores/Redis.py b/src/backend/base/langflow/components/vectorstores/_Redis.py similarity index 100% rename from src/backend/base/langflow/components/vectorstores/Redis.py rename to src/backend/base/langflow/components/vectorstores/_Redis.py diff --git a/src/backend/base/langflow/components/vectorstores/Upstash.py b/src/backend/base/langflow/components/vectorstores/_Upstash.py similarity index 100% rename from src/backend/base/langflow/components/vectorstores/Upstash.py rename to src/backend/base/langflow/components/vectorstores/_Upstash.py diff --git a/src/backend/base/langflow/components/vectorstores/Vectara.py b/src/backend/base/langflow/components/vectorstores/_Vectara.py similarity index 100% rename from src/backend/base/langflow/components/vectorstores/Vectara.py rename to src/backend/base/langflow/components/vectorstores/_Vectara.py diff --git a/src/backend/base/langflow/components/vectorstores/Weaviate.py b/src/backend/base/langflow/components/vectorstores/_Weaviate.py similarity index 100% rename from src/backend/base/langflow/components/vectorstores/Weaviate.py rename to src/backend/base/langflow/components/vectorstores/_Weaviate.py From 940ea4dc4fb4f62acc0d88058790b0279c4819b9 Mon Sep 17 00:00:00 2001 From: Christophe Bornet Date: Mon, 21 Oct 2024 13:24:59 +0200 Subject: [PATCH 3/5] git rename workaround (2/2) --- .../base/langflow/components/data/{_Directory.py => directory.py} | 0 src/backend/base/langflow/components/data/{_File.py => file.py} | 0 src/backend/base/langflow/components/data/{_Gmail.py => gmail.py} | 0 src/backend/base/langflow/components/data/{_URL.py => url.py} | 0 .../base/langflow/components/data/{_Webhook.py => webhook.py} | 0 .../base/langflow/components/deactivated/{_Embed.py => embed.py} | 0 .../langflow/components/deactivated/{_Message.py => message.py} | 0 .../components/documentloaders/{_Confluence.py => confluence.py} | 0 .../documentloaders/{_Unstructured.py => unstructured.py} | 0 .../base/langflow/components/helpers/{_Memory.py => memory.py} | 0 .../base/langflow/components/models/{_Maritalk.py => maritalk.py} | 0 .../base/langflow/components/prompts/{_Prompt.py => prompt.py} | 0 .../base/langflow/components/prototypes/{_Listen.py => listen.py} | 0 .../base/langflow/components/prototypes/{_Notify.py => notify.py} | 0 .../langflow/components/toolkits/{_Metaphor.py => metaphor.py} | 0 .../langflow/components/tools/{_Calculator.py => calculator.py} | 0 .../langflow/components/vectorstores/{_AstraDB.py => astradb.py} | 0 .../components/vectorstores/{_Cassandra.py => cassandra.py} | 0 .../langflow/components/vectorstores/{_Chroma.py => chroma.py} | 0 .../components/vectorstores/{_Clickhouse.py => clickhouse.py} | 0 .../components/vectorstores/{_Couchbase.py => couchbase.py} | 0 .../vectorstores/{_Elasticsearch.py => elasticsearch.py} | 0 .../base/langflow/components/vectorstores/{_FAISS.py => faiss.py} | 0 .../base/langflow/components/vectorstores/{_HCD.py => hcd.py} | 0 .../langflow/components/vectorstores/{_Milvus.py => milvus.py} | 0 .../components/vectorstores/{_OpenSearch.py => opensearch.py} | 0 .../components/vectorstores/{_Pinecone.py => pinecone.py} | 0 .../langflow/components/vectorstores/{_Qdrant.py => qdrant.py} | 0 .../base/langflow/components/vectorstores/{_Redis.py => redis.py} | 0 .../langflow/components/vectorstores/{_Upstash.py => upstash.py} | 0 .../langflow/components/vectorstores/{_Vectara.py => vectara.py} | 0 .../components/vectorstores/{_Weaviate.py => weaviate.py} | 0 32 files changed, 0 insertions(+), 0 deletions(-) rename src/backend/base/langflow/components/data/{_Directory.py => directory.py} (100%) rename src/backend/base/langflow/components/data/{_File.py => file.py} (100%) rename src/backend/base/langflow/components/data/{_Gmail.py => gmail.py} (100%) rename src/backend/base/langflow/components/data/{_URL.py => url.py} (100%) rename src/backend/base/langflow/components/data/{_Webhook.py => webhook.py} (100%) rename src/backend/base/langflow/components/deactivated/{_Embed.py => embed.py} (100%) rename src/backend/base/langflow/components/deactivated/{_Message.py => message.py} (100%) rename src/backend/base/langflow/components/documentloaders/{_Confluence.py => confluence.py} (100%) rename src/backend/base/langflow/components/documentloaders/{_Unstructured.py => unstructured.py} (100%) rename src/backend/base/langflow/components/helpers/{_Memory.py => memory.py} (100%) rename src/backend/base/langflow/components/models/{_Maritalk.py => maritalk.py} (100%) rename src/backend/base/langflow/components/prompts/{_Prompt.py => prompt.py} (100%) rename src/backend/base/langflow/components/prototypes/{_Listen.py => listen.py} (100%) rename src/backend/base/langflow/components/prototypes/{_Notify.py => notify.py} (100%) rename src/backend/base/langflow/components/toolkits/{_Metaphor.py => metaphor.py} (100%) rename src/backend/base/langflow/components/tools/{_Calculator.py => calculator.py} (100%) rename src/backend/base/langflow/components/vectorstores/{_AstraDB.py => astradb.py} (100%) rename src/backend/base/langflow/components/vectorstores/{_Cassandra.py => cassandra.py} (100%) rename src/backend/base/langflow/components/vectorstores/{_Chroma.py => chroma.py} (100%) rename src/backend/base/langflow/components/vectorstores/{_Clickhouse.py => clickhouse.py} (100%) rename src/backend/base/langflow/components/vectorstores/{_Couchbase.py => couchbase.py} (100%) rename src/backend/base/langflow/components/vectorstores/{_Elasticsearch.py => elasticsearch.py} (100%) rename src/backend/base/langflow/components/vectorstores/{_FAISS.py => faiss.py} (100%) rename src/backend/base/langflow/components/vectorstores/{_HCD.py => hcd.py} (100%) rename src/backend/base/langflow/components/vectorstores/{_Milvus.py => milvus.py} (100%) rename src/backend/base/langflow/components/vectorstores/{_OpenSearch.py => opensearch.py} (100%) rename src/backend/base/langflow/components/vectorstores/{_Pinecone.py => pinecone.py} (100%) rename src/backend/base/langflow/components/vectorstores/{_Qdrant.py => qdrant.py} (100%) rename src/backend/base/langflow/components/vectorstores/{_Redis.py => redis.py} (100%) rename src/backend/base/langflow/components/vectorstores/{_Upstash.py => upstash.py} (100%) rename src/backend/base/langflow/components/vectorstores/{_Vectara.py => vectara.py} (100%) rename src/backend/base/langflow/components/vectorstores/{_Weaviate.py => weaviate.py} (100%) diff --git a/src/backend/base/langflow/components/data/_Directory.py b/src/backend/base/langflow/components/data/directory.py similarity index 100% rename from src/backend/base/langflow/components/data/_Directory.py rename to src/backend/base/langflow/components/data/directory.py diff --git a/src/backend/base/langflow/components/data/_File.py b/src/backend/base/langflow/components/data/file.py similarity index 100% rename from src/backend/base/langflow/components/data/_File.py rename to src/backend/base/langflow/components/data/file.py diff --git a/src/backend/base/langflow/components/data/_Gmail.py b/src/backend/base/langflow/components/data/gmail.py similarity index 100% rename from src/backend/base/langflow/components/data/_Gmail.py rename to src/backend/base/langflow/components/data/gmail.py diff --git a/src/backend/base/langflow/components/data/_URL.py b/src/backend/base/langflow/components/data/url.py similarity index 100% rename from src/backend/base/langflow/components/data/_URL.py rename to src/backend/base/langflow/components/data/url.py diff --git a/src/backend/base/langflow/components/data/_Webhook.py b/src/backend/base/langflow/components/data/webhook.py similarity index 100% rename from src/backend/base/langflow/components/data/_Webhook.py rename to src/backend/base/langflow/components/data/webhook.py diff --git a/src/backend/base/langflow/components/deactivated/_Embed.py b/src/backend/base/langflow/components/deactivated/embed.py similarity index 100% rename from src/backend/base/langflow/components/deactivated/_Embed.py rename to src/backend/base/langflow/components/deactivated/embed.py diff --git a/src/backend/base/langflow/components/deactivated/_Message.py b/src/backend/base/langflow/components/deactivated/message.py similarity index 100% rename from src/backend/base/langflow/components/deactivated/_Message.py rename to src/backend/base/langflow/components/deactivated/message.py diff --git a/src/backend/base/langflow/components/documentloaders/_Confluence.py b/src/backend/base/langflow/components/documentloaders/confluence.py similarity index 100% rename from src/backend/base/langflow/components/documentloaders/_Confluence.py rename to src/backend/base/langflow/components/documentloaders/confluence.py diff --git a/src/backend/base/langflow/components/documentloaders/_Unstructured.py b/src/backend/base/langflow/components/documentloaders/unstructured.py similarity index 100% rename from src/backend/base/langflow/components/documentloaders/_Unstructured.py rename to src/backend/base/langflow/components/documentloaders/unstructured.py diff --git a/src/backend/base/langflow/components/helpers/_Memory.py b/src/backend/base/langflow/components/helpers/memory.py similarity index 100% rename from src/backend/base/langflow/components/helpers/_Memory.py rename to src/backend/base/langflow/components/helpers/memory.py diff --git a/src/backend/base/langflow/components/models/_Maritalk.py b/src/backend/base/langflow/components/models/maritalk.py similarity index 100% rename from src/backend/base/langflow/components/models/_Maritalk.py rename to src/backend/base/langflow/components/models/maritalk.py diff --git a/src/backend/base/langflow/components/prompts/_Prompt.py b/src/backend/base/langflow/components/prompts/prompt.py similarity index 100% rename from src/backend/base/langflow/components/prompts/_Prompt.py rename to src/backend/base/langflow/components/prompts/prompt.py diff --git a/src/backend/base/langflow/components/prototypes/_Listen.py b/src/backend/base/langflow/components/prototypes/listen.py similarity index 100% rename from src/backend/base/langflow/components/prototypes/_Listen.py rename to src/backend/base/langflow/components/prototypes/listen.py diff --git a/src/backend/base/langflow/components/prototypes/_Notify.py b/src/backend/base/langflow/components/prototypes/notify.py similarity index 100% rename from src/backend/base/langflow/components/prototypes/_Notify.py rename to src/backend/base/langflow/components/prototypes/notify.py diff --git a/src/backend/base/langflow/components/toolkits/_Metaphor.py b/src/backend/base/langflow/components/toolkits/metaphor.py similarity index 100% rename from src/backend/base/langflow/components/toolkits/_Metaphor.py rename to src/backend/base/langflow/components/toolkits/metaphor.py diff --git a/src/backend/base/langflow/components/tools/_Calculator.py b/src/backend/base/langflow/components/tools/calculator.py similarity index 100% rename from src/backend/base/langflow/components/tools/_Calculator.py rename to src/backend/base/langflow/components/tools/calculator.py diff --git a/src/backend/base/langflow/components/vectorstores/_AstraDB.py b/src/backend/base/langflow/components/vectorstores/astradb.py similarity index 100% rename from src/backend/base/langflow/components/vectorstores/_AstraDB.py rename to src/backend/base/langflow/components/vectorstores/astradb.py diff --git a/src/backend/base/langflow/components/vectorstores/_Cassandra.py b/src/backend/base/langflow/components/vectorstores/cassandra.py similarity index 100% rename from src/backend/base/langflow/components/vectorstores/_Cassandra.py rename to src/backend/base/langflow/components/vectorstores/cassandra.py diff --git a/src/backend/base/langflow/components/vectorstores/_Chroma.py b/src/backend/base/langflow/components/vectorstores/chroma.py similarity index 100% rename from src/backend/base/langflow/components/vectorstores/_Chroma.py rename to src/backend/base/langflow/components/vectorstores/chroma.py diff --git a/src/backend/base/langflow/components/vectorstores/_Clickhouse.py b/src/backend/base/langflow/components/vectorstores/clickhouse.py similarity index 100% rename from src/backend/base/langflow/components/vectorstores/_Clickhouse.py rename to src/backend/base/langflow/components/vectorstores/clickhouse.py diff --git a/src/backend/base/langflow/components/vectorstores/_Couchbase.py b/src/backend/base/langflow/components/vectorstores/couchbase.py similarity index 100% rename from src/backend/base/langflow/components/vectorstores/_Couchbase.py rename to src/backend/base/langflow/components/vectorstores/couchbase.py diff --git a/src/backend/base/langflow/components/vectorstores/_Elasticsearch.py b/src/backend/base/langflow/components/vectorstores/elasticsearch.py similarity index 100% rename from src/backend/base/langflow/components/vectorstores/_Elasticsearch.py rename to src/backend/base/langflow/components/vectorstores/elasticsearch.py diff --git a/src/backend/base/langflow/components/vectorstores/_FAISS.py b/src/backend/base/langflow/components/vectorstores/faiss.py similarity index 100% rename from src/backend/base/langflow/components/vectorstores/_FAISS.py rename to src/backend/base/langflow/components/vectorstores/faiss.py diff --git a/src/backend/base/langflow/components/vectorstores/_HCD.py b/src/backend/base/langflow/components/vectorstores/hcd.py similarity index 100% rename from src/backend/base/langflow/components/vectorstores/_HCD.py rename to src/backend/base/langflow/components/vectorstores/hcd.py diff --git a/src/backend/base/langflow/components/vectorstores/_Milvus.py b/src/backend/base/langflow/components/vectorstores/milvus.py similarity index 100% rename from src/backend/base/langflow/components/vectorstores/_Milvus.py rename to src/backend/base/langflow/components/vectorstores/milvus.py diff --git a/src/backend/base/langflow/components/vectorstores/_OpenSearch.py b/src/backend/base/langflow/components/vectorstores/opensearch.py similarity index 100% rename from src/backend/base/langflow/components/vectorstores/_OpenSearch.py rename to src/backend/base/langflow/components/vectorstores/opensearch.py diff --git a/src/backend/base/langflow/components/vectorstores/_Pinecone.py b/src/backend/base/langflow/components/vectorstores/pinecone.py similarity index 100% rename from src/backend/base/langflow/components/vectorstores/_Pinecone.py rename to src/backend/base/langflow/components/vectorstores/pinecone.py diff --git a/src/backend/base/langflow/components/vectorstores/_Qdrant.py b/src/backend/base/langflow/components/vectorstores/qdrant.py similarity index 100% rename from src/backend/base/langflow/components/vectorstores/_Qdrant.py rename to src/backend/base/langflow/components/vectorstores/qdrant.py diff --git a/src/backend/base/langflow/components/vectorstores/_Redis.py b/src/backend/base/langflow/components/vectorstores/redis.py similarity index 100% rename from src/backend/base/langflow/components/vectorstores/_Redis.py rename to src/backend/base/langflow/components/vectorstores/redis.py diff --git a/src/backend/base/langflow/components/vectorstores/_Upstash.py b/src/backend/base/langflow/components/vectorstores/upstash.py similarity index 100% rename from src/backend/base/langflow/components/vectorstores/_Upstash.py rename to src/backend/base/langflow/components/vectorstores/upstash.py diff --git a/src/backend/base/langflow/components/vectorstores/_Vectara.py b/src/backend/base/langflow/components/vectorstores/vectara.py similarity index 100% rename from src/backend/base/langflow/components/vectorstores/_Vectara.py rename to src/backend/base/langflow/components/vectorstores/vectara.py diff --git a/src/backend/base/langflow/components/vectorstores/_Weaviate.py b/src/backend/base/langflow/components/vectorstores/weaviate.py similarity index 100% rename from src/backend/base/langflow/components/vectorstores/_Weaviate.py rename to src/backend/base/langflow/components/vectorstores/weaviate.py From 8217e4bf39c7917b151fa133f213f2eec810187b Mon Sep 17 00:00:00 2001 From: Christophe Bornet Date: Tue, 22 Oct 2024 14:39:21 +0200 Subject: [PATCH 4/5] Rollback changes on schema __init__ --- .../base/langflow/base/prompts/utils.py | 2 +- src/backend/base/langflow/schema/__init__.py | 18 +----------------- .../unit/base/tools/test_component_toolkit.py | 2 +- .../unit/graph/graph/test_callback_graph.py | 2 +- .../tests/unit/graph/graph/test_cycles.py | 2 +- 5 files changed, 5 insertions(+), 21 deletions(-) diff --git a/src/backend/base/langflow/base/prompts/utils.py b/src/backend/base/langflow/base/prompts/utils.py index cac903a157a..07bc692b6eb 100644 --- a/src/backend/base/langflow/base/prompts/utils.py +++ b/src/backend/base/langflow/base/prompts/utils.py @@ -2,7 +2,7 @@ from langchain_core.documents import Document -from langflow.schema.data import Data +from langflow.schema import Data def data_to_string(record: Data) -> str: diff --git a/src/backend/base/langflow/schema/__init__.py b/src/backend/base/langflow/schema/__init__.py index 0f153f334a4..e84ff7dfc1c 100644 --- a/src/backend/base/langflow/schema/__init__.py +++ b/src/backend/base/langflow/schema/__init__.py @@ -1,20 +1,4 @@ -from .artifact import ArtifactType from .data import Data from .dotdict import dotdict -from .image import Image -from .log import LogFunctionType, LoggableType -from .message import Message, MessageResponse -from .table import Column, TableSchema -__all__ = [ - "ArtifactType", - "Column", - "Data", - "Image", - "LogFunctionType", - "LoggableType", - "Message", - "MessageResponse", - "TableSchema", - "dotdict", -] +__all__ = ["Data", "dotdict"] diff --git a/src/backend/tests/unit/base/tools/test_component_toolkit.py b/src/backend/tests/unit/base/tools/test_component_toolkit.py index e3cb3a08726..67c81dae474 100644 --- a/src/backend/tests/unit/base/tools/test_component_toolkit.py +++ b/src/backend/tests/unit/base/tools/test_component_toolkit.py @@ -7,7 +7,7 @@ from langflow.components.models import OpenAIModelComponent from langflow.components.outputs import ChatOutput from langflow.graph import Graph -from langflow.schema import Message +from langflow.schema.message import Message from langflow.services.settings.feature_flags import FEATURE_FLAGS diff --git a/src/backend/tests/unit/graph/graph/test_callback_graph.py b/src/backend/tests/unit/graph/graph/test_callback_graph.py index 080322a5d9a..30fd86e18a6 100644 --- a/src/backend/tests/unit/graph/graph/test_callback_graph.py +++ b/src/backend/tests/unit/graph/graph/test_callback_graph.py @@ -5,7 +5,7 @@ from langflow.events.event_manager import EventManager from langflow.graph import Graph from langflow.inputs import IntInput -from langflow.schema import Message +from langflow.schema.message import Message from langflow.template import Output diff --git a/src/backend/tests/unit/graph/graph/test_cycles.py b/src/backend/tests/unit/graph/graph/test_cycles.py index 95c9f9297f6..5c3c2630149 100644 --- a/src/backend/tests/unit/graph/graph/test_cycles.py +++ b/src/backend/tests/unit/graph/graph/test_cycles.py @@ -10,7 +10,7 @@ from langflow.graph import Graph from langflow.graph.graph.utils import find_cycle_vertices from langflow.io import MessageTextInput, Output -from langflow.schema import Message +from langflow.schema.message import Message class Concatenate(Component): From 71766bcb8c806e9c111e159a17cab1d974145e28 Mon Sep 17 00:00:00 2001 From: Christophe Bornet Date: Tue, 22 Oct 2024 14:59:41 +0200 Subject: [PATCH 5/5] Fix tests --- src/backend/tests/unit/test_data_components.py | 4 ++-- src/backend/tests/unit/test_helper_components.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/backend/tests/unit/test_data_components.py b/src/backend/tests/unit/test_data_components.py index 8e13bf2dadf..05d9fa974fd 100644 --- a/src/backend/tests/unit/test_data_components.py +++ b/src/backend/tests/unit/test_data_components.py @@ -113,8 +113,8 @@ async def test_build_with_multiple_urls(api_request): assert len(results) == len(urls) -@patch("langflow.components.data.Directory.parallel_load_data") -@patch("langflow.components.data.Directory.retrieve_file_paths") +@patch("langflow.components.data.directory.parallel_load_data") +@patch("langflow.components.data.directory.retrieve_file_paths") @patch("langflow.components.data.DirectoryComponent.resolve_path") def test_directory_component_build_with_multithreading( mock_resolve_path, mock_retrieve_file_paths, mock_parallel_load_data diff --git a/src/backend/tests/unit/test_helper_components.py b/src/backend/tests/unit/test_helper_components.py index 87b389ef6a1..9326bedc4e7 100644 --- a/src/backend/tests/unit/test_helper_components.py +++ b/src/backend/tests/unit/test_helper_components.py @@ -35,7 +35,7 @@ def test_uuid_generator_component(): # Arrange uuid_generator_component = helpers.IDGeneratorComponent() - uuid_generator_component._code = Path(helpers.IDGenerator.__file__).read_text(encoding="utf-8") + uuid_generator_component._code = Path(helpers.id_generator.__file__).read_text(encoding="utf-8") frontend_node, _ = build_custom_component_template(uuid_generator_component)