FIX: Include OP when building title suggestion prompt. (#248)

When the OP is the only post in the topic, we'll send a prompt without user content to the LLM, and the suggested title will make no sense.
This commit is contained in:
Roman Rizzi 2023-10-10 00:08:08 -03:00 committed by GitHub
parent 99ee949b33
commit 919a87f8d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -298,7 +298,7 @@ module DiscourseAi
You will never respond with anything but a topic title.
Suggest a 7 word title for the following topic without quoting any of it:
#{post.topic.posts[1..-1].map(&:raw).join("\n\n")[0..prompt_limit]}
#{post.topic.posts.map(&:raw).join("\n\n")[0..prompt_limit]}
TEXT
end