wx-ai prompt add-chat-item

Adds chat items to a prompt.

Syntax

cpdctl wx-ai prompt add-chat-item \
--chat-item CHAT-ITEM \
[--cpd-scope CPD-SCOPE] \
[--project-id PROJECT-ID] \
--prompt-id PROMPT-ID \
[--space-id SPACE-ID]

Options

Table 1: Command options
Option Description
--chat-item

An array that contains a question chat item and an answer chat item. Required.

The maximum length is 2 items. The minimum length is 2 items.

Provide a JSON string option or specify a JSON file to read from by providing a file path option that begins with a @, for example --chat-item=@path/to/file.json.

--cpd-scope (string)

The Cloud Pak for Data space or project scope,. For example, cpd://default-profile/spaces/7bccdda4-9752-4f37-868e-891de6c48135.

--project-id (string)

Required. Specifies the project ID as the target. One target must be supplied per request.

The value must match the regular expression /[a-zA-Z0-9-]*/.

--prompt-id (string)

Prompt ID. Required.

The value must match the regular expression /[a-zA-Z0-9-]*/.

--space-id (string)

Required. Specifies the space ID as the target. One target must be supplied per request.

The value must match the regular expression /[a-zA-Z0-9-]*/.

Examples

cpdctl wx-ai prompt add-chat-item \
    --prompt-id exampleString \
    --chat-item '[{"type": "question", "content": "Some text", "status": "ready", "timestamp": 1711504485261}]' \
    --space-id exampleString \
    --project-id exampleString