discourse-ai/db/fixtures/ai_bot/602_bot_users.rb
Sam 70c158cae1
FEATURE: add full bot support for GPT 3.5 (#87)
Given latest GPT 3.5 16k which is both better steered and supports functions
we can now support rich bot integration.

Clunky system message based steering is removed and instead we use the
function framework provided by Open AI
2023-06-20 08:45:31 +10:00

29 lines
759 B
Ruby

# frozen_string_literal: true
DiscourseAi::AiBot::EntryPoint::BOTS.each do |id, bot_username|
# let's not create a bot user if it already exists
# seed seems to be messing with dates on the user
# causing it to look like these bots were created at the
# wrong time
if !User.exists?(id: id)
UserEmail.seed do |ue|
ue.id = id
ue.email = "no_email_#{bot_username}"
ue.primary = true
ue.user_id = id
end
User.seed do |u|
u.id = id
u.name = bot_username.titleize
u.username = UserNameSuggester.suggest(bot_username)
u.password = SecureRandom.hex
u.active = true
u.admin = true
u.moderator = true
u.approved = true
u.trust_level = TrustLevel[4]
end
end
end