Skip to content

Commit 72fb7bf

Browse files
committed
Rename :service to :service_enum for consistency
1 parent 368a408 commit 72fb7bf

File tree

6 files changed

+6
-6
lines changed

6 files changed

+6
-6
lines changed

src/foobara/ai/answer_bot/ask.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ class Ask < Foobara::Command
66

77
inputs do
88
question :string, :required, "whatever you want to know!"
9-
service :service, "If two services expose the same model, you can specify which one to use."
9+
service :service_enum, "If two services expose the same model, you can specify which one to use."
1010
model :model_enum, default: "gpt-3.5-turbo", description: "The model to use."
1111
end
1212

src/foobara/ai/answer_bot/domain_mappers/model_to_ai_service.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ module AnswerBot
77
module DomainMappers
88
class ModelToAiService < Foobara::DomainMapper
99
from :model_enum
10-
to :service
10+
to :service_enum
1111

1212
def map
1313
symbol = model.to_sym

src/foobara/ai/answer_bot/domain_mappers/service_to_command.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ module Ai
55
module AnswerBot
66
module DomainMappers
77
class ServiceToChatCompletionCommand < Foobara::DomainMapper
8-
from :service
8+
from :service_enum
99
# TODO: create a :class type? Maybe with an inherits: validator?
1010
to Class
1111

src/foobara/ai/answer_bot/domain_mappers/service_to_list_models_command.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ module Ai
55
module AnswerBot
66
module DomainMappers
77
class ServiceToChatCompletionCommand < Foobara::DomainMapper
8-
from :service
8+
from :service_enum
99
# TODO: create a :class type? Maybe with an inherits: validator?
1010
to Class
1111

src/foobara/ai/answer_bot/types/model.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class Model < Foobara::Model
1111
class Model < Foobara::Model
1212
attributes do
1313
id :model_enum, :required
14-
service :service, :required
14+
service :service_enum, :required
1515
end
1616
end
1717
end

src/foobara/ai/answer_bot/types/service_enum.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ module Types
99
)
1010
end
1111

12-
foobara_register_type(:service, :symbol, one_of: Types::ServiceEnum)
12+
foobara_register_type(:service_enum, :symbol, one_of: Types::ServiceEnum)
1313
end
1414
end
1515
end

0 commit comments

Comments
 (0)