Skip to content

Commit 83f5700

Browse files
committed
WIP Moondream
1 parent f96de22 commit 83f5700

File tree

4 files changed

+732
-70
lines changed

4 files changed

+732
-70
lines changed

examples/04_security_camera_example/pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ dependencies = [
99
"vision-agents-plugins-elevenlabs",
1010
"vision-agents-plugins-getstream",
1111
"vision-agents-plugins-gemini",
12+
"vision-agents-plugins-moondream",
1213
"vision-agents",
1314
"opencv-python>=4.8.0",
1415
"google-genai>=1.33.0",
@@ -20,4 +21,5 @@ dependencies = [
2021
"vision-agents-plugins-elevenlabs" = {path = "../../plugins/elevenlabs", editable=true}
2122
"vision-agents-plugins-getstream" = {path = "../../plugins/getstream", editable=true}
2223
"vision-agents-plugins-gemini" = {path = "../../plugins/gemini", editable=true}
24+
"vision-agents-plugins-moondream" = {path = "../../plugins/moondream", editable=true}
2325
"vision-agents" = {path = "../../agents-core", editable=true}

examples/04_security_camera_example/security_camera_example.py

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,31 @@ async def get_visitor_details() -> Dict[str, Any]:
7474
"total_unique_visitors": len(details),
7575
}
7676

77+
# Register function for getting package count
78+
@llm.register_function(
79+
description="Get the number of unique packages detected in the last 30 minutes"
80+
)
81+
async def get_package_count() -> Dict[str, Any]:
82+
count = security_processor.get_package_count()
83+
state = security_processor.state()
84+
return {
85+
"unique_packages": count,
86+
"total_package_detections": state["total_package_detections"],
87+
"time_window": f"{state['time_window_minutes']} minutes",
88+
"last_detection": state["last_package_detection_time"],
89+
}
90+
91+
# Register function for getting detailed package information
92+
@llm.register_function(
93+
description="Get detailed information about all packages including when they were first and last seen, and confidence scores"
94+
)
95+
async def get_package_details() -> Dict[str, Any]:
96+
details = security_processor.get_package_details()
97+
return {
98+
"packages": details,
99+
"total_unique_packages": len(details),
100+
}
101+
77102
return agent
78103

79104

0 commit comments

Comments
 (0)