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 *
Demo Scenario 3
Validate Demonstrate Scenario 3 on a notebook
def update_tools(
list # list of services
services:
):"""Extarct services from ToolBox and integrate to current tools"""
= extract_tools_from_services(services)
new for tool in new:
tools.append(tool)
= [tool_schema(fn) for fn in [update_tools, download_file, cap, add_api_tools]] + extract_tools_from_services(['ytube_live']) tools
= form_msgs([
messages "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!
- User: Notify me when there’s a vacancy in the parking lot.
- Assistant: Notification set. I’ll alert you as soon as a parking spot becomes available.
- (Later, when a space opens) Assistant: Notification: A parking spot is now available at [Location].