Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 80
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-f763c1a35c8b9b02f1e31b9b2e09e21f98bfe8413e5079c86cbb07da2dd7779b.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-f3bce04386c4fcfd5037e0477fbaa39010003fd1558eb5185fe4a71dd6a05fdd.yml
8 changes: 7 additions & 1 deletion lib/openai.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
require_relative "openai/models/reasoning_effort"
require_relative "openai/models/chat/chat_completion_message"
require_relative "openai/models/fine_tuning/fine_tuning_job_wandb_integration_object"
require_relative "openai/models/responses/response_function_tool_call"
require_relative "openai/models/audio/speech_create_params"
require_relative "openai/models/audio/speech_model"
require_relative "openai/models/audio/transcription"
Expand Down Expand Up @@ -259,6 +260,8 @@
require_relative "openai/models/responses/response_code_interpreter_tool_call"
require_relative "openai/models/responses/response_completed_event"
require_relative "openai/models/responses/response_computer_tool_call"
require_relative "openai/models/responses/response_computer_tool_call_output_item"
require_relative "openai/models/responses/response_computer_tool_call_output_screenshot"
require_relative "openai/models/responses/response_content"
require_relative "openai/models/responses/response_content_part_added_event"
require_relative "openai/models/responses/response_content_part_done_event"
Expand All @@ -276,7 +279,8 @@
require_relative "openai/models/responses/response_format_text_json_schema_config"
require_relative "openai/models/responses/response_function_call_arguments_delta_event"
require_relative "openai/models/responses/response_function_call_arguments_done_event"
require_relative "openai/models/responses/response_function_tool_call"
require_relative "openai/models/responses/response_function_tool_call_item"
require_relative "openai/models/responses/response_function_tool_call_output_item"
require_relative "openai/models/responses/response_function_web_search"
require_relative "openai/models/responses/response_includable"
require_relative "openai/models/responses/response_incomplete_event"
Expand All @@ -288,7 +292,9 @@
require_relative "openai/models/responses/response_input_image"
require_relative "openai/models/responses/response_input_item"
require_relative "openai/models/responses/response_input_message_content_list"
require_relative "openai/models/responses/response_input_message_item"
require_relative "openai/models/responses/response_input_text"
require_relative "openai/models/responses/response_item"
require_relative "openai/models/responses/response_item_list"
require_relative "openai/models/responses/response_output_audio"
require_relative "openai/models/responses/response_output_item"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
# frozen_string_literal: true

module OpenAI
module Models
module Responses
class ResponseComputerToolCallOutputItem < OpenAI::BaseModel
# @!attribute id
# The unique ID of the computer call tool output.
#
# @return [String]
required :id, String

# @!attribute call_id
# The ID of the computer tool call that produced the output.
#
# @return [String]
required :call_id, String

# @!attribute output
# A computer screenshot image used with the computer use tool.
#
# @return [OpenAI::Models::Responses::ResponseComputerToolCallOutputScreenshot]
required :output, -> { OpenAI::Models::Responses::ResponseComputerToolCallOutputScreenshot }

# @!attribute type
# The type of the computer tool call output. Always `computer_call_output`.
#
# @return [Symbol, :computer_call_output]
required :type, const: :computer_call_output

# @!attribute [r] acknowledged_safety_checks
# The safety checks reported by the API that have been acknowledged by the
# developer.
#
# @return [Array<OpenAI::Models::Responses::ResponseComputerToolCallOutputItem::AcknowledgedSafetyCheck>, nil]
optional :acknowledged_safety_checks,
-> { OpenAI::ArrayOf[OpenAI::Models::Responses::ResponseComputerToolCallOutputItem::AcknowledgedSafetyCheck] }

# @!parse
# # @return [Array<OpenAI::Models::Responses::ResponseComputerToolCallOutputItem::AcknowledgedSafetyCheck>]
# attr_writer :acknowledged_safety_checks

# @!attribute [r] status
# The status of the message input. One of `in_progress`, `completed`, or
# `incomplete`. Populated when input items are returned via API.
#
# @return [Symbol, OpenAI::Models::Responses::ResponseComputerToolCallOutputItem::Status, nil]
optional :status, enum: -> { OpenAI::Models::Responses::ResponseComputerToolCallOutputItem::Status }

