From 4efeae46bc494d92da29e27a2184386210d38714 Mon Sep 17 00:00:00 2001 From: Moishe Lettvin Date: Tue, 9 Jan 2024 05:32:42 -0500 Subject: [PATCH] stop using my random room in the demos --- src/samples/theoretical-to-real/01-say-one-thing.py | 11 +++++++++-- .../theoretical-to-real/02-llm-say-one-thing.py | 10 +++++++++- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/src/samples/theoretical-to-real/01-say-one-thing.py b/src/samples/theoretical-to-real/01-say-one-thing.py index 726330646..d90bc212e 100644 --- a/src/samples/theoretical-to-real/01-say-one-thing.py +++ b/src/samples/theoretical-to-real/01-say-one-thing.py @@ -1,5 +1,5 @@ +import argparse import asyncio -import time from typing import AsyncGenerator from dailyai.output_queue import OutputQueueFrame, FrameType @@ -43,4 +43,11 @@ async def main(room_url): if __name__ == "__main__": - asyncio.run(main("https://moishe.daily.co/Lettvins")) + parser = argparse.ArgumentParser(description="Simple Daily Bot Sample") + parser.add_argument( + "-u", "--url", type=str, required=True, help="URL of the Daily room to join" + ) + + args: argparse.Namespace = parser.parse_args() + + asyncio.run(main(args.url)) diff --git a/src/samples/theoretical-to-real/02-llm-say-one-thing.py b/src/samples/theoretical-to-real/02-llm-say-one-thing.py index c32aabd56..b9d0aeea3 100644 --- a/src/samples/theoretical-to-real/02-llm-say-one-thing.py +++ b/src/samples/theoretical-to-real/02-llm-say-one-thing.py @@ -1,3 +1,4 @@ +import argparse import asyncio import re from typing import AsyncGenerator @@ -43,4 +44,11 @@ async def main(room_url): if __name__ == "__main__": - asyncio.run(main("https://moishe.daily.co/Lettvins")) + parser = argparse.ArgumentParser(description="Simple Daily Bot Sample") + parser.add_argument( + "-u", "--url", type=str, required=True, help="URL of the Daily room to join" + ) + + args: argparse.Namespace = parser.parse_args() + + asyncio.run(main(args.url))