-
-
Notifications
You must be signed in to change notification settings - Fork 92
Open
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomersvalidThis issue/PR is validated and ready to be picked. This auto adds items to TJ project board.This issue/PR is validated and ready to be picked. This auto adds items to TJ project board.
Description
Describe the bug
as shown in the screenshot, title is quoted sometimes when question is transfered via TransferQuestionCommand
, mainly due to inconsistency in response from GPT.
Expected behavior
Title shouldnt have any quotation marks
Additional context
String chatGptPrompt =
"Summarize the following text into a concise title or heading not more than 4-5 words, remove quotations if any: %s"
.formatted(originalMessage);
Optional<String> chatGptResponse = chatGptService.ask(chatGptPrompt, "");
String title = chatGptResponse.orElse(createTitle(originalMessage));
if (title.length() > TITLE_MAX_LENGTH) {
title = title.substring(0, TITLE_MAX_LENGTH);
}
Above piece of code is responsible for generating title in TransferQuestionCommand#onMessageContext
, to solve this issue instead of directly assigning generated text from GPT as title, it should be santized by removing quotations if present.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomersvalidThis issue/PR is validated and ready to be picked. This auto adds items to TJ project board.This issue/PR is validated and ready to be picked. This auto adds items to TJ project board.
Type
Projects
Status
Ready