Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add files to tool call trace #230

Merged
merged 2 commits into from
Sep 9, 2024

Conversation

yzld2002
Copy link
Member

@yzld2002 yzld2002 commented Sep 9, 2024

Some tools use the files param in the send_inference_request, which cannot be captured by the ToolCallTrace

    buffer_bytes = frames_to_bytes(frames)
    files = [("video", buffer_bytes)]
    payload = {
        "prompts": [s.strip() for s in prompt.split(",")],
        "function_name": "florence2_sam2_video_tracking",
    }
    data: Dict[str, Any] = send_inference_request(
        payload, "florence2-sam2", files=files, v2=True

This PR adds the files in ToolCallTrace, which are the base64 encoded files, so we can capture the tool input files in downstream processing.

@yzld2002 yzld2002 merged commit ba89dfb into main Sep 9, 2024
8 checks passed
@yzld2002 yzld2002 deleted the zhichao-add-files-to-tool-call-trace branch September 9, 2024 02:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants