fix: 修改deepseek校验
This commit is contained in:
@@ -91,7 +91,7 @@ public class AiChatService : ApplicationService
|
|||||||
public async Task PostSendAsync(SendMessageInput input, CancellationToken cancellationToken)
|
public async Task PostSendAsync(SendMessageInput input, CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
//除了免费模型,其他的模型都要校验
|
//除了免费模型,其他的模型都要校验
|
||||||
if (input.Model != "DeepSeek-R1")
|
if (!input.Model.Contains("DeepSeek-R1"))
|
||||||
{
|
{
|
||||||
//有token,需要黑名单校验
|
//有token,需要黑名单校验
|
||||||
if (CurrentUser.IsAuthenticated)
|
if (CurrentUser.IsAuthenticated)
|
||||||
|
|||||||
@@ -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 === 'DeepSeek-R1' || userStore.userInfo?.user?.userName === 'cc';
|
return isUserRoleVip.value || item.modelName?.includes('DeepSeek-R1') || userStore.userInfo?.user?.userName === 'cc';
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user