# @!parse
# # @return [Symbol, OpenAI::Models::Responses::ResponseComputerToolCallOutputItem::Status]
# attr_writer :status

# @!parse
# # @param id [String]
# # @param call_id [String]
# # @param output [OpenAI::Models::Responses::ResponseComputerToolCallOutputScreenshot]
# # @param acknowledged_safety_checks [Array<OpenAI::Models::Responses::ResponseComputerToolCallOutputItem::AcknowledgedSafetyCheck>]
# # @param status [Symbol, OpenAI::Models::Responses::ResponseComputerToolCallOutputItem::Status]
# # @param type [Symbol, :computer_call_output]
# #
# def initialize(id:, call_id:, output:, acknowledged_safety_checks: nil, status: nil, type: :computer_call_output, **) = super

# def initialize: (Hash | OpenAI::BaseModel) -> void

class AcknowledgedSafetyCheck < OpenAI::BaseModel
# @!attribute id
# The ID of the pending safety check.
#
# @return [String]
required :id, String

# @!attribute code
# The type of the pending safety check.
#
# @return [String]
required :code, String

# @!attribute message
# Details about the pending safety check.
#
# @return [String]
required :message, String

# @!parse
# # A pending safety check for the computer call.
# #
# # @param id [String]
# # @param code [String]
# # @param message [String]
# #
# def initialize(id:, code:, message:, **) = super

# def initialize: (Hash | OpenAI::BaseModel) -> void
end

# @abstract
#
# The status of the message input. One of `in_progress`, `completed`, or
# `incomplete`. Populated when input items are returned via API.
class Status < OpenAI::Enum
IN_PROGRESS = :in_progress
COMPLETED = :completed
INCOMPLETE = :incomplete

finalize!
end
end
end
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# frozen_string_literal: true

module OpenAI
module Models
module Responses
class ResponseComputerToolCallOutputScreenshot < OpenAI::BaseModel
# @!attribute type
# Specifies the event type. For a computer screenshot, this property is always set
# to `computer_screenshot`.
#
# @return [Symbol, :computer_screenshot]
required :type, const: :computer_screenshot

# @!attribute [r] file_id
# The identifier of an uploaded file that contains the screenshot.
#
# @return [String, nil]
optional :file_id, String

# @!parse
# # @return [String]
# attr_writer :file_id

# @!attribute [r] image_url
# The URL of the screenshot image.
#
# @return [String, nil]
optional :image_url, String

# @!parse
# # @return [String]
# attr_writer :image_url

# @!parse
# # A computer screenshot image used with the computer use tool.
# #
# # @param file_id [String]
# # @param image_url [String]
# # @param type [Symbol, :computer_screenshot]
# #
# def initialize(file_id: nil, image_url: nil, type: :computer_screenshot, **) = super

# def initialize: (Hash | OpenAI::BaseModel) -> void
end
end
end
end
26 changes: 26 additions & 0 deletions lib/openai/models/responses/response_function_tool_call_item.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# frozen_string_literal: true

module OpenAI
module Models
module Responses
class ResponseFunctionToolCallItem < OpenAI::Models::Responses::ResponseFunctionToolCall
# @!attribute id
# The unique ID of the function call tool output.
#
# @return [String]
required :id, String

# @!parse
# # A tool call to run a function. See the
# # [function calling guide](https://platform.openai.com/docs/guides/function-calling)
# # for more information.
# #
# # @param id [String]
# #
# def initialize(id:, **) = super

# def initialize: (Hash | OpenAI::BaseModel) -> void
end
end
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# frozen_string_literal: true

module OpenAI
module Models
module Responses
class ResponseFunctionToolCallOutputItem < OpenAI::BaseModel
# @!attribute id
# The unique ID of the function call tool output.
#
# @return [String]
required :id, String

# @!attribute call_id
# The unique ID of the function tool call generated by the model.
#
# @return [String]
required :call_id, String

# @!attribute output
# A JSON string of the output of the function tool call.
#
# @return [String]
required :output, String

