已配置模型显示id的bug修复
This commit is contained in:
@@ -275,7 +275,10 @@
|
||||
const contentText = showLoading ? '<span class="text-gray-400">正在调用模型API...</span>' : '<span class="text-gray-300">模型即将开始生成回答...</span>';
|
||||
|
||||
grid.innerHTML = displayModelIds.map((modelId, index) => {
|
||||
const model = allAvailableModels.find(m => m.id === modelId) || { name: `模型 ${modelId}` };
|
||||
// 支持 ID 数字或模型名称字符串匹配
|
||||
const model = allAvailableModels.find(m =>
|
||||
m.id == modelId || m.id === modelId || m.name === modelId
|
||||
) || { name: modelId };
|
||||
const colors = ['bg-blue-100 text-blue-700', 'bg-green-100 text-green-700', 'bg-purple-100 text-purple-700', 'bg-orange-100 text-orange-700'];
|
||||
const colorClass = colors[index % colors.length];
|
||||
return `
|
||||
|
||||
Reference in New Issue
Block a user