Import langflow.field_typing.constants in
__init__.py
This commit is contained in:
parent
3d4820144c
commit
7cfd5171d7
2 changed files with 27 additions and 10 deletions
|
|
@ -1,16 +1,35 @@
|
|||
from typing import Any
|
||||
|
||||
from .constants import (AgentExecutor, BaseChatMemory, BaseLanguageModel,
|
||||
BaseLLM, BaseLoader, BaseMemory, BaseOutputParser,
|
||||
BasePromptTemplate, BaseRetriever, Callable, Chain,
|
||||
ChatPromptTemplate, Data, Document, Embeddings,
|
||||
NestedDict, Object, Prompt, PromptTemplate,
|
||||
TextSplitter, Tool, VectorStore)
|
||||
from .constants import (
|
||||
AgentExecutor,
|
||||
BaseChatMemory,
|
||||
BaseLanguageModel,
|
||||
BaseLLM,
|
||||
BaseLoader,
|
||||
BaseMemory,
|
||||
BaseOutputParser,
|
||||
BasePromptTemplate,
|
||||
BaseRetriever,
|
||||
Callable,
|
||||
Chain,
|
||||
ChatPromptTemplate,
|
||||
Data,
|
||||
Document,
|
||||
Embeddings,
|
||||
NestedDict,
|
||||
Object,
|
||||
Prompt,
|
||||
PromptTemplate,
|
||||
TextSplitter,
|
||||
Tool,
|
||||
VectorStore,
|
||||
)
|
||||
from .range_spec import RangeSpec
|
||||
|
||||
|
||||
def import_template_field():
|
||||
from langflow.template.field.base import TemplateField
|
||||
|
||||
return TemplateField
|
||||
|
||||
|
||||
|
|
@ -21,12 +40,11 @@ def __getattr__(name: str) -> Any:
|
|||
elif name == "RangeSpec":
|
||||
return RangeSpec
|
||||
# The other names should work as if they were imported from constants
|
||||
import langflow.field_typing.constants as constants
|
||||
|
||||
return getattr(constants, name)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
__all__ = [
|
||||
"NestedDict",
|
||||
"Data",
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
from abc import ABC
|
||||
from typing import Any, Callable, Optional, Union
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, Field, field_serializer
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue