openairesponsesitem

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CanonizeReasoningItemOpaque

func CanonizeReasoningItemOpaque(raw []byte) (json.RawMessage, error)

CanonizeReasoningItemOpaque validates a Responses reasoning item JSON object against the exact Opaque allowlist and returns a presence-preserving canonical form.

type may be absent on input; it is always emitted as "reasoning" (required semantically).

func MarshalEnvelope

func MarshalEnvelope(fields map[string]json.RawMessage) ([]byte, error)

MarshalEnvelope writes allowlisted fields in deterministic envelope key order.

func ParseIncompleteFields

func ParseIncompleteFields(raw []byte) (map[string]json.RawMessage, error)

ParseIncompleteFields structurally parses a reasoning item object in incomplete-allowed mode: JSON object, exact EOF, duplicate-key rejection, unknown-field rejection, and max size. Missing required final fields (id/summary/...) are allowed; CanonizeReasoningItemOpaque performs final validation after merge.

The returned map is a new caller-owned copy.

Types

This section is empty.

Jump to

Keyboard shortcuts

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