mirror of
https://github.com/AstrBotDevs/AstrBot.git
synced 2026-10-16 15:06:04 +08:00
fix: use selected model in webchat side threads (#10065)
This commit is contained in:
@@ -467,6 +467,7 @@
|
||||
:thread="activeThread"
|
||||
:is-dark="isDark"
|
||||
:deleting="deletingThread"
|
||||
:get-provider-selection="getSelectedProviderSelection"
|
||||
@delete="deleteThread"
|
||||
/>
|
||||
<ReasoningSidebar
|
||||
|
||||
@@ -83,6 +83,7 @@ const props = defineProps<{
|
||||
thread: ChatThread | null;
|
||||
isDark: boolean;
|
||||
deleting?: boolean;
|
||||
getProviderSelection: () => { providerId: string; modelName: string };
|
||||
}>();
|
||||
|
||||
const emit = defineEmits<{
|
||||
@@ -155,6 +156,7 @@ async function send() {
|
||||
const abort = new AbortController();
|
||||
sending.value = true;
|
||||
try {
|
||||
const selection = props.getProviderSelection();
|
||||
const response = await fetchWithAuth(
|
||||
chatApi.sendThreadMessageUrl(props.thread.thread_id),
|
||||
{
|
||||
@@ -165,6 +167,8 @@ async function send() {
|
||||
body: JSON.stringify({
|
||||
message: [{ type: "plain", text }],
|
||||
flags: buildChatRequestFlags(),
|
||||
selected_provider: selection.providerId,
|
||||
selected_model: selection.modelName,
|
||||
}),
|
||||
signal: abort.signal,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user