llmutils

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2026 License: Apache-2.0 Imports: 1 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

View Source
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.

Jump to

Keyboard shortcuts

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