openai 0.120.0 → 0.121.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (94) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +13 -0
  3. data/README.md +1 -1
  4. data/lib/openai/models/beta/agents/automation.rb +27 -0
  5. data/lib/openai/models/beta/agents/automation_agent_config.rb +142 -0
  6. data/lib/openai/models/beta/agents/automation_create_params.rb +27 -0
  7. data/lib/openai/models/beta/agents/automation_created_by.rb +65 -0
  8. data/lib/openai/models/beta/agents/automation_delete_params.rb +24 -0
  9. data/lib/openai/models/beta/agents/automation_deleted.rb +40 -0
  10. data/lib/openai/models/beta/agents/automation_environment.rb +484 -0
  11. data/lib/openai/models/beta/agents/automation_list_params.rb +68 -0
  12. data/lib/openai/models/beta/agents/automation_pause_params.rb +24 -0
  13. data/lib/openai/models/beta/agents/automation_resume_params.rb +24 -0
  14. data/lib/openai/models/beta/agents/automation_retrieve_params.rb +24 -0
  15. data/lib/openai/models/beta/agents/automation_schedule_param.rb +124 -0
  16. data/lib/openai/models/beta/agents/automation_target.rb +153 -0
  17. data/lib/openai/models/beta/agents/automation_target_param.rb +312 -0
  18. data/lib/openai/models/beta/agents/automation_update_params.rb +79 -0
  19. data/lib/openai/models/beta/agents/automations/automation_invocation.rb +148 -0
  20. data/lib/openai/models/beta/agents/automations/automation_invocation_source.rb +59 -0
  21. data/lib/openai/models/beta/agents/automations/invocation_create_params.rb +26 -0
  22. data/lib/openai/models/beta/agents/automations/invocation_list_params.rb +68 -0
  23. data/lib/openai/models/beta/agents/automations/invocation_retrieve_params.rb +32 -0
  24. data/lib/openai/models/beta/agents/environments/file_create_params.rb +11 -1
  25. data/lib/openai/models/beta/agents/one_time_automation.rb +118 -0
  26. data/lib/openai/models/beta/agents/periodic_automation.rb +126 -0
  27. data/lib/openai/models/beta/beta_responses_client_event.rb +3 -0
  28. data/lib/openai/models/beta/response_compact_params.rb +3 -0
  29. data/lib/openai/models/beta/response_create_params.rb +3 -0
  30. data/lib/openai/resources/beta/agents/automations/invocations.rb +103 -0
  31. data/lib/openai/resources/beta/agents/automations.rb +211 -0
  32. data/lib/openai/resources/beta/agents.rb +4 -0
  33. data/lib/openai/version.rb +1 -1
  34. data/lib/openai.rb +24 -0
  35. data/rbi/openai/models/beta/agents/automation.rbi +32 -0
  36. data/rbi/openai/models/beta/agents/automation_agent_config.rbi +255 -0
  37. data/rbi/openai/models/beta/agents/automation_create_params.rbi +75 -0
  38. data/rbi/openai/models/beta/agents/automation_created_by.rbi +124 -0
  39. data/rbi/openai/models/beta/agents/automation_delete_params.rbi +57 -0
  40. data/rbi/openai/models/beta/agents/automation_deleted.rbi +71 -0
  41. data/rbi/openai/models/beta/agents/automation_environment.rbi +795 -0
  42. data/rbi/openai/models/beta/agents/automation_list_params.rbi +122 -0
  43. data/rbi/openai/models/beta/agents/automation_pause_params.rbi +57 -0
  44. data/rbi/openai/models/beta/agents/automation_resume_params.rbi +57 -0
  45. data/rbi/openai/models/beta/agents/automation_retrieve_params.rbi +57 -0
  46. data/rbi/openai/models/beta/agents/automation_schedule_param.rbi +228 -0
  47. data/rbi/openai/models/beta/agents/automation_target.rbi +250 -0
  48. data/rbi/openai/models/beta/agents/automation_target_param.rbi +564 -0
  49. data/rbi/openai/models/beta/agents/automation_update_params.rbi +161 -0
  50. data/rbi/openai/models/beta/agents/automations/automation_invocation.rbi +233 -0
  51. data/rbi/openai/models/beta/agents/automations/automation_invocation_source.rbi +123 -0
  52. data/rbi/openai/models/beta/agents/automations/invocation_create_params.rbi +61 -0
  53. data/rbi/openai/models/beta/agents/automations/invocation_list_params.rbi +125 -0
  54. data/rbi/openai/models/beta/agents/automations/invocation_retrieve_params.rbi +68 -0
  55. data/rbi/openai/models/beta/agents/environments/file_create_params.rbi +27 -1
  56. data/rbi/openai/models/beta/agents/one_time_automation.rbi +168 -0
  57. data/rbi/openai/models/beta/agents/periodic_automation.rbi +177 -0
  58. data/rbi/openai/models/beta/beta_responses_client_event.rbi +4 -0
  59. data/rbi/openai/models/beta/response_compact_params.rbi +1 -0
  60. data/rbi/openai/models/beta/response_create_params.rbi +1 -0
  61. data/rbi/openai/resources/beta/agents/automations/invocations.rbi +67 -0
  62. data/rbi/openai/resources/beta/agents/automations.rbi +141 -0
  63. data/rbi/openai/resources/beta/agents.rbi +3 -0
  64. data/sig/openai/models/beta/agent_session_turn_reasoning_summary_part_done_event.rbs +1 -4
  65. data/sig/openai/models/beta/agents/automation.rbs +17 -0
  66. data/sig/openai/models/beta/agents/automation_agent_config.rbs +143 -0
  67. data/sig/openai/models/beta/agents/automation_create_params.rbs +33 -0
  68. data/sig/openai/models/beta/agents/automation_created_by.rbs +62 -0
  69. data/sig/openai/models/beta/agents/automation_delete_params.rbs +27 -0
  70. data/sig/openai/models/beta/agents/automation_deleted.rbs +39 -0
  71. data/sig/openai/models/beta/agents/automation_environment.rbs +428 -0
  72. data/sig/openai/models/beta/agents/automation_list_params.rbs +85 -0
  73. data/sig/openai/models/beta/agents/automation_pause_params.rbs +27 -0
  74. data/sig/openai/models/beta/agents/automation_resume_params.rbs +27 -0
  75. data/sig/openai/models/beta/agents/automation_retrieve_params.rbs +27 -0
  76. data/sig/openai/models/beta/agents/automation_schedule_param.rbs +127 -0
  77. data/sig/openai/models/beta/agents/automation_target.rbs +157 -0
  78. data/sig/openai/models/beta/agents/automation_target_param.rbs +299 -0
  79. data/sig/openai/models/beta/agents/automation_update_params.rbs +97 -0
  80. data/sig/openai/models/beta/agents/automations/automation_invocation.rbs +134 -0
  81. data/sig/openai/models/beta/agents/automations/automation_invocation_source.rbs +62 -0
  82. data/sig/openai/models/beta/agents/automations/invocation_create_params.rbs +29 -0
  83. data/sig/openai/models/beta/agents/automations/invocation_list_params.rbs +81 -0
  84. data/sig/openai/models/beta/agents/automations/invocation_retrieve_params.rbs +37 -0
  85. data/sig/openai/models/beta/agents/environments/file_create_params.rbs +12 -1
  86. data/sig/openai/models/beta/agents/one_time_automation.rbs +111 -0
  87. data/sig/openai/models/beta/agents/periodic_automation.rbs +118 -0
  88. data/sig/openai/models/beta/beta_responses_client_event.rbs +2 -0
  89. data/sig/openai/models/beta/response_compact_params.rbs +2 -0
  90. data/sig/openai/models/beta/response_create_params.rbs +2 -0
  91. data/sig/openai/resources/beta/agents/automations/invocations.rbs +32 -0
  92. data/sig/openai/resources/beta/agents/automations.rbs +57 -0
  93. data/sig/openai/resources/beta/agents.rbs +2 -0
  94. metadata +73 -1
