inconsistency in titles generated by GPT
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.
I'd like to work on this, assign it to me.
@arslanaka remove the prompt check and add a manual check https://github.com/Together-Java/TJ-Bot/pull/1059#issuecomment-2017473576
I'd like to work on it, assign this to me
I'd like to work on it, assign this to me.
Will remove assignment from previous contributors due to a lack of activity and give @billpapat a chance to implement this.
From what I am understanding, @billpapat would like to work on this issue, however they have no OpenAI key to be able to test any changes made and they claim that the free version of the OpenAI key that they can make does not have enough tokens for what they would like to test. For that reason, I will temporarily remove the assignment from them. If anybody else would like to work on this, feel free :)
From what I am understanding, @billpapat would like to work on this issue, however they have no OpenAI key to be able to test any changes made and they claim that the free version of the OpenAI key that they can make does not have enough tokens for what they would like to test. For that reason, I will temporarily remove the assignment from them. If anybody else would like to work on this, feel free :)
We have an OpenApi key for everyone to use, exactly for that reason. Check the pins in tj-bot-discussion 🙂 Helps to read the example config 👍
"openaiApiKey": "<check pins in #tjbot_discussion for the key>",
Is this still an issue? Seems transferred questions no longer show with quotation marks
Yeah I believe Ive fixed it when I touched the GPT-code a few weeks ago.
Fixed in #1262
Nevermind. Still an issue apparently. See PROD:

Are anyone working on this issue?
Are anyone working on this issue?
I will check this problem at ~ 16:00 today.
Hello, i would like to contribute by solving this issue
Sure thing! Best of lucks