Class: Deeprails::Models::DefendResponse

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/deeprails/models/defend_response.rb

Overview

Defined Under Namespace

Modules: AutomaticHallucinationToleranceLevel, ImprovementAction, Status, ThresholdType Classes: Capability, Event, File, Stats

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, inspect, #inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(file_id: nil, file_name: nil, file_size: nil) ⇒ Object

Parameters:

  • file_id (String) (defaults to: nil)
  • file_name (String) (defaults to: nil)
  • file_size (Integer) (defaults to: nil)


# File 'lib/deeprails/models/defend_response.rb', line 147


Instance Attribute Details

#automatic_hallucination_tolerance_levelsHash{Symbol=>Symbol, Deeprails::Models::DefendResponse::AutomaticHallucinationToleranceLevel}

Mapping of guardrail metric names to tolerance values. Values can be strings (‘low`, `medium`, `high`) for automatic tolerance levels.



12
13
# File 'lib/deeprails/models/defend_response.rb', line 12

required :automatic_hallucination_tolerance_levels,
-> { Deeprails::Internal::Type::HashOf[enum: Deeprails::DefendResponse::AutomaticHallucinationToleranceLevel] }

#capabilitiesArray<Deeprails::Models::DefendResponse::Capability>

Extended AI capabilities available to the event, if any. Can be ‘web_search` and/or `file_search`.



20
# File 'lib/deeprails/models/defend_response.rb', line 20

required :capabilities, -> { Deeprails::Internal::Type::ArrayOf[Deeprails::DefendResponse::Capability] }

#created_atTime

The time the workflow was created in UTC.

Returns:

  • (Time)


26
# File 'lib/deeprails/models/defend_response.rb', line 26

required :created_at, Time

#custom_hallucination_threshold_valuesHash{Symbol=>Float}

Mapping of guardrail metric names to threshold values. Values can be floating point numbers (0.0-1.0) for custom thresholds.

Returns:

  • (Hash{Symbol=>Float})


33
# File 'lib/deeprails/models/defend_response.rb', line 33

required :custom_hallucination_threshold_values, Deeprails::Internal::Type::HashOf[Float]

#descriptionString

A description for the workflow, to help you remember what that workflow means to your organization.

Returns:

  • (String)


40
# File 'lib/deeprails/models/defend_response.rb', line 40

required :description, String

#eventsArray<Deeprails::Models::DefendResponse::Event>

An array of events associated with this workflow.



46
# File 'lib/deeprails/models/defend_response.rb', line 46

required :events, -> { Deeprails::Internal::Type::ArrayOf[Deeprails::DefendResponse::Event] }

#filesArray<Deeprails::Models::DefendResponse::File>

List of files associated with the workflow. If this is not empty, models can search these files when performing evaluations or remediations



53
# File 'lib/deeprails/models/defend_response.rb', line 53

required :files, -> { Deeprails::Internal::Type::ArrayOf[Deeprails::DefendResponse::File] }

#improvement_actionSymbol, ...

The action used to improve outputs that fail one or more guardrail metrics for the workflow events.



91
# File 'lib/deeprails/models/defend_response.rb', line 91

optional :improvement_action, enum: -> { Deeprails::DefendResponse::ImprovementAction }

#nameString

A human-readable name for the workflow that will correspond to it’s workflow ID.

Returns:

  • (String)


59
# File 'lib/deeprails/models/defend_response.rb', line 59

required :name, String

#statsDeeprails::Models::DefendResponse::Stats?



96
# File 'lib/deeprails/models/defend_response.rb', line 96

optional :stats, -> { Deeprails::DefendResponse::Stats }

#statusSymbol, Deeprails::Models::DefendResponse::Status

Status of the selected workflow. May be ‘inactive` or `active`. Inactive workflows will not accept events.



66
# File 'lib/deeprails/models/defend_response.rb', line 66

required :status, enum: -> { Deeprails::DefendResponse::Status }

#threshold_typeSymbol, Deeprails::Models::DefendResponse::ThresholdType

Type of thresholds used to evaluate the event.



72
# File 'lib/deeprails/models/defend_response.rb', line 72

required :threshold_type, enum: -> { Deeprails::DefendResponse::ThresholdType }

#updated_atTime

The most recent time the workflow was updated in UTC.

Returns:

  • (Time)


78
# File 'lib/deeprails/models/defend_response.rb', line 78

required :updated_at, Time

#workflow_idString

A unique workflow ID used to identify the workflow in other endpoints.

Returns:

  • (String)


84
# File 'lib/deeprails/models/defend_response.rb', line 84

required :workflow_id, String

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/deeprails/models/defend_response.rb', line 137