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 .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
ruby-version: ['3.1', '3.2', '3.3', '3.4']
ruby-version: ['3.2', '3.3', '3.4']

steps:
- uses: actions/checkout@v4
Expand Down
3 changes: 1 addition & 2 deletions lib/ruby_llm/providers/openai_responses.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def api_base
end

# Override to support WebSocket transport via with_params(transport: :websocket).
# rubocop:disable Metrics/ParameterLists
# rubocop:disable-next Metrics/ParameterLists
def complete(messages, tools:, temperature:, model:, params: {}, headers: {},
schema: nil, thinking: nil, tool_prefs: nil, &block)
if params[:transport]&.to_sym == :websocket
Expand All @@ -28,7 +28,6 @@ def complete(messages, tools:, temperature:, model:, params: {}, headers: {},
super
end
end
# rubocop:enable Metrics/ParameterLists

def headers
{
Expand Down
3 changes: 1 addition & 2 deletions lib/ruby_llm/providers/openai_responses/chat.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def completion_url

module_function

# rubocop:disable Metrics/ParameterLists
# rubocop:disable-next Metrics/ParameterLists
def render_payload(messages, tools:, temperature:, model:, stream: false,
schema: nil, thinking: nil, tool_prefs: nil) # rubocop:disable Lint/UnusedMethodArgument
tool_prefs ||= {}
Expand All @@ -37,7 +37,6 @@ def render_payload(messages, tools:, temperature:, model:, stream: false,

payload
end
# rubocop:enable Metrics/ParameterLists

# Apply tools and tool preferences to the payload.
def apply_tools(payload, tools, tool_prefs)
Expand Down
3 changes: 1 addition & 2 deletions lib/ruby_llm/providers/openai_responses/web_socket.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class WebSocket # rubocop:disable Metrics/ClassLength
# @param project_id [String, nil] OpenAI project ID
# @param client_class [#connect, nil] WebSocket client class (for testing)
# @param response_timeout [Numeric] seconds to wait for a response event
# rubocop:disable Metrics/ParameterLists
# rubocop:disable-next Metrics/ParameterLists
def initialize(api_key:, api_base: 'https://api.openai.com/v1', organization_id: nil, project_id: nil,
client_class: nil, response_timeout: 60)
@api_key = api_key
Expand All @@ -51,7 +51,6 @@ def initialize(api_key:, api_base: 'https://api.openai.com/v1', organization_id:
@last_response_id = nil
@message_queue = nil
end
# rubocop:enable Metrics/ParameterLists

# Open the WebSocket connection. Blocks until the connection is established.
# @param timeout [Numeric] seconds to wait for the connection (default: 10)
Expand Down
2 changes: 1 addition & 1 deletion ruby_llm-responses_api.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Gem::Specification.new do |spec|
spec.add_development_dependency 'rake', '~> 13.0'
spec.add_development_dependency 'rspec', '~> 3.0'
spec.add_development_dependency 'rubocop', '~> 1.0'
spec.add_development_dependency 'sqlite3', '~> 1.4'
spec.add_development_dependency 'sqlite3', '>= 2.9.5'
spec.add_development_dependency 'vcr', '~> 6.0'
spec.add_development_dependency 'webmock', '~> 3.0'
spec.add_development_dependency 'websocket-client-simple', '~> 0.8'
Expand Down
Loading