@@ -0,0 +1,124 @@
1
+ # frozen_string_literal: true
2
+
3
+ module OpenAI
4
+ module Models
5
+ module Beta
6
+ module Agents
7
+ # Creates an automation without invoking it immediately.
8
+ module AutomationScheduleParam
9
+ extend OpenAI::Internal::Type::Union
10
+
11
+ discriminator :type
12
+
13
+ variant :periodic, -> { OpenAI::Beta::Agents::AutomationScheduleParam::Periodic }
14
+
15
+ variant :once, -> { OpenAI::Beta::Agents::AutomationScheduleParam::Once }
16
+
17
+ class Periodic < OpenAI::Internal::Type::BaseModel
18
+ # @!attribute expression
19
+ # A standard five-field cron expression defining scheduled occurrences.
20
+ #
21
+ # @return [String]
22
+ required :expression, String
23
+
24
+ # @!attribute name
25
+ # A human-readable name for the automation.
26
+ #
27
+ # @return [String]
28
+ required :name, String
29
+
30
+ # @!attribute target
31
+ # The session an automation invocation targets.
32
+ #
33
+ # @return [OpenAI::Models::Beta::Agents::AutomationTargetParam::NewSession, OpenAI::Models::Beta::Agents::AutomationTargetParam::ExistingSession]
34
+ required :target, union: -> { OpenAI::Beta::Agents::AutomationTargetParam }
35
+
36
+ # @!attribute timezone
37
+ # The IANA timezone used to interpret the cron expression.
38
+ #
39
+ # @return [String]
40
+ required :timezone, String
41
+
42
+ # @!attribute type
43
+ # The type of the object. Always `periodic`.
44
+ #
45
+ # @return [Symbol, :periodic]
46
+ required :type, const: :periodic
47
+
48
+ # @!attribute metadata
49
+ #
50
+ # @return [Hash{Symbol=>String}, nil]
51
+ optional :metadata, OpenAI::Internal::Type::HashOf[String]
52
+
53
+ # @!method initialize(expression:, name:, target:, timezone:, metadata: nil, type: :periodic)
54
+ # @param expression [String]
55
+ # A standard five-field cron expression defining scheduled occurrences.
56
+ #
57
+ # @param name [String]
58
+ # A human-readable name for the automation.
59
+ #
60
+ # @param target [OpenAI::Models::Beta::Agents::AutomationTargetParam::NewSession, OpenAI::Models::Beta::Agents::AutomationTargetParam::ExistingSession]
61
+ # The session an automation invocation targets.
62
+ #
63
+ # @param timezone [String]
64
+ # The IANA timezone used to interpret the cron expression.
65
+ #
66
+ # @param metadata [Hash{Symbol=>String}]
67
+ #
68
+ # @param type [Symbol, :periodic]
69
+ # The type of the object. Always `periodic`.
70
+ end
71
+
72
+ class Once < OpenAI::Internal::Type::BaseModel
73
+ # @!attribute name
74
+ # A human-readable name for the automation.
75
+ #
76
+ # @return [String]
77
+ required :name, String
78
+
79
+ # @!attribute run_at
80
+ # A future Unix timestamp in seconds.
81
+ #
82
+ # @return [Integer]
83
+ required :run_at, Integer
84
+
85
+ # @!attribute target
86
+ # The session an automation invocation targets.
87
+ #
88
+ # @return [OpenAI::Models::Beta::Agents::AutomationTargetParam::NewSession, OpenAI::Models::Beta::Agents::AutomationTargetParam::ExistingSession]
89
+ required :target, union: -> { OpenAI::Beta::Agents::AutomationTargetParam }
90
+
91
+ # @!attribute type
92
+ # The type of the object. Always `once`.
93
+ #
94
+ # @return [Symbol, :once]
95
+ required :type, const: :once
96
+
97
+ # @!attribute metadata
98
+ #
99
+ # @return [Hash{Symbol=>String}, nil]
100
+ optional :metadata, OpenAI::Internal::Type::HashOf[String]
101
+
102
+ # @!method initialize(name:, run_at:, target:, metadata: nil, type: :once)
103
+ # @param name [String]
104
+ # A human-readable name for the automation.
105
+ #
106
+ # @param run_at [Integer]
107
+ # A future Unix timestamp in seconds.
108
+ #
109
+ # @param target [OpenAI::Models::Beta::Agents::AutomationTargetParam::NewSession, OpenAI::Models::Beta::Agents::AutomationTargetParam::ExistingSession]
110
+ # The session an automation invocation targets.
111
+ #
112
+ # @param metadata [Hash{Symbol=>String}]
113
+ #
114
+ # @param type [Symbol, :once]
115
+ # The type of the object. Always `once`.
116
+ end
117
+
118
+ # @!method self.variants
119
+ # @return [Array(OpenAI::Models::Beta::Agents::AutomationScheduleParam::Periodic, OpenAI::Models::Beta::Agents::AutomationScheduleParam::Once)]
120
+ end
121
+ end
122
+ end
123
+ end
124
+ end
@@ -0,0 +1,153 @@
1
+ # frozen_string_literal: true
2
+
3
+ module OpenAI
4
+ module Models
5
+ module Beta
6
+ module Agents
7
+ # Saved target configuration, excluding confidential request-only values.
8
+ module AutomationTarget
9
+ extend OpenAI::Internal::Type::Union
10
+
11
+ discriminator :type
12
+
13
+ variant :new_session, -> { OpenAI::Beta::Agents::AutomationTarget::NewSession }
14
+
15
+ variant :existing_session, -> { OpenAI::Beta::Agents::AutomationTarget::ExistingSession }
16
+
17
+ class NewSession < OpenAI::Internal::Type::BaseModel
18
+ # @!attribute agent
19
+ # The inline agent configuration, or null when agent_id is configured.
20
+ #
21
+ # @return [OpenAI::Models::Beta::Agents::AutomationAgentConfig, nil]
22
+ required :agent, -> { OpenAI::Beta::Agents::AutomationAgentConfig }, nil?: true
23
+
24
+ # @!attribute agent_id
25
+ # The saved agent reference, or null when an inline agent is configured.
26
+ #
27
+ # @return [String, nil]
28
+ required :agent_id, String, nil?: true
29
+
30
+ # @!attribute environment
31
+ # Configuration or references used to select the execution environment.
32
+ #
33
+ # @return [OpenAI::Models::Beta::Agents::AutomationEnvironment::None, OpenAI::Models::Beta::Agents::AutomationEnvironment::OpenAIHosted, OpenAI::Models::Beta::Agents::AutomationEnvironment::SelfHosted]
34
+ required :environment, union: -> { OpenAI::Beta::Agents::AutomationEnvironment }
35
+
36
+ # @!attribute input
37
+ # Initial input delivered to each new session.
38
+ #
39
+ # @return [Array<OpenAI::Models::Beta::Agents::AutomationTarget::NewSession::Input>]
40
+ required(
41
+ :input,
42
+ -> { OpenAI::Internal::Type::ArrayOf[OpenAI::Beta::Agents::AutomationTarget::NewSession::Input] }
43
+ )
44
+
45
+ # @!attribute metadata
46
+ # Metadata attached to each new session.
47
+ #
48
+ # @return [Hash{Symbol=>String}]
49
+ required :metadata, OpenAI::Internal::Type::HashOf[String]
50
+
51
+ # @!attribute type
52
+ # The type of the object. Always `new_session`.
53
+ #
54
+ # @return [Symbol, :new_session]
55
+ required :type, const: :new_session
56
+
57
+ # @!attribute vault_ids
58
+ # Vaults made available to each new session.
59
+ #
60
+ # @return [Array<String>]
61
+ required :vault_ids, OpenAI::Internal::Type::ArrayOf[String]
62
+
63
+ # @!method initialize(agent:, agent_id:, environment:, input:, metadata:, vault_ids:, type: :new_session)
64
+ # @param agent [OpenAI::Models::Beta::Agents::AutomationAgentConfig, nil]
65
+ # The inline agent configuration, or null when agent_id is configured.
66
+ #
67
+ # @param agent_id [String, nil]
68
+ # The saved agent reference, or null when an inline agent is configured.
69
+ #
70
+ # @param environment [OpenAI::Models::Beta::Agents::AutomationEnvironment::None, OpenAI::Models::Beta::Agents::AutomationEnvironment::OpenAIHosted, OpenAI::Models::Beta::Agents::AutomationEnvironment::SelfHosted]
71
+ # Configuration or references used to select the execution environment.
72
+ #
73
+ # @param input [Array<OpenAI::Models::Beta::Agents::AutomationTarget::NewSession::Input>]
74
+ # Initial input delivered to each new session.
75
+ #
76
+ # @param metadata [Hash{Symbol=>String}]
77
+ # Metadata attached to each new session.
78
+ #
79
+ # @param vault_ids [Array<String>]
80
+ # Vaults made available to each new session.
81
+ #
82
+ # @param type [Symbol, :new_session]
83
+ # The type of the object. Always `new_session`.
84
+ class Input < OpenAI::Internal::Type::BaseModel
85
+ # @!attribute content
86
+ # The content of the message.
87
+ #
88
+ # @return [Array<OpenAI::Models::Beta::InputContent::InputText, OpenAI::Models::Beta::InputContent::InputImage>]
89
+ required :content, -> { OpenAI::Internal::Type::ArrayOf[union: OpenAI::Beta::InputContent] }
90
+
91
+ # @!attribute role
92
+ # The role of the message author. Always `user`.
93
+ #
94
+ # @return [Symbol, :user]
95
+ required :role, const: :user
96
+
97
+ # @!attribute type
98
+ # The type of the input item. Always `message`.
99
+ #
100
+ # @return [Symbol, :message]
101
+ required :type, const: :message
102
+
103
+ # @!method initialize(content:, role: :user, type: :message)
104
+ # A user message recorded in a session.
105
+ #
106
+ # @param content [Array<OpenAI::Models::Beta::InputContent::InputText, OpenAI::Models::Beta::InputContent::InputImage>]
107
+ # The content of the message.
108
+ #
109
+ # @param role [Symbol, :user]
110
+ # The role of the message author. Always `user`.
111
+ #
112
+ # @param type [Symbol, :message]
113
+ # The type of the input item. Always `message`.
114
+ end
115
+ end
116
+
117
+ class ExistingSession < OpenAI::Internal::Type::BaseModel
118
+ # @!attribute instructions
119
+ # Saved instructions delivered as an automation notification.
120
+ #
121
+ # @return [String]
122
+ required :instructions, String
123
+
124
+ # @!attribute session_id
125
+ # The session receiving each invocation.
126
+ #
127
+ # @return [String]
128
+ required :session_id, String
129
+
130
+ # @!attribute type
131
+ # The type of the object. Always `existing_session`.
132
+ #
133
+ # @return [Symbol, :existing_session]
134
+ required :type, const: :existing_session
135
+
136
+ # @!method initialize(instructions:, session_id:, type: :existing_session)
137
+ # @param instructions [String]
138
+ # Saved instructions delivered as an automation notification.
139
+ #
140
+ # @param session_id [String]
141
+ # The session receiving each invocation.
142
+ #
143
+ # @param type [Symbol, :existing_session]
144
+ # The type of the object. Always `existing_session`.
145
+ end
146
+
147
+ # @!method self.variants
148
+ # @return [Array(OpenAI::Models::Beta::Agents::AutomationTarget::NewSession, OpenAI::Models::Beta::Agents::AutomationTarget::ExistingSession)]
149
+ end
150
+ end
151
+ end
152
+ end
153
+ end
@@ -0,0 +1,312 @@
1
+ # frozen_string_literal: true
2
+
3
+ module OpenAI
4
+ module Models
5
+ module Beta
6
+ module Agents
7
+ # The session an automation invocation targets.
8
+ module AutomationTargetParam
9
+ extend OpenAI::Internal::Type::Union
10
+
11
+ discriminator :type
12
+
13
+ # Create a session for each invocation.
14
+ variant :new_session, -> { OpenAI::Beta::Agents::AutomationTargetParam::NewSession }
15
+
16
+ # Deliver instructions to an existing session.
17
+ variant :existing_session, -> { OpenAI::Beta::Agents::AutomationTargetParam::ExistingSession }
18
+
19
+ class NewSession < OpenAI::Internal::Type::BaseModel
20
+ # @!attribute environment
21
+ # The execution environment for each new session.
22
+ #
23
+ # @return [OpenAI::Models::Beta::EnvironmentParam::None, OpenAI::Models::Beta::EnvironmentParam::OpenAIHosted, OpenAI::Models::Beta::EnvironmentParam::SelfHosted]
24
+ required :environment, union: -> { OpenAI::Beta::EnvironmentParam }
25
+
26
+ # @!attribute input
27
+ # Initial user messages submitted with each new session.
28
+ #
29
+ # @return [Array<OpenAI::Models::Beta::AgentSessionInputMessageParam>]
30
+ required :input, -> { OpenAI::Internal::Type::ArrayOf[OpenAI::Beta::AgentSessionInputMessageParam] }
31
+
32
+ # @!attribute type
33
+ # The type of the object. Always `new_session`.
34
+ #
35
+ # @return [Symbol, :new_session]
36
+ required :type, const: :new_session
37
+
38
+ # @!attribute agent
39
+ # Inline agent configuration. Provide exactly one of agent and agent_id.
40
+ #
41
+ # @return [OpenAI::Models::Beta::Agents::AutomationTargetParam::NewSession::Agent, nil]
42
+ optional :agent, -> { OpenAI::Beta::Agents::AutomationTargetParam::NewSession::Agent }
43
+
44
+ # @!attribute agent_id
45
+ # A saved agent ID. Provide exactly one of agent and agent_id.
46
+ #
47
+ # @return [String, nil]
48
+ optional :agent_id, String
49
+
50
+ # @!attribute metadata
51
+ # Metadata attached to each new session.
52
+ #
53
+ # @return [Hash{Symbol=>String}, nil]
54
+ optional :metadata, OpenAI::Internal::Type::HashOf[String], nil?: true
55
+
56
+ # @!attribute vault_ids
57
+ # The IDs of vaults made available to each new session.
58
+ #
59
+ # @return [Array<String>, nil]
60
+ optional :vault_ids, OpenAI::Internal::Type::ArrayOf[String], nil?: true
61
+
62
+ # @!method initialize(environment:, input:, agent: nil, agent_id: nil, metadata: nil, vault_ids: nil, type: :new_session)
63
+ # Create a session for each invocation.
64
+ #
65
+ # @param environment [OpenAI::Models::Beta::EnvironmentParam::None, OpenAI::Models::Beta::EnvironmentParam::OpenAIHosted, OpenAI::Models::Beta::EnvironmentParam::SelfHosted]
66
+ # The execution environment for each new session.
67
+ #
68
+ # @param input [Array<OpenAI::Models::Beta::AgentSessionInputMessageParam>]
69
+ # Initial user messages submitted with each new session.
70
+ #
71
+ # @param agent [OpenAI::Models::Beta::Agents::AutomationTargetParam::NewSession::Agent]
72
+ # Inline agent configuration. Provide exactly one of agent and agent_id.
73
+ #
74
+ # @param agent_id [String]
75
+ # A saved agent ID. Provide exactly one of agent and agent_id.
76
+ #
77
+ # @param metadata [Hash{Symbol=>String}, nil]
78
+ # Metadata attached to each new session.
79
+ #
80
+ # @param vault_ids [Array<String>, nil]
81
+ # The IDs of vaults made available to each new session.
82
+ #
83
+ # @param type [Symbol, :new_session]
84
+ # The type of the object. Always `new_session`.
85
+
86
+ # @see OpenAI::Models::Beta::Agents::AutomationTargetParam::NewSession#agent
87
+ class Agent < OpenAI::Internal::Type::BaseModel
88
+ # @!attribute compaction
89
+ # Context compaction settings. Omit to keep the current settings. A supplied
90
+ # object replaces the settings; null or an empty object enables background
91
+ # compaction.
92
+ #
93
+ # @return [OpenAI::Models::Beta::Agents::AutomationTargetParam::NewSession::Agent::Compaction, nil]
94
+ optional(
95
+ :compaction,
96
+ -> { OpenAI::Beta::Agents::AutomationTargetParam::NewSession::Agent::Compaction },
97
+ nil?: true
98
+ )
99
+
100
+ # @!attribute experimental
101
+ # Experimental settings to merge by key. Omitted settings keep their current
102
+ # values.
103
+ #
104
+ # @return [OpenAI::Models::Beta::Agents::AutomationTargetParam::NewSession::Agent::Experimental, nil]
105
+ optional(
106
+ :experimental,
107
+ -> { OpenAI::Beta::Agents::AutomationTargetParam::NewSession::Agent::Experimental }
108
+ )
109
+
110
+ # @!attribute instructions
111
+ # Additional instructions appended to the agent's default base instructions. Omit
112
+ # to leave unchanged.
113
+ #
114
+ # @return [String, nil]
115
+ optional :instructions, String, nil?: true
116
+
117
+ # @!attribute model
118
+ # The model to use for the agent. The requested model name is preserved.
119
+ #
120
+ # @return [String, nil]
121
+ optional :model, String
122
+
123
+ # @!attribute multi_agent
124
+ # Configuration for creating and coordinating subagents.
125
+ #
126
+ # @return [OpenAI::Models::Beta::MultiAgentConfigParam, nil]
127
+ optional :multi_agent, -> { OpenAI::Beta::MultiAgentConfigParam }, nil?: true
128
+
129
+ # @!attribute reasoning
130
+ # Configuration for model reasoning. Omit to keep the current settings; pass
131
+ # `null` to reset to the model's default effort.
132
+ #
133
+ # @return [OpenAI::Models::Beta::AgentReasoningParam, nil]
134
+ optional :reasoning, -> { OpenAI::Beta::AgentReasoningParam }, nil?: true
135
+
136
+ # @!attribute service_tier
137
+ # The service tier used for model requests.
138
+ #
139
+ # @return [Symbol, OpenAI::Models::Beta::Agents::AutomationTargetParam::NewSession::Agent::ServiceTier, nil]
140
+ optional(
141
+ :service_tier,
142
+ enum: -> {
143
+ OpenAI::Beta::Agents::AutomationTargetParam::NewSession::Agent::ServiceTier
144
+ },
145
+ nil?: true
146
+ )
147
+
148
+ # @!attribute text
149
+ # Configuration for text generated by the agent.
150
+ #
151
+ # @return [OpenAI::Models::Beta::AgentTextParam, nil]
152
+ optional :text, -> { OpenAI::Beta::AgentTextParam }, nil?: true
153
+
154
+ # @!attribute tools
155
+ # Tools available to the agent. Omit to inherit, or pass null to clear them. The
156
+ # resolved tool list must fit within 3 MiB (3,145,728 bytes) of compact UTF-8
157
+ # JSON.
158
+ #
159
+ # @return [Array<OpenAI::Models::Beta::AgentToolParam::Function, OpenAI::Models::Beta::AgentToolParam::ToolSearch, OpenAI::Models::Beta::AgentToolParam::ProgrammaticToolCalling, OpenAI::Models::Beta::AgentToolParam::Mcp, OpenAI::Models::Beta::AgentToolParam::WebSearch, OpenAI::Models::Beta::AgentToolParam::ComputerUse, OpenAI::Models::Beta::AgentToolParam::Automations>, nil]
160
+ optional(
161
+ :tools,
162
+ -> {
163
+ OpenAI::Internal::Type::ArrayOf[union: OpenAI::Beta::AgentToolParam]
164
+ },
165
+ nil?: true
166
+ )
167
+
168
+ # @!method initialize(compaction: nil, experimental: nil, instructions: nil, model: nil, multi_agent: nil, reasoning: nil, service_tier: nil, text: nil, tools: nil)
169
+ # Inline agent configuration. Provide exactly one of agent and agent_id.
170
+ #
171
+ # @param compaction [OpenAI::Models::Beta::Agents::AutomationTargetParam::NewSession::Agent::Compaction, nil]
172
+ # Context compaction settings. Omit to keep the current settings. A supplied
173
+ # object replaces the settings; null or an empty object enables background
174
+ # compaction.
175
+ #
176
+ # @param experimental [OpenAI::Models::Beta::Agents::AutomationTargetParam::NewSession::Agent::Experimental]
177
+ # Experimental settings to merge by key. Omitted settings keep their current
178
+ # values.
179
+ #
180
+ # @param instructions [String, nil]
181
+ # Additional instructions appended to the agent's default base instructions. Omit
182
+ # to leave unchanged.
183
+ #
184
+ # @param model [String]
185
+ # The model to use for the agent. The requested model name is preserved.
186
+ #
187
+ # @param multi_agent [OpenAI::Models::Beta::MultiAgentConfigParam, nil]
188
+ # Configuration for creating and coordinating subagents.
189
+ #
190
+ # @param reasoning [OpenAI::Models::Beta::AgentReasoningParam, nil]
191
+ # Configuration for model reasoning. Omit to keep the current settings; pass
192
+ # `null` to reset to the model's default effort.
193
+ #
194
+ # @param service_tier [Symbol, OpenAI::Models::Beta::Agents::AutomationTargetParam::NewSession::Agent::ServiceTier, nil]
195
+ # The service tier used for model requests.
196
+ #
197
+ # @param text [OpenAI::Models::Beta::AgentTextParam, nil]
198
+ # Configuration for text generated by the agent.
199
+ #
200
+ # @param tools [Array<OpenAI::Models::Beta::AgentToolParam::Function, OpenAI::Models::Beta::AgentToolParam::ToolSearch, OpenAI::Models::Beta::AgentToolParam::ProgrammaticToolCalling, OpenAI::Models::Beta::AgentToolParam::Mcp, OpenAI::Models::Beta::AgentToolParam::WebSearch, OpenAI::Models::Beta::AgentToolParam::ComputerUse, OpenAI::Models::Beta::AgentToolParam::Automations>, nil]
201
+ # Tools available to the agent. Omit to inherit, or pass null to clear them. The
202
+ # resolved tool list must fit within 3 MiB (3,145,728 bytes) of compact UTF-8
203
+ # JSON.
204
+
205
+ # @see OpenAI::Models::Beta::Agents::AutomationTargetParam::NewSession::Agent#compaction
206
+ class Compaction < OpenAI::Internal::Type::BaseModel
207
+ # @!attribute async
208
+ # Whether to compact context in the background. Omission or null defaults to true.
209
+ # Set to false to use blocking compaction. Background compaction may increase
210
+ # token usage.
211
+ #
212
+ # @return [Boolean, nil]
213
+ optional :async, OpenAI::Internal::Type::Boolean, nil?: true
214
+
215
+ # @!method initialize(async: nil)
216
+ # Context compaction settings. Omit to keep the current settings. A supplied
217
+ # object replaces the settings; null or an empty object enables background
218
+ # compaction.
219
+ #
220
+ # @param async [Boolean, nil]
221
+ # Whether to compact context in the background. Omission or null defaults to true.
222
+ # Set to false to use blocking compaction. Background compaction may increase
223
+ # token usage.
224
+ end
225
+
226
+ # @see OpenAI::Models::Beta::Agents::AutomationTargetParam::NewSession::Agent#experimental
227
+ class Experimental < OpenAI::Internal::Type::BaseModel
228
+ # @!attribute time_awareness
229
+ # Whether to give the model periodic current-time reminders. Omit to keep the
230
+ # current setting.
231
+ #
232
+ # @return [Boolean, nil]
233
+ optional :time_awareness, OpenAI::Internal::Type::Boolean
234
+
235
+ # @!method initialize(time_awareness: nil)
236
+ # Experimental settings to merge by key. Omitted settings keep their current
237
+ # values.
238
+ #
239
+ # @param time_awareness [Boolean]
240
+ # Whether to give the model periodic current-time reminders. Omit to keep the
241
+ # current setting.
242
+ end
243
+
244
+ # The service tier used for model requests.
245
+ #
246
+ # @see OpenAI::Models::Beta::Agents::AutomationTargetParam::NewSession::Agent#service_tier
247
+ module ServiceTier
248
+ extend OpenAI::Internal::Type::Enum
249
+
250
+ # Selects the service tier automatically.
251
+ AUTO = :auto
252
+
253
+ # Uses the default service tier.
254
+ DEFAULT = :default
255
+
256
+ # Uses the flex service tier.
257
+ FLEX = :flex
258
+
259
+ # Uses the priority service tier.
260
+ PRIORITY = :priority
261
+
262
+ # Uses the fast service tier.
263
+ FAST = :fast
264
+
265
+ # Uses the ultrafast service tier.
266
+ ULTRAFAST = :ultrafast
267
+
268
+ # @!method self.values
269
+ # @return [Array<Symbol>]
270
+ end
271
+ end
272
+ end
273
+
274
+ class ExistingSession < OpenAI::Internal::Type::BaseModel
275
+ # @!attribute instructions
276
+ # Instructions delivered as an automation notification.
277
+ #
278
+ # @return [String]
279
+ required :instructions, String
280
+
281
+ # @!attribute session_id
282
+ # The session receiving each invocation.
283
+ #
284
+ # @return [String]
285
+ required :session_id, String
286
+
287
+ # @!attribute type
288
+ # The type of the object. Always `existing_session`.
289
+ #
290
+ # @return [Symbol, :existing_session]
291
+ required :type, const: :existing_session
292
+
293
+ # @!method initialize(instructions:, session_id:, type: :existing_session)
294
+ # Deliver instructions to an existing session.
295
+ #
296
+ # @param instructions [String]
297
+ # Instructions delivered as an automation notification.
298
+ #
299
+ # @param session_id [String]
300
+ # The session receiving each invocation.
301
+ #
302
+ # @param type [Symbol, :existing_session]
303
+ # The type of the object. Always `existing_session`.
304
+ end
305
+
306
+ # @!method self.variants
307
+ # @return [Array(OpenAI::Models::Beta::Agents::AutomationTargetParam::NewSession, OpenAI::Models::Beta::Agents::AutomationTargetParam::ExistingSession)]
308
+ end
309
+ end
310
+ end
311
+ end
312
+ end
@@ -0,0 +1,79 @@
1
+ # frozen_string_literal: true
2
+
3
+ module OpenAI
4
+ module Models
5
+ module Beta
6
+ module Agents
7
+ # @see OpenAI::Resources::Beta::Agents::Automations#update
8
+ class AutomationUpdateParams < OpenAI::Internal::Type::BaseModel
9
+ extend OpenAI::Internal::Type::RequestParameters::Converter
10
+ include OpenAI::Internal::Type::RequestParameters
11
+
12
+ # @!attribute automation_id
13
+ #
14
+ # @return [String]
15
+ required :automation_id, String
16
+
17
+ # @!attribute expression
18
+ # Only accepted for periodic automations.
19
+ #
20
+ # @return [String, nil]
21
+ optional :expression, String
22
+
23
+ # @!attribute metadata
24
+ # Replaces all metadata; omit to leave unchanged.
25
+ #
26
+ # @return [Hash{Symbol=>String}, nil]
27
+ optional :metadata, OpenAI::Internal::Type::HashOf[String]
28
+
29
+ # @!attribute name
30
+ #
31
+ # @return [String, nil]
32
+ optional :name, String
33
+
34
+ # @!attribute run_at
35
+ # A future Unix timestamp in seconds; accepted only before a one-time scheduled
36
+ # invocation exists.
37
+ #
38
+ # @return [Integer, nil]
39
+ optional :run_at, Integer
40
+
41
+ # @!attribute target
42
+ # Replaces the complete target, retaining its type and any creator session.
43
+ #
44
+ # @return [OpenAI::Models::Beta::Agents::AutomationTargetParam::NewSession, OpenAI::Models::Beta::Agents::AutomationTargetParam::ExistingSession, nil]
45
+ optional :target, union: -> { OpenAI::Beta::Agents::AutomationTargetParam }
46
+
47
+ # @!attribute timezone
48
+ # Only accepted for periodic automations.
49
+ #
50
+ # @return [String, nil]
51
+ optional :timezone, String
52
+
53
+ # @!method initialize(automation_id:, expression: nil, metadata: nil, name: nil, run_at: nil, target: nil, timezone: nil, request_options: {})
54
+ # @param automation_id [String]
55
+ #
56
+ # @param expression [String]
57
+ # Only accepted for periodic automations.
58
+ #
59
+ # @param metadata [Hash{Symbol=>String}]
60
+ # Replaces all metadata; omit to leave unchanged.
61
+ #
62
+ # @param name [String]
63
+ #
64
+ # @param run_at [Integer]
65
+ # A future Unix timestamp in seconds; accepted only before a one-time scheduled
66
+ # invocation exists.
67
+ #
68
+ # @param target [OpenAI::Models::Beta::Agents::AutomationTargetParam::NewSession, OpenAI::Models::Beta::Agents::AutomationTargetParam::ExistingSession]
69
+ # Replaces the complete target, retaining its type and any creator session.
70
+ #
71
+ # @param timezone [String]
72
+ # Only accepted for periodic automations.
73
+ #
74
+ # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}]
75
+ end
76
+ end
77
+ end
78
+ end
79
+ end