Actions14
Update Package
AI-generatedOverview
This node operation updates an existing package (prompt) in a HumanFirst playbook. It allows selective updating of specific fields in the package by specifying an update mask, which is a comma-separated list of field paths to be updated. The operation supports updating various package attributes such as contents, name, NLG model parameters (temperature, top_p, max_tokens, stop_sequences, frequency_penalty, presence_penalty), post-processing options, run mode, parent package ID, position, metadata, source, parameters, and NLG timeout.
Use Case Examples
- Updating the contents and name of a package in a playbook.
- Modifying NLG model parameters like temperature and max tokens for a package.
- Changing post-processing settings or run mode of a package.
Properties
| Name | Meaning |
|---|---|
| Namespace | The namespace in which the playbook resides, used to identify the playbook context. |
| Playbook ID | The identifier of the playbook containing the package to update. |
| Package ID | The identifier of the package (prompt) to update within the playbook. |
| Update Mask (Comma-Separated) | A required comma-separated list of field paths specifying which fields of the package to update. |
| Contents | The new contents of the package, if updating the 'contents' field. |
| Name | The new name of the package, if updating the 'name' field. |
| Temperature | The temperature parameter for the NLG model, if updating related fields. |
| Top-P | The top_p parameter for the NLG model, if updating related fields. |
| Max Tokens | The max_tokens parameter for the NLG model, if updating related fields. |
| Stop Sequences (JSON Array) | A JSON array of stop sequences for the NLG model, if updating related fields. |
| Frequency Penalty | The frequency penalty parameter for the NLG model, if updating related fields. |
| Presence Penalty | The presence penalty parameter for the NLG model, if updating related fields. |
| Post-Processing | Post-processing option for the package output, if updating this field. |
| Delimiter (if Post-Processing = Delimiter) | The delimiter string used if post-processing is set to 'Delimiter'. |
| Run Mode | The run mode of the package, either run once merging all items or run on each item. |
| Parent Package ID | The ID of the parent package, if applicable. |
| Position | The position of the package in the playbook. |
| Metadata (JSON) | Additional metadata for the package in JSON format. |
| Source (JSON) | Source information for the package in JSON format. |
| Parameters (JSON Array) | An array of parameters for the package in JSON format. |
| NLG Timeout (ISO Duration) | Timeout duration for NLG processing in ISO format. |
Output
JSON
json- The JSON response from the HumanFirst API after updating the package, containing the updated package details.
Dependencies
- HumanFirst API key credential
Troubleshooting
- Ensure the 'update_mask' parameter is a non-empty comma-separated list of valid field paths; otherwise, the node throws an error.
- Invalid JSON in fields like 'stop_sequences', 'metadata', 'source', or 'parameters' will cause errors; ensure proper JSON formatting.
- API request failures may occur due to invalid credentials or network issues; verify API key and connectivity.