builtin

package
v0.0.74 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2026 License: MPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BuiltInModelPresetsRootDir = "modelpresets"
	BuiltInModelPresetsJSON    = "modelpresets.json"

	BuiltInToolBundlesRootDir = "tools"
	BuiltInToolBundlesJSON    = "tools.bundles.json"

	BuiltInPromptBundlesRootDir = "prompts"
	BuiltInPromptBundlesJSON    = "prompts.bundles.json"
)
View Source
const (
	BuiltinBundleIDLLMToolsFS    = "018fe0f4-b8cd-7e55-82d5-9df0bd70e400"
	BuiltinBundleIDLLMToolsImage = "018fe0f4-b8cd-7e55-82d5-9df0bd70e401"
	BuiltinBundleIDLLMToolsShell = "019c0415-40f7-70cb-9200-d804c9388a57"
	BuiltinBundleIDLLMToolsText  = "019c0da2-02d2-7e71-81d7-35f2e5a0bebf"
)

IMPORTANT: keep these stable (match tools.bundles.json).

View Source
const (
	ProviderNameAnthropic             = "anthropic"
	ProviderNameDeepseek              = "deepseek"
	ProviderNameGoogleGemini          = "googlegemini"
	ProviderNameHuggingFace           = "huggingface"
	ProviderNameLlamaCPP              = "llamacpp"
	ProviderNameOpenAIChatCompletions = "openai"
	ProviderNameOpenAIResponses       = "openairesponses"
	ProviderNameOpenRouter            = "openrouter"
	ProviderNameXAI                   = "xai"
)

Variables

View Source
var BuiltInModelPresetsFS embed.FS
View Source
var BuiltInPromptBundlesFS embed.FS
View Source
var BuiltInToolBundlesFS embed.FS

Functions

This section is empty.

Types

type AsyncRebuilder

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

AsyncRebuilder calls fn in a background goroutine when Trigger detects that the previous successful run is older than maxAge.

func NewAsyncRebuilder

func NewAsyncRebuilder(maxAge time.Duration, fn func() error) *AsyncRebuilder

NewAsyncRebuilder returns a ready-to-use AsyncRebuilder. If maxAge <= 0 the rebuilder will consider a snapshot stale immediately (i.e. every Trigger may start a rebuild).

func (*AsyncRebuilder) Force

func (r *AsyncRebuilder) Force() error

Force executes fn synchronously and updates the timestamp on success. It is exported mainly for unit tests.

func (*AsyncRebuilder) IsDone

func (r *AsyncRebuilder) IsDone() <-chan struct{}

func (*AsyncRebuilder) MarkFresh

func (r *AsyncRebuilder) MarkFresh()

func (*AsyncRebuilder) Trigger

func (r *AsyncRebuilder) Trigger()

Trigger starts a rebuild in the background when the stored snapshot is considered stale. The call itself is cheap (non-blocking).

Jump to

Keyboard shortcuts

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