fix:前端模型主键换位modelId
This commit is contained in:
@@ -11,4 +11,5 @@ export interface GetSessionListVO {
|
|||||||
apiHost?: string;
|
apiHost?: string;
|
||||||
apiKey?: string;
|
apiKey?: string;
|
||||||
remark?: string;
|
remark?: string;
|
||||||
|
modelId?: string;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ const userStore = useUserStore();
|
|||||||
const modelStore = useModelStore();
|
const modelStore = useModelStore();
|
||||||
// 检查模型是否可用
|
// 检查模型是否可用
|
||||||
function isModelAvailable(item: GetSessionListVO) {
|
function isModelAvailable(item: GetSessionListVO) {
|
||||||
return isUserRoleVip.value || item.modelName?.includes('DeepSeek-R1') || userStore.userInfo?.user?.userName === 'cc';
|
return isUserRoleVip.value || item.modelId?.includes('DeepSeek-R1-0528') || userStore.userInfo?.user?.userName === 'cc';
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
@@ -28,7 +28,7 @@ onMounted(async () => {
|
|||||||
// 设置默认模型
|
// 设置默认模型
|
||||||
if (
|
if (
|
||||||
modelStore.modelList.length > 0
|
modelStore.modelList.length > 0
|
||||||
&& (!modelStore.currentModelInfo || !modelStore.currentModelInfo.modelName)
|
&& (!modelStore.currentModelInfo || !modelStore.currentModelInfo.modelId)
|
||||||
) {
|
) {
|
||||||
modelStore.setCurrentModelInfo(modelStore.modelList[0]);
|
modelStore.setCurrentModelInfo(modelStore.modelList[0]);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -185,7 +185,7 @@ async function startSSE(chatContent: string) {
|
|||||||
})),
|
})),
|
||||||
sessionId: route.params?.id !== 'not_login' ? String(route.params?.id) : undefined,
|
sessionId: route.params?.id !== 'not_login' ? String(route.params?.id) : undefined,
|
||||||
userId: userStore.userInfo?.userId,
|
userId: userStore.userInfo?.userId,
|
||||||
model: modelStore.currentModelInfo.modelName ?? '',
|
model: modelStore.currentModelInfo.modelId ?? '',
|
||||||
})) {
|
})) {
|
||||||
handleDataChunk(chunk.result as AnyObject);
|
handleDataChunk(chunk.result as AnyObject);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user