mirror of
https://github.com/discourse/discourse.git
synced 2026-08-07 13:19:19 +08:00
There is no _super_ clean way to do this in the sense that Post creation _will call `can_send_private_message?`_. We need to teach the system that there are different "contexts" here and one of them is sending an AI bot a PM. Plumb that in.. use a modifier.. boom.
12 lines
393 B
Ruby
Vendored
12 lines
393 B
Ruby
Vendored
# frozen_string_literal: true
|
|
|
|
module DiscourseAi
|
|
module AiBot
|
|
USER_AGENT = "Discourse AI Bot 1.0 (https://www.discourse.org)"
|
|
TOPIC_AI_BOT_PM_FIELD = "is_ai_bot_pm"
|
|
POST_AI_LLM_NAME_FIELD = "ai_llm_name"
|
|
POST_AI_LLM_MODEL_ID_FIELD = "ai_llm_model_id"
|
|
POST_AI_AGENT_ID_FIELD = "ai_agent_id"
|
|
PERSONAL_MESSAGE_CONTEXT = "discourse_ai.ai_bot_personal_message"
|
|
end
|
|
end
|