Move prompts into LLMs module (#70)
Since the only usage of prompt is within LLMs, it is reasonable to keep it within the LLM module. This way, it would be easier to discover module, and make the code base less complicated. Changes: * Move prompt components into llms * Bump version 0.3.1 * Make pip install dependencies in eager mode --------- Co-authored-by: ian <ian@cinnamon.is>
This commit is contained in:
committed by
GitHub
parent
8532138842
commit
693ed39de4
@@ -3,10 +3,10 @@ from typing import Dict, List, Optional, Union
|
||||
|
||||
from pydantic import BaseModel
|
||||
|
||||
from kotaemon.llms import PromptTemplate
|
||||
from kotaemon.llms.chats.base import ChatLLM
|
||||
from kotaemon.llms.completions.base import LLM
|
||||
from kotaemon.pipelines.tools import BaseTool
|
||||
from kotaemon.prompt.template import PromptTemplate
|
||||
|
||||
BaseLLM = Union[ChatLLM, LLM]
|
||||
|
||||
|
@@ -4,7 +4,7 @@ from typing import Dict, List, Optional, Tuple, Type, Union
|
||||
|
||||
from pydantic import BaseModel, create_model
|
||||
|
||||
from kotaemon.prompt.template import PromptTemplate
|
||||
from kotaemon.llms import PromptTemplate
|
||||
|
||||
from ..base import AgentOutput, AgentType, BaseAgent, BaseLLM, BaseTool
|
||||
from ..output.base import AgentAction, AgentFinish
|
||||
|
@@ -1,6 +1,6 @@
|
||||
# flake8: noqa
|
||||
|
||||
from kotaemon.prompt.template import PromptTemplate
|
||||
from kotaemon.llms import PromptTemplate
|
||||
|
||||
zero_shot_react_prompt = PromptTemplate(
|
||||
template="""Answer the following questions as best you can. You have access to the following tools:
|
||||
|
@@ -5,9 +5,7 @@ from typing import Any, Dict, List, Optional, Tuple, Type, Union
|
||||
|
||||
from pydantic import BaseModel, create_model
|
||||
|
||||
from kotaemon.llms.chats.base import ChatLLM
|
||||
from kotaemon.llms.completions.base import LLM
|
||||
from kotaemon.prompt.template import PromptTemplate
|
||||
from kotaemon.llms import LLM, ChatLLM, PromptTemplate
|
||||
|
||||
from ..base import AgentOutput, AgentType, BaseAgent, BaseLLM, BaseTool
|
||||
from ..output.base import BaseScratchPad
|
||||
|
@@ -1,8 +1,7 @@
|
||||
from typing import Any, List, Optional, Union
|
||||
|
||||
from kotaemon.base import BaseComponent
|
||||
from kotaemon.prompt.template import PromptTemplate
|
||||
|
||||
from ....base import BaseComponent
|
||||
from ....llms import PromptTemplate
|
||||
from ..base import BaseLLM, BaseTool
|
||||
from ..output.base import BaseScratchPad
|
||||
from .prompt import zero_shot_planner_prompt
|
||||
|
@@ -1,6 +1,6 @@
|
||||
# flake8: noqa
|
||||
|
||||
from kotaemon.prompt.template import PromptTemplate
|
||||
from kotaemon.llms import PromptTemplate
|
||||
|
||||
zero_shot_planner_prompt = PromptTemplate(
|
||||
template="""You are an AI agent who makes step-by-step plans to solve a problem under the help of external tools.
|
||||
|
@@ -1,7 +1,7 @@
|
||||
from typing import Any, List, Optional, Union
|
||||
|
||||
from kotaemon.base import BaseComponent
|
||||
from kotaemon.prompt.template import PromptTemplate
|
||||
from kotaemon.llms import PromptTemplate
|
||||
|
||||
from ..base import BaseLLM
|
||||
from ..output.base import BaseScratchPad
|
||||
|
Reference in New Issue
Block a user