We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0f2641b commit 7acb096Copy full SHA for 7acb096
src/backend/src/modules/puterai/AIChatService.js
@@ -563,7 +563,7 @@ class AIChatService extends BaseService {
563
// Calculate the sorted list
564
const models = this.detail_model_list;
565
566
- sorted_models = models.sort((a, b) => {
+ sorted_models = models.toSorted((a, b) => {
567
return Math.sqrt(
568
Math.pow(a.cost.input - target_model.cost.input, 2) +
569
Math.pow(a.cost.output - target_model.cost.output, 2)
0 commit comments