langflow-base-nightly 0.5.0.dev25__py3-none-any.whl → 0.5.0.dev27__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- langflow/components/__init__.py +273 -0
- langflow/components/_importing.py +37 -0
- langflow/components/aiml/__init__.py +32 -2
- langflow/components/amazon/__init__.py +34 -3
- langflow/components/anthropic/__init__.py +30 -1
- langflow/components/assemblyai/__init__.py +38 -5
- langflow/components/azure/__init__.py +32 -2
- langflow/components/baidu/__init__.py +30 -1
- langflow/components/cleanlab/__init__.py +39 -4
- langflow/components/cloudflare/__init__.py +30 -1
- langflow/components/cohere/__init__.py +39 -4
- langflow/components/composio/__init__.py +40 -6
- langflow/components/crewai/__init__.py +40 -6
- langflow/components/custom_component/__init__.py +30 -1
- langflow/components/datastax/__init__.py +54 -13
- langflow/components/deepseek/__init__.py +33 -2
- langflow/components/docling/__init__.py +36 -4
- langflow/components/embeddings/__init__.py +32 -4
- langflow/components/firecrawl/__init__.py +42 -5
- langflow/components/groq/__init__.py +33 -2
- langflow/components/helpers/__init__.py +42 -7
- langflow/components/huggingface/__init__.py +32 -2
- langflow/components/ibm/__init__.py +32 -2
- langflow/components/input_output/__init__.py +36 -4
- langflow/components/langchain_utilities/__init__.py +80 -26
- langflow/components/langchain_utilities/conversation.py +1 -1
- langflow/components/langchain_utilities/llm_checker.py +1 -1
- langflow/components/langchain_utilities/llm_math.py +1 -1
- langflow/components/langchain_utilities/retrieval_qa.py +4 -2
- langflow/components/langchain_utilities/sql_generator.py +1 -1
- langflow/components/lmstudio/__init__.py +32 -2
- langflow/components/logic/__init__.py +42 -7
- langflow/components/maritalk/__init__.py +30 -1
- langflow/components/mistral/__init__.py +36 -3
- langflow/components/models/__init__.py +32 -2
- langflow/components/notdiamond/__init__.py +36 -0
- langflow/components/novita/__init__.py +30 -1
- langflow/components/nvidia/__init__.py +45 -7
- langflow/components/ollama/__init__.py +32 -2
- langflow/components/openai/__init__.py +32 -2
- langflow/components/openrouter/__init__.py +30 -1
- langflow/components/perplexity/__init__.py +33 -2
- langflow/components/processing/__init__.py +90 -23
- langflow/components/prototypes/__init__.py +30 -1
- langflow/components/sambanova/__init__.py +30 -1
- langflow/components/scrapegraph/__init__.py +39 -4
- langflow/components/searchapi/__init__.py +36 -0
- langflow/components/tools/__init__.py +54 -19
- langflow/components/twelvelabs/__init__.py +42 -7
- langflow/components/vectorstores/__init__.py +76 -24
- langflow/components/vertexai/__init__.py +32 -2
- langflow/components/xai/__init__.py +30 -1
- langflow/components/youtube/__init__.py +42 -7
- {langflow_base_nightly-0.5.0.dev25.dist-info → langflow_base_nightly-0.5.0.dev27.dist-info}/METADATA +1 -1
- {langflow_base_nightly-0.5.0.dev25.dist-info → langflow_base_nightly-0.5.0.dev27.dist-info}/RECORD +57 -57
- langflow/components/vectara/__init__.py +0 -0
- {langflow_base_nightly-0.5.0.dev25.dist-info → langflow_base_nightly-0.5.0.dev27.dist-info}/WHEEL +0 -0
- {langflow_base_nightly-0.5.0.dev25.dist-info → langflow_base_nightly-0.5.0.dev27.dist-info}/entry_points.txt +0 -0
|
@@ -1,29 +1,65 @@
|
|
|
1
|
-
from
|
|
2
|
-
|
|
3
|
-
from
|
|
4
|
-
|
|
5
|
-
from .
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
from .
|
|
9
|
-
from .
|
|
10
|
-
from .
|
|
11
|
-
from .
|
|
12
|
-
from .
|
|
13
|
-
from .
|
|
14
|
-
from .
|
|
15
|
-
from .
|
|
16
|
-
from .
|
|
17
|
-
from .
|
|
18
|
-
from .
|
|
19
|
-
from .
|
|
20
|
-
from .
|
|
21
|
-
from .
|
|
22
|
-
from .
|
|
23
|
-
from .
|
|
24
|
-
from .
|
|
25
|
-
from .
|
|
26
|
-
from .
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from typing import TYPE_CHECKING, Any
|
|
4
|
+
|
|
5
|
+
from langflow.components._importing import import_mod
|
|
6
|
+
|
|
7
|
+
if TYPE_CHECKING:
|
|
8
|
+
from .character import CharacterTextSplitterComponent
|
|
9
|
+
from .conversation import ConversationChainComponent
|
|
10
|
+
from .csv_agent import CSVAgentComponent
|
|
11
|
+
from .fake_embeddings import FakeEmbeddingsComponent
|
|
12
|
+
from .html_link_extractor import HtmlLinkExtractorComponent
|
|
13
|
+
from .json_agent import JsonAgentComponent
|
|
14
|
+
from .langchain_hub import LangChainHubPromptComponent
|
|
15
|
+
from .language_recursive import LanguageRecursiveTextSplitterComponent
|
|
16
|
+
from .language_semantic import SemanticTextSplitterComponent
|
|
17
|
+
from .llm_checker import LLMCheckerChainComponent
|
|
18
|
+
from .llm_math import LLMMathChainComponent
|
|
19
|
+
from .natural_language import NaturalLanguageTextSplitterComponent
|
|
20
|
+
from .openai_tools import OpenAIToolsAgentComponent
|
|
21
|
+
from .openapi import OpenAPIAgentComponent
|
|
22
|
+
from .recursive_character import RecursiveCharacterTextSplitterComponent
|
|
23
|
+
from .retrieval_qa import RetrievalQAComponent
|
|
24
|
+
from .runnable_executor import RunnableExecComponent
|
|
25
|
+
from .self_query import SelfQueryRetrieverComponent
|
|
26
|
+
from .spider import SpiderTool
|
|
27
|
+
from .sql import SQLAgentComponent
|
|
28
|
+
from .sql_database import SQLDatabaseComponent
|
|
29
|
+
from .sql_generator import SQLGeneratorComponent
|
|
30
|
+
from .tool_calling import ToolCallingAgentComponent
|
|
31
|
+
from .vector_store_info import VectorStoreInfoComponent
|
|
32
|
+
from .vector_store_router import VectorStoreRouterAgentComponent
|
|
33
|
+
from .xml_agent import XMLAgentComponent
|
|
34
|
+
|
|
35
|
+
_dynamic_imports = {
|
|
36
|
+
"CharacterTextSplitterComponent": "character",
|
|
37
|
+
"ConversationChainComponent": "conversation",
|
|
38
|
+
"CSVAgentComponent": "csv_agent",
|
|
39
|
+
"FakeEmbeddingsComponent": "fake_embeddings",
|
|
40
|
+
"HtmlLinkExtractorComponent": "html_link_extractor",
|
|
41
|
+
"JsonAgentComponent": "json_agent",
|
|
42
|
+
"LangChainHubPromptComponent": "langchain_hub",
|
|
43
|
+
"LanguageRecursiveTextSplitterComponent": "language_recursive",
|
|
44
|
+
"LLMCheckerChainComponent": "llm_checker",
|
|
45
|
+
"LLMMathChainComponent": "llm_math",
|
|
46
|
+
"NaturalLanguageTextSplitterComponent": "natural_language",
|
|
47
|
+
"OpenAIToolsAgentComponent": "openai_tools",
|
|
48
|
+
"OpenAPIAgentComponent": "openapi",
|
|
49
|
+
"RecursiveCharacterTextSplitterComponent": "recursive_character",
|
|
50
|
+
"RetrievalQAComponent": "retrieval_qa",
|
|
51
|
+
"RunnableExecComponent": "runnable_executor",
|
|
52
|
+
"SelfQueryRetrieverComponent": "self_query",
|
|
53
|
+
"SemanticTextSplitterComponent": "language_semantic",
|
|
54
|
+
"SpiderTool": "spider",
|
|
55
|
+
"SQLAgentComponent": "sql",
|
|
56
|
+
"SQLDatabaseComponent": "sql_database",
|
|
57
|
+
"SQLGeneratorComponent": "sql_generator",
|
|
58
|
+
"ToolCallingAgentComponent": "tool_calling",
|
|
59
|
+
"VectorStoreInfoComponent": "vector_store_info",
|
|
60
|
+
"VectorStoreRouterAgentComponent": "vector_store_router",
|
|
61
|
+
"XMLAgentComponent": "xml_agent",
|
|
62
|
+
}
|
|
27
63
|
|
|
28
64
|
__all__ = [
|
|
29
65
|
"CSVAgentComponent",
|
|
@@ -53,3 +89,21 @@ __all__ = [
|
|
|
53
89
|
"VectorStoreRouterAgentComponent",
|
|
54
90
|
"XMLAgentComponent",
|
|
55
91
|
]
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
def __getattr__(attr_name: str) -> Any:
|
|
95
|
+
"""Lazily import langchain utility components on attribute access."""
|
|
96
|
+
if attr_name not in _dynamic_imports:
|
|
97
|
+
msg = f"module '{__name__}' has no attribute '{attr_name}'"
|
|
98
|
+
raise AttributeError(msg)
|
|
99
|
+
try:
|
|
100
|
+
result = import_mod(attr_name, _dynamic_imports[attr_name], __spec__.parent)
|
|
101
|
+
except (ModuleNotFoundError, ImportError, AttributeError) as e:
|
|
102
|
+
msg = f"Could not import '{attr_name}' from '{__name__}': {e}"
|
|
103
|
+
raise AttributeError(msg) from e
|
|
104
|
+
globals()[attr_name] = result
|
|
105
|
+
return result
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
def __dir__() -> list[str]:
|
|
109
|
+
return list(__all__)
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
from langchain.chains import ConversationChain
|
|
2
2
|
|
|
3
3
|
from langflow.base.chains.model import LCChainComponent
|
|
4
|
-
from langflow.field_typing import Message
|
|
5
4
|
from langflow.inputs.inputs import HandleInput, MultilineInput
|
|
5
|
+
from langflow.schema.message import Message
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
class ConversationChainComponent(LCChainComponent):
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
from langchain.chains import LLMCheckerChain
|
|
2
2
|
|
|
3
3
|
from langflow.base.chains.model import LCChainComponent
|
|
4
|
-
from langflow.field_typing import Message
|
|
5
4
|
from langflow.inputs.inputs import HandleInput, MultilineInput
|
|
5
|
+
from langflow.schema.message import Message
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
class LLMCheckerChainComponent(LCChainComponent):
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
from langchain.chains import LLMMathChain
|
|
2
2
|
|
|
3
3
|
from langflow.base.chains.model import LCChainComponent
|
|
4
|
-
from langflow.field_typing import Message
|
|
5
4
|
from langflow.inputs.inputs import HandleInput, MultilineInput
|
|
5
|
+
from langflow.schema.message import Message
|
|
6
6
|
from langflow.template.field.base import Output
|
|
7
7
|
|
|
8
8
|
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
from typing import cast
|
|
2
|
+
|
|
1
3
|
from langchain.chains import RetrievalQA
|
|
2
4
|
|
|
3
5
|
from langflow.base.chains.model import LCChainComponent
|
|
4
|
-
from langflow.field_typing import Message
|
|
5
6
|
from langflow.inputs.inputs import BoolInput, DropdownInput, HandleInput, MultilineInput
|
|
7
|
+
from langflow.schema.message import Message
|
|
6
8
|
|
|
7
9
|
|
|
8
10
|
class RetrievalQAComponent(LCChainComponent):
|
|
@@ -78,4 +80,4 @@ class RetrievalQAComponent(LCChainComponent):
|
|
|
78
80
|
result_str = f"{result_str}\n{references_str}"
|
|
79
81
|
# put the entire result to debug history, query and content
|
|
80
82
|
self.status = {**result, "source_documents": source_docs, "output": result_str}
|
|
81
|
-
return result_str
|
|
83
|
+
return cast("Message", result_str)
|
|
@@ -4,8 +4,8 @@ from langchain.chains import create_sql_query_chain
|
|
|
4
4
|
from langchain_core.prompts import PromptTemplate
|
|
5
5
|
|
|
6
6
|
from langflow.base.chains.model import LCChainComponent
|
|
7
|
-
from langflow.field_typing import Message
|
|
8
7
|
from langflow.inputs.inputs import HandleInput, IntInput, MultilineInput
|
|
8
|
+
from langflow.schema.message import Message
|
|
9
9
|
from langflow.template.field.base import Output
|
|
10
10
|
|
|
11
11
|
if TYPE_CHECKING:
|
|
@@ -1,4 +1,34 @@
|
|
|
1
|
-
from
|
|
2
|
-
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from typing import TYPE_CHECKING, Any
|
|
4
|
+
|
|
5
|
+
from langflow.components._importing import import_mod
|
|
6
|
+
|
|
7
|
+
if TYPE_CHECKING:
|
|
8
|
+
from langflow.components.lmstudio.lmstudioembeddings import LMStudioEmbeddingsComponent
|
|
9
|
+
from langflow.components.lmstudio.lmstudiomodel import LMStudioModelComponent
|
|
10
|
+
|
|
11
|
+
_dynamic_imports = {
|
|
12
|
+
"LMStudioEmbeddingsComponent": "lmstudioembeddings",
|
|
13
|
+
"LMStudioModelComponent": "lmstudiomodel",
|
|
14
|
+
}
|
|
3
15
|
|
|
4
16
|
__all__ = ["LMStudioEmbeddingsComponent", "LMStudioModelComponent"]
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
def __getattr__(attr_name: str) -> Any:
|
|
20
|
+
"""Lazily import lmstudio components on attribute access."""
|
|
21
|
+
if attr_name not in _dynamic_imports:
|
|
22
|
+
msg = f"module '{__name__}' has no attribute '{attr_name}'"
|
|
23
|
+
raise AttributeError(msg)
|
|
24
|
+
try:
|
|
25
|
+
result = import_mod(attr_name, _dynamic_imports[attr_name], __spec__.parent)
|
|
26
|
+
except (ModuleNotFoundError, ImportError, AttributeError) as e:
|
|
27
|
+
msg = f"Could not import '{attr_name}' from '{__name__}': {e}"
|
|
28
|
+
raise AttributeError(msg) from e
|
|
29
|
+
globals()[attr_name] = result
|
|
30
|
+
return result
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
def __dir__() -> list[str]:
|
|
34
|
+
return list(__all__)
|
|
@@ -1,10 +1,27 @@
|
|
|
1
|
-
from
|
|
2
|
-
|
|
3
|
-
from
|
|
4
|
-
|
|
5
|
-
from .
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from typing import TYPE_CHECKING, Any
|
|
4
|
+
|
|
5
|
+
from langflow.components._importing import import_mod
|
|
6
|
+
|
|
7
|
+
if TYPE_CHECKING:
|
|
8
|
+
from langflow.components.logic.conditional_router import ConditionalRouterComponent
|
|
9
|
+
from langflow.components.logic.data_conditional_router import DataConditionalRouterComponent
|
|
10
|
+
from langflow.components.logic.flow_tool import FlowToolComponent
|
|
11
|
+
from langflow.components.logic.loop import LoopComponent
|
|
12
|
+
from langflow.components.logic.pass_message import PassMessageComponent
|
|
13
|
+
from langflow.components.logic.run_flow import RunFlowComponent
|
|
14
|
+
from langflow.components.logic.sub_flow import SubFlowComponent
|
|
15
|
+
|
|
16
|
+
_dynamic_imports = {
|
|
17
|
+
"ConditionalRouterComponent": "conditional_router",
|
|
18
|
+
"DataConditionalRouterComponent": "data_conditional_router",
|
|
19
|
+
"FlowToolComponent": "flow_tool",
|
|
20
|
+
"LoopComponent": "loop",
|
|
21
|
+
"PassMessageComponent": "pass_message",
|
|
22
|
+
"RunFlowComponent": "run_flow",
|
|
23
|
+
"SubFlowComponent": "sub_flow",
|
|
24
|
+
}
|
|
8
25
|
|
|
9
26
|
__all__ = [
|
|
10
27
|
"ConditionalRouterComponent",
|
|
@@ -15,3 +32,21 @@ __all__ = [
|
|
|
15
32
|
"RunFlowComponent",
|
|
16
33
|
"SubFlowComponent",
|
|
17
34
|
]
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
def __getattr__(attr_name: str) -> Any:
|
|
38
|
+
"""Lazily import logic components on attribute access."""
|
|
39
|
+
if attr_name not in _dynamic_imports:
|
|
40
|
+
msg = f"module '{__name__}' has no attribute '{attr_name}'"
|
|
41
|
+
raise AttributeError(msg)
|
|
42
|
+
try:
|
|
43
|
+
result = import_mod(attr_name, _dynamic_imports[attr_name], __spec__.parent)
|
|
44
|
+
except (ModuleNotFoundError, ImportError, AttributeError) as e:
|
|
45
|
+
msg = f"Could not import '{attr_name}' from '{__name__}': {e}"
|
|
46
|
+
raise AttributeError(msg) from e
|
|
47
|
+
globals()[attr_name] = result
|
|
48
|
+
return result
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
def __dir__() -> list[str]:
|
|
52
|
+
return list(__all__)
|
|
@@ -1,3 +1,32 @@
|
|
|
1
|
-
from
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from typing import TYPE_CHECKING, Any
|
|
4
|
+
|
|
5
|
+
from langflow.components._importing import import_mod
|
|
6
|
+
|
|
7
|
+
if TYPE_CHECKING:
|
|
8
|
+
from langflow.components.maritalk.maritalk import MaritalkModelComponent
|
|
9
|
+
|
|
10
|
+
_dynamic_imports = {
|
|
11
|
+
"MaritalkModelComponent": "maritalk",
|
|
12
|
+
}
|
|
2
13
|
|
|
3
14
|
__all__ = ["MaritalkModelComponent"]
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
def __getattr__(attr_name: str) -> Any:
|
|
18
|
+
"""Lazily import maritalk components on attribute access."""
|
|
19
|
+
if attr_name not in _dynamic_imports:
|
|
20
|
+
msg = f"module '{__name__}' has no attribute '{attr_name}'"
|
|
21
|
+
raise AttributeError(msg)
|
|
22
|
+
try:
|
|
23
|
+
result = import_mod(attr_name, _dynamic_imports[attr_name], __spec__.parent)
|
|
24
|
+
except (ModuleNotFoundError, ImportError, AttributeError) as e:
|
|
25
|
+
msg = f"Could not import '{attr_name}' from '{__name__}': {e}"
|
|
26
|
+
raise AttributeError(msg) from e
|
|
27
|
+
globals()[attr_name] = result
|
|
28
|
+
return result
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
def __dir__() -> list[str]:
|
|
32
|
+
return list(__all__)
|
|
@@ -1,4 +1,37 @@
|
|
|
1
|
-
from
|
|
2
|
-
from .mistral_embeddings import MistralAIEmbeddingsComponent
|
|
1
|
+
from __future__ import annotations
|
|
3
2
|
|
|
4
|
-
|
|
3
|
+
from typing import TYPE_CHECKING, Any
|
|
4
|
+
|
|
5
|
+
from langflow.components._importing import import_mod
|
|
6
|
+
|
|
7
|
+
if TYPE_CHECKING:
|
|
8
|
+
from .mistral import MistralAIModelComponent
|
|
9
|
+
from .mistral_embeddings import MistralAIEmbeddingsComponent
|
|
10
|
+
|
|
11
|
+
_dynamic_imports = {
|
|
12
|
+
"MistralAIModelComponent": "mistral",
|
|
13
|
+
"MistralAIEmbeddingsComponent": "mistral_embeddings",
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
__all__ = [
|
|
17
|
+
"MistralAIEmbeddingsComponent",
|
|
18
|
+
"MistralAIModelComponent",
|
|
19
|
+
]
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
def __getattr__(attr_name: str) -> Any:
|
|
23
|
+
"""Lazily import mistral components on attribute access."""
|
|
24
|
+
if attr_name not in _dynamic_imports:
|
|
25
|
+
msg = f"module '{__name__}' has no attribute '{attr_name}'"
|
|
26
|
+
raise AttributeError(msg)
|
|
27
|
+
try:
|
|
28
|
+
result = import_mod(attr_name, _dynamic_imports[attr_name], __spec__.parent)
|
|
29
|
+
except (ModuleNotFoundError, ImportError, AttributeError) as e:
|
|
30
|
+
msg = f"Could not import '{attr_name}' from '{__name__}': {e}"
|
|
31
|
+
raise AttributeError(msg) from e
|
|
32
|
+
globals()[attr_name] = result
|
|
33
|
+
return result
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
def __dir__() -> list[str]:
|
|
37
|
+
return list(__all__)
|
|
@@ -1,4 +1,34 @@
|
|
|
1
|
-
from
|
|
2
|
-
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from typing import TYPE_CHECKING, Any
|
|
4
|
+
|
|
5
|
+
from langflow.components._importing import import_mod
|
|
6
|
+
|
|
7
|
+
if TYPE_CHECKING:
|
|
8
|
+
from langflow.components.models.embedding_model import EmbeddingModelComponent
|
|
9
|
+
from langflow.components.models.language_model import LanguageModelComponent
|
|
10
|
+
|
|
11
|
+
_dynamic_imports = {
|
|
12
|
+
"EmbeddingModelComponent": "embedding_model",
|
|
13
|
+
"LanguageModelComponent": "language_model",
|
|
14
|
+
}
|
|
3
15
|
|
|
4
16
|
__all__ = ["EmbeddingModelComponent", "LanguageModelComponent"]
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
def __getattr__(attr_name: str) -> Any:
|
|
20
|
+
"""Lazily import model components on attribute access."""
|
|
21
|
+
if attr_name not in _dynamic_imports:
|
|
22
|
+
msg = f"module '{__name__}' has no attribute '{attr_name}'"
|
|
23
|
+
raise AttributeError(msg)
|
|
24
|
+
try:
|
|
25
|
+
result = import_mod(attr_name, _dynamic_imports[attr_name], __spec__.parent)
|
|
26
|
+
except (ModuleNotFoundError, ImportError, AttributeError) as e:
|
|
27
|
+
msg = f"Could not import '{attr_name}' from '{__name__}': {e}"
|
|
28
|
+
raise AttributeError(msg) from e
|
|
29
|
+
globals()[attr_name] = result
|
|
30
|
+
return result
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
def __dir__() -> list[str]:
|
|
34
|
+
return list(__all__)
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"""NotDiamond components for LangFlow."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import TYPE_CHECKING, Any
|
|
6
|
+
|
|
7
|
+
from langflow.components._importing import import_mod
|
|
8
|
+
|
|
9
|
+
if TYPE_CHECKING:
|
|
10
|
+
from langflow.components.notdiamond.notdiamond import NotDiamondComponent
|
|
11
|
+
|
|
12
|
+
_dynamic_imports = {
|
|
13
|
+
"NotDiamondComponent": "notdiamond",
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
__all__ = [
|
|
17
|
+
"NotDiamondComponent",
|
|
18
|
+
]
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
def __getattr__(attr_name: str) -> Any:
|
|
22
|
+
"""Lazily import notdiamond components on attribute access."""
|
|
23
|
+
if attr_name not in _dynamic_imports:
|
|
24
|
+
msg = f"module '{__name__}' has no attribute '{attr_name}'"
|
|
25
|
+
raise AttributeError(msg)
|
|
26
|
+
try:
|
|
27
|
+
result = import_mod(attr_name, _dynamic_imports[attr_name], __spec__.parent)
|
|
28
|
+
except (ModuleNotFoundError, ImportError, AttributeError) as e:
|
|
29
|
+
msg = f"Could not import '{attr_name}' from '{__name__}': {e}"
|
|
30
|
+
raise AttributeError(msg) from e
|
|
31
|
+
globals()[attr_name] = result
|
|
32
|
+
return result
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
def __dir__() -> list[str]:
|
|
36
|
+
return list(__all__)
|
|
@@ -1,3 +1,32 @@
|
|
|
1
|
-
from
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from typing import TYPE_CHECKING, Any
|
|
4
|
+
|
|
5
|
+
from langflow.components._importing import import_mod
|
|
6
|
+
|
|
7
|
+
if TYPE_CHECKING:
|
|
8
|
+
from langflow.components.novita.novita import NovitaModelComponent
|
|
9
|
+
|
|
10
|
+
_dynamic_imports = {
|
|
11
|
+
"NovitaModelComponent": "novita",
|
|
12
|
+
}
|
|
2
13
|
|
|
3
14
|
__all__ = ["NovitaModelComponent"]
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
def __getattr__(attr_name: str) -> Any:
|
|
18
|
+
"""Lazily import novita components on attribute access."""
|
|
19
|
+
if attr_name not in _dynamic_imports:
|
|
20
|
+
msg = f"module '{__name__}' has no attribute '{attr_name}'"
|
|
21
|
+
raise AttributeError(msg)
|
|
22
|
+
try:
|
|
23
|
+
result = import_mod(attr_name, _dynamic_imports[attr_name], __spec__.parent)
|
|
24
|
+
except (ModuleNotFoundError, ImportError, AttributeError) as e:
|
|
25
|
+
msg = f"Could not import '{attr_name}' from '{__name__}': {e}"
|
|
26
|
+
raise AttributeError(msg) from e
|
|
27
|
+
globals()[attr_name] = result
|
|
28
|
+
return result
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
def __dir__() -> list[str]:
|
|
32
|
+
return list(__all__)
|
|
@@ -1,13 +1,28 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
1
3
|
import sys
|
|
4
|
+
from typing import TYPE_CHECKING, Any
|
|
2
5
|
|
|
3
|
-
from .
|
|
4
|
-
from .nvidia_embedding import NVIDIAEmbeddingsComponent
|
|
5
|
-
from .nvidia_ingest import NvidiaIngestComponent
|
|
6
|
-
from .nvidia_rerank import NvidiaRerankComponent
|
|
6
|
+
from langflow.components._importing import import_mod
|
|
7
7
|
|
|
8
|
-
if
|
|
9
|
-
from .
|
|
8
|
+
if TYPE_CHECKING:
|
|
9
|
+
from .nvidia import NVIDIAModelComponent
|
|
10
|
+
from .nvidia_embedding import NVIDIAEmbeddingsComponent
|
|
11
|
+
from .nvidia_ingest import NvidiaIngestComponent
|
|
12
|
+
from .nvidia_rerank import NvidiaRerankComponent
|
|
13
|
+
|
|
14
|
+
if sys.platform == "win32":
|
|
15
|
+
from .system_assist import NvidiaSystemAssistComponent
|
|
16
|
+
|
|
17
|
+
_dynamic_imports = {
|
|
18
|
+
"NVIDIAModelComponent": "nvidia",
|
|
19
|
+
"NVIDIAEmbeddingsComponent": "nvidia_embedding",
|
|
20
|
+
"NvidiaIngestComponent": "nvidia_ingest",
|
|
21
|
+
"NvidiaRerankComponent": "nvidia_rerank",
|
|
22
|
+
}
|
|
10
23
|
|
|
24
|
+
if sys.platform == "win32":
|
|
25
|
+
_dynamic_imports["NvidiaSystemAssistComponent"] = "system_assist"
|
|
11
26
|
__all__ = [
|
|
12
27
|
"NVIDIAEmbeddingsComponent",
|
|
13
28
|
"NVIDIAModelComponent",
|
|
@@ -16,4 +31,27 @@ if sys.platform == "win32":
|
|
|
16
31
|
"NvidiaSystemAssistComponent",
|
|
17
32
|
]
|
|
18
33
|
else:
|
|
19
|
-
__all__ = [
|
|
34
|
+
__all__ = [
|
|
35
|
+
"NVIDIAEmbeddingsComponent",
|
|
36
|
+
"NVIDIAModelComponent",
|
|
37
|
+
"NvidiaIngestComponent",
|
|
38
|
+
"NvidiaRerankComponent",
|
|
39
|
+
]
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
def __getattr__(attr_name: str) -> Any:
|
|
43
|
+
"""Lazily import nvidia components on attribute access."""
|
|
44
|
+
if attr_name not in _dynamic_imports:
|
|
45
|
+
msg = f"module '{__name__}' has no attribute '{attr_name}'"
|
|
46
|
+
raise AttributeError(msg)
|
|
47
|
+
try:
|
|
48
|
+
result = import_mod(attr_name, _dynamic_imports[attr_name], __spec__.parent)
|
|
49
|
+
except (ModuleNotFoundError, ImportError, AttributeError) as e:
|
|
50
|
+
msg = f"Could not import '{attr_name}' from '{__name__}': {e}"
|
|
51
|
+
raise AttributeError(msg) from e
|
|
52
|
+
globals()[attr_name] = result
|
|
53
|
+
return result
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
def __dir__() -> list[str]:
|
|
57
|
+
return list(__all__)
|
|
@@ -1,7 +1,37 @@
|
|
|
1
|
-
from
|
|
2
|
-
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from typing import TYPE_CHECKING, Any
|
|
4
|
+
|
|
5
|
+
from langflow.components._importing import import_mod
|
|
6
|
+
|
|
7
|
+
if TYPE_CHECKING:
|
|
8
|
+
from .ollama import ChatOllamaComponent
|
|
9
|
+
from .ollama_embeddings import OllamaEmbeddingsComponent
|
|
10
|
+
|
|
11
|
+
_dynamic_imports = {
|
|
12
|
+
"ChatOllamaComponent": "ollama",
|
|
13
|
+
"OllamaEmbeddingsComponent": "ollama_embeddings",
|
|
14
|
+
}
|
|
3
15
|
|
|
4
16
|
__all__ = [
|
|
5
17
|
"ChatOllamaComponent",
|
|
6
18
|
"OllamaEmbeddingsComponent",
|
|
7
19
|
]
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
def __getattr__(attr_name: str) -> Any:
|
|
23
|
+
"""Lazily import ollama components on attribute access."""
|
|
24
|
+
if attr_name not in _dynamic_imports:
|
|
25
|
+
msg = f"module '{__name__}' has no attribute '{attr_name}'"
|
|
26
|
+
raise AttributeError(msg)
|
|
27
|
+
try:
|
|
28
|
+
result = import_mod(attr_name, _dynamic_imports[attr_name], __spec__.parent)
|
|
29
|
+
except (ModuleNotFoundError, ImportError, AttributeError) as e:
|
|
30
|
+
msg = f"Could not import '{attr_name}' from '{__name__}': {e}"
|
|
31
|
+
raise AttributeError(msg) from e
|
|
32
|
+
globals()[attr_name] = result
|
|
33
|
+
return result
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
def __dir__() -> list[str]:
|
|
37
|
+
return list(__all__)
|
|
@@ -1,7 +1,37 @@
|
|
|
1
|
-
from
|
|
2
|
-
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from typing import TYPE_CHECKING, Any
|
|
4
|
+
|
|
5
|
+
from langflow.components._importing import import_mod
|
|
6
|
+
|
|
7
|
+
if TYPE_CHECKING:
|
|
8
|
+
from langflow.components.openai.openai import OpenAIEmbeddingsComponent
|
|
9
|
+
from langflow.components.openai.openai_chat_model import OpenAIModelComponent
|
|
10
|
+
|
|
11
|
+
_dynamic_imports = {
|
|
12
|
+
"OpenAIEmbeddingsComponent": "openai",
|
|
13
|
+
"OpenAIModelComponent": "openai_chat_model",
|
|
14
|
+
}
|
|
3
15
|
|
|
4
16
|
__all__ = [
|
|
5
17
|
"OpenAIEmbeddingsComponent",
|
|
6
18
|
"OpenAIModelComponent",
|
|
7
19
|
]
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
def __getattr__(attr_name: str) -> Any:
|
|
23
|
+
"""Lazily import OpenAI components on attribute access."""
|
|
24
|
+
if attr_name not in _dynamic_imports:
|
|
25
|
+
msg = f"module '{__name__}' has no attribute '{attr_name}'"
|
|
26
|
+
raise AttributeError(msg)
|
|
27
|
+
try:
|
|
28
|
+
result = import_mod(attr_name, _dynamic_imports[attr_name], __spec__.parent)
|
|
29
|
+
except (ModuleNotFoundError, ImportError, AttributeError) as e:
|
|
30
|
+
msg = f"Could not import '{attr_name}' from '{__name__}': {e}"
|
|
31
|
+
raise AttributeError(msg) from e
|
|
32
|
+
globals()[attr_name] = result
|
|
33
|
+
return result
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
def __dir__() -> list[str]:
|
|
37
|
+
return list(__all__)
|
|
@@ -1,3 +1,32 @@
|
|
|
1
|
-
from
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from typing import TYPE_CHECKING, Any
|
|
4
|
+
|
|
5
|
+
from langflow.components._importing import import_mod
|
|
6
|
+
|
|
7
|
+
if TYPE_CHECKING:
|
|
8
|
+
from langflow.components.openrouter.openrouter import OpenRouterComponent
|
|
9
|
+
|
|
10
|
+
_dynamic_imports = {
|
|
11
|
+
"OpenRouterComponent": "openrouter",
|
|
12
|
+
}
|
|
2
13
|
|
|
3
14
|
__all__ = ["OpenRouterComponent"]
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
def __getattr__(attr_name: str) -> Any:
|
|
18
|
+
"""Lazily import openrouter components on attribute access."""
|
|
19
|
+
if attr_name not in _dynamic_imports:
|
|
20
|
+
msg = f"module '{__name__}' has no attribute '{attr_name}'"
|
|
21
|
+
raise AttributeError(msg)
|
|
22
|
+
try:
|
|
23
|
+
result = import_mod(attr_name, _dynamic_imports[attr_name], __spec__.parent)
|
|
24
|
+
except (ModuleNotFoundError, ImportError, AttributeError) as e:
|
|
25
|
+
msg = f"Could not import '{attr_name}' from '{__name__}': {e}"
|
|
26
|
+
raise AttributeError(msg) from e
|
|
27
|
+
globals()[attr_name] = result
|
|
28
|
+
return result
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
def __dir__() -> list[str]:
|
|
32
|
+
return list(__all__)
|
|
@@ -1,3 +1,34 @@
|
|
|
1
|
-
from
|
|
1
|
+
from __future__ import annotations
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
from typing import TYPE_CHECKING, Any
|
|
4
|
+
|
|
5
|
+
from langflow.components._importing import import_mod
|
|
6
|
+
|
|
7
|
+
if TYPE_CHECKING:
|
|
8
|
+
from .perplexity import PerplexityComponent
|
|
9
|
+
|
|
10
|
+
_dynamic_imports = {
|
|
11
|
+
"PerplexityComponent": "perplexity",
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
__all__ = [
|
|
15
|
+
"PerplexityComponent",
|
|
16
|
+
]
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
def __getattr__(attr_name: str) -> Any:
|
|
20
|
+
"""Lazily import perplexity components on attribute access."""
|
|
21
|
+
if attr_name not in _dynamic_imports:
|
|
22
|
+
msg = f"module '{__name__}' has no attribute '{attr_name}'"
|
|
23
|
+
raise AttributeError(msg)
|
|
24
|
+
try:
|
|
25
|
+
result = import_mod(attr_name, _dynamic_imports[attr_name], __spec__.parent)
|
|
26
|
+
except (ModuleNotFoundError, ImportError, AttributeError) as e:
|
|
27
|
+
msg = f"Could not import '{attr_name}' from '{__name__}': {e}"
|
|
28
|
+
raise AttributeError(msg) from e
|
|
29
|
+
globals()[attr_name] = result
|
|
30
|
+
return result
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
def __dir__() -> list[str]:
|
|
34
|
+
return list(__all__)
|