diff --git a/lib/integrations/llm_base_service.rb b/lib/integrations/llm_base_service.rb index 5177e5d8c..4652ad76f 100644 --- a/lib/integrations/llm_base_service.rb +++ b/lib/integrations/llm_base_service.rb @@ -7,7 +7,7 @@ class Integrations::LlmBaseService # 120000 * 4 = 480,000 characters (rounding off downwards to 400,000 to be safe) TOKEN_LIMIT = 400_000 GPT_MODEL = Llm::Config::DEFAULT_MODEL - ALLOWED_EVENT_NAMES = %w[rephrase summarize reply_suggestion fix_spelling_grammar casual professional make_friendly make_formal + ALLOWED_EVENT_NAMES = %w[summarize reply_suggestion fix_spelling_grammar casual professional make_friendly make_formal confident straightforward].freeze CACHEABLE_EVENTS = %w[].freeze diff --git a/lib/integrations/openai/processor_service.rb b/lib/integrations/openai/processor_service.rb index 7cad9873c..1814ac2d6 100644 --- a/lib/integrations/openai/processor_service.rb +++ b/lib/integrations/openai/processor_service.rb @@ -28,9 +28,9 @@ class Integrations::Openai::ProcessorService < Integrations::LlmBaseService make_api_call(summarize_body) end - def rephrase_message - make_api_call(build_api_call_body('Please rephrase the following response. ' \ - "#{LANGUAGE_INSTRUCTION}")) + def confident_message + tone_instruction = determine_tone_instruction('confident') + make_api_call(build_api_call_body(format(AGENT_INSTRUCTION, tone_instruction))) end def fix_spelling_grammar_message