Skip to content

Ask the HotKV docs

Answers come only from these docs and can be wrong; check the linked pages before you rely on them.

PROMPT.PUT

Last updated
PROMPT.PUT name content [META metadata]
Group
Prompt registry
Complexity
O(1)
Arity
-3 (at least 3 words, counting the command name)
Flags
write, fast
Keys
first 1, last 1, step 1
HotKV Cloud
Performance and Scale
On-Premise
requires the prompt-registry license feature

The prompt registry stores versioned prompt templates by name, with one version marked active, so you can roll a prompt forward or back without deploying code. PROMPT.PUT stores content as the next version of template name (starting at 1), creating the template if needed, and makes the new version active.

A template keeps its most recent versions only, up to max_versions under [prompt] (64 unless you change it); older versions are removed.

Option Effect
META metadata Any string to keep with this version, such as JSON describing the change.
Case RESP2 RESP3
Version stored Integer: the new version number Same

Errors:

  • ERR template limit reached if the template is new and the server already holds its maximum number of templates (max_templates under [prompt]).
  • ERR unknown option if the fourth argument is not META.
  • ERR wrong number of arguments for 'prompt.put' command if the argument count is wrong.
  • NOLICENSE prompt-registry requires a HotKV license. Contact sales@hotkv.com if your license does not include the prompt-registry feature.
127.0.0.1:6379> PROMPT.PUT support-agent "You are a helpful support agent."
(integer) 1
127.0.0.1:6379> PROMPT.PUT support-agent "You are a concise, friendly support agent." META "{\"author\":\"maria\"}"
(integer) 2

HotKV-only command. Redis and Valkey have no equivalent.

PROMPT.GET, PROMPT.LATEST, PROMPT.SETACTIVE, PROMPT.VERSIONS, PROMPT.DROP, PROMPT.LIST, AI features guide