This commit is contained in:
2026-06-25 14:53:55 +08:00
6 changed files with 94 additions and 49 deletions

View File

@ -8,9 +8,10 @@ namespace QYZH.InteractiveMagazine.IService;
public interface IAiChatService
{
/// <summary>
/// 发送消息进行AI对话
/// 流式AI对话逐块返回AI生成的内容
/// </summary>
/// <param name="input">聊天输入</param>
/// <returns>AI返回的提示词内容</returns>
Task<AiChatOutput> ChatAsync(AiChatInput input);
/// <param name="cancellationToken">取消令牌</param>
/// <returns>AI生成的内容片段流</returns>
IAsyncEnumerable<string> ChatAsync(AiChatInput input, CancellationToken cancellationToken = default);
}