Class: Deeprails::Models::DefendSubmitAndStreamEventParams

Inherits:
Internal::Type::BaseModel show all
Extended by:
Internal::Type::RequestParameters::Converter
Includes:
Internal::Type::RequestParameters
Defined in:
lib/deeprails/models/defend_submit_and_stream_event_params.rb

Overview

Defined Under Namespace

Modules: RunMode

Instance Attribute Summary collapse

Attributes included from Internal::Type::RequestParameters

#request_options

Instance Method Summary collapse

Methods included from Internal::Type::RequestParameters::Converter

dump_request

Methods included from Internal::Type::RequestParameters

included

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(workflow_id:, model_input:, model_output:, model_used:, run_mode:, stream: nil, nametag: nil, request_options: {}) ⇒ Object

Some parameter documentations has been truncated, see Deeprails::Models::DefendSubmitAndStreamEventParams for more details.

Parameters:

  • workflow_id (String)
  • model_input (Hash{Symbol=>Object})

    The input provided to the model (e.g., prompt, messages).

  • model_output (String)

    The output generated by the model to be evaluated.

  • model_used (String)

    The model that generated the output (e.g., “gpt-4”, “claude-3”).

  • run_mode (Symbol, Deeprails::Models::DefendSubmitAndStreamEventParams::RunMode)

    The evaluation run mode. Streaming is supported on all run modes except precisio

  • stream (Boolean) (defaults to: nil)

    Enable SSE streaming for real-time token feedback. Supported on all run modes ex

  • nametag (String) (defaults to: nil)

    Optional tag to identify this event.

  • request_options (Deeprails::RequestOptions, Hash{Symbol=>Object}) (defaults to: {})


# File 'lib/deeprails/models/defend_submit_and_stream_event_params.rb', line 55

Instance Attribute Details

#model_inputHash{Symbol=>Object}

The input provided to the model (e.g., prompt, messages).

Returns:

  • (Hash{Symbol=>Object})


19
# File 'lib/deeprails/models/defend_submit_and_stream_event_params.rb', line 19

required :model_input, Deeprails::Internal::Type::HashOf[Deeprails::Internal::Type::Unknown]

#model_outputString

The output generated by the model to be evaluated.

Returns:

  • (String)


25
# File 'lib/deeprails/models/defend_submit_and_stream_event_params.rb', line 25

required :model_output, String

#model_usedString

The model that generated the output (e.g., “gpt-4”, “claude-3”).

Returns:

  • (String)


31
# File 'lib/deeprails/models/defend_submit_and_stream_event_params.rb', line 31

required :model_used, String

#nametagString?

Optional tag to identify this event.

Returns:

  • (String, nil)


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

optional :nametag, String

#run_modeSymbol, Deeprails::Models::DefendSubmitAndStreamEventParams::RunMode

The evaluation run mode. Streaming is supported on all run modes except precision_max and precision_max_codex. Note: super_fast does not support Web Search or File Search — if your workflow has these enabled, use a different run mode or disable the capability on the workflow.



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

required :run_mode, enum: -> { Deeprails::DefendSubmitAndStreamEventParams::RunMode }

#streamBoolean?

Enable SSE streaming for real-time token feedback. Supported on all run modes except precision_max and precision_max_codex.

Returns:

  • (Boolean, nil)


47
# File 'lib/deeprails/models/defend_submit_and_stream_event_params.rb', line 47

optional :stream, Deeprails::Internal::Type::Boolean

#workflow_idString

Returns:

  • (String)


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

required :workflow_id, String