chore: Update LLM formatter classes to include additional details (#11491)
This PR introduces support for optionally exposing more data during LLM function calls. This will be useful as we expand Copilot’s capabilities. Changes included: - Add support for ArticleLlmFormatter - Add missing specs for ContactLLMFormatter and ArticleLLMFormatter - Add additional spec for ConversationLLMFormatter based on config
This commit is contained in:
@@ -33,6 +33,7 @@
|
||||
#
|
||||
class Article < ApplicationRecord
|
||||
include PgSearch::Model
|
||||
include LlmFormattable
|
||||
|
||||
has_many :associated_articles,
|
||||
class_name: :Article,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
module LlmFormattable
|
||||
extend ActiveSupport::Concern
|
||||
|
||||
def to_llm_text
|
||||
LlmFormatter::LlmTextFormatterService.new(self).format
|
||||
def to_llm_text(config = {})
|
||||
LlmFormatter::LlmTextFormatterService.new(self).format(config)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user