a few tweaks to the prompt

This commit is contained in:
Moishe Lettvin
2024-01-02 10:46:48 -05:00
parent fad73c29cf
commit aab06f4441
3 changed files with 9 additions and 10 deletions

View File

@@ -209,6 +209,9 @@ class Orchestrator(EventHandler):
def on_intro_finished(self, intro): def on_intro_finished(self, intro):
self.logger.info(f"Introduction has finished") self.logger.info(f"Introduction has finished")
waiting = self.conversation_processors.waiting(self.services, self.message_handler, self.output_queue)
waiting.prepare()
waiting.play()
def on_response_played(self, response): def on_response_played(self, response):
response.finalize() response.finalize()

View File

@@ -19,10 +19,11 @@ def add_bot_to_room(room_url, token, expiration) -> None:
# A simple prompt for a simple sample. # A simple prompt for a simple sample.
message_handler = MessageHandler( message_handler = MessageHandler(
""" """
You are a sample bot, meant to demonstrate how to use an LLM with transcription at TTS. You are a sample bot in a WebRTC session. You'll receive input as transcriptions of user's
speech, and your responses will be converted to audio via a TTS service.
Answer user's questions and be friendly, and if you can, give some ideas about how someone Answer user's questions and be friendly, and if you can, give some ideas about how someone
could use a bot like you in a more in-depth way. Because your responses will be spoken, could use a bot like you in a more in-depth way. Because your responses will be spoken,
try to keep them short and sweet. try to keep them short.
""" """
) )
@@ -33,12 +34,6 @@ def add_bot_to_room(room_url, token, expiration) -> None:
# - AZURE_CHATGPT_KEY # - AZURE_CHATGPT_KEY
# - AZURE_CHATGPT_ENDPOINT # - AZURE_CHATGPT_ENDPOINT
# - AZURE_CHATGPT_DEPLOYMENT_ID # - AZURE_CHATGPT_DEPLOYMENT_ID
#
# This demo doesn't use image generation, but if you extend it to do so,
# you'll also need to set:
# - AZURE_DALLE_KEY
# - AZURE_DALLE_ENDPOINT
# - AZURE_DALLE_DEPLOYMENT_ID
services = AIServiceConfig( services = AIServiceConfig(
tts=AzureTTSService(), image=None, llm=AzureLLMService() tts=AzureTTSService(), image=None, llm=AzureLLMService()

View File

@@ -83,10 +83,11 @@ def add_bot_to_room(room_url, token, expiration) -> None:
# A simple prompt for a simple sample. # A simple prompt for a simple sample.
message_handler = MessageHandler( message_handler = MessageHandler(
""" """
You are a sample bot, meant to demonstrate how to use an LLM with transcription at TTS. You are a sample bot in a WebRTC session. You'll receive input as transcriptions of user's
speech, and your responses will be converted to audio via a TTS service.
Answer user's questions and be friendly, and if you can, give some ideas about how someone Answer user's questions and be friendly, and if you can, give some ideas about how someone
could use a bot like you in a more in-depth way. Because your responses will be spoken, could use a bot like you in a more in-depth way. Because your responses will be spoken,
try to keep them short and sweet. try to keep them short.
""" """
) )