Change template to private attribute and simplify imports (#101)

---------

Co-authored-by: ian <ian@cinnamon.is>
This commit is contained in:
Duc Nguyen (john)
2023-12-08 18:10:34 +07:00
committed by GitHub
parent 1f927d3391
commit da0ac1d69f
13 changed files with 31 additions and 39 deletions

View File

@@ -1,6 +1,7 @@
from typing import Callable, Union
from ...base import BaseComponent, Document
from kotaemon.base import BaseComponent, Document
from .template import PromptTemplate
@@ -16,6 +17,7 @@ class BasePromptComponent(BaseComponent):
class Config:
middleware_switches = {"theflow.middleware.CachingMiddleware": False}
allow_extra = True
def __init__(self, template: Union[str, PromptTemplate], **kwargs):
super().__init__()