-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #246 from microsoft/package-upgrade
Citations to Chat with file
- Loading branch information
Showing
56 changed files
with
1,489 additions
and
3,213 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,75 +12,87 @@ Clone this repository locally or fork to your Github account. Run all of the the | |
|
||
1. Change directory to the `src` folder | ||
2. Copy the file `.env.example` and rename it to `.env.local`. | ||
3. Populate the environment variables in this file. | ||
<details><summary>Environment Variables (ref src/.env.example)</summary> | ||
|
||
```bash | ||
# NOTES: | ||
# - Do not use double-quotes and do not delete any of the variables. | ||
# - Make sure that NEXTAUTH_URL=http://localhost:3000 has no comments in the same line. | ||
|
||
# Update your Azure OpenAI details | ||
# AZURE_OPENAI_API_INSTANCE_NAME should be just the name of azure openai resource and not the full url; | ||
# AZURE_OPENAI_API_DEPLOYMENT_NAME should be deployment name from your azure openai studio and not the model name. | ||
# AZURE_OPENAI_API_VERSION should be Supported versions checkout docs https://learn.microsoft.com/en-us/azure/ai-services/openai/reference | ||
|
||
AZURE_OPENAI_API_KEY= | ||
AZURE_OPENAI_API_INSTANCE_NAME= | ||
AZURE_OPENAI_API_DEPLOYMENT_NAME= | ||
AZURE_OPENAI_API_VERSION=2023-03-15-preview | ||
AZURE_OPENAI_API_EMBEDDINGS_DEPLOYMENT_NAME= | ||
|
||
# Update your admin email address | ||
ADMIN_EMAIL_ADDRESS="[email protected],[email protected]" | ||
|
||
# You must have atleast one of the following auth providers configured | ||
AUTH_GITHUB_ID= | ||
AUTH_GITHUB_SECRET= | ||
AZURE_AD_CLIENT_ID= | ||
AZURE_AD_CLIENT_SECRET= | ||
AZURE_AD_TENANT_ID= | ||
|
||
# Update your production URL in NEXTAUTH_URL | ||
NEXTAUTH_SECRET=AZURE-OPENIAI-NEXTAUTH-OWNKEY@1 | ||
NEXTAUTH_URL=http://localhost:3000 | ||
|
||
# Update your Cosmos Environment details here | ||
AZURE_COSMOSDB_URI=https://<cosmoresourcename>.documents.azure.com:443/ | ||
AZURE_COSMOSDB_KEY= | ||
|
||
# Update your Cosmos DB_NAME and CONTAINER_NAME if you want to overwrite the default values | ||
AZURE_COSMOSDB_DB_NAME=chat | ||
AZURE_COSMOSDB_CONTAINER_NAME=history | ||
|
||
# Azure cognitive search is used for chat over your data | ||
AZURE_SEARCH_API_KEY= | ||
AZURE_SEARCH_NAME= | ||
AZURE_SEARCH_INDEX_NAME= | ||
AZURE_SEARCH_API_VERSION="2023-07-01-Preview" | ||
|
||
# Azure AI Document Intelligence to extract content from your data | ||
AZURE_DOCUMENT_INTELLIGENCE_ENDPOINT="https://REGION.api.cognitive.microsoft.com/" | ||
AZURE_DOCUMENT_INTELLIGENCE_KEY= | ||
|
||
# Azure Speech to Text to convert audio to text | ||
# Enabled must be set to "Y" any other value will disable the feature | ||
NEXT_PUBLIC_SPEECH_ENABLED=Y | ||
AZURE_SPEECH_REGION=<region, e.g. australiaeast> | ||
AZURE_SPEECH_KEY= | ||
``` | ||
</details> | ||
|
||
3. Populate the environment variables in this file. | ||
<details><summary>Environment Variables (ref src/.env.example)</summary> | ||
```bash | ||
# NOTES: | ||
# - Do not use double-quotes and do not delete any of the variables. | ||
# - Make sure that NEXTAUTH_URL=http://localhost:3000 has no comments in the same line. | ||
|
||
# Update your Azure OpenAI details | ||
|
||
# AZURE_OPENAI_API_INSTANCE_NAME should be just the name of azure openai resource and not the full url; | ||
|
||
# AZURE_OPENAI_API_DEPLOYMENT_NAME should be deployment name from your azure openai studio and not the model name. | ||
|
||
# AZURE_OPENAI_API_VERSION should be Supported versions checkout docs https://learn.microsoft.com/en-us/azure/ai-services/openai/reference | ||
|
||
OPENAI_API_KEY= | ||
AZURE_OPENAI_API_INSTANCE_NAME= | ||
AZURE_OPENAI_API_DEPLOYMENT_NAME= | ||
AZURE_OPENAI_API_VERSION=2023-03-15-preview | ||
AZURE_OPENAI_API_EMBEDDINGS_DEPLOYMENT_NAME= | ||
|
||
# Update your admin email address | ||
|
||
ADMIN_EMAIL_ADDRESS="[email protected],[email protected]" | ||
|
||
# You must have atleast one of the following auth providers configured | ||
|
||
AUTH_GITHUB_ID= | ||
AUTH_GITHUB_SECRET= | ||
AZURE_AD_CLIENT_ID= | ||
AZURE_AD_CLIENT_SECRET= | ||
AZURE_AD_TENANT_ID= | ||
|
||
# Update your production URL in NEXTAUTH_URL | ||
|
||
NEXTAUTH_SECRET=AZURE-OPENIAI-NEXTAUTH-OWNKEY@1 | ||
NEXTAUTH_URL=http://localhost:3000 | ||
|
||
# Update your Cosmos Environment details here | ||
|
||
AZURE_COSMOSDB_URI=https://<cosmoresourcename>.documents.azure.com:443/ | ||
AZURE_COSMOSDB_KEY= | ||
|
||
# Update your Cosmos DB_NAME and CONTAINER_NAME if you want to overwrite the default values | ||
|
||
AZURE_COSMOSDB_DB_NAME=chat | ||
AZURE_COSMOSDB_CONTAINER_NAME=history | ||
|
||
# Azure cognitive search is used for chat over your data | ||
|
||
AZURE_SEARCH_API_KEY= | ||
AZURE_SEARCH_NAME= | ||
AZURE_SEARCH_INDEX_NAME= | ||
AZURE_SEARCH_API_VERSION="2023-07-01-Preview" | ||
|
||
# Azure AI Document Intelligence to extract content from your data | ||
|
||
AZURE_DOCUMENT_INTELLIGENCE_ENDPOINT="https://REGION.api.cognitive.microsoft.com/" | ||
AZURE_DOCUMENT_INTELLIGENCE_KEY= | ||
|
||
# Azure Speech to Text to convert audio to text | ||
|
||
# Enabled must be set to "Y" any other value will disable the feature | ||
|
||
NEXT_PUBLIC_SPEECH_ENABLED=Y | ||
AZURE_SPEECH_REGION=<region, e.g. australiaeast> | ||
AZURE_SPEECH_KEY= | ||
``` | ||
</details> | ||
|
||
4. Install npm packages by running `npm install` | ||
5. Start the app by running `npm run dev` | ||
6. Access the app on [http://localhost:3000](http://localhost:3000) | ||
|
||
You should now be prompted to login with your chosen OAuth provider. | ||
|
||
> NOTE: If using Basic Auth (DEV ONLY) any username you enter will create a new user id (hash of username@localhost). You can use this to simulate multiple users. | ||
![Chat Login (DEV)](/images/chat-login-dev.png) | ||
|
||
|
||
Once successfully logged in, you can start creating new conversations. | ||
|
||
![Chat Home](/images/chat-home.png) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
export const APP_VERSION = "1.1.0"; | ||
export const APP_VERSION = "1.2.0"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Azure Chat Updates | ||
|
||
Below are the updates for the Azure Chat Solution accelerator | ||
|
||
## 📂 Chat with file | ||
|
||
- In the chat with file feature, you can now see citations within the responses. Simply click on the citation to access the related context. | ||
|
||
- You can now upload files to existing chats, allowing you to chat with multiple files simultaneously. | ||
|
||
## 🎙️ Speech | ||
|
||
Ability to use Azure Speech in conversations. This feature is not enabled by default. To enable this feature, you must set the environment variable `NEXT_PUBLIC_SPEECH_ENABLED=true` along with the Azure Speech subscription key and region. | ||
|
||
``` | ||
NEXT_PUBLIC_SPEECH_ENABLED=true | ||
AZURE_SPEECH_REGION="REGION" | ||
AZURE_SPEECH_KEY="1234...." | ||
``` | ||
|
||
## 🔑 Environment variable change | ||
|
||
Please note that the solution has been upgraded to utilise the most recent version of the OpenAI JavaScript SDK, necessitating the use of the `OPENAI_API_KEY` environment variable. | ||
|
||
Ensure that you update the variable name in both your '.env' file and the configuration within Azure App Service or Key Vault, changing it from `AZURE_OPENAI_API_KEY` to `OPENAI_API_KEY`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.