Move Document and other interface into base/schema (#69)

This commit is contained in:
Nguyen Trung Duc (john)
2023-11-14 11:51:10 +07:00
committed by GitHub
parent 4704e2c11a
commit 8532138842
34 changed files with 51 additions and 63 deletions

View File

@@ -1,13 +0,0 @@
from typing import List
from pydantic import Field
from kotaemon.documents.base import Document
class LLMInterface(Document):
candidates: List[str] = Field(default_factory=list)
completion_tokens: int = -1
total_tokens: int = -1
prompt_tokens: int = -1
logits: List[List[float]] = Field(default_factory=list)

View File

@@ -8,7 +8,7 @@ from langchain.schema.messages import BaseMessage, HumanMessage
from theflow.base import Param
from ...base import BaseComponent
from ..base import LLMInterface
from ...base.schema import LLMInterface
logger = logging.getLogger(__name__)

View File

@@ -5,7 +5,7 @@ from langchain.llms.base import BaseLLM
from theflow.base import Param
from ...base import BaseComponent
from ..base import LLMInterface
from ...base.schema import LLMInterface
logger = logging.getLogger(__name__)