Class: SafetyKit::Resources::AgentDecisions
- Inherits:
-
Object
- Object
- SafetyKit::Resources::AgentDecisions
- Defined in:
- lib/safety_kit/resources/agent_decisions.rb
Overview
Send human reviewer final verdicts to SafetyKit. This feedback improves the accuracy of SafetyKit’s automated decisions over time.
Instance Method Summary collapse
-
#create_agent_decision(content_type:, decision:, policy_id:, reference_id:, action: nil, comment: nil, request_options: {}) ⇒ SafetyKit::Models::AgentDecisionCreateAgentDecisionResponse
Some parameter documentations has been truncated, see Models::AgentDecisionCreateAgentDecisionParams for more details.
-
#initialize(client:) ⇒ AgentDecisions
constructor
private
A new instance of AgentDecisions.
Constructor Details
#initialize(client:) ⇒ AgentDecisions
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of AgentDecisions.
50 51 52 |
# File 'lib/safety_kit/resources/agent_decisions.rb', line 50 def initialize(client:) @client = client end |
Instance Method Details
#create_agent_decision(content_type:, decision:, policy_id:, reference_id:, action: nil, comment: nil, request_options: {}) ⇒ SafetyKit::Models::AgentDecisionCreateAgentDecisionResponse
Some parameter documentations has been truncated, see Models::AgentDecisionCreateAgentDecisionParams for more details.
Record a human reviewer’s final verdict for content that SafetyKit has previously reviewed. This ground truth feedback allows SafetyKit to improve the accuracy of automated decisions. Each call provides feedback on whether a given piece of content violates a specific policy category. If content is reviewed for multiple policies, send one call per policy.
36 37 38 39 40 41 42 43 44 45 |
# File 'lib/safety_kit/resources/agent_decisions.rb', line 36 def create_agent_decision(params) parsed, = SafetyKit::AgentDecisionCreateAgentDecisionParams.dump_request(params) @client.request( method: :post, path: "v1/agent_decisions", body: parsed, model: SafetyKit::Models::AgentDecisionCreateAgentDecisionResponse, options: ) end |