新增 接入Baset的deepSeek

修改 oss配置
修复 错误的文件名
This commit is contained in:
小肥羊 2026-03-09 16:17:41 +08:00
parent 3b431b978a
commit 7dd5054060
7 changed files with 45 additions and 34 deletions

View File

@ -66,8 +66,8 @@
"EndPoint": "vod.cn-shanghai.aliyuncs.com" // "EndPoint": "vod.cn-shanghai.aliyuncs.com" //
}, },
"AliyunOSS": { "AliyunOSS": {
"AccessKeyId": "LTAI5tDC6p9h747B7FHbgwkH", "AccessKeyId": "LTAI5tFLXyC3ixVdxhxLih8K",
"AccessKeySecret": "vRKgmbp1LB05LaGOjh3ZrZxbHSLYLF", "AccessKeySecret": "dlGu3WMoW0XQaoAYxiCPpnxry6qLhB",
"BucketDomain": "https://learn-videoanalysis.oss-cn-chengdu.aliyuncs.com", "BucketDomain": "https://learn-videoanalysis.oss-cn-chengdu.aliyuncs.com",
"Region": "cn-chengdu", "Region": "cn-chengdu",
"BucketName": "learn-videoanalysis", "BucketName": "learn-videoanalysis",

View File

@ -22,14 +22,6 @@
"FFmpeg": { "FFmpeg": {
" TimeSlice": 600 " TimeSlice": 600
}, },
"AliyunOSS": {
"AccessKeyId": "LTAI5tDC6p9h747B7FHbgwkH",
"AccessKeySecret": "vRKgmbp1LB05LaGOjh3ZrZxbHSLYLF",
"BucketDomain": "https://learn-videoanalysis.oss-cn-chengdu.aliyuncs.com",
"Region": "cn-chengdu",
"BucketName": "learn-videoanalysis",
"EndPoint": "oss-cn-chengdu.aliyuncs.com" //
},
"DB": { "DB": {
//"ConnectionString": "AllowLoadLocalInfile=true;Server=10.255.255.3;Port=3306;Database=learn.videoanalysis;User ID=marking;Password=qwe123!@#;CharSet=utf8mb4;pooling=true;SslMode=None", //"ConnectionString": "AllowLoadLocalInfile=true;Server=10.255.255.3;Port=3306;Database=learn.videoanalysis;User ID=marking;Password=qwe123!@#;CharSet=utf8mb4;pooling=true;SslMode=None",
"ConnectionString": "AllowLoadLocalInfile=true;Server=rm-2vc20nd3d11g0oh6g2o.rwlb.cn-chengdu.rds.aliyuncs.com;User ID=marking;Password=poiuytPOIUYT098765)(*&^%;Port=3306;Database=learn.videoanalysis;CharSet=utf8mb4;pooling=true;SslMode=None", "ConnectionString": "AllowLoadLocalInfile=true;Server=rm-2vc20nd3d11g0oh6g2o.rwlb.cn-chengdu.rds.aliyuncs.com;User ID=marking;Password=poiuytPOIUYT098765)(*&^%;Port=3306;Database=learn.videoanalysis;CharSet=utf8mb4;pooling=true;SslMode=None",

View File

@ -76,7 +76,7 @@
//"ConnectionString": "AllowLoadLocalInfile=true;Server=rm-2vc20nd3d11g0oh6g2o.rwlb.cn-chengdu.rds.aliyuncs.com;User ID=marking;Password=poiuytPOIUYT098765)(*&^%;Port=3306;Database=learn.videoanalysis;CharSet=utf8mb4;pooling=true;SslMode=None", //"ConnectionString": "AllowLoadLocalInfile=true;Server=rm-2vc20nd3d11g0oh6g2o.rwlb.cn-chengdu.rds.aliyuncs.com;User ID=marking;Password=poiuytPOIUYT098765)(*&^%;Port=3306;Database=learn.videoanalysis;CharSet=utf8mb4;pooling=true;SslMode=None",
"SqlType": "MySql", "SqlType": "MySql",
"UpdateTable": true "UpdateTable": false
}, },
"AlibabaCloudVod": { "AlibabaCloudVod": {
"AccessKeyId": "LTAI5tDC6p9h747B7FHbgwkH", "AccessKeyId": "LTAI5tDC6p9h747B7FHbgwkH",
@ -84,8 +84,8 @@
"EndPoint": "vod.cn-shanghai.aliyuncs.com" // "EndPoint": "vod.cn-shanghai.aliyuncs.com" //
}, },
"AliyunOSS": { "AliyunOSS": {
"AccessKeyId": "LTAI5tDC6p9h747B7FHbgwkH", "AccessKeyId": "LTAI5tFLXyC3ixVdxhxLih8K",
"AccessKeySecret": "vRKgmbp1LB05LaGOjh3ZrZxbHSLYLF", "AccessKeySecret": "dlGu3WMoW0XQaoAYxiCPpnxry6qLhB",
"BucketDomain": "https://learn-videoanalysis.oss-cn-chengdu.aliyuncs.com", "BucketDomain": "https://learn-videoanalysis.oss-cn-chengdu.aliyuncs.com",
"Region": "cn-chengdu", "Region": "cn-chengdu",
"BucketName": "learn-videoanalysis", "BucketName": "learn-videoanalysis",

View File

@ -16,7 +16,7 @@ using VideoAnalysisCore.AICore.GPT.Gemini;
namespace VideoAnalysisCore.AICore.GPT namespace VideoAnalysisCore.AICore.GPT
{ {
public interface IBserGPTWorkflow public interface IBaseGPTWorkflow
{ {
/// <summary> /// <summary>
/// 访问GPT /// 访问GPT
@ -185,10 +185,13 @@ namespace VideoAnalysisCore.AICore.GPT
public static void AddGPTService(this IServiceCollection services) public static void AddGPTService(this IServiceCollection services)
{ {
services.AddSingleton<DeepSeekGPTClient>(); services.AddSingleton<DeepSeekGPTClient>();
services.AddSingleton<BSET_DeepSeekGPTClient>(); services.AddSingleton<BSET_DeepSeekGPTClient
>();
services.AddSingleton<BestAIClient>(); services.AddSingleton<BestAIClient>();
services.AddSingleton<GeminiGPTClient>(); services.AddSingleton<GeminiGPTClient>();
services.AddSingleton<IBserGPTWorkflow, GTP_Analysis_1>(); services.AddSingleton<IBaseGPTWorkflow, GTP_Analysis_1>();
} }

View File

@ -33,7 +33,7 @@ namespace VideoAnalysisCore.AICore.GPT
/// <summary> /// <summary>
/// 视频分析工作流1 /// 视频分析工作流1
/// </summary> /// </summary>
public class GTP_Analysis_1 : IBserGPTWorkflow public class GTP_Analysis_1 : IBaseGPTWorkflow
{ {
private readonly GeminiGPTClient geminiClient; private readonly GeminiGPTClient geminiClient;
private readonly DeepSeekGPTClient deepSeekClient; private readonly DeepSeekGPTClient deepSeekClient;

View File

@ -67,21 +67,21 @@ namespace VideoAnalysisCore.Common
SubscribeList.Add(RedisChannelEnum.AI课程类型, async (task) => SubscribeList.Add(RedisChannelEnum.AI课程类型, async (task) =>
{ {
using var scope = _serviceProvider.CreateScope(); using var scope = _serviceProvider.CreateScope();
var service = scope.ServiceProvider.GetService<IBserGPTWorkflow>(); var service = scope.ServiceProvider.GetService<IBaseGPTWorkflow>();
if (service is null) throw new Exception("IBserGPT 未注入"); if (service is null) throw new Exception("IBserGPT 未注入");
await service.GetVideoType(task); await service.GetVideoType(task);
}); });
SubscribeList.Add(RedisChannelEnum.AI模型分析, async (task) => SubscribeList.Add(RedisChannelEnum.AI模型分析, async (task) =>
{ {
using var scope = _serviceProvider.CreateScope(); using var scope = _serviceProvider.CreateScope();
var service = scope.ServiceProvider.GetService<IBserGPTWorkflow>(); var service = scope.ServiceProvider.GetService<IBaseGPTWorkflow>();
if (service is null) throw new Exception("IBserGPT 未注入"); if (service is null) throw new Exception("IBserGPT 未注入");
await service.GetKnow(task); await service.GetKnow(task);
}); });
SubscribeList.Add(RedisChannelEnum.AI分析试题, async (task) => SubscribeList.Add(RedisChannelEnum.AI分析试题, async (task) =>
{ {
using var scope = _serviceProvider.CreateScope(); using var scope = _serviceProvider.CreateScope();
var service = scope.ServiceProvider.GetService<IBserGPTWorkflow>(); var service = scope.ServiceProvider.GetService<IBaseGPTWorkflow>();
if (service is null) throw new Exception("IBserGPT 未注入"); if (service is null) throw new Exception("IBserGPT 未注入");
await service.GetVideoQuestion(task); await service.GetVideoQuestion(task);
}); });

View File

@ -464,7 +464,15 @@ namespace VideoAnalysisCore.Controllers
{ {
// 扫描 Heartbeat Key // 扫描 Heartbeat Key
var pattern = RedisExpandKey.DeviceHeartbeat("*"); var pattern = RedisExpandKey.DeviceHeartbeat("*");
var keys = redisManager.Redis.Scan(pattern, 1000).ToList(); var keys = new List<string>();
long cursor = 0;
do
{
var scanResult = redisManager.Redis.Scan(cursor, pattern, 1000, null);
keys.AddRange(scanResult.items);
cursor = scanResult.cursor;
} while (cursor != 0);
var prefix = RedisExpandKey.DeviceHeartbeat(""); var prefix = RedisExpandKey.DeviceHeartbeat("");
var devices = keys.Select(k => k.Replace(prefix, "")).ToList(); var devices = keys.Select(k => k.Replace(prefix, "")).ToList();
return Ok(devices); return Ok(devices);
@ -490,7 +498,15 @@ namespace VideoAnalysisCore.Controllers
oldTaskArr = new List<long>(); oldTaskArr = new List<long>();
// 直接扫描 Heartbeat Key 获取在线设备 // 直接扫描 Heartbeat Key 获取在线设备
var pattern = RedisExpandKey.DeviceHeartbeat("*"); var pattern = RedisExpandKey.DeviceHeartbeat("*");
var keys = redisManager.Redis.Scan(pattern, 1000).ToList(); var keys = new List<string>();
long cursor = 0;
do
{
var scanResult = redisManager.Redis.Scan(cursor, pattern, 1000, null);
keys.AddRange(scanResult.items);
cursor = scanResult.cursor;
} while (cursor != 0);
var prefix = RedisExpandKey.DeviceHeartbeat(""); var prefix = RedisExpandKey.DeviceHeartbeat("");
var onlineDevices = keys.Select(k => k.Replace(prefix, "")).ToList(); var onlineDevices = keys.Select(k => k.Replace(prefix, "")).ToList();