tagreplace

package
v0.1.99 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2026 License: MIT Imports: 7 Imported by: 0 modules, 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 tagreplace is the built-in tag_replace plugin: before the provider call it expands {{gomodel.<tag>}} placeholders in prompt text into request facts such as the resolved model, the user path, or the current date.

Index

Constants

View Source
const DefaultTimezone = "UTC"

DefaultTimezone is the zone the date tags are rendered in.

View Source
const Name = "tag_replace"

Name is the manifest name of the plugin.

Variables

This section is empty.

Functions

func New

func New() pluginapi.Plugin

New returns an unconfigured plugin; call Init before use.

Types

type Plugin

type Plugin struct {
	// contains filtered or unexported fields
}

Plugin is one configured tag_replace instance.

func (*Plugin) Close

func (p *Plugin) Close(context.Context) error

Close releases nothing; the plugin holds no resources.

func (*Plugin) Init

func (p *Plugin) Init(_ context.Context, raw json.RawMessage, _ pluginapi.Host) error

Init decodes and validates the instance configuration.

func (*Plugin) Manifest

func (p *Plugin) Manifest() pluginapi.Manifest

Manifest describes the plugin and its configuration form.

func (*Plugin) OnPrompt

OnPrompt expands the tags in the text of the configured roles.

func (*Plugin) Summarize

func (p *Plugin) Summarize(raw json.RawMessage) string

Summarize returns one line describing the instance for the dashboard list.

Jump to

Keyboard shortcuts

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