refactor: 重构AI聊天服务为流式返回,优化OOS路径与仓库初始化逻辑
1. 重构AI聊天接口与实现为流式返回,支持SSE协议 2. 修正BaseRepository的数据库上下文初始化逻辑 3. 更新AutoDotCodeConsumer的OOS存储路径 4. 新增阿里云OSS配置项到appsettings 5. 优化AiChatService的日志与代码注释
This commit is contained in:
@ -19,7 +19,8 @@ namespace QYZH.InteractiveMagazine.Repository
|
||||
private readonly ILogger<BaseRepository<T>> _logger;
|
||||
public BaseRepository(ISqlSugarClient context = null) : base(context)
|
||||
{
|
||||
Context = DbScoped.SugarScope;
|
||||
// 优先使用注入的 context,如果没有注入则使用 DbScoped.SugarScope
|
||||
Context = context ?? DbScoped.SugarScope;
|
||||
_logger = ServiceContext.GetService<ILogger<BaseRepository<T>>>();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user