Add Callable to field_typing constants

This commit is contained in:
Gabriel Luiz Freitas Almeida 2023-11-02 22:45:16 -03:00
commit 5c5ef227d1
2 changed files with 4 additions and 1 deletions

View file

@ -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",
] ]

View file

@ -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,
} }