Skip to content

Commit

Permalink
Bump rubocop TargetRubyVersion: 3.3 (#537)
Browse files Browse the repository at this point in the history
  • Loading branch information
drnic authored Nov 7, 2024
1 parent edbbffd commit e7776ca
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ require:
- rubocop-performance

AllCops:
TargetRubyVersion: 3.0
TargetRubyVersion: 3.3
# RuboCop has a bunch of cops enabled by default. This setting tells RuboCop
# to ignore them, so only the ones explicitly set in this file are enabled.
DisabledByDefault: true
Expand Down
12 changes: 6 additions & 6 deletions app/models/message.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def not_finished?
private

def create_conversation
self.conversation = Conversation.create!(user: Current.user, assistant: assistant)
self.conversation = Conversation.create!(user: Current.user, assistant:)
end

def validate_conversation
Expand All @@ -62,12 +62,12 @@ def validate_assistant
end

def start_assistant_reply
m = conversation.messages.create!(
assistant: assistant,
conversation.messages.create!(
assistant:,
role: :assistant,
content_text: nil,
version: version,
index: index+1
version:,
index: index + 1
)
end

Expand All @@ -77,7 +77,7 @@ def set_last_assistant_message

def update_assistant_on_conversation
return if conversation.assistant == assistant
conversation.update!(assistant: assistant)
conversation.update!(assistant:)
end

def update_input_token_cost
Expand Down
14 changes: 7 additions & 7 deletions app/models/user/registerable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,13 @@ def create_initial_assistants_etc
output_token_cost_cents = output_token_cost_per_million/million

language_models.create!(
api_name: api_name,
api_service: api_service,
name: name,
api_name:,
api_service:,
name:,
supports_tools: true,
supports_images: supports_images,
input_token_cost_cents: input_token_cost_cents,
output_token_cost_cents: output_token_cost_cents,
supports_images:,
input_token_cost_cents:,
output_token_cost_cents:,
)
end

Expand All @@ -73,7 +73,7 @@ def create_initial_assistants_etc
input_token_cost_cents = input_token_cost_per_million/million
output_token_cost_cents = output_token_cost_per_million/million

language_models.create!(api_name: api_name, api_service: api_service, name: name, supports_tools: false, supports_images: supports_images, input_token_cost_cents: input_token_cost_cents, output_token_cost_cents: output_token_cost_cents)
language_models.create!(api_name:, api_service:, name:, supports_tools: false, supports_images:, input_token_cost_cents:, output_token_cost_cents:)
end

assistants.create! name: "GPT-4o", language_model: language_models.find_by(api_name: LanguageModel::BEST_GPT)
Expand Down

0 comments on commit e7776ca

Please sign in to comment.