ReferenceCLIEmbedder
Embedder Update
Embedder Update CLI command reference
goodmem embedder update
Update an embedder
Synopsis
Update an embedder 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 embedder, 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. The document template cannot be changed while a space uses the embedder.
goodmem embedder update [embedder-id] [flags]Examples
# Update an embedder's display name
goodmem embedder update 123e4567-e89b-12d3-a456-426614174000 --display-name "New Name"
# Update an embedder's endpoint URL
goodmem embedder update 123e4567-e89b-12d3-a456-426614174000 --endpoint-url "https://new-api.example.com"
# Update an embedder's distribution type
goodmem embedder update 123e4567-e89b-12d3-a456-426614174000 --distribution-type SPARSE
# Rotate inline API key credentials
goodmem embedder update 123e4567-e89b-12d3-a456-426614174000 --cred-api-key "NEW_API_KEY"
# Atomically replace Gemini routing with Google Cloud configuration and ADC
goodmem embedder update 123e4567-e89b-12d3-a456-426614174000 \
--endpoint-url "https://aiplatform.us.rep.googleapis.com" \
--api-path "/v1" \
--gemini-api-backend google-cloud \
--gemini-project-id "my-resource-project" \
--gemini-location "us" \
--cred-gcp \
--cred-gcp-scope "https://www.googleapis.com/auth/cloud-platform"
# Replace all labels with new ones
goodmem embedder update 123e4567-e89b-12d3-a456-426614174000 --label key1=value1 --label key2=value2 --label-strategy replace
# Merge new labels with existing ones
goodmem embedder update 123e4567-e89b-12d3-a456-426614174000 --label key1=newvalue --label-strategy merge
# Change only the task instruction; the stored templates are kept
goodmem embedder update 123e4567-e89b-12d3-a456-426614174000 \
--instruction "Given a claim, retrieve passages that support or refute it"
# Replace the query template with the content of a file (one final line break is removed)
goodmem embedder update 123e4567-e89b-12d3-a456-426614174000 --query-template-file ./query-template.txt
# Remove the stored instruction and both templates
goodmem embedder update 123e4567-e89b-12d3-a456-426614174000 --clear-input-formatOptions
--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 (EMBEDDING_NATIVE_TEXT, EMBEDDING_NATIVE_CONTENTS, or OPENAI_COMPATIBLE)
--description string New description for the embedder
--dimensionality int32 New output vector dimensions
--display-name string New display name for the embedder
--distribution-type string New embedding distribution type (DENSE, SPARSE)
--document-template string New template applied to each chunk before it is embedded; 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
--gemini-api-backend string Atomically replace Gemini endpoint routing (developer or google-cloud); requires the target to be a Gemini embedder
--gemini-location string Google Cloud location; requires --gemini-api-backend google-cloud; omitted defaults to global
--gemini-project-id string Google Cloud resource project; requires --gemini-api-backend google-cloud
-h, --help[=true|false] help for update
--instruction string New task instruction for queries, as plain text (not a template). The query template places it where it reads {{ instruction }}; 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")
--max-sequence-length int32 New maximum input sequence length
--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 informationOptions 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
- goodmem embedder - Manage GoodMem embedders