Demo Scenario 3

Validate Demonstrate Scenario 3 on a notebook
from llmcam.downloader import *
from llmcam.dtcam import *
from llmcam.file_manager import *
from llmcam.fn_to_fc import *
from llmcam.oas_to_requests import *
from llmcam.store import *
from llmcam.yolo import *
def update_tools(
    services: list # list of services
):
    """Extarct services from ToolBox and integrate to current tools"""
    new = extract_tools_from_services(services)
    for tool in new:
        tools.append(tool)

tools = [tool_schema(fn) for fn in [update_tools, download_file, cap, add_api_tools]] + extract_tools_from_services(['ytube_live'])
messages = form_msgs([
    ("system", "You are a helpful system administrator. Use the supplied tools to help the user."),
    ("user", "Notify me when there is a vacancy in the parking lot at 6am. Check this camera: https://youtu.be/SUseaJu9DIE?si=LFM0yN-VhS5JJACO"),
    ("user", "This video has some timestamps. I want to you to check if at 6am (of this video) there is any parking slots.")
])
complete(messages, tools)
print_msgs(messages)
[youtube] Extracting URL: https://youtu.be/SUseaJu9DIE?si=LFM0yN-VhS5JJACO
[youtube] SUseaJu9DIE: Downloading webpage
[youtube] SUseaJu9DIE: Downloading ios player API JSON
[youtube] SUseaJu9DIE: Downloading mweb player API JSON
[youtube] SUseaJu9DIE: Downloading player 5f315c3d
[youtube] SUseaJu9DIE: Downloading m3u8 information
>> System:
You are a helpful system administrator. Use the supplied tools to help the user.
>> User:
Notify me when there is a vacancy in the parking lot at 6am. Check this camera:
https://youtu.be/SUseaJu9DIE?si=LFM0yN-VhS5JJACO
>> Assistant:
To notify you when there's a vacancy in the parking lot at 6 am, I need to perform a series of
tasks, including capturing an image from the YouTube Live stream at that time and analyzing it for
parking availability. However, scheduling tasks for a specific time is currently outside my
capabilities.  As an alternative, I can guide you on how to automate this using external tools or
provide assistance on capturing and analyzing an image interactively at your request. Please let me
know how you'd like to proceed.
>> User:
This video has some timestamps. I want to you to check if at 6am (of this video) there is any
parking slots.
>> Assistant:
At 6 am on the video, there are 5 available parking spaces in the lot. If you need any further
assistance, feel free to ask!
  1. User: Notify me when there’s a vacancy in the parking lot.
  2. Assistant: Notification set. I’ll alert you as soon as a parking spot becomes available.
  3. (Later, when a space opens) Assistant: Notification: A parking spot is now available at [Location].