Add Callable to field_typing constants
This commit is contained in:
parent
cef6d78070
commit
5c5ef227d1
2 changed files with 4 additions and 1 deletions
|
|
@ -32,6 +32,7 @@ from .constants import (
|
||||||
NestedDict,
|
NestedDict,
|
||||||
Data,
|
Data,
|
||||||
BaseLanguageModel,
|
BaseLanguageModel,
|
||||||
|
Callable,
|
||||||
)
|
)
|
||||||
|
|
||||||
__all__ = [
|
__all__ = [
|
||||||
|
|
@ -52,4 +53,5 @@ __all__ = [
|
||||||
"TextSplitter",
|
"TextSplitter",
|
||||||
"Document",
|
"Document",
|
||||||
"AgentExecutor",
|
"AgentExecutor",
|
||||||
|
"Callable",
|
||||||
]
|
]
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ from langchain.schema.memory import BaseMemory
|
||||||
from langchain.text_splitter import TextSplitter
|
from langchain.text_splitter import TextSplitter
|
||||||
from langchain.tools import Tool
|
from langchain.tools import Tool
|
||||||
from langchain.vectorstores.base import VectorStore
|
from langchain.vectorstores.base import VectorStore
|
||||||
from typing import Union, Dict
|
from typing import Union, Dict, Callable
|
||||||
|
|
||||||
# Type alias for more complex dicts
|
# Type alias for more complex dicts
|
||||||
NestedDict = Dict[str, Union[str, Dict]]
|
NestedDict = Dict[str, Union[str, Dict]]
|
||||||
|
|
@ -48,4 +48,5 @@ CUSTOM_COMPONENT_SUPPORTED_TYPES = {
|
||||||
"dict": dict,
|
"dict": dict,
|
||||||
"NestedDict": NestedDict,
|
"NestedDict": NestedDict,
|
||||||
"Data": Data,
|
"Data": Data,
|
||||||
|
"Callable": Callable,
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue