Migrate the MVP into kotaemon (#108)
- Migrate the MVP into kotaemon. - Preliminary include the pipeline within chatbot interface. - Organize MVP as an application. Todo: - Add an info panel to view the planning of agents -> Fix streaming agents' output. Resolve: #60 Resolve: #61 Resolve: #62
This commit is contained in:
committed by
GitHub
parent
230328c62f
commit
5a9d6f75be
@@ -1,4 +1,5 @@
|
||||
from abc import abstractmethod
|
||||
from typing import Iterator
|
||||
|
||||
from theflow import Function, Node, Param, lazy
|
||||
|
||||
@@ -32,7 +33,9 @@ class BaseComponent(Function):
|
||||
return self.__call__(self.inflow.flow())
|
||||
|
||||
@abstractmethod
|
||||
def run(self, *args, **kwargs) -> Document | list[Document] | None:
|
||||
def run(
|
||||
self, *args, **kwargs
|
||||
) -> Document | list[Document] | Iterator[Document] | None:
|
||||
"""Run the component."""
|
||||
...
|
||||
|
||||
|
@@ -23,11 +23,13 @@ class Document(BaseDocument):
|
||||
store the raw content of the document. If specified, the class will use
|
||||
`content` to initialize the base llama_index class.
|
||||
|
||||
Args:
|
||||
content: the raw content of the document.
|
||||
Attributes:
|
||||
content: raw content of the document, can be anything
|
||||
source: id of the source of the Document. Optional.
|
||||
"""
|
||||
|
||||
content: Any
|
||||
source: Optional[str] = None
|
||||
|
||||
def __init__(self, content: Optional[Any] = None, *args, **kwargs):
|
||||
if content is None:
|
||||
|
Reference in New Issue
Block a user