Documentation
¶
Overview ¶
Package llmutils holds the shared extraction contract consumed by its format-specific subpackages (chatcompletions, messages, responses): the ContentField addressing type and the ErrUnsupportedBodySchema sentinel.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrUnsupportedBodySchema = errors.New("unsupported request body schema")
Functions ¶
This section is empty.
Types ¶
type ContentField ¶
type ContentField struct {
Path string // e.g. "messages.1.content", "prompt", "choices.0.message.content"
Value string
}
ContentField is a mutable text field in an OpenAI-compatible JSON body. Path is a sjson-compatible dotted path for patching back into the body. Used for both request extraction (ExtractRequestContent) and response extraction (ExtractResponseContent).
Directories
¶
| Path | Synopsis |
|---|---|
|
Package chatcompletions models the OpenAI /v1/chat/completions wire format (non-streaming and SSE) and extracts the scannable/demaskable text fields from its request and response bodies.
|
Package chatcompletions models the OpenAI /v1/chat/completions wire format (non-streaming and SSE) and extracts the scannable/demaskable text fields from its request and response bodies. |
|
Package messages extracts the scannable/demaskable text fields from Anthropic Messages API (/v1/messages) request and response bodies.
|
Package messages extracts the scannable/demaskable text fields from Anthropic Messages API (/v1/messages) request and response bodies. |
|
Package responses extracts the scannable/demaskable text fields from OpenAI Responses API (/v1/responses) request and response bodies.
|
Package responses extracts the scannable/demaskable text fields from OpenAI Responses API (/v1/responses) request and response bodies. |