extract

package
v0.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 10, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package extract detects file references in HTTP request bodies sent to LLM APIs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileRef

type FileRef struct {
	Path   string `json:"path"`
	Source string `json:"source"` // how it was detected: "json_field", "text_pattern"
}

FileRef represents a file reference detected in an API payload.

func FilesFromBody

func FilesFromBody(body string) []FileRef

FilesFromBody extracts file references from an HTTP request body. It handles JSON payloads (typical of LLM APIs) and falls back to text pattern matching.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL