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
@@ -7,6 +7,9 @@ module OpenAI
7
7
 
8
8
  class Agents
9
9
 
10
+ sig { returns(OpenAI::Resources::Beta::Agents::Automations) }
11
+ attr_reader :automations
12
+
10
13
  sig { returns(OpenAI::Resources::Beta::Agents::Environments) }
11
14
  attr_reader :environments
12
15
 
@@ -31,10 +31,7 @@ module OpenAI
31
31
  attr_accessor session_id: String
32
32
 
33
33
  # Present as `incomplete` when summary generation was interrupted.
34
- attr_reader status: :incomplete
35
-
36
- # Present as `incomplete` when summary generation was interrupted.
37
- def status=: (:incomplete?) -> :incomplete?
34
+ attr_accessor status: :incomplete?
38
35
 
39
36
  # The index of the summary part.
40
37
  attr_accessor summary_index: Integer
@@ -0,0 +1,17 @@
1
+ module OpenAI
2
+ module Models
3
+ module Beta
4
+ module Agents
5
+ type automation =
6
+ OpenAI::Beta::Agents::PeriodicAutomation
7
+ | OpenAI::Beta::Agents::OneTimeAutomation
8
+
9
+ module Automation
10
+ extend OpenAI::Internal::Type::Union
11
+
12
+ def self?.variants: -> ::Array[OpenAI::Models::Beta::Agents::automation]
13
+ end
14
+ end
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,143 @@
1
+ module OpenAI
2
+ module Models
3
+ module Beta
4
+ module Agents
5
+ type automation_agent_config =
6
+ {
7
+ instructions: String?,
8
+ model: String,
9
+ multi_agent: OpenAI::Beta::MultiAgentConfig,
10
+ reasoning: OpenAI::Beta::AgentReasoning,
11
+ service_tier: OpenAI::Models::Beta::Agents::AutomationAgentConfig::service_tier,
12
+ text: OpenAI::Beta::AgentText,
13
+ tools: ::Array[OpenAI::Models::Beta::agent_tool],
14
+ ?compaction: OpenAI::Beta::Agents::AutomationAgentConfig::Compaction,
15
+ ?experimental: OpenAI::Beta::Agents::AutomationAgentConfig::Experimental
16
+ }
17
+
18
+ class AutomationAgentConfig < OpenAI::Internal::Type::BaseModel
19
+ # Custom instructions, or null when absent.
20
+ attr_accessor instructions: String?
21
+
22
+ # The requested model name.
23
+ attr_accessor model: String
24
+
25
+ # The configuration for creating and coordinating subagents.
26
+ attr_accessor multi_agent: OpenAI::Beta::MultiAgentConfig
27
+
28
+ # The configured reasoning policy.
29
+ attr_accessor reasoning: OpenAI::Beta::AgentReasoning
30
+
31
+ # The configured service-tier policy.
32
+ attr_accessor service_tier: OpenAI::Models::Beta::Agents::AutomationAgentConfig::service_tier
33
+
34
+ # The configured output format and verbosity.
35
+ attr_accessor text: OpenAI::Beta::AgentText
36
+
37
+ # Configured tools, excluding confidential credentials.
38
+ attr_accessor tools: ::Array[OpenAI::Models::Beta::agent_tool]
39
+
40
+ # The effective context compaction settings.
41
+ attr_reader compaction: OpenAI::Beta::Agents::AutomationAgentConfig::Compaction?
42
+
43
+ # The effective context compaction settings.
44
+ def compaction=: (
45
+ OpenAI::Beta::Agents::AutomationAgentConfig::Compaction
46
+ ) -> OpenAI::Beta::Agents::AutomationAgentConfig::Compaction
47
+
48
+ # The effective experimental settings for the agent.
49
+ attr_reader experimental: OpenAI::Beta::Agents::AutomationAgentConfig::Experimental?
50
+
51
+ # The effective experimental settings for the agent.
52
+ def experimental=: (
53
+ OpenAI::Beta::Agents::AutomationAgentConfig::Experimental
54
+ ) -> OpenAI::Beta::Agents::AutomationAgentConfig::Experimental
55
+
56
+ # @param instructions
57
+ # Custom instructions, or null when absent.
58
+ # @param model
59
+ # The requested model name.
60
+ # @param multi_agent
61
+ # The configuration for creating and coordinating subagents.
62
+ # @param reasoning
63
+ # The configured reasoning policy.
64
+ # @param service_tier
65
+ # The configured service-tier policy.
66
+ # @param text
67
+ # The configured output format and verbosity.
68
+ # @param tools
69
+ # Configured tools, excluding confidential credentials.
70
+ # @param compaction
71
+ # The effective context compaction settings.
72
+ # @param experimental
73
+ # The effective experimental settings for the agent.
74
+ def initialize: (
75
+ instructions: String?,
76
+ model: String,
77
+ multi_agent: OpenAI::Beta::MultiAgentConfig,
78
+ reasoning: OpenAI::Beta::AgentReasoning,
79
+ service_tier: OpenAI::Models::Beta::Agents::AutomationAgentConfig::service_tier,
80
+ text: OpenAI::Beta::AgentText,
81
+ tools: ::Array[OpenAI::Models::Beta::agent_tool],
82
+ ?compaction: OpenAI::Beta::Agents::AutomationAgentConfig::Compaction,
83
+ ?experimental: OpenAI::Beta::Agents::AutomationAgentConfig::Experimental
84
+ ) -> void
85
+
86
+ def to_hash: -> {
87
+ instructions: String?,
88
+ model: String,
89
+ multi_agent: OpenAI::Beta::MultiAgentConfig,
90
+ reasoning: OpenAI::Beta::AgentReasoning,
91
+ service_tier: OpenAI::Models::Beta::Agents::AutomationAgentConfig::service_tier,
92
+ text: OpenAI::Beta::AgentText,
93
+ tools: ::Array[OpenAI::Models::Beta::agent_tool],
94
+ ?compaction: OpenAI::Beta::Agents::AutomationAgentConfig::Compaction,
95
+ ?experimental: OpenAI::Beta::Agents::AutomationAgentConfig::Experimental
96
+ }
97
+
98
+ type service_tier =
99
+ :auto | :default | :flex | :priority | :fast | :ultrafast
100
+
101
+ module ServiceTier
102
+ extend OpenAI::Internal::Type::Enum
103
+
104
+ AUTO: :auto
105
+ DEFAULT: :default
106
+ FLEX: :flex
107
+ PRIORITY: :priority
108
+ FAST: :fast
109
+ ULTRAFAST: :ultrafast
110
+
111
+ def self?.values: -> ::Array[OpenAI::Models::Beta::Agents::AutomationAgentConfig::service_tier]
112
+ end
113
+
114
+ type compaction = { async: bool }
115
+
116
+ class Compaction < OpenAI::Internal::Type::BaseModel
117
+ # Whether context is compacted in the background. Defaults to true.
118
+ attr_accessor async: bool
119
+
120
+ # @param async
121
+ # Whether context is compacted in the background. Defaults to true.
122
+ def initialize: (async: bool) -> void
123
+
124
+ def to_hash: -> { async: bool }
125
+ end
126
+
127
+ type experimental = { time_awareness: bool }
128
+
129
+ class Experimental < OpenAI::Internal::Type::BaseModel
130
+ # Whether the model receives periodic current-time reminders.
131
+ attr_accessor time_awareness: bool
132
+
133
+ # @param time_awareness
134
+ # Whether the model receives periodic current-time reminders.
135
+ def initialize: (time_awareness: bool) -> void
136
+
137
+ def to_hash: -> { time_awareness: bool }
138
+ end
139
+ end
140
+ end
141
+ end
142
+ end
143
+ end
@@ -0,0 +1,33 @@
1
+ module OpenAI
2
+ module Models
3
+ module Beta
4
+ module Agents
5
+ type automation_create_params =
6
+ {
7
+ create_automation_params: OpenAI::Models::Beta::Agents::automation_schedule_param,
8
+ ?request_options: OpenAI::request_opts
9
+ }
10
+
11
+ class AutomationCreateParams < OpenAI::Internal::Type::BaseModel
12
+ extend OpenAI::Internal::Type::RequestParameters::Converter
13
+ include OpenAI::Internal::Type::RequestParameters
14
+
15
+ # Creates an automation without invoking it immediately.
16
+ attr_accessor create_automation_params: OpenAI::Models::Beta::Agents::automation_schedule_param
17
+
18
+ # @param create_automation_params
19
+ # Creates an automation without invoking it immediately.
20
+ def initialize: (
21
+ create_automation_params: OpenAI::Models::Beta::Agents::automation_schedule_param,
22
+ ?request_options: OpenAI::request_opts
23
+ ) -> void
24
+
25
+ def to_hash: -> {
26
+ create_automation_params: OpenAI::Models::Beta::Agents::automation_schedule_param,
27
+ ?request_options: OpenAI::RequestOptions
28
+ }
29
+ end
30
+ end
31
+ end
32
+ end
33
+ end
@@ -0,0 +1,62 @@
1
+ module OpenAI
2
+ module Models
3
+ module Beta
4
+ module Agents
5
+ type automation_created_by =
6
+ OpenAI::Beta::Agents::AutomationCreatedBy::Developer
7
+ | OpenAI::Beta::Agents::AutomationCreatedBy::Agent
8
+
9
+ module AutomationCreatedBy
10
+ extend OpenAI::Internal::Type::Union
11
+
12
+ type developer = { ?type: :developer }
13
+
14
+ class Developer < OpenAI::Internal::Type::BaseModel
15
+ # The type of the object. Always `developer`.
16
+ attr_accessor type: :developer
17
+
18
+ # @param type
19
+ # The type of the object. Always `developer`.
20
+ def initialize: (?type: :developer) -> void
21
+
22
+ def to_hash: -> { ?type: :developer }
23
+ end
24
+
25
+ type agent =
26
+ { session_id: String, tool_call_id: String, ?type: :agent }
27
+
28
+ class Agent < OpenAI::Internal::Type::BaseModel
29
+ # The creator session, which is also the automation's target.
30
+ attr_accessor session_id: String
31
+
32
+ # The tool call that created the automation.
33
+ attr_accessor tool_call_id: String
34
+
35
+ # The type of the object. Always `agent`.
36
+ attr_accessor type: :agent
37
+
38
+ # @param session_id
39
+ # The creator session, which is also the automation's target.
40
+ # @param tool_call_id
41
+ # The tool call that created the automation.
42
+ # @param type
43
+ # The type of the object. Always `agent`.
44
+ def initialize: (
45
+ session_id: String,
46
+ tool_call_id: String,
47
+ ?type: :agent
48
+ ) -> void
49
+
50
+ def to_hash: -> {
51
+ session_id: String,
52
+ tool_call_id: String,
53
+ ?type: :agent
54
+ }
55
+ end
56
+
57
+ def self?.variants: -> ::Array[OpenAI::Models::Beta::Agents::automation_created_by]
58
+ end
59
+ end
60
+ end
61
+ end
62
+ end
@@ -0,0 +1,27 @@
1
+ module OpenAI
2
+ module Models
3
+ module Beta
4
+ module Agents
5
+ type automation_delete_params =
6
+ { automation_id: String, ?request_options: OpenAI::request_opts }
7
+
8
+ class AutomationDeleteParams < OpenAI::Internal::Type::BaseModel
9
+ extend OpenAI::Internal::Type::RequestParameters::Converter
10
+ include OpenAI::Internal::Type::RequestParameters
11
+
12
+ attr_accessor automation_id: String
13
+
14
+ def initialize: (
15
+ automation_id: String,
16
+ ?request_options: OpenAI::request_opts
17
+ ) -> void
18
+
19
+ def to_hash: -> {
20
+ automation_id: String,
21
+ ?request_options: OpenAI::RequestOptions
22
+ }
23
+ end
24
+ end
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,39 @@
1
+ module OpenAI
2
+ module Models
3
+ module Beta
4
+ module Agents
5
+ type automation_deleted =
6
+ { id: String, deleted: bool, ?object: :"agent.automation.deleted" }
7
+
8
+ class AutomationDeleted < OpenAI::Internal::Type::BaseModel
9
+ # The deleted automation ID.
10
+ attr_accessor id: String
11
+
12
+ # Always true.
13
+ attr_accessor deleted: bool
14
+
15
+ # Always `agent.automation.deleted`.
16
+ attr_accessor object: :"agent.automation.deleted"
17
+
18
+ # @param id
19
+ # The deleted automation ID.
20
+ # @param deleted
21
+ # Always true.
22
+ # @param object
23
+ # Always `agent.automation.deleted`.
24
+ def initialize: (
25
+ id: String,
26
+ deleted: bool,
27
+ ?object: :"agent.automation.deleted"
28
+ ) -> void
29
+
30
+ def to_hash: -> {
31
+ id: String,
32
+ deleted: bool,
33
+ ?object: :"agent.automation.deleted"
34
+ }
35
+ end
36
+ end
37
+ end
38
+ end
39
+ end