post rebase fixes
This commit is contained in:
parent
4ad887c835
commit
74d47a97c6
|
@ -125,8 +125,6 @@ module DiscourseAi
|
||||||
|
|
||||||
response = bot.reply(context)
|
response = bot.reply(context)
|
||||||
|
|
||||||
debugger
|
|
||||||
|
|
||||||
matching_concepts = JSON.parse(response[0][0]).dig("matching_concepts")
|
matching_concepts = JSON.parse(response[0][0]).dig("matching_concepts")
|
||||||
|
|
||||||
matching_concepts || []
|
matching_concepts || []
|
||||||
|
|
|
@ -152,7 +152,8 @@ module DiscourseAi
|
||||||
raw_context << partial
|
raw_context << partial
|
||||||
current_thinking << partial
|
current_thinking << partial
|
||||||
end
|
end
|
||||||
elsif partial.is_a?(DiscourseAi::Completions::StructuredOutput)
|
elsif update_blk.present?
|
||||||
|
if partial.is_a?(DiscourseAi::Completions::StructuredOutput)
|
||||||
update_blk.call(partial, nil, :structured_output)
|
update_blk.call(partial, nil, :structured_output)
|
||||||
else
|
else
|
||||||
update_blk.call(partial)
|
update_blk.call(partial)
|
||||||
|
@ -160,6 +161,7 @@ module DiscourseAi
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
if !tool_found
|
if !tool_found
|
||||||
ongoing_chain = false
|
ongoing_chain = false
|
||||||
|
|
|
@ -17,11 +17,8 @@ module DiscourseAi
|
||||||
:context_post_ids,
|
:context_post_ids,
|
||||||
:feature_name,
|
:feature_name,
|
||||||
:resource_url,
|
:resource_url,
|
||||||
<<<<<<< HEAD
|
:cancel_manager,
|
||||||
:cancel_manager
|
|
||||||
=======
|
|
||||||
:inferred_concepts
|
:inferred_concepts
|
||||||
>>>>>>> 44391e27 (FEATURE: Extend inferred concepts to include posts)
|
|
||||||
|
|
||||||
def initialize(
|
def initialize(
|
||||||
post: nil,
|
post: nil,
|
||||||
|
@ -39,11 +36,8 @@ module DiscourseAi
|
||||||
context_post_ids: nil,
|
context_post_ids: nil,
|
||||||
feature_name: "bot",
|
feature_name: "bot",
|
||||||
resource_url: nil,
|
resource_url: nil,
|
||||||
<<<<<<< HEAD
|
cancel_manager: nil,
|
||||||
cancel_manager: nil
|
|
||||||
=======
|
|
||||||
inferred_concepts: []
|
inferred_concepts: []
|
||||||
>>>>>>> 44391e27 (FEATURE: Extend inferred concepts to include posts)
|
|
||||||
)
|
)
|
||||||
@participants = participants
|
@participants = participants
|
||||||
@user = user
|
@user = user
|
||||||
|
|
|
@ -3,6 +3,10 @@
|
||||||
module DiscourseAi
|
module DiscourseAi
|
||||||
module Personas
|
module Personas
|
||||||
class ConceptDeduplicator < Persona
|
class ConceptDeduplicator < Persona
|
||||||
|
def self.default_enabled
|
||||||
|
false
|
||||||
|
end
|
||||||
|
|
||||||
def system_prompt
|
def system_prompt
|
||||||
<<~PROMPT.strip
|
<<~PROMPT.strip
|
||||||
You will be given a list of machine-generated tags.
|
You will be given a list of machine-generated tags.
|
||||||
|
@ -42,7 +46,7 @@ module DiscourseAi
|
||||||
end
|
end
|
||||||
|
|
||||||
def response_format
|
def response_format
|
||||||
[{ key: "streamlined_tags", type: "array" }]
|
[{ "key" => "streamlined_tags", "type" => "array" }]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -3,6 +3,10 @@
|
||||||
module DiscourseAi
|
module DiscourseAi
|
||||||
module Personas
|
module Personas
|
||||||
class ConceptFinder < Persona
|
class ConceptFinder < Persona
|
||||||
|
def self.default_enabled
|
||||||
|
false
|
||||||
|
end
|
||||||
|
|
||||||
def system_prompt
|
def system_prompt
|
||||||
existing_concepts = DiscourseAi::InferredConcepts::Manager.list_concepts(limit: 100)
|
existing_concepts = DiscourseAi::InferredConcepts::Manager.list_concepts(limit: 100)
|
||||||
existing_concepts_text = ""
|
existing_concepts_text = ""
|
||||||
|
@ -38,7 +42,7 @@ module DiscourseAi
|
||||||
end
|
end
|
||||||
|
|
||||||
def response_format
|
def response_format
|
||||||
[{ key: "concepts", type: "array" }]
|
[{ "key" => "concepts", "type" => "array" }]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -3,6 +3,10 @@
|
||||||
module DiscourseAi
|
module DiscourseAi
|
||||||
module Personas
|
module Personas
|
||||||
class ConceptMatcher < Persona
|
class ConceptMatcher < Persona
|
||||||
|
def self.default_enabled
|
||||||
|
false
|
||||||
|
end
|
||||||
|
|
||||||
def system_prompt
|
def system_prompt
|
||||||
<<~PROMPT.strip
|
<<~PROMPT.strip
|
||||||
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.
|
||||||
|
@ -32,7 +36,7 @@ module DiscourseAi
|
||||||
end
|
end
|
||||||
|
|
||||||
def response_format
|
def response_format
|
||||||
[{ key: "matching_concepts", type: "array" }]
|
[{ "key" => "matching_concepts", "type" => "array" }]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue