feat: 新增openai对接接口

This commit is contained in:
chenchun
2024-07-19 18:17:36 +08:00
parent 58d1b62250
commit a0478279df
10 changed files with 146 additions and 5 deletions

View File

@@ -48,6 +48,14 @@ namespace Yi.Framework.ChatHub.Domain.Managers
case MessageTypeEnum.All:
await _hubContext.Clients.All.SendAsync(ChatConst.ClientActionReceiveMsg, context.MessageType, context);
break;
case MessageTypeEnum.Ai:
var userModel2 = await GetUserAsync(context.ReceiveId.Value);
if (userModel2 is not null)
{
await _hubContext.Clients.Client(userModel2.ClientId).SendAsync(ChatConst.ClientActionReceiveMsg, context.MessageType, context);
}
break;
default:
break;
}