Class: Pangea::Models::AiGuard::TextGuardResult

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/pangea/models/ai_guard/text_guard_result.rb

Defined Under Namespace

Classes: Detectors

Instance Attribute Summary collapse

Method Summary

Methods inherited from Internal::Type::BaseModel

#==, coerce, #deconstruct_keys, dump, fields, #initialize, #inspect, known_fields, optional, required, #to_h

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, type_info

Constructor Details

This class inherits a constructor from Pangea::Internal::Type::BaseModel

Instance Attribute Details

#blocked ⇒ Boolean?

Whether or not the prompt triggered a block detection.

Returns:

  • (Boolean, nil)


29
# File 'lib/pangea/models/ai_guard/text_guard_result.rb', line 29

optional :blocked, Pangea::Internal::Type::Boolean, nil?: true

#detectors ⇒ Detectors

Result of the recipe analyzing and input prompt.

Returns:



11
# File 'lib/pangea/models/ai_guard/text_guard_result.rb', line 11

required :detectors, -> { Detectors }

#fpe_context ⇒ String?

If an FPE redaction method returned results, this will be the context passed to unredact.

Returns:

  • (String, nil)


42
# File 'lib/pangea/models/ai_guard/text_guard_result.rb', line 42

optional :fpe_context, String, nil?: true

#prompt_messages ⇒ Pangea::Internal::Type::Unknown?

Updated structured prompt, if applicable.



23
# File 'lib/pangea/models/ai_guard/text_guard_result.rb', line 23

optional :prompt_messages, Hash, nil?: true

#prompt_text ⇒ String?

Updated prompt text, if applicable.

Returns:

  • (String, nil)


17
# File 'lib/pangea/models/ai_guard/text_guard_result.rb', line 17

optional :prompt_text, String, nil?: true

#recipe ⇒ String?

The Recipe that was used.

Returns:

  • (String, nil)


35
# File 'lib/pangea/models/ai_guard/text_guard_result.rb', line 35

optional :recipe, String, nil?: true