Skip to content

Commit d81ec22

Browse files
chore: use multi-line formatting style for really long lines (#37)
1 parent b5f0419 commit d81ec22

File tree

101 files changed

+989
-862
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

101 files changed

+989
-862
lines changed

lib/openai/base_client.rb

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,15 @@ class BaseClient
99
MAX_REDIRECTS = 20
1010

1111
# rubocop:disable Style/MutableConstant
12-
PLATFORM_HEADERS = {
13-
"x-stainless-arch" => OpenAI::Util.arch,
14-
"x-stainless-lang" => "ruby",
15-
"x-stainless-os" => OpenAI::Util.os,
16-
"x-stainless-package-version" => OpenAI::VERSION,
17-
"x-stainless-runtime" => ::RUBY_ENGINE,
18-
"x-stainless-runtime-version" => ::RUBY_ENGINE_VERSION
19-
}
12+
PLATFORM_HEADERS =
13+
{
14+
"x-stainless-arch" => OpenAI::Util.arch,
15+
"x-stainless-lang" => "ruby",
16+
"x-stainless-os" => OpenAI::Util.os,
17+
"x-stainless-package-version" => OpenAI::VERSION,
18+
"x-stainless-runtime" => ::RUBY_ENGINE,
19+
"x-stainless-runtime-version" => ::RUBY_ENGINE_VERSION
20+
}
2021
# rubocop:enable Style/MutableConstant
2122

2223
class << self

lib/openai/base_page.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ module OpenAI
1717
#
1818
# @example
1919
# ```ruby
20-
# completions = page
20+
# completions =
21+
# page
2122
# .to_enum
2223
# .lazy
2324
# .select { _1.object_id.even? }

lib/openai/base_stream.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ module OpenAI
1010
#
1111
# @example
1212
# ```ruby
13-
# chunks = stream
13+
# chunks =
14+
# stream
1415
# .to_enum
1516
# .lazy
1617
# .select { _1.object_id.even? }

lib/openai/cursor_page.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ module OpenAI
1717
#
1818
# @example
1919
# ```ruby
20-
# completions = cursor_page
20+
# completions =
21+
# cursor_page
2122
# .to_enum
2223
# .lazy
2324
# .select { _1.object_id.even? }

lib/openai/models/beta/thread_create_and_run_params.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,8 @@ class Message < OpenAI::BaseModel
327327
#
328328
# The text contents of the message.
329329
class Content < OpenAI::Union
330-
MessageContentPartParamArray = OpenAI::ArrayOf[union: -> { OpenAI::Models::Beta::Threads::MessageContentPartParam }]
330+
MessageContentPartParamArray =
331+
OpenAI::ArrayOf[union: -> { OpenAI::Models::Beta::Threads::MessageContentPartParam }]
331332

332333
# The text contents of the message.
333334
variant String

lib/openai/models/beta/thread_create_params.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,8 @@ class Message < OpenAI::BaseModel
100100
#
101101
# The text contents of the message.
102102
class Content < OpenAI::Union
103-
MessageContentPartParamArray = OpenAI::ArrayOf[union: -> { OpenAI::Models::Beta::Threads::MessageContentPartParam }]
103+
MessageContentPartParamArray =
104+
OpenAI::ArrayOf[union: -> { OpenAI::Models::Beta::Threads::MessageContentPartParam }]
104105

105106
# The text contents of the message.
106107
variant String

lib/openai/models/beta/threads/message_create_params.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@ class MessageCreateParams < OpenAI::BaseModel
6060
#
6161
# The text contents of the message.
6262
class Content < OpenAI::Union
63-
MessageContentPartParamArray = OpenAI::ArrayOf[union: -> { OpenAI::Models::Beta::Threads::MessageContentPartParam }]
63+
MessageContentPartParamArray =
64+
OpenAI::ArrayOf[union: -> { OpenAI::Models::Beta::Threads::MessageContentPartParam }]
6465

6566
# The text contents of the message.
6667
variant String

lib/openai/models/beta/threads/run_create_params.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,8 @@ class AdditionalMessage < OpenAI::BaseModel
289289
#
290290
# The text contents of the message.
291291
class Content < OpenAI::Union
292-
MessageContentPartParamArray = OpenAI::ArrayOf[union: -> { OpenAI::Models::Beta::Threads::MessageContentPartParam }]
292+
MessageContentPartParamArray =
293+
OpenAI::ArrayOf[union: -> { OpenAI::Models::Beta::Threads::MessageContentPartParam }]
293294

294295
# The text contents of the message.
295296
variant String

lib/openai/models/beta/threads/runs/run_step_include.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ module Threads
77
module Runs
88
# @abstract
99
class RunStepInclude < OpenAI::Enum
10-
STEP_DETAILS_TOOL_CALLS_FILE_SEARCH_RESULTS_CONTENT = :"step_details.tool_calls[*].file_search.results[*].content"
10+
STEP_DETAILS_TOOL_CALLS_FILE_SEARCH_RESULTS_CONTENT =
11+
:"step_details.tool_calls[*].file_search.results[*].content"
1112

1213
finalize!
1314
end

lib/openai/models/chat/chat_completion_assistant_message_param.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,8 @@ class Audio < OpenAI::BaseModel
111111
# The contents of the assistant message. Required unless `tool_calls` or
112112
# `function_call` is specified.
113113
class Content < OpenAI::Union
114-
ArrayOfContentPartArray = OpenAI::ArrayOf[union: -> { OpenAI::Models::Chat::ChatCompletionAssistantMessageParam::Content::ArrayOfContentPart }]
114+
ArrayOfContentPartArray =
115+
OpenAI::ArrayOf[union: -> { OpenAI::Models::Chat::ChatCompletionAssistantMessageParam::Content::ArrayOfContentPart }]
115116

116117
# The contents of the assistant message.
117118
variant String

0 commit comments

Comments
 (0)