Skip to content

Commit 85d8330

Browse files
committed
Load anthropic if no other services have been loaded
1 parent 8d39640 commit 85d8330

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

lib/foobara/ai.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,13 @@ module AnswerBot
2121
ai_services[Types::ServiceEnum::OLLAMA] = OllamaApi
2222
end
2323

24+
if ai_services.empty?
25+
# :nocov:
26+
require "foobara/anthropic_api"
27+
ai_services = { Types::ServiceEnum::ANTHROPIC => AnthropicApi }
28+
# :nocov:
29+
end
30+
2431
ai_services.each_value do |domain|
2532
foobara_depends_on domain
2633
end

0 commit comments

Comments
 (0)