Skip to content

Commit

Permalink
Add default user profile to utterance tests
Browse files Browse the repository at this point in the history
  • Loading branch information
NeonDaniel committed Oct 4, 2023
1 parent 32950fa commit d49f7eb
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions neon_minerva/integration/user_utterance.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,13 @@

class UtteranceTests:
def __init__(self, prompts: List[str], lang: str = "en-us",
bus_config: dict = None, audio: bool = False):
bus_config: dict = None, user_config: dict = None,
audio: bool = False):
if not user_config:
from neon_utils.configuration_utils import get_neon_user_config
user_config = get_neon_user_config()
user_config['user']['username'] = "minerva"
self._user_config = user_config
bus_config = bus_config or dict()
self.core_bus = MessageBusClient(**bus_config)
self.core_bus.run_in_thread()
Expand Down Expand Up @@ -126,12 +132,12 @@ def send_prompt(self, prompt: str):
"""
Send a prompt to core for intent handling
"""
# TODO: Define user profile
context = {"neon_should_respond": True,
"source": ["minerva"],
"destination": ["skills"],
"timing": {"transcribed": time()},
"username": "minerva"}
"username": "minerva",
"user_profiles": [self._user_config]}
if self.test_audio:
_, file_path = mkstemp()
audio, _ = self._tts.get_tts(prompt, file_path, lang=self.lang)
Expand Down

0 comments on commit d49f7eb

Please sign in to comment.