refparts

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: 6 Imported by: 0

Documentation

Index

Constants

View Source
const ID = "ref-request-suffix"

ID is the feature plugin id for YAML registration.

Variables

This section is empty.

Functions

func NewRequestPartHook

func NewRequestPartHook(cfg Config) sdk.RequestPartHook

NewRequestPartHook mutates the first user text part by appending a suffix (observable in backends).

func NewResponsePartHook

func NewResponsePartHook(cfg Config) sdk.ResponsePartHook

NewResponsePartHook prepends a marker to assistant text deltas (non-streaming-safe for tests).

Types

type Config

type Config struct {
	Order          *int   `yaml:"order"`
	Suffix         string `yaml:"suffix"`
	ResponsePrefix string `yaml:"response_prefix"`
}

Config is decoded from the feature plugin YAML block.

func DecodeConfig

func DecodeConfig(n yaml.Node) (Config, error)

DecodeConfig parses YAML for ref-request-suffix.

Jump to

Keyboard shortcuts

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