diff --git a/bridges/python/src/sdk/leon.py b/bridges/python/src/sdk/leon.py index d21ee2c3..a79b74f6 100644 --- a/bridges/python/src/sdk/leon.py +++ b/bridges/python/src/sdk/leon.py @@ -2,6 +2,7 @@ import random import sys from time import sleep +from types import from ..constants import SKILL_SRC_CONFIG, SKILL_CONFIG, INTENT_OBJECT class Leon: @@ -11,7 +12,7 @@ class Leon: if not Leon.instance: Leon.instance = self - def get_src_config(key: str = None): + def get_src_config(self, key: str = None): """ Get source configuration """ @@ -24,7 +25,7 @@ class Leon: print('Error while getting source configuration:', e) return {} - def set_answer_data(answer_key: str, data = None): + def set_answer_data(self, answer_key: str, data = None): """ Apply data to the answer """ @@ -66,7 +67,7 @@ class Leon: return None - def answer(answer_input): + def answer(self, answer_input: AnswerInput) -> None: """ Send an answer to the core """ diff --git a/bridges/python/src/sdk/types.py b/bridges/python/src/sdk/types.py new file mode 100644 index 00000000..5d29c5f0 --- /dev/null +++ b/bridges/python/src/sdk/types.py @@ -0,0 +1,22 @@ +from typing import Dict, Any, Optional, List + +# TODO + +class Answer: + key: Optional[str] + widget: Optional[Any] + data: Optional[AnswerData] + core: Optional[Dict[str, Any]] + +class AnswerInput: + key: Optional[str] + widget: Any + data: Optional[AnswerData] + core: Dict[str, Any] + +class AnswerData: + pass + +class AnswerConfig: + text: str + speech: str