mirror of
https://github.com/discourse/discourse.git
synced 2025-06-01 03:35:15 +08:00
DEV: Pass the user who requested the summary to the strategy. (#24489)
This change allows the `discourse-ai` plugin to log the user who requested the summary in the `AiApiAuditLog`.
This commit is contained in:
@ -75,6 +75,8 @@ module Summarization
|
||||
# @param &on_partial_blk { Block - Optional } - If the strategy supports it, the passed block
|
||||
# will get called with partial summarized text as its generated.
|
||||
#
|
||||
# @param current_user { User } - User requesting the summary.
|
||||
#
|
||||
# @returns { Hash } - The summarized content, plus chunks if the content couldn't be summarized in one pass. Example:
|
||||
# {
|
||||
# summary: "This is the final summary",
|
||||
@ -83,7 +85,7 @@ module Summarization
|
||||
# { ids: [post_1.post_number, post_2.post_number], summary: "this is the second chunk" },
|
||||
# ],
|
||||
# }
|
||||
def summarize(content)
|
||||
def summarize(content, current_user)
|
||||
raise NotImplemented
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user