nardial 0.2.1__tar.gz → 0.2.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {nardial-0.2.1 → nardial-0.2.2}/PKG-INFO +1 -1
- {nardial-0.2.1 → nardial-0.2.2}/pyproject.toml +1 -1
- {nardial-0.2.1 → nardial-0.2.2}/src/nardial/conversation_agent.py +6 -6
- {nardial-0.2.1 → nardial-0.2.2}/src/nardial.egg-info/PKG-INFO +1 -1
- {nardial-0.2.1 → nardial-0.2.2}/LICENSE +0 -0
- {nardial-0.2.1 → nardial-0.2.2}/README.md +0 -0
- {nardial-0.2.1 → nardial-0.2.2}/setup.cfg +0 -0
- {nardial-0.2.1 → nardial-0.2.2}/src/nardial/__init__.py +0 -0
- {nardial-0.2.1 → nardial-0.2.2}/src/nardial/authoring/__init__.py +0 -0
- {nardial-0.2.1 → nardial-0.2.2}/src/nardial/authoring/export_html.py +0 -0
- {nardial-0.2.1 → nardial-0.2.2}/src/nardial/authoring/factory.py +0 -0
- {nardial-0.2.1 → nardial-0.2.2}/src/nardial/authoring/loader.py +0 -0
- {nardial-0.2.1 → nardial-0.2.2}/src/nardial/conversation_state.py +0 -0
- {nardial-0.2.1 → nardial-0.2.2}/src/nardial/dialog_logic.py +0 -0
- {nardial-0.2.1 → nardial-0.2.2}/src/nardial/interaction_orchestrator.py +0 -0
- {nardial-0.2.1 → nardial-0.2.2}/src/nardial/mini_dialogs.py +0 -0
- {nardial-0.2.1 → nardial-0.2.2}/src/nardial/moves.py +0 -0
- {nardial-0.2.1 → nardial-0.2.2}/src/nardial/providers/__init__.py +0 -0
- {nardial-0.2.1 → nardial-0.2.2}/src/nardial/providers/device/__init__.py +0 -0
- {nardial-0.2.1 → nardial-0.2.2}/src/nardial/providers/device/alphamini.py +0 -0
- {nardial-0.2.1 → nardial-0.2.2}/src/nardial/providers/device/desktop.py +0 -0
- {nardial-0.2.1 → nardial-0.2.2}/src/nardial/providers/device/nao.py +0 -0
- {nardial-0.2.1 → nardial-0.2.2}/src/nardial/providers/device/pepper.py +0 -0
- {nardial-0.2.1 → nardial-0.2.2}/src/nardial/providers/llm/__init__.py +0 -0
- {nardial-0.2.1 → nardial-0.2.2}/src/nardial/providers/llm/echo.py +0 -0
- {nardial-0.2.1 → nardial-0.2.2}/src/nardial/providers/llm/openai_gpt.py +0 -0
- {nardial-0.2.1 → nardial-0.2.2}/src/nardial/providers/nlu/__init__.py +0 -0
- {nardial-0.2.1 → nardial-0.2.2}/src/nardial/providers/nlu/dialogflow.py +0 -0
- {nardial-0.2.1 → nardial-0.2.2}/src/nardial/providers/nlu/written_keyword.py +0 -0
- {nardial-0.2.1 → nardial-0.2.2}/src/nardial/providers/tts/__init__.py +0 -0
- {nardial-0.2.1 → nardial-0.2.2}/src/nardial/providers/tts/cacher.py +0 -0
- {nardial-0.2.1 → nardial-0.2.2}/src/nardial/providers/tts/elevenlabs.py +0 -0
- {nardial-0.2.1 → nardial-0.2.2}/src/nardial/providers/tts/google.py +0 -0
- {nardial-0.2.1 → nardial-0.2.2}/src/nardial/providers/tts/naoqi.py +0 -0
- {nardial-0.2.1 → nardial-0.2.2}/src/nardial/providers/tts/null.py +0 -0
- {nardial-0.2.1 → nardial-0.2.2}/src/nardial/providers/vector_store/__init__.py +0 -0
- {nardial-0.2.1 → nardial-0.2.2}/src/nardial/providers/vector_store/null.py +0 -0
- {nardial-0.2.1 → nardial-0.2.2}/src/nardial/providers/vector_store/redis_store.py +0 -0
- {nardial-0.2.1 → nardial-0.2.2}/src/nardial/session_manager.py +0 -0
- {nardial-0.2.1 → nardial-0.2.2}/src/nardial/user_model.py +0 -0
- {nardial-0.2.1 → nardial-0.2.2}/src/nardial.egg-info/SOURCES.txt +0 -0
- {nardial-0.2.1 → nardial-0.2.2}/src/nardial.egg-info/dependency_links.txt +0 -0
- {nardial-0.2.1 → nardial-0.2.2}/src/nardial.egg-info/requires.txt +0 -0
- {nardial-0.2.1 → nardial-0.2.2}/src/nardial.egg-info/top_level.txt +0 -0
- {nardial-0.2.1 → nardial-0.2.2}/tests/test_authoring_factory.py +0 -0
- {nardial-0.2.1 → nardial-0.2.2}/tests/test_conversation_agent.py +0 -0
- {nardial-0.2.1 → nardial-0.2.2}/tests/test_conversation_state.py +0 -0
- {nardial-0.2.1 → nardial-0.2.2}/tests/test_llm.py +0 -0
- {nardial-0.2.1 → nardial-0.2.2}/tests/test_mini_dialogs_extra.py +0 -0
- {nardial-0.2.1 → nardial-0.2.2}/tests/test_moves.py +0 -0
- {nardial-0.2.1 → nardial-0.2.2}/tests/test_providers.py +0 -0
|
@@ -99,7 +99,7 @@ class ConversationAgent:
|
|
|
99
99
|
"""
|
|
100
100
|
self.orchestrator.play_animation(animation_name, run_async=run_async)
|
|
101
101
|
|
|
102
|
-
def ask_yesno(self, question, max_attempts=1):
|
|
102
|
+
def ask_yesno(self, question, max_attempts=1, **kwargs):
|
|
103
103
|
"""
|
|
104
104
|
Ask a yes/no question and interpret the response via the NLU provider.
|
|
105
105
|
|
|
@@ -117,7 +117,7 @@ class ConversationAgent:
|
|
|
117
117
|
"""
|
|
118
118
|
attempts = 0
|
|
119
119
|
while attempts < max_attempts:
|
|
120
|
-
self.say(question)
|
|
120
|
+
self.say(question, **kwargs)
|
|
121
121
|
result = self.orchestrator.listen()
|
|
122
122
|
if result.intent:
|
|
123
123
|
print(f'context: answer_yesno, recognized_intent: {result.intent}')
|
|
@@ -130,7 +130,7 @@ class ConversationAgent:
|
|
|
130
130
|
attempts += 1
|
|
131
131
|
return None
|
|
132
132
|
|
|
133
|
-
def ask_open(self, question, max_attempts=2):
|
|
133
|
+
def ask_open(self, question, max_attempts=2, **kwargs):
|
|
134
134
|
"""
|
|
135
135
|
Ask an open-ended question and return the user's spoken response.
|
|
136
136
|
|
|
@@ -148,14 +148,14 @@ class ConversationAgent:
|
|
|
148
148
|
"""
|
|
149
149
|
attempts = 0
|
|
150
150
|
while attempts < max_attempts:
|
|
151
|
-
self.say(question)
|
|
151
|
+
self.say(question, **kwargs)
|
|
152
152
|
result = self.orchestrator.listen()
|
|
153
153
|
if result.transcript:
|
|
154
154
|
return result.transcript
|
|
155
155
|
attempts += 1
|
|
156
156
|
return None
|
|
157
157
|
|
|
158
|
-
def ask_options(self, question, options, max_attempts=2):
|
|
158
|
+
def ask_options(self, question, options, max_attempts=2, **kwargs):
|
|
159
159
|
"""
|
|
160
160
|
Ask a question and match the response against a set of predefined options.
|
|
161
161
|
|
|
@@ -177,7 +177,7 @@ class ConversationAgent:
|
|
|
177
177
|
-----
|
|
178
178
|
Matching is case-insensitive and based on substring presence.
|
|
179
179
|
"""
|
|
180
|
-
answer = self.ask_open(question, max_attempts=max_attempts)
|
|
180
|
+
answer = self.ask_open(question, max_attempts=max_attempts, **kwargs)
|
|
181
181
|
if answer:
|
|
182
182
|
answer_lower = answer.lower()
|
|
183
183
|
for opt in options:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|