diff --git a/lang_agent/base.py b/lang_agent/base.py index 68e7292..d862793 100644 --- a/lang_agent/base.py +++ b/lang_agent/base.py @@ -1,4 +1,4 @@ -from typing import List, Callable, Tuple +from typing import List, Callable, Tuple, Dict from abc import ABC, abstractmethod from PIL import Image from io import BytesIO @@ -6,6 +6,7 @@ import matplotlib.pyplot as plt from loguru import logger from langgraph.graph.state import CompiledStateGraph +from langchain_core.messages import BaseMessage class LangToolBase(ABC): @@ -54,4 +55,8 @@ class ToolNodeBase(GraphBase): returns 2 words, one for starting delayed yeilding, the other for ending delayed yielding, they should be of format ('[key1]', '[key2]'); key1 is starting, key2 is ending """ - return None, None \ No newline at end of file + return None, None + + @abstractmethod + def invoke(self, inp)->Dict[str, List[BaseMessage]]: + pass \ No newline at end of file