Skip to content

Commit ae234b1

Browse files
authored
Merge pull request #7 from Paul-Borisov/beta-1.2
Version 1.2
2 parents ff91473 + 888122d commit ae234b1

35 files changed

+1261
-779
lines changed

README.md

+36-34
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ This web part interacts with private **Azure OpenAI** endpoints that are publish
1515
- Chats are private and visible only to their creators. Creators have the option to share their chats when this feature is enabled in the web part settings (disabled by default).
1616
- The web part incorporates tampering prevention logic to guard against unauthorized access to another user's data by their GUID. Creators can share their chats with everyone or only with specific people in the company.
1717

18-
In addition to the default configuration, you have the option to publish the Native OpenAI endpoint in APIM. You can find instructions in the [documentation](docs/azure-openai-chat-web-part.pdf) (pages 11 and 21).
18+
In addition to the default configuration, you have the option to publish the Native OpenAI endpoint in APIM. You can find instructions in the [documentation](docs/azure-openai-chat-web-part.pdf) (pages 23 and 32-35).
1919

2020
- CONS: Granting access to the Native OpenAI endpoint requires a separate **api-key** for it and could potentially compromise data privacy, as requests might travel outside your Azure tenant under this setup.
2121
- PROS: Using the Native OpenAI endpoint could grant you access to the latest language models that are not currently available in Azure OpenAI.
@@ -35,36 +35,38 @@ The integrations available in this release include:
3535
- Local Date and Time
3636
- Analysis of an uploaded PDF and summarization of its content
3737
- Analysis of uploaded images and description of their content
38-
- Version 1.1: Search on the Internet: Bing and Google (+ Reddit). Added on Dec 2, 2023.
39-
40-
- The configuration is supported in two alternatives:
41-
- 1. Using the additional APIM-endpoints https://**tenant**.azure-api.net/**bing** and/or https://**tenant**.azure-api.net/**google**
42-
- 2. Using the direct Bing and Google endpoints with own **api-key** values stored in the web part settings (less secure).
43-
44-
- Version 1.1: Image generation from the prompt text. This option supports Dalle 3. Added on Dec 5, 2023.
45-
46-
- The configuration is supported in three alternatives:
47-
- 1. Using the additional APIM-endpoint https://**tenant**.azure-api.net/openai/**dalle**
48-
- 2. Using the Azure OpenAI endpoint https://**tenant**.openai.azure.com/openai/deployments/dalle3/images/generations?api-version=2023-12-01-preview with **api-key** stored in the web part settings (less secure).
49-
- The model Dalle3 is available for the deployment in Swedish Central zone (as of December 2023).
50-
- 3. Using the Native OpenAI endpoint https://**api.openai.com**/v1/images/generations with **api-key** stored in the web part settings (less secure).
51-
52-
- Version 1.1: The option to use voice input to prompt text is available. Added on Dec 8, 2023.
53-
54-
- [Beta 1.2](../../releases/tag/Beta1.2). Dec 13, 2023: Added the optional support for GPT-4 Vision APIM endpoint (/openai4/vision).
55-
56-
- [Beta 1.2](../../releases/tag/Beta1.2). Dec 16, 2023: Added the optional support for /tts APIM endpoint (/openainative/tts) and Native OpenAI text-to-speech model for AI-generated texts.
57-
58-
- [Beta 1.2](../../releases/tag/Beta1.2). Dec 18, 2023: Added the optional support for Web Speech API (window.speechSynthesis) to provide voice outputs to AI-generated texts when OpenAI text-to-speech model is not available.
59-
- OpenAI text-to-speech model automatically handles text that contains mixed languages.
60-
- The standard Web Speech API requires selecting the preferred language; using default page language is not always optimal.
61-
- Azure OpenAI does not yet have support for text-to-speech models (as of Dec 2023).
62-
63-
- [Beta 1.2](../../releases/tag/Beta1.2). Dec 19, 2023: Added the optional support for AES data encryption for all storage types
64-
- SharePoint list
65-
- Database
66-
- Local Storage.
67-
38+
- Version 1.1 released on Dec 13, 2023. It includes the following additional options:
39+
- Search on the Internet: Bing and Google (+ Reddit).
40+
- The configuration is supported in two alternatives:
41+
- 1. Using the additional APIM-endpoints https://**tenant**.azure-api.net/**bing** and/or https://**tenant**.azure-api.net/**google**
42+
- 2. Using the direct Bing and Google endpoints with own **api-key** values stored in the web part settings (less secure).
43+
44+
- Image generation from the prompt text. This option supports Dalle 3.
45+
46+
- The configuration is supported in three alternatives:
47+
- 1. Using the additional APIM-endpoint https://**tenant**.azure-api.net/openai/**dalle**
48+
- 2. Using the Azure OpenAI endpoint https://**tenant**.openai.azure.com/openai/deployments/dalle3/images/generations?api-version=2023-12-01-preview with **api-key** stored in the web part settings (less secure).
49+
- The model Dalle3 is available for the deployment in Swedish Central zone (as of December 2023).
50+
- 3. Using the Native OpenAI endpoint https://**api.openai.com**/v1/images/generations with **api-key** stored in the web part settings (less secure).
51+
52+
- The option to use voice input to prompt text is available.
53+
54+
- Version 1.2 released on Dec 23, 2023. It includes the following additional options:
55+
- Data encryption for all storage types.
56+
- SharePoint list
57+
- Database
58+
- Local Storage
59+
- Seamless support of the Chat Sharing option for all storage types
60+
61+
- GPT-4 Vision APIM endpoint (/openai4/vision).
62+
63+
- Speech synthesis to read out AI-generated texts by default
64+
- The standard Web Speech API requires selecting the preferred language; using default page language is not always optimal. This default option is used when Native OpenAI text-to-speech model is not available.
65+
- Azure OpenAI does not yet have support for text-to-speech models (as of Dec 2023).
66+
67+
- /tts APIM endpoint (/openainative/tts) and Native OpenAI text-to-speech model for AI-generated texts.
68+
- In case of using Native OpenAI endpoints - direct URL or APIM-based operation - the native text-to-speech model automatically handles text that contains mixed languages.
69+
6870
### Full-Scale Setup
6971

