Просмотр исходного кода

✨ fix(playground): send selected group in API payload

Previously, the Playground UI allowed users to pick a group, but the request body sent to `/pg/chat/completions` did not include this information, so the backend always fell back to the user’s default group.

Changes introduced
• web/src/helpers/api.js – added `group: inputs.group` to the `payload` built in `buildApiPayload`.

Outcome
• Selected group is now transmitted to the backend, enabling proper channel routing and pricing logic based on group ratios.
• Resolves the issue where group selection appeared ineffective in the Playground.
Apple\Apple 6 месяцев назад
Родитель
Сommit
aa793088ed
1 измененных файлов с 1 добавлено и 0 удалено
  1. 1 0
      web/src/helpers/api.js

+ 1 - 0
web/src/helpers/api.js

@@ -82,6 +82,7 @@ export const buildApiPayload = (messages, systemPrompt, inputs, parameterEnabled
 
   const payload = {
     model: inputs.model,
+    group: inputs.group,
     messages: processedMessages,
     stream: inputs.stream,
   };