From 61f01ebc2ebf7339ae3c4baeec86551a9da53241 Mon Sep 17 00:00:00 2001 From: Shivam Mishra Date: Wed, 17 Dec 2025 17:12:33 +0530 Subject: [PATCH] refactor: label suggestion service --- lib/captain/label_suggestion_service.rb | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/lib/captain/label_suggestion_service.rb b/lib/captain/label_suggestion_service.rb index 9d19f2465..57c49a2e9 100644 --- a/lib/captain/label_suggestion_service.rb +++ b/lib/captain/label_suggestion_service.rb @@ -5,7 +5,7 @@ class Captain::LabelSuggestionService < Captain::BaseEditorService payload = label_suggestion_body return nil if payload.blank? - response = make_api_call(label_suggestion_body) + response = make_api_call(payload) return response if response[:error].present? # LLMs are not deterministic - sometimes response includes "Labels:" prefix @@ -59,11 +59,6 @@ class Captain::LabelSuggestionService < Captain::BaseEditorService true end - def conversation_messages(in_array_format: false) - messages = init_messages_body(in_array_format) - add_messages_until_token_limit(conversation, messages, in_array_format) - end - def init_messages_body(in_array_format) in_array_format ? [] : '' end