Files
glz 3c3453668f refactor: 重构AI聊天服务为流式返回,优化OOS路径与仓库初始化逻辑
1. 重构AI聊天接口与实现为流式返回,支持SSE协议
2. 修正BaseRepository的数据库上下文初始化逻辑
3. 更新AutoDotCodeConsumer的OOS存储路径
4. 新增阿里云OSS配置项到appsettings
5. 优化AiChatService的日志与代码注释
2026-06-24 18:25:25 +08:00

18 lines
542 B
C#
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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);
}