7072
![Data access diagram](docs/data-access-diagram.png "Data access diagram")
@@ -289,7 +291,7 @@ You will not be able to use the Private Chat sharing and People Search features
289291
- Optionally, you can deploy the API Management service and publish (Azure) OpenAI endpoints there.
290292
- You should have an **api-key** for Azure OpenAI instance, with configured endpoints for GPT 3.5 and, optionally, GPT 4 text language models.
291293
- Alternatively, you should have an **api-key** for Native OpenAI.
292-
- For detailed instructions on configuring Azure OpenAI and APIM endpoints, please refer to the project documentation in [azure-openai-chat-web-part.pdf](docs/azure-openai-chat-web-part.pdf) (pages 17-38).
294+
- For detailed instructions on configuring Azure OpenAI and APIM endpoints, please refer to the project documentation in [azure-openai-chat-web-part.pdf](docs/azure-openai-chat-web-part.pdf) (pages 19-41).
293295

294296
## Configurations
295297

@@ -404,8 +406,8 @@ You will not be able to use the Private Chat sharing and People Search features
404406

405407
Please refer to the project documentation in [azure-openai-chat-web-part.pdf](docs/azure-openai-chat-web-part.pdf) and [azure-openai-chat-security.pdf](docs/azure-openai-chat-security.pdf)
406408

407-
- For detailed instructions on configuring Backend services, please refer to [azure-openai-chat-web-part.pdf](docs/azure-openai-chat-web-part.pdf) (pages 17-38).
408-
- For detailed instructions on deploying the web part and configuring its settings, please refer to [azure-openai-chat-web-part.pdf](docs/azure-openai-chat-web-part.pdf) (pages 3-11).
409+
- For detailed instructions on configuring Backend services, please refer to [azure-openai-chat-web-part.pdf](docs/azure-openai-chat-web-part.pdf) (pages 19-41).
410+
- For detailed instructions on deploying the web part and configuring its settings, please refer to [azure-openai-chat-web-part.pdf](docs/azure-openai-chat-web-part.pdf) (pages 3-12).
409411
- For more options regarding the security of Backend services, please refer to [azure-openai-chat-security.pdf](docs/azure-openai-chat-security.pdf).
410412

411413
# Notes on npm install and associated warnings

backend-optional-storage-azuresql/ChatWebApi/Endpoints/ChatMessageEndpoints.cs

+3-2
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,12 @@ public static void MapChatMessageEndpoints(this IEndpointRouteBuilder routes, bo
7272
if (checkUserPermissions) {
7373
var user = GetUser(context);
7474
chatMessage.Username = user?.Id;
75-
chatMessage.DisplayName = user?.Name;
75+
if (chatMessage.DisplayName == null) chatMessage.DisplayName = user?.Name;
7676
}
7777
if (chatMessage.Created == null) chatMessage.Created = DateTime.Now.ToUniversalTime();
7878
if (chatMessage.Modified == null) chatMessage.Modified = DateTime.Now.ToUniversalTime();
7979
if (chatMessage.Enabled == null) chatMessage.Enabled = true;
80+
if (chatMessage.DisplayName == "") chatMessage.DisplayName = null;
8081
//if (chatMessage.Shared == null) chatMessage.Shared = false; // Should be NULL if the chat was never shared after its creation
8182

8283
db.ChatMessages.Add(chatMessage);
@@ -109,7 +110,7 @@ public static void MapChatMessageEndpoints(this IEndpointRouteBuilder routes, bo
109110
.SetProperty(m => m.Modified, modified) // DateTime.Now.ToUniversalTime() is not accepted here (and no need)
110111
.SetProperty(m => m.Enabled, chatMessage.Enabled ?? row.Enabled)
111112
.SetProperty(m => m.Shared, chatMessage.Shared ?? row.Shared)
112-
.SetProperty(m => m.DisplayName, row.DisplayName)
113+
.SetProperty(m => m.DisplayName, chatMessage.DisplayName == "" ? null : row.DisplayName)
113114
.SetProperty(m => m.SharedWith, sharedWith)
114115
);
115116

1.07 KB
Binary file not shown.
Binary file not shown.

docs/azure-openai-chat-web-part.pdf

70.7 KB
Binary file not shown.

docs/data-access-diagram.png

1.45 KB
Loading

package/azure-openai-chat.sppkg

3.2 KB
Binary file not shown.

spfx-latest/config/package-solution.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"name": "azure-openai-chat",
55
"title": "Azure OpenAI Chat Web Part",
66
"id": "64e358ba-f88c-4fee-9a8a-6db06299d90a",
7-
"version": "1.1.0.0",
7+
"version": "1.2.0.0",
88
"includeClientSideAssets": true,
99
"skipFeatureDeployment": true,
1010
"isDomainIsolated": false,

0 commit comments

Comments
 (0)