Fix import statements and add missing Prompt class
This commit is contained in:
parent
b1224ddb63
commit
ead79e802d
2 changed files with 11 additions and 24 deletions
|
|
@ -1,27 +1,9 @@
|
|||
from .constants import (
|
||||
AgentExecutor,
|
||||
BaseChatMemory,
|
||||
BaseLanguageModel,
|
||||
BaseLLM,
|
||||
BaseLoader,
|
||||
BaseMemory,
|
||||
BaseOutputParser,
|
||||
BasePromptTemplate,
|
||||
BaseRetriever,
|
||||
Callable,
|
||||
Chain,
|
||||
ChatPromptTemplate,
|
||||
Data,
|
||||
Document,
|
||||
Embeddings,
|
||||
NestedDict,
|
||||
Object,
|
||||
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)
|
||||
|
||||
__all__ = [
|
||||
"NestedDict",
|
||||
|
|
@ -45,4 +27,5 @@ __all__ = [
|
|||
"Callable",
|
||||
"BasePromptTemplate",
|
||||
"ChatPromptTemplate",
|
||||
"Prompt"
|
||||
]
|
||||
|
|
|
|||
|
|
@ -25,6 +25,8 @@ class Object:
|
|||
class Data:
|
||||
pass
|
||||
|
||||
class Prompt
|
||||
|
||||
|
||||
LANGCHAIN_BASE_TYPES = {
|
||||
"Chain": Chain,
|
||||
|
|
@ -44,6 +46,7 @@ LANGCHAIN_BASE_TYPES = {
|
|||
"BaseOutputParser": BaseOutputParser,
|
||||
"BaseMemory": BaseMemory,
|
||||
"BaseChatMemory": BaseChatMemory,
|
||||
|
||||
}
|
||||
# Langchain base types plus Python base types
|
||||
CUSTOM_COMPONENT_SUPPORTED_TYPES = {
|
||||
|
|
@ -58,4 +61,5 @@ CUSTOM_COMPONENT_SUPPORTED_TYPES = {
|
|||
"Data": Data,
|
||||
"Object": Object,
|
||||
"Callable": Callable,
|
||||
"Prompt": Prompt,
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue