Class: OpenAI::Models::Beta::Agents::SessionUpdateParams::Agent

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openai/models/beta/agents/session_update_params.rb,
sig/openai/models/beta/agents/session_update_params.rbs

Defined Under Namespace

Modules: ServiceTier Classes: Reasoning

Instance Attribute Summary collapse

Attributes inherited from Internal::Type::BaseModel

#last_response

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], #_request_id, #_set_last_response, coerce, #deconstruct_keys, #deep_to_h, dump, #encode_with, 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, coerce_with_error, 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(model: nil, reasoning: nil, service_tier: nil) ⇒ Object

Parameters:

  • model (defaults to: nil)

    The model for subsequent turns. Omit to keep the current model.

  • reasoning (defaults to: nil)

    Reasoning settings to update. Omit to keep the current effort.

  • service_tier (defaults to: nil)

    Omit to keep the current tier. Null resets it to auto.



44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
# File 'lib/openai/models/beta/agents/session_update_params.rb', line 44

class Agent < OpenAI::Internal::Type::BaseModel
  # @!attribute model
  #   The model for subsequent turns. Omit to keep the current model.
  #
  #   @return [String, nil]
  optional :model, String

  # @!attribute reasoning
  #   Reasoning settings to update. Omit to keep the current effort.
  #
  #   @return [OpenAI::Models::Beta::Agents::SessionUpdateParams::Agent::Reasoning, nil]
  optional :reasoning, -> { OpenAI::Beta::Agents::SessionUpdateParams::Agent::Reasoning }

  # @!attribute service_tier
  #   Omit to keep the current tier. Null resets it to auto.
  #
  #   @return [Symbol, OpenAI::Models::Beta::Agents::SessionUpdateParams::Agent::ServiceTier, nil]
  optional(
    :service_tier,
    enum: -> { OpenAI::Beta::Agents::SessionUpdateParams::Agent::ServiceTier },
    nil?: true
  )

  # @!method initialize(model: nil, reasoning: nil, service_tier: nil)
  #   Model settings for subsequent turns. Omitted fields stay unchanged.
  #
  #   @param model [String]
  #     The model for subsequent turns. Omit to keep the current model.
  #
  #   @param reasoning [OpenAI::Models::Beta::Agents::SessionUpdateParams::Agent::Reasoning]
  #     Reasoning settings to update. Omit to keep the current effort.
  #
  #   @param service_tier [Symbol, OpenAI::Models::Beta::Agents::SessionUpdateParams::Agent::ServiceTier, nil]
  #     Omit to keep the current tier. Null resets it to auto.

  # @see OpenAI::Models::Beta::Agents::SessionUpdateParams::Agent#reasoning
  class Reasoning < OpenAI::Internal::Type::BaseModel
    # @!attribute effort
    #   Omit to keep the current effort. Null selects the model's default effort.
    #
    #   @return [Symbol, OpenAI::Models::Beta::Agents::SessionUpdateParams::Agent::Reasoning::Effort, nil]
    optional(
      :effort,
      enum: -> { OpenAI::Beta::Agents::SessionUpdateParams::Agent::Reasoning::Effort },
      nil?: true
    )

    # @!method initialize(effort: nil)
    #   Reasoning settings to update. Omit to keep the current effort.
    #
    #   @param effort [Symbol, OpenAI::Models::Beta::Agents::SessionUpdateParams::Agent::Reasoning::Effort, nil]
    #     Omit to keep the current effort. Null selects the model's default effort.

    # Omit to keep the current effort. Null selects the model's default effort.
    #
    # @see OpenAI::Models::Beta::Agents::SessionUpdateParams::Agent::Reasoning#effort
    module Effort
      extend OpenAI::Internal::Type::Enum

      NONE = :none
      MINIMAL = :minimal
      LOW = :low
      MEDIUM = :medium
      HIGH = :high
      XHIGH = :xhigh
      MAX = :max

      # @!method self.values
      #   @return [Array<Symbol>]
    end
  end

  # Omit to keep the current tier. Null resets it to auto.
  #
  # @see OpenAI::Models::Beta::Agents::SessionUpdateParams::Agent#service_tier
  module ServiceTier
    extend OpenAI::Internal::Type::Enum

    # Selects the service tier automatically.
    AUTO = :auto

    # Uses the default service tier.
    DEFAULT = :default

    # Uses the flex service tier.
    FLEX = :flex

    # Uses the priority service tier.
    PRIORITY = :priority

    # Uses the fast service tier.
    FAST = :fast

    # @!method self.values
    #   @return [Array<Symbol>]
  end
end

Instance Attribute Details

#modelString?

The model for subsequent turns. Omit to keep the current model.

Returns:

  • (String, nil)


49
# File 'lib/openai/models/beta/agents/session_update_params.rb', line 49

optional :model, String

#reasoningOpenAI::Beta::Agents::SessionUpdateParams::Agent::Reasoning?

Reasoning settings to update. Omit to keep the current effort.

Returns:

  • (OpenAI::Beta::Agents::SessionUpdateParams::Agent::Reasoning, nil)


55
# File 'lib/openai/models/beta/agents/session_update_params.rb', line 55

optional :reasoning, -> { OpenAI::Beta::Agents::SessionUpdateParams::Agent::Reasoning }

#service_tierOpenAI::Models::Beta::Agents::SessionUpdateParams::Agent::service_tier?

Omit to keep the current tier. Null resets it to auto.

Returns:

  • (OpenAI::Models::Beta::Agents::SessionUpdateParams::Agent::service_tier, nil)


61
62
63
64
65
# File 'lib/openai/models/beta/agents/session_update_params.rb', line 61

optional(
  :service_tier,
  enum: -> { OpenAI::Beta::Agents::SessionUpdateParams::Agent::ServiceTier },
  nil?: true
)

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/openai/models/beta/agents/session_update_params.rb', line 111

Instance Method Details

#to_hash{

Returns:

  • ({)


89
# File 'sig/openai/models/beta/agents/session_update_params.rbs', line 89

def to_hash: -> {