Refactor the `kotaemon/pipelines` module to `kotaemon/indices`. Create the VectorIndex. Note: currently I place `qa` to be inside `kotaemon/indices` since at the moment we only have `qa` in RAG. At the same time, I think `qa` can be an independent module in `kotaemon/qa`. Since this can be changed later, I still go at the 1st option for now to observe if we can change it later.
36 lines
900 B
Python
36 lines
900 B
Python
from typing import Union
|
|
|
|
from kotaemon.base.schema import AIMessage, BaseMessage, HumanMessage, SystemMessage
|
|
|
|
from .branching import GatedBranchingPipeline, SimpleBranchingPipeline
|
|
from .chats import AzureChatOpenAI, ChatLLM
|
|
from .completions import LLM, AzureOpenAI, OpenAI
|
|
from .linear import GatedLinearPipeline, SimpleLinearPipeline
|
|
from .prompts import BasePromptComponent, PromptTemplate
|
|
|
|
BaseLLM = Union[ChatLLM, LLM]
|
|
|
|
|
|
__all__ = [
|
|
"BaseLLM",
|
|
# chat-specific components
|
|
"ChatLLM",
|
|
"BaseMessage",
|
|
"HumanMessage",
|
|
"AIMessage",
|
|
"SystemMessage",
|
|
"AzureChatOpenAI",
|
|
# completion-specific components
|
|
"LLM",
|
|
"OpenAI",
|
|
"AzureOpenAI",
|
|
# prompt-specific components
|
|
"BasePromptComponent",
|
|
"PromptTemplate",
|
|
# strategies
|
|
"SimpleLinearPipeline",
|
|
"GatedLinearPipeline",
|
|
"SimpleBranchingPipeline",
|
|
"GatedBranchingPipeline",
|
|
]
|