Some cleanup, bringing azure ai service up to date

This commit is contained in:
Moishe Lettvin
2023-12-29 10:12:24 -05:00
parent d1b9a77d86
commit 7c9ecb1a1d
4 changed files with 42 additions and 30 deletions

View File

@@ -38,14 +38,24 @@ class OrchestratorConfig:
bot_name: str
expiration: float
# Note that we use this as a default parameter value in the Orchestrator
# constructor. The dataclass is defined with Frozen=True, so this should
# be safe.
default_conversation_collection = ConversationProcessorCollection(
introduction=Response,
waiting=None,
response=Response,
goodbye=None,
)
class Orchestrator(EventHandler):
def __init__(
self,
daily_config: OrchestratorConfig,
ai_service_config: AIServiceConfig,
conversation_processors: ConversationProcessorCollection,
message_handler: MessageHandler,
conversation_processors: ConversationProcessorCollection = default_conversation_collection,
tracer=None,
):
self.bot_name: str = daily_config.bot_name
@@ -272,8 +282,6 @@ class Orchestrator(EventHandler):
except Exception as e:
self.logger.error(f"Exception {e} in camera thread.")
print("==== camera thread exitings")
def handle_user_started_talking(self):
# TODO: allow configuration of the timer timeout
self.logger.error("user started talking")