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, agent_type: 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.
52 53 54 |
# File 'lib/safety_kit/resources/agent_decisions.rb', line 52 def initialize(client:) @client = client end |
Instance Method Details
#create_agent_decision(content_type:, decision:, policy_id:, reference_id:, action: nil, agent_type: 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 feedback lets SafetyKit measure and improve automated decisions over time. Each request provides feedback for one content object and one policy category. If a content object is reviewed for multiple policy categories, send one request per policy category.
38 39 40 41 42 43 44 45 46 47 |
# File 'lib/safety_kit/resources/agent_decisions.rb', line 38 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 |