create_feedback_config(
self,
feedback_key: str,
*,
feedback_config: ls_schemas.FeedbackConfig,
is_lower_score_better: Optional| Name | Type | Description |
|---|---|---|
feedback_key* | str | The feedback key to configure. |
feedback_config* | ls_schemas.FeedbackConfig | The configuration defining type, bounds, and categories. |
is_lower_score_better | Optional[bool] | Default: NoneWhether a lower score is considered better. When omitted, a key that already has configs keeps its direction, and a new key defaults to False. |
is_enforced | bool | Default: False |
Create a feedback configuration.
Defines how feedback with a given key should be interpreted. If an identical configuration already exists for the key, it is returned unchanged. If a different configuration already exists for the key, the result depends on the workspace: with enforced feedback configs on, the new configuration is added next to the existing ones (unless the key has an enforced configuration); otherwise an HTTP 400 "Feedback config already exists" is raised.
Create the key's enforced configuration, which sets the rules for the whole workspace. Requires the feedback-configs:manage-enforced permission, which workspace admins have. Fails if the key already has an enforced configuration. Defaults to False.