Skip to content

Commit

Permalink
fix(#36): 요약 정확도 및 실용성을 위해 max 글자 수 120자로 향상
Browse files Browse the repository at this point in the history
  • Loading branch information
kimhji committed Feb 5, 2025
1 parent 5497861 commit 5a2a0b1
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions server/src/rss/ai/feed-ai.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export class FeedAIService {
private URL: URL;
private headers;
private prompt;
static limitLength = 100;
static limitLength = 120;
static reReqCount = 5;

constructor(private readonly configService: ConfigService) {
Expand Down Expand Up @@ -45,7 +45,7 @@ export class FeedAIService {
],
topP: 0.6,
topK: 0,
maxTokens: 30,
maxTokens: 35,
temperature: 0.1,
repeatPenalty: 2.0,
stopBefore: [],
Expand Down Expand Up @@ -112,6 +112,9 @@ export class FeedAIService {
const parsedData = JSON.parse(jsonString);
if (parsedData.content) {
accumulatedText = parsedData.content.trim();

const lastDotIndex = accumulatedText.lastIndexOf('.');
accumulatedText = accumulatedText.substring(0, lastDotIndex + 1);
}
} catch (error) {
console.error('JSON 파싱 실패:', error);
Expand Down

0 comments on commit 5a2a0b1

Please sign in to comment.