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:
Roman Rizzi
2023-11-21 13:27:27 -03:00
committed by GitHub
parent 18cbb37e23
commit 75e2c6b506
4 changed files with 6 additions and 4 deletions

View File

@ -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