small fixes

This commit is contained in:
Rafael Silva 2025-05-09 15:18:05 -03:00
parent f525947984
commit a8644fadf7
2 changed files with 1 additions and 3 deletions

View File

@ -14,7 +14,7 @@ module Jobs
def execute(args = {}) def execute(args = {})
return if args[:item_ids].blank? || args[:item_type].blank? return if args[:item_ids].blank? || args[:item_type].blank?
unless %w[topics posts].include?(args[:item_type]) if %w[topics posts].exclude?(args[:item_type])
Rails.logger.error("Invalid item_type for GenerateInferredConcepts: #{args[:item_type]}") Rails.logger.error("Invalid item_type for GenerateInferredConcepts: #{args[:item_type]}")
return return
end end

View File

@ -8,7 +8,6 @@ module DiscourseAi
You are an advanced concept matching system that determines which concepts from a provided list are relevant to a piece of content. You are an advanced concept matching system that determines which concepts from a provided list are relevant to a piece of content.
Your job is to analyze the content and determine which concepts from the list apply to it. Your job is to analyze the content and determine which concepts from the list apply to it.
#{concepts_text}
Guidelines for matching concepts: Guidelines for matching concepts:
- Only select concepts that are clearly relevant to the content - Only select concepts that are clearly relevant to the content
- The content must substantially discuss or relate to the concept - The content must substantially discuss or relate to the concept
@ -20,7 +19,6 @@ module DiscourseAi
- If no concepts from the list match the content, return an empty array - If no concepts from the list match the content, return an empty array
The list of available concepts is: The list of available concepts is:
{inferred_concepts} {inferred_concepts}
Format your response as a JSON object with a single key named "matching_concepts", which has an array of concept strings from the provided list. Format your response as a JSON object with a single key named "matching_concepts", which has an array of concept strings from the provided list.