1. 重构AI聊天接口与实现为流式返回,支持SSE协议 2. 修正BaseRepository的数据库上下文初始化逻辑 3. 更新AutoDotCodeConsumer的OOS存储路径 4. 新增阿里云OSS配置项到appsettings 5. 优化AiChatService的日志与代码注释
18 lines
542 B
C#
18 lines
542 B
C#
using QYZH.InteractiveMagazine.Models.Dto;
|
||
|
||
namespace QYZH.InteractiveMagazine.IService;
|
||
|
||
/// <summary>
|
||
/// AI聊天服务接口
|
||
/// </summary>
|
||
public interface IAiChatService
|
||
{
|
||
/// <summary>
|
||
/// 流式AI对话,逐块返回AI生成的内容
|
||
/// </summary>
|
||
/// <param name="input">聊天输入</param>
|
||
/// <param name="cancellationToken">取消令牌</param>
|
||
/// <returns>AI生成的内容片段流</returns>
|
||
IAsyncEnumerable<string> ChatAsync(AiChatInput input, CancellationToken cancellationToken = default);
|
||
}
|