diff --git a/spec/enterprise/services/captain/open_ai_message_builder_service_spec.rb b/spec/enterprise/services/captain/open_ai_message_builder_service_spec.rb index 1cbc41955..13c29f756 100644 --- a/spec/enterprise/services/captain/open_ai_message_builder_service_spec.rb +++ b/spec/enterprise/services/captain/open_ai_message_builder_service_spec.rb @@ -306,4 +306,4 @@ RSpec.describe Captain::OpenAiMessageBuilderService do end end end -end \ No newline at end of file +end diff --git a/spec/services/llm_formatter/conversation_llm_formatter_spec.rb b/spec/services/llm_formatter/conversation_llm_formatter_spec.rb index 9f570d23d..93fec14f7 100644 --- a/spec/services/llm_formatter/conversation_llm_formatter_spec.rb +++ b/spec/services/llm_formatter/conversation_llm_formatter_spec.rb @@ -12,9 +12,7 @@ RSpec.describe LlmFormatter::ConversationLlmFormatter do "Conversation ID: ##{conversation.display_id}", "Channel: #{conversation.inbox.channel.name}", 'Message History:', - 'No messages in this conversation', - 'Conversation Attributes:', - '' + 'No messages in this conversation' ].join("\n") expect(formatter.format).to eq(expected_output) @@ -43,8 +41,6 @@ RSpec.describe LlmFormatter::ConversationLlmFormatter do 'Message History:', 'User: Hello, I need help', 'Support agent: How can I assist you today?', - '', - 'Conversation Attributes:', '' ].join("\n") @@ -59,38 +55,11 @@ RSpec.describe LlmFormatter::ConversationLlmFormatter do "Channel: #{conversation.inbox.channel.name}", 'Message History:', 'No messages in this conversation', - "Contact Details: #{conversation.contact.to_llm_text}", - 'Conversation Attributes:', - '' + "Contact Details: #{conversation.contact.to_llm_text}" ].join("\n") expect(formatter.format(include_contact_details: true)).to eq(expected_output) end end - - context 'when conversation has custom attributes' do - it 'includes formatted custom attributes in the output' do - create( - :custom_attribute_definition, - account: account, - attribute_display_name: 'Order ID', - attribute_key: 'order_id', - attribute_model: :conversation_attribute - ) - - conversation.update(custom_attributes: { 'order_id' => '12345' }) - - expected_output = [ - "Conversation ID: ##{conversation.display_id}", - "Channel: #{conversation.inbox.channel.name}", - 'Message History:', - 'No messages in this conversation', - 'Conversation Attributes:', - 'Order ID: 12345' - ].join("\n") - - expect(formatter.format).to eq(expected_output) - end - end end end