# @!attribute type
# The type of the function tool call output. Always `function_call_output`.
#
# @return [Symbol, :function_call_output]
required :type, const: :function_call_output

# @!attribute [r] status
# The status of the item. One of `in_progress`, `completed`, or `incomplete`.
# Populated when items are returned via API.
#
# @return [Symbol, OpenAI::Models::Responses::ResponseFunctionToolCallOutputItem::Status, nil]
optional :status, enum: -> { OpenAI::Models::Responses::ResponseFunctionToolCallOutputItem::Status }

# @!parse
# # @return [Symbol, OpenAI::Models::Responses::ResponseFunctionToolCallOutputItem::Status]
# attr_writer :status

# @!parse
# # @param id [String]
# # @param call_id [String]
# # @param output [String]
# # @param status [Symbol, OpenAI::Models::Responses::ResponseFunctionToolCallOutputItem::Status]
# # @param type [Symbol, :function_call_output]
# #
# def initialize(id:, call_id:, output:, status: nil, type: :function_call_output, **) = super

# def initialize: (Hash | OpenAI::BaseModel) -> void

# @abstract
#
# The status of the item. One of `in_progress`, `completed`, or `incomplete`.
# Populated when items are returned via API.
class Status < OpenAI::Enum
IN_PROGRESS = :in_progress
COMPLETED = :completed
INCOMPLETE = :incomplete

finalize!
end
end
end
end
end
46 changes: 3 additions & 43 deletions lib/openai/models/responses/response_input_item.rb
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,8 @@ class ComputerCallOutput < OpenAI::BaseModel
# @!attribute output
# A computer screenshot image used with the computer use tool.
#
# @return [OpenAI::Models::Responses::ResponseInputItem::ComputerCallOutput::Output]
required :output, -> { OpenAI::Models::Responses::ResponseInputItem::ComputerCallOutput::Output }
# @return [OpenAI::Models::Responses::ResponseComputerToolCallOutputScreenshot]
required :output, -> { OpenAI::Models::Responses::ResponseComputerToolCallOutputScreenshot }

# @!attribute type
# The type of the computer tool call output. Always `computer_call_output`.
Expand Down Expand Up @@ -195,7 +195,7 @@ class ComputerCallOutput < OpenAI::BaseModel
# # The output of a computer tool call.
# #
# # @param call_id [String]
# # @param output [OpenAI::Models::Responses::ResponseInputItem::ComputerCallOutput::Output]
# # @param output [OpenAI::Models::Responses::ResponseComputerToolCallOutputScreenshot]
# # @param id [String]
# # @param acknowledged_safety_checks [Array<OpenAI::Models::Responses::ResponseInputItem::ComputerCallOutput::AcknowledgedSafetyCheck>]
# # @param status [Symbol, OpenAI::Models::Responses::ResponseInputItem::ComputerCallOutput::Status]
Expand All @@ -205,46 +205,6 @@ class ComputerCallOutput < OpenAI::BaseModel

# def initialize: (Hash | OpenAI::BaseModel) -> void

class Output < OpenAI::BaseModel
# @!attribute type
# Specifies the event type. For a computer screenshot, this property is always set
# to `computer_screenshot`.
#
# @return [Symbol, :computer_screenshot]
required :type, const: :computer_screenshot

# @!attribute [r] file_id
# The identifier of an uploaded file that contains the screenshot.
#
# @return [String, nil]
optional :file_id, String

# @!parse
# # @return [String]
# attr_writer :file_id

# @!attribute [r] image_url
# The URL of the screenshot image.
#
# @return [String, nil]
optional :image_url, String

# @!parse
# # @return [String]
# attr_writer :image_url

# @!parse
# # A computer screenshot image used with the computer use tool.
# #
# # @param file_id [String]
# # @param image_url [String]
# # @param type [Symbol, :computer_screenshot]
# #
# def initialize(file_id: nil, image_url: nil, type: :computer_screenshot, **) = super

# def initialize: (Hash | OpenAI::BaseModel) -> void
end

class AcknowledgedSafetyCheck < OpenAI::BaseModel
# @!attribute id
# The ID of the pending safety check.
Expand Down
Loading