GoodMemGoodMem
ReferenceCLIReranker

Reranker Update

Reranker Update CLI command reference

goodmem reranker update

Update a reranker

Synopsis

Update a reranker in the GoodMem service.

Input format: the server replaces the whole stored input format when an update sends one. When you give --instruction, --query-template(-file), or --document-template(-file), this command first reads the reranker, applies only the flags you gave, and sends the complete result, so the fields you did not name keep their stored values. An empty value removes that field.

goodmem reranker update [reranker-id] [flags]

Examples

  # Update a reranker's display name
  goodmem reranker update 123e4567-e89b-12d3-a456-426614174000 --display-name "New Name"

  # Update a reranker's endpoint URL
  goodmem reranker update 123e4567-e89b-12d3-a456-426614174000 --endpoint-url "https://new-api.example.com"

  # Rotate API key credentials
  goodmem reranker update 123e4567-e89b-12d3-a456-426614174000 --cred-api-key "NEW_API_KEY"

  # Replace supported modalities
  goodmem reranker update 123e4567-e89b-12d3-a456-426614174000 --modalities TEXT,IMAGE

  # Replace all labels with new ones
  goodmem reranker update 123e4567-e89b-12d3-a456-426614174000 --label key1=value1 --label key2=value2 --label-strategy replace

  # Merge new labels with existing ones
  goodmem reranker update 123e4567-e89b-12d3-a456-426614174000 --label key1=newvalue --label-strategy merge

  # Change only the task instruction; the stored templates are kept
  goodmem reranker update 123e4567-e89b-12d3-a456-426614174000 --instruction "Prefer recent documents"

  # Replace the document template with the content of a file (one final line break is removed)
  goodmem reranker update 123e4567-e89b-12d3-a456-426614174000 --document-template-file ./candidate-template.txt

  # Remove the stored instruction and both templates
  goodmem reranker update 123e4567-e89b-12d3-a456-426614174000 --clear-input-format

Options

      --api-path string                    New API path
      --clear-input-format[=true|false]    Remove the stored instruction and both templates; cannot be combined with the other input-format flags
      --cred-api-key string                API key for provider endpoint (use "-" to read from piped stdin)
      --cred-api-key-file string           Read API key from file (file should be mode 0600)
      --cred-api-key-prompt[=true|false]   Prompt for API key interactively (requires TTY, input hidden)
      --cred-gcp[=true|false]              Use Google Application Default Credentials
      --cred-gcp-quota string              Quota project for Google ADC requests
      --cred-gcp-scope strings             Additional Google ADC OAuth scope (can be specified multiple times)
      --dashscope-api-dialect string       New DashScope API dialect for DashScope resources only (RERANK_NATIVE_NESTED or RERANK_COMPATIBLE_FLAT)
      --description string                 New description for the reranker
      --display-name string                New display name for the reranker
      --document-template string           New template applied to each candidate before it is ranked; it must output {{ content }} exactly once and can read memory.metadata.<key>, memory.createdAt, and chunk.sequenceNumber. A line break in a template must be a real line break, not the two characters \n: use the matching -file flag or shell quoting such as $'...'. An empty value removes the stored template
      --document-template-file string      File that holds the new document template. One leading UTF-8 BOM and one final line break are removed; the remaining content must be nonempty
      --endpoint-url string                New API endpoint URL
  -h, --help[=true|false]                  help for update
      --instruction string                 New task instruction, as plain text (not a template). The query template places it where it reads {{ instruction }}; otherwise it is sent in the provider's instruction field when the provider has one; an empty value removes it. Input-format fields that are not given keep their stored values
  -l, --label strings                      New labels in key=value format (can be specified multiple times)
      --label-strategy string              Label update strategy: 'replace' to overwrite all existing labels, 'merge' to add to existing labels (default "replace")
      --modalities strings                 New supported modalities (TEXT, IMAGE, AUDIO, VIDEO); non-empty replaces the stored set
      --model-identifier string            New model identifier
      --monitoring-endpoint string         New monitoring endpoint
      --query-template string              New template applied to query text; it must output {{ content }} exactly once. A line break in a template must be a real line break, not the two characters \n: use the matching -file flag or shell quoting such as $'...'. An empty value removes the stored template
      --query-template-file string         File that holds the new query template. One leading UTF-8 BOM and one final line break are removed; the remaining content must be nonempty
      --version string                     New version information

Options inherited from parent commands

      --api-key string   API key for authentication (can also be set via GOODMEM_API_KEY environment variable)
      --server string    GoodMem server URL (gRPC API; default ports: https=443, http=80)

SEE ALSO

On this page