Update command/command_interface.py
Browse files
command/command_interface.py
CHANGED
@@ -1,15 +1,20 @@
|
|
1 |
-
from typing import Optional, Dict
|
2 |
from abc import ABC, abstractmethod
|
3 |
|
4 |
|
5 |
class CommandHandler(ABC):
|
6 |
# {"base": {"name": command}, "advance": {"name": command}}
|
7 |
@abstractmethod
|
8 |
-
def get_command(
|
9 |
"Method to get command from yaml file and return dictionary"
|
10 |
pass
|
|
|
|
|
|
|
|
|
|
|
11 |
|
12 |
@abstractmethod
|
13 |
-
def execute(
|
14 |
"Method to execute command"
|
15 |
pass
|
|
|
1 |
+
from typing import Optional, Dict, Any
|
2 |
from abc import ABC, abstractmethod
|
3 |
|
4 |
|
5 |
class CommandHandler(ABC):
|
6 |
# {"base": {"name": command}, "advance": {"name": command}}
|
7 |
@abstractmethod
|
8 |
+
def get_command() -> Dict[str, Dict[str, list]] -> Any:
|
9 |
"Method to get command from yaml file and return dictionary"
|
10 |
pass
|
11 |
+
|
12 |
+
@abstractmethod
|
13 |
+
def is_contains(text: Optional[str], llm: Any, prompt: Any, command: Dict[str, Dict[str, list]]) -> bool:
|
14 |
+
"""Method to check contains command in text or not"""
|
15 |
+
pass
|
16 |
|
17 |
@abstractmethod
|
18 |
+
def execute() -> Any:
|
19 |
"Method to execute command"
|
20 |
pass
|