Skip to content

Commit

Permalink
minor tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
ZmeiGorynych committed Jul 29, 2024
1 parent 7f90b49 commit 2971c5f
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
2 changes: 2 additions & 0 deletions motleycrew/agents/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@
from .abstract_parent import MotleyAgentAbstractParent
from .output_handler import MotleyOutputHandler
from .parent import MotleyAgentParent
from .langchain import LangchainMotleyAgent

__all__ = [
"MotleyAgentAbstractParent",
"MotleyAgentParent",
"MotleyOutputHandler",
"LangchainMotleyAgent",
]
3 changes: 2 additions & 1 deletion motleycrew/agents/langchain/langchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from langchain_core.chat_history import InMemoryChatMessageHistory
from langchain_core.runnables import RunnableConfig
from langchain_core.runnables.history import RunnableWithMessageHistory, GetSessionHistoryCallable
from langchain_core.prompts.chat import ChatPromptTemplate

from motleycrew.agents.mixins import LangchainOutputHandlingAgentMixin
from motleycrew.agents.parent import MotleyAgentParent
Expand All @@ -21,7 +22,7 @@ def __init__(
self,
description: str | None = None,
name: str | None = None,
prompt_prefix: str | None = None,
prompt_prefix: str | ChatPromptTemplate | None = None,
agent_factory: MotleyAgentFactory[AgentExecutor] | None = None,
tools: Sequence[MotleySupportedTool] | None = None,
output_handler: MotleySupportedTool | None = None,
Expand Down
2 changes: 1 addition & 1 deletion motleycrew/agents/langchain/tool_calling_react.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def __init__(
tools: Sequence[MotleySupportedTool],
description: str | None = None,
name: str | None = None,
prompt_prefix: str | None = None,
prompt_prefix: str | ChatPromptTemplate | None = None,
prompt: ChatPromptTemplate | None = None,
chat_history: bool | GetSessionHistoryCallable = True,
output_handler: MotleySupportedTool | None = None,
Expand Down
2 changes: 1 addition & 1 deletion motleycrew/agents/parent.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class MotleyAgentParent(MotleyAgentAbstractParent, ABC):

def __init__(
self,
prompt_prefix: str | None = None,
prompt_prefix: str | ChatPromptTemplate | None = None,
description: str | None = None,
name: str | None = None,
agent_factory: MotleyAgentFactory | None = None,
Expand Down

0 comments on commit 2971c5f

Please sign in to comment.