import textwrap
import json
import openai
from llmcam.fn_to_fc import *
detect_objects
detect_objects (image_path:str, conf:float=0.25)
Run YOLO object detection on an input image.
Type | Default | Details | |
---|---|---|---|
image_path | str | Path/URL of image | |
conf | float | 0.25 | Confidence threshold |
Returns | str | JSON format of detection results |
= [tool_schema(fn) for fn in (capture_youtube_live_frame_and_save, ask_gpt4v_about_image_file, detect_objects)] YTLiveTools
def exec_func(name, tools=[], **kwargs):
= globals().get(name)(**kwargs)
res return res
= form_msgs([
messages "system", "You are a helpful system administrator. Use the supplied tools to assist the user."),
("user", "Hi, can you capture YouTube Live?"),
("user", "You can use the default link."),
("user", "Can you extract information from this file?"),
("user", "Use your new tool to detect."),
(
])
complete(messages, YTLiveTools, exec_func) print_msgs(messages)