You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"You are a machine tasked with auto-categorizing articles based on information obtained through web scraping. You can only answer a single category name. Here is the article's information:",
442
-
];
443
-
444
-
if(title){
445
-
questionLines.push(
446
-
`The article in question is titled "${title.trim()}"`,
447
-
);
448
-
}
449
-
450
-
if(content){
451
-
constcontentLength=content.length/2;
452
-
questionLines.push(
453
-
`The 150 characters of the article is, "${content
454
-
.replace(/\s/g,'')
455
-
.slice(contentLength-150,contentLength+150)
456
-
.trim()}"`,
457
-
);
458
-
}
459
-
460
-
if(description){
461
-
questionLines.push(`The description is ${description.trim()}"`);
462
-
}
463
-
464
-
if(siteName){
465
-
questionLines.push(`The site's name is "${siteName.trim()}"`);
466
-
}
467
-
468
-
// Add the category options to the end of the list
469
-
questionLines.push(
470
-
`Please provide the most suitable category among the following. Here is Category options: [${categories.join(
"You are a machine tasked with auto-categorizing articles based on information obtained through web scraping. You can only answer a single category name. Here is the article's information:",
589
-
];
590
-
591
-
if(title){
592
-
questionLines.push(
593
-
`The article in question is titled "${title.trim()}"`,
594
-
);
595
-
}
596
-
597
-
if(content){
598
-
constcontentLength=content.length/2;
599
-
questionLines.push(
600
-
`The 150 characters of the article is, "${content
601
-
.replace(/\s/g,'')
602
-
.slice(contentLength-150,contentLength+150)
603
-
.trim()}"`,
604
-
);
605
-
}
606
-
607
-
if(description){
608
-
questionLines.push(`The description is ${description.trim()}"`);
609
-
}
610
-
611
-
if(siteName){
612
-
questionLines.push(`The site's name is "${siteName.trim()}"`);
613
-
}
614
-
615
-
// Add the category options to the end of the list
616
-
questionLines.push(
617
-
`Please provide the most suitable category among the following. Here is Category options: [${categories.join(
0 commit comments