keywordblock

command
v0.1.100 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 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

keyword_block is an example GoModel plugin built as a shared object. It blocks, answers, or flags a request when the last user message contains a configured keyword, and does the same for the assistant's reply.

Build (from the GoModel checkout, with the gomodel binary that will load it):

go run ./cmd/gomodel plugin build ./docs/example_plugins/keywordblock -o plugins/keyword_block.so
go run ./cmd/gomodel plugin inspect plugins/keyword_block.so

Load (config.yaml, or PLUGINS_SEARCH_PATHS=./plugins):

plugins:
  search_paths: ["./plugins"]
  load:
    - file: keyword_block.so
      sha256: ""   # optional pin; `shasum -a 256 plugins/keyword_block.so`

The plugin type then appears as "keyword_block" wherever plugin instances are configured (the dashboard, plugins.instances, workflows).

Exact-toolchain constraint: Go's plugin package refuses a shared object unless it was built with the same Go version, the same build flags (-trimpath, -race, -tags), and identical sources of every package shared with the host (the standard library and pluginapi). `gomodel plugin build` copies the flags of the gomodel binary that runs it, so build plugins with the binary that loads them and rebuild after every GoModel or Go upgrade. Loading needs a cgo-enabled binary on Linux, macOS, or FreeBSD (`make build-plugins`, or the gomodel:<version>-plugins image); the default static binary reports a clear error instead.

Jump to

Keyboard shortcuts

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