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

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

Overview

See Also:

  • OpenAI::Resources::Beta::Agents::Sessions#update

Defined Under Namespace

Modules: Review Classes: Agent, PromptCacheOptions, SpendControl

Instance Attribute Summary collapse

Attributes included from Internal::Type::RequestParameters

#request_options

Attributes inherited from Internal::Type::BaseModel

#last_response

Class Method Summary collapse

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

==, #==, #[], #_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_cached, coerce_with_error, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, resolve_type, 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 ⇒ SessionUpdateParams

Returns a new instance of SessionUpdateParams.

Parameters:

  • agent —

    Agent settings to update on this session. Omitted fields stay unchanged.

  • metadata —

    Replaces all metadata. Omit to leave unchanged, or pass null or {} to clear it. Up to 16 string key-value pairs, with keys up to 64 and values up to 512 characters.

  • prompt_cache_options —

    Default prompt cache lifetime for future turns. Send null to clear the session default.

  • review —

    Default action review for new root turns. Existing turns and their subagents keep their review mode.

  • spend_control —

    Omit to retain the limit; null or a null limit removes it without resetting spend.

  • vault_ids —

    Replaces the session's referenced vaults. Omit to retain them; null or [] clears them.

  • session_id: (String)
  • agent: (OpenAI::Beta::Agents::SessionUpdateParams::Agent)
  • metadata: (::Hash[Symbol, String], nil)
  • prompt_cache_options: (OpenAI::Beta::Agents::SessionUpdateParams::PromptCacheOptions, nil)
  • review: (OpenAI::Models::Beta::Agents::SessionUpdateParams::review)
  • spend_control: (OpenAI::Beta::Agents::SessionUpdateParams::SpendControl, nil)
  • vault_ids: (::Array[String], nil)
  • request_options: (OpenAI::request_opts)


76
77
78
79
80
81
82
83
84
85
# File 'sig/openai/models/beta/agents/session_update_params.rbs', line 76

def initialize: (
  session_id: String,
  ?agent: OpenAI::Beta::Agents::SessionUpdateParams::Agent,
  ?metadata: ::Hash[Symbol, String]?,
  ?prompt_cache_options: OpenAI::Beta::Agents::SessionUpdateParams::PromptCacheOptions?,
  ?review: OpenAI::Models::Beta::Agents::SessionUpdateParams::review,
  ?spend_control: OpenAI::Beta::Agents::SessionUpdateParams::SpendControl?,
  ?vault_ids: ::Array[String]?,
  ?request_options: OpenAI::request_opts
) -> void

Instance Attribute Details

#agent ⇒ OpenAI::Beta::Agents::SessionUpdateParams::Agent?

Agent settings to update on this session. Omitted fields stay unchanged.

Returns:

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


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

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

#metadata ⇒ ::Hash[Symbol, String]?

Replaces all metadata. Omit to leave unchanged, or pass null or {} to clear it. Up to 16 string key-value pairs, with keys up to 64 and values up to 512 characters.

Returns:

  • (::Hash[Symbol, String], nil)


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

optional :metadata, OpenAI::Internal::Type::HashOf[String], nil?: true

#prompt_cache_options ⇒ OpenAI::Beta::Agents::SessionUpdateParams::PromptCacheOptions?

Default prompt cache lifetime for future turns. Send null to clear the session default.

Returns:

  • (OpenAI::Beta::Agents::SessionUpdateParams::PromptCacheOptions, nil)


36
37
38
39
40
# File 'lib/openai/models/beta/agents/session_update_params.rb', line 36

optional(
  :prompt_cache_options,
  -> { OpenAI::Beta::Agents::SessionUpdateParams::PromptCacheOptions },
  nil?: true
)

#review ⇒ OpenAI::Models::Beta::Agents::SessionUpdateParams::review?

Default action review for new root turns. Existing turns and their subagents keep their review mode.

Returns:

  • (OpenAI::Models::Beta::Agents::SessionUpdateParams::review, nil)


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

optional :review, enum: -> { OpenAI::Beta::Agents::SessionUpdateParams::Review }

#session_id ⇒ String

Parameters:

  • value (String)

Returns:

  • (String)


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

required :session_id, String

#spend_control ⇒ OpenAI::Beta::Agents::SessionUpdateParams::SpendControl?

Omit to retain the limit; null or a null limit removes it without resetting spend.

Returns:

  • (OpenAI::Beta::Agents::SessionUpdateParams::SpendControl, nil)


54
55
56
57
58
59
60
# File 'lib/openai/models/beta/agents/session_update_params.rb', line 54

optional(
  :spend_control,
  -> {
    OpenAI::Beta::Agents::SessionUpdateParams::SpendControl
  },
  nil?: true
)

#vault_ids ⇒ ::Array[String]?

Replaces the session's referenced vaults. Omit to retain them; null or [] clears them.

Returns:

  • (::Array[String], nil)


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

optional :vault_ids, OpenAI::Internal::Type::ArrayOf[String], nil?: true

Class Method Details

.values ⇒ Array<Symbol>

Returns:

  • (Array<Symbol>)


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

Instance Method Details

#to_hash ⇒ { session_id: String, ?agent: OpenAI::Beta::Agents::SessionUpdateParams::Agent, ?metadata: ::Hash[Symbol, String]?, ?prompt_cache_options: OpenAI::Beta::Agents::SessionUpdateParams::PromptCacheOptions?, ?review: OpenAI::Models::Beta::Agents::SessionUpdateParams::review, ?spend_control: OpenAI::Beta::Agents::SessionUpdateParams::SpendControl?, ?vault_ids: ::Array[String]?, ?request_options: OpenAI::RequestOptions }

Returns:

  • ({ session_id: String, ?agent: OpenAI::Beta::Agents::SessionUpdateParams::Agent, ?metadata: ::Hash[Symbol, String]?, ?prompt_cache_options: OpenAI::Beta::Agents::SessionUpdateParams::PromptCacheOptions?, ?review: OpenAI::Models::Beta::Agents::SessionUpdateParams::review, ?spend_control: OpenAI::Beta::Agents::SessionUpdateParams::SpendControl?, ?vault_ids: ::Array[String]?, ?request_options: OpenAI::RequestOptions })


87
88
89
90
91
92
93
94
95
96
# File 'sig/openai/models/beta/agents/session_update_params.rbs', line 87

def to_hash: -> {
  session_id: String,
  ?agent: OpenAI::Beta::Agents::SessionUpdateParams::Agent,
  ?metadata: ::Hash[Symbol, String]?,
  ?prompt_cache_options: OpenAI::Beta::Agents::SessionUpdateParams::PromptCacheOptions?,
  ?review: OpenAI::Models::Beta::Agents::SessionUpdateParams::review,
  ?spend_control: OpenAI::Beta::Agents::SessionUpdateParams::SpendControl?,
  ?vault_ids: ::Array[String]?,
  ?request_options: OpenAI::RequestOptions
}