diff --git a/llm-service/app/services/chat.py b/llm-service/app/services/chat.py index 314901a68..49118ad59 100644 --- a/llm-service/app/services/chat.py +++ b/llm-service/app/services/chat.py @@ -236,7 +236,6 @@ def generate_suggested_questions( ), [], ) - suggested_questions = process_response(response.response) return suggested_questions @@ -250,7 +249,7 @@ def process_response(response: str | None) -> list[str]: sentences = map(lambda x: x.removeprefix("*").strip(), sentences) sentences = map(lambda x: x.removeprefix("-").strip(), sentences) sentences = map(lambda x: x.strip("*"), sentences) - sentences = filter(lambda x: len(x.split()) <= 15, sentences) + sentences = filter(lambda x: len(x.split()) <= 60, sentences) sentences = filter(lambda x: x != "Empty Response", sentences) sentences = filter(lambda x: x != "", sentences) return list(sentences)[:5] diff --git a/llm-service/app/tests/services/test_chat.py b/llm-service/app/tests/services/test_chat.py index 006e5c95b..32e4ae147 100644 --- a/llm-service/app/tests/services/test_chat.py +++ b/llm-service/app/tests/services/test_chat.py @@ -92,7 +92,7 @@ def test_process_response(self, response: str) -> None: assert not suggested_question.endswith("*") - assert len(suggested_question.split()) <= 15 + assert len(suggested_question.split()) <= 60 assert suggested_question != "Empty Response" assert suggested_question != ""