Skip to content

Commit cf357c0

Browse files
authored
Made fixes flagged by reviewer
1 parent 2898ba3 commit cf357c0

File tree

5 files changed

+8
-15
lines changed

5 files changed

+8
-15
lines changed

.vscode/settings.json

Lines changed: 0 additions & 5 deletions
This file was deleted.
129 KB
Loading

articles/azure-signalr/signalr-tutorial-group-chat-with-open-ai.md renamed to articles/azure-signalr/signalr-tutorial-group-chat-with-openai.md

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,20 @@
11
---
2-
title: Build an AI-Powered Group Chat with SignalR and OpenAI
2+
title: Build an AI-powered Group Chat with Azure SignalR and OpenAI Completion API
33
author: kevinguo-ed
4-
description: A tutorial explaining how SignalR and OpenAI are used together to build an AI-powered group chat
4+
description: A tutorial explaining how Azure SignalR and OpenAI Completion API are used together to build an AI-powered group chat
55
ms.author: kevinguo
66
ms.topic: tutorial
77
ms.date: 09/09/2024
88
uid: tutorials/ai-powered-group-chat
99
---
1010

11-
# Build an AI-powered group chat with SignalR and OpenAI
12-
13-
## Overview
11+
# Build an AI-powered group chat with Azure SignalR and OpenAI Completion API
1412

1513
The integration of AI into applications is rapidly becoming a must-have for developers looking to help their users be more creative, productive, and achieve their health goals. AI-powered features, such as intelligent chatbots, personalized recommendations, and contextual responses, add significant value to modern apps. The AI-powered apps that came out since ChatGPT captured our imagination are primarily between one user and one AI assistant. As developers get more comfortable with the capabilities of AI, they're exploring AI-powered apps in a team's context. They ask "what value can AI add to a team of collaborators?"
1614

1715
This tutorial guides you through building a real-time group chat application. Among a group of human collaborators in a chat, there's an AI assistant, which has access to the chat history and can be invited to help out by any collaborator when they start the message with `@gpt`. The finished app looks like this.
1816

19-
:::image type="content" source="./media/signalr-tutorial-group-chat-with-open-ai/ai-powered-group-chat.jpg" alt-text="user interface for the AI-powered group chat":::
17+
:::image type="content" source="./media/signalr-tutorial-group-chat-with-open-ai/ai-powered-group-chat.png" alt-text="Screenshot of user interface for the AI-powered group chat":::
2018

2119
We use OpenAI for generating intelligent, context-aware responses and SignalR for delivering the response to users in a group. You can find the complete code [in this repo](https://github.com/aspnet/AzureSignalR-samples/tree/main/samples/AIStreaming).
2220

@@ -44,7 +42,7 @@ In this section, we walk through the key parts of the code that integrate Signal
4442

4543
### Data flow
4644

47-
:::image type="content" source="./media/signalr-tutorial-group-chat-with-open-ai/sequence-diagram-ai-powered-group-chat.png" alt-text="sequence diagram for the AI-powered group chat":::
45+
:::image type="content" source="./media/signalr-tutorial-group-chat-with-open-ai/sequence-diagram-ai-powered-group-chat.png" alt-text="Sequence diagram of the AI-powered group chat":::
4846

4947
### SignalR Hub integration
5048

@@ -97,6 +95,6 @@ if (totalCompletion.Length - lastSentTokenLength > 20)
9795
## Explore further
9896

9997
This project opens up exciting possibilities for further enhancement:
100-
1. **Advanced AI features**: Use other OpenAI capabilities like sentiment analysis, translation, or summarization.
101-
2. **Incorporating multiple AI agents**: You can introduce multiple AI agents with distinct roles or expertise areas within the same chat. For example, one agent might focus on text generation and the other provides image or audio generation. This interaction can create a richer and more dynamic user experience where different AI agents interact seamlessly with users and each other.
102-
3. **Share chat history between server instances**: Implement a database layer to persist chat history across sessions, allowing conversations to resume even after a disconnect. Beyond SQL or NO SQL based solutions, you can also explore using a caching service like Redis. It can significantly improve performance by storing frequently accessed data, such as chat history or AI responses, in memory. This reduces latency and offloads database operations, leading to faster response times, particularly in high-traffic scenarios.
98+
- **Advanced AI features**: Use other OpenAI capabilities like sentiment analysis, translation, or summarization.
99+
- **Incorporating multiple AI agents**: You can introduce multiple AI agents with distinct roles or expertise areas within the same chat. For example, one agent might focus on text generation and the other provides image or audio generation. This interaction can create a richer and more dynamic user experience where different AI agents interact seamlessly with users and each other.
100+
- **Share chat history between server instances**: Implement a database layer to persist chat history across sessions, allowing conversations to resume even after a disconnect. Beyond SQL or NO SQL based solutions, you can also explore using a caching service like Redis. It can significantly improve performance by storing frequently accessed data, such as chat history or AI responses, in memory. This reduces latency and offloads database operations, leading to faster response times, particularly in high-traffic scenarios.

0 commit comments

Comments
 (0)