Giter Club home page Giter Club logo

azurechat's Introduction

Unleash the Power of Azure Open AI

  1. Introduction
  2. Solution Overview
  3. Deploy to Azure
  4. Run from your local machine
  5. Deploy to Azure with GitHub Actions
  6. Add identity provider
  7. Chatting with your file
  8. Persona
  9. Extensions
  10. Environment variables
  11. Migration considerations

Introduction

Azure Chat Solution Accelerator powered by Azure Open AI Service

Azure Chat Solution Accelerator powered by Azure Open AI Service is a solution accelerator that allows organisations to deploy a private chat tenant in their Azure Subscription, with a familiar user experience and the added capabilities of chatting over your data and files.

Benefits are:

  1. Private: Deployed in your Azure tenancy, allowing you to isolate it to your Azure tenant.

  2. Controlled: Network traffic can be fully isolated to your network and other enterprise grade authentication security features are built in.

  3. Value: Deliver added business value with your own internal data sources (plug and play) or integrate with your internal services (e.g., ServiceNow, etc).

Deploy to Azure

You can provision Azure resources for the solution accelerator using either the Azure Developer CLI or the Deploy to Azure button below. Regardless of the method you chose you will still need set up an identity provider and specify an admin user

Deployment Options

You can deploy the application using one of the following options:

1. Azure Developer CLI

Important

This section will create Azure resources and deploy the solution from your local environment using the Azure Developer CLI. Note that you do not need to clone this repo to complete these steps.

  1. Download the Azure Developer CLI
  2. If you have not cloned this repo, run azd init -t microsoft/azurechat. If you have cloned this repo, just run 'azd init' from the repo root directory.
  3. Run azd up to provision and deploy the application
azd init -t microsoft/azurechat
azd up

# if you are wanting to see logs run with debug flag
azd up --debug

2. Azure Portal Deployment

Warning

This button will only create Azure resources. You will still need to deploy the application by following the deploy to Azure section to build and deploy the application using GitHub actions.

Click on the Deploy to Azure button to deploy the Azure resources for the application.

Deploy to Azure

Important

The application is protected by an identity provider and follow the steps in Add an identity provider section for adding authentication to your app.

Next

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.

When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

Trademarks

This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft's Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.

azurechat's People

Contributors

anarchitect avatar davidxw avatar dcnsakthi avatar dependabot[bot] avatar jasonthedeveloper avatar kun432 avatar maxleiter avatar microsoft-github-policy-service[bot] avatar microsoftopensource avatar ms-phillipk avatar oliverlabs avatar option40 avatar thivy avatar tonybaloney avatar vyasdev avatar xtrah avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

azurechat's Issues

Deployment Error by CustomDeployment from Template to Azure

I am unfortunately getting the following error when using the one-click deployment to azure:

{"code":"DeploymentFailed","target":"/subscriptions/XXX/resourceGroups/XXXX/providers/Microsoft.Resources/deployments/resources-5stymuvr2bba2","message":"At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/arm-deployment-operations for usage details.","details":[{"code":"BadRequest","target":"/subscriptions/XXX/resourceGroups/XXX/providers/Microsoft.Resources/deployments/resources-5stymuvr2bba2","message":"{\r\n "code": "BadRequest",\r\n "message": "The character 'F' at index 0 is not allowed in the DatabaseAccount name\r\nActivityId: 6a63308f-d2c3-49ea-a9df-fd1c369b7938, Microsoft.Azure.Documents.Common/2.14.0"\r\n}"}]}

Incorrect mapping of Conversation Styles to Temperature Values

I discovered an inconsistency in the mapping of conversation styles to temperature values in the transformConversationStyleToTemperature function (located in features/chat/chat-services/utils.ts). The current mapping seems to be:

"precise" โ†’ 1
"balanced" โ†’ 0.5
"creative" โ†’ 0.1

However, according to the official documentation for the temperature parameter:

temperature: Defaults to 1. What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.

Based on this, the expected behavior for a "precise" style would typically correspond to a lower temperature value, while a "creative" style would be associated with a higher temperature.

The correct mapping should likely be:

"precise" โ†’ 0.1
"balanced" โ†’ 0.5
"creative" โ†’ 1
I recommend reviewing and updating this mapping to align with the intended behavior of the conversation styles.

No data separation between users

Hi all,

Any authentified user (Microsoft 365) can see the historic of conversation of everyone when click there :

image

image

Is this by design, or is something wrong with my deployment ?!

Can you use this with your own DB/ Auth?

Do we need to use CosmosDB and the Azure auth to run this? Could we use our own DB server and existing Auth system?

We have a Azure OpenAI deployment we use too, just curious if it'd be possible or not..

Document Upload is not working

Hi. First of all thanks for the great app.

Everything works except for the document upload.
If I try to upload PDF document I always get error 500 Failed to load resources
I have created all services and configured the env.local, unfortunately I am not getting this part to work.
image
image

Feature request to allow the answer generation to be canceled

In the original ChatGPT, the user can cancel the AI answer generation for various reasons. Here, in Azure ChatGPT, I see at least two reasons while a user might want to cancel an answer generation:

  1. The user don't want to wait until the answer is fully generated.
  2. The user want to cancel the generation in order to save on the API usage.

I know that the .NET version of the Azure OpenAI SDK supports cancellation tokens very well with streaming. I haven't looked yet, but I would assume that the same cancellation mechanism would exist for JavaScript.

can not start azurechatgpt

node version v18.16.1
npm version 9.5.1

- error ./node_modules/lucide-react/dist/cjs/lucide-react.js:2:0
Module not found: Can't resolve '/azurechatgpt/src/node_modules/lucide-react/dist/cjs/icons/x'

https://nextjs.org/docs/messages/module-not-found

Import trace for requested module:
./components/ui/toast.tsx
./components/ui/toaster.tsx
- wait compiling...
- warn ./components/ui/toast.tsx
Attempted import error: 'modularize-import-loader?name=X&from=default&as=default&join=./icons/x!lucide-react' does not contain a default export (imported as 'X').

Import trace for requested module:
./components/ui/toast.tsx
./components/ui/toaster.tsx
- warn ./components/ui/toast.tsx
Attempted import error: 'modularize-import-loader?name=X&from=default&as=default&join=./icons/x!lucide-react' does not contain a default export (imported as 'X').

Import trace for requested module:
./components/ui/toast.tsx
./components/ui/toaster.tsx
- wait compiling /_error (client and server)...
- error ./node_modules/lucide-react/dist/cjs/lucide-react.js:2:0
Module not found: Can't resolve '/azurechatgpt/src/node_modules/lucide-react/dist/cjs/icons/x'

https://nextjs.org/docs/messages/module-not-found

Import trace for requested module:
./components/ui/toast.tsx

Still MODULE_NOT_FOUND after successful push via GH actions

I'm still seeing issues and I am really not sure why as I am confident I have setup the application based on the README.

I've created the required App Reg within my Development AAD and I created the AZURE_CREDENTIALS and the AZURE_APP_SERVICE variables within GH.

I ensured the App Reg had the required Contributor role within the RG I was deployed into.

Used the updated ARM template to ensure that the NEXTAUTH_URL had the 'https:/' prefix as explained previously.

Updated the settings within the App Service with the AZURE_AD_TENANT_ID, AZURE_AD_CLIENT_ID and AZURE_AD_CLIENT_SECRET variables.

Pushed the app files to the app service via the GH action and this excutes successfully without issue.

I then traverse to the app, complete initial sign in (which completes successfully based on the AAD logs)until I get the following error:

image

I know from previous issues that this related to an issue with the COSMOSDB_KEY and COSMOSDB_URI variables being incorrectly set so I have validated this on my side and I can confirm that the variable names are correct in the App Service and in the code within GH.

I took a look at the Kudu portal to see if I could diagnose further and I am still seeing events like the below:

image

I checked the file path that the error mentions (/home/site/wwwroot/) and confirmed that the file 'server.js" does indeed exist within the application files:

image

Really sorry if this is a simple fix but I am really struggling and not sure where else to troubleshoot.

Thanks for your help.

AAD Auth Provider stuck in sign in loop

Describe the issue

Infra and code successfully deployed, but when using the AAD Auth Provider, it appears to get stuck in sign in loop.
Have confirmed that the AAD App Registration is successfully issuing an auth token, and what looks like to be session tokens back to next-auth but upon hitting the /chat endpoint it gets sent back to login screen

Screenshots ๐Ÿ“ท

image

image

Unhandled Runtime Error

Hi, Could you please let me know if you have come across this problem and if there is a quick solution available?

image

Ensure Azure ChatGPT is responsive for mobile devices

I'm sure the team is aware of this: the current sample is not responsive on mobile at all.

Image

I understand that this is a starter repo and that the focus is more on providing a private solution with a Cosmos data store. However, making the UI work well on different devices is a bit of a no-brainer to me. Thanks for the consideration.

Application error: a server-side exception has occurred (see the server logs for more information).

When I deploy an app to an Azure Web App using GitHub Actions, the Action succeeds and the deployment is there.

However, once I authenticate, I get the following error:

Application error: a server-side exception has occurred (see the server logs for more information).
Digest: 807578399

The url is https://chatomg-app-[REDACTED].azurewebsites.net/chat

Looking at the logs, there's a MODULE NOT FOUND error upon loading the container:

2023-08-04T13:16:40  Welcome, you are now connected to log-streaming service.
Starting Log Tail -n 10 of existing logs ----
/home/LogFiles/__lastCheckTime.txt  (https://chatomg-app-[REDACTED].scm.azurewebsites.net/api/vfs/LogFiles/__lastCheckTime.txt)08/04/2023 13:11:04
/home/LogFiles/kudu/trace/ee68e071c1e3-8c0baba3-95b6-42c0-8b06-5ca15ca99b94.txt  (https://chatomg-app-[REDACTED].scm.azurewebsites.net/api/vfs/LogFiles/kudu/trace/ee68e071c1e3-8c0baba3-95b6-42c0-8b06-5ca15ca99b94.txt)
2023-08-04T13:03:30  Startup Request, url: /api/deployments/?$orderby=ReceivedTime%20desc&$top=20&api-version=2022-03-01, method: GET, type: request, pid: 86,1,14, ScmType: None
/home/LogFiles/kudu/trace/f0602c3d977b-f84ce349-8d4a-4684-86a7-caba7f488a61.txt  (https://chatomg-app-4waanfmk7mez2.scm.azurewebsites.net/api/vfs/LogFiles/kudu/trace/f0602c3d977b-f84ce349-8d4a-4684-86a7-caba7f488a61.txt)
2023-08-04T13:08:20  Startup Request, url: /api/settings, method: GET, type: request, pid: 92,1,16, ScmType: None
/home/LogFiles/kudu/trace/fdaf58675734-42e852ef-a880-4d56-b4a6-f6d5119a2bbd.txt  (https://chatomg-app-4waanfmk7mez2.scm.azurewebsites.net/api/vfs/LogFiles/kudu/trace/fdaf58675734-42e852ef-a880-4d56-b4a6-f6d5119a2bbd.txt)
2023-08-04T13:06:22  Startup Request, url: /api/deployments/?$orderby=ReceivedTime%20desc&$top=20&api-version=2022-03-01, method: GET, type: request, pid: 86,1,5, ScmType: None
/home/LogFiles/2023_08_04_ln0xsdlwk00000F_default_docker.log  (https://chatomg-app-4waanfmk7mez2.scm.azurewebsites.net/api/vfs/LogFiles/2023_08_04_ln0xsdlwk00000F_default_docker.log)
2023-08-04T13:08:38.716314930Z     at Module._resolveFilename (node:internal/modules/cjs/loader:1075:15)
2023-08-04T13:08:38.716318930Z     at Module._load (node:internal/modules/cjs/loader:920:27)
2023-08-04T13:08:38.716322930Z     at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
2023-08-04T13:08:38.716340930Z     at node:internal/main/run_main_module:23:47 {
2023-08-04T13:08:38.716345330Z   code: 'MODULE_NOT_FOUND',
2023-08-04T13:08:38.716349530Z   requireStack: []
2023-08-04T13:08:38.716353330Z }
2023-08-04T13:08:38.716463731Z
2023-08-04T13:08:38.716475931Z Node.js v18.16.0

Handle messages that exceeds token limits

If message (thread?) exceeds the GPT model token limits of 4k/8k/32k, the app should return a descriptive error message. It currently seems to just send a POST request that never gets an answer from the backend.

Deploy to azure error

deploy Azure Cosmos DB Account failedใ€‚
Error type:
The character 'C' at index 0 is not allowed in the DatabaseAccount name
ActivityId: xxxxxxxxxxxxxxxxxxxxxxxxxxx, Microsoft.Azure.Documents.Common/2.14.0 (code: BadRequest)

support other LLMs

More a question than an issue - is there a plan for supporting custom LLMs with this? Looks like langchain does support many others and would be great if we could let users pick or choose another LLM to be default.

GitHub OAuth timed out

I successfully got the app to work on a local machine directly connected to the Internet, using GitHub authentication.

Next, I tried to get the app to work on a PC connected to the company network under proxy management, using the same API and authentication settings.

But I got the following error and GitHub authentication failed.

C:\Users\me\work\azurechatgpt\src> npm run dev

> [email protected] dev
> next dev

- ready started server on 0.0.0.0:3000, url: http://localhost:3000
- info Loaded env from C:\Users\me\work\azurechatgpt\src\.env.local
- warn You have enabled experimental features (serverActions, serverActionsBodySizeLimit) in next.config.js.
- warn Experimental features are not covered by semver, and may cause unexpected or broken application behavior. Use at your own risk.

- event compiled client and server successfully in 392 ms (20 modules)
- wait compiling...
- event compiled client and server successfully in 426 ms (20 modules)
- wait compiling /page (client and server)...
- event compiled client and server successfully in 7.5s (2037 modules)
[next-auth][warn][EXPERIMENTAL_API]
`getServerSession` is used in a React Server Component.
https://next-auth.js.org/configuration/nextjs#getServerSession}
https://next-auth.js.org/warnings#EXPERIMENTAL_API
- wait compiling /api/auth/[...nextauth]/route (client and server)...
- event compiled client and server successfully in 476 ms (2105 modules)
[next-auth][error][OAUTH_CALLBACK_ERROR]
https://next-auth.js.org/errors#oauth_callback_error outgoing request timed out after 3500ms {
  error: RPError: outgoing request timed out after 3500ms
      at eval (webpack-internal:///(sc_server)/./node_modules/openid-client/lib/helpers/request.js:115:19)
      at async Client.grant (webpack-internal:///(sc_server)/./node_modules/openid-client/lib/client.js:1182:26)
      at async Client.oauthCallback (webpack-internal:///(sc_server)/./node_modules/openid-client/lib/client.js:520:30)
      at async oAuthCallback (webpack-internal:///(sc_server)/./node_modules/next-auth/core/lib/oauth/callback.js:120:22)
      at async Object.callback (webpack-internal:///(sc_server)/./node_modules/next-auth/core/routes/callback.js:18:79)
      at async AuthHandler (webpack-internal:///(sc_server)/./node_modules/next-auth/core/index.js:202:38)
      at async NextAuthRouteHandler (webpack-internal:///(sc_server)/./node_modules/next-auth/next/index.js:49:30)
      at async NextAuth._args$ (webpack-internal:///(sc_server)/./node_modules/next-auth/next/index.js:83:24)
      at async eval (webpack-internal:///(sc_server)/./node_modules/next/dist/server/future/route-modules/app-route/module.js:249:37) {
    name: 'OAuthCallbackError',
    code: undefined
  },
  providerId: 'github',
  message: 'outgoing request timed out after 3500ms'
}

GPT-4 is not set

You're not using the header's tabs.

It would need something like

  const myModel = props.model === "GPT-4" ? "gpt-4" : "gpt-3.5-turbo"

  const chat = new ChatOpenAI({
    temperature: 0,
    streaming: true,
    modelName:  myModel
  });

new CosmosClient throws ERR_INVALID_URL

Hi, I'm using my fresh deployed cosmos db URI in a format of "https://<my-cosmos>.documents.azure.com:443/", while the following runtime error is thrown.
I check the @azure/cosmos document, turns out the URI format is correct.

Do we have any clue about the cause or have any workaround?

image
- error TypeError [ERR_INVALID_URL]: Invalid URL
    at memoryContainer (./features/common/cosmos.ts:15:20)
    at FindAllChatThreadForCurrentUser (./features/chat/chat-services/chat-thread-service.ts:29:92)
    at ChatMenu (./features/chat/chat-menu/chat-menu.tsx:19:138)
    at stringify (<anonymous>)
- error TypeError [ERR_INVALID_URL]: Invalid URL
    at memoryContainer (./features/common/cosmos.ts:15:20)
    at FindAllChatThreadForCurrentUser (./features/chat/chat-services/chat-thread-service.ts:29:92)
    at Home (./app/chat/page.tsx:18:138)
    at async Promise.all (index 0)
    at async Promise.all (index 0)
- error TypeError [ERR_INVALID_URL]: Invalid URL
    at memoryContainer (./features/common/cosmos.ts:15:20)
    at FindAllChatThreadForCurrentUser (./features/chat/chat-services/chat-thread-service.ts:29:92)
    at ChatMenu (./features/chat/chat-menu/chat-menu.tsx:19:138)
    at stringify (<anonymous>)
- error TypeError [ERR_INVALID_URL]: Invalid URL
    at memoryContainer (./features/common/cosmos.ts:15:20)
    at FindAllChatThreadForCurrentUser (./features/chat/chat-services/chat-thread-service.ts:29:92)
    at ChatMenu (./features/chat/chat-menu/chat-menu.tsx:19:138)
    at stringify (<anonymous>)
digest: "304417822"
- error TypeError [ERR_INVALID_URL]: Invalid URL
    at memoryContainer (./features/common/cosmos.ts:15:20)
    at FindAllChatThreadForCurrentUser (./features/chat/chat-services/chat-thread-service.ts:29:92)
    at Home (./app/chat/page.tsx:18:138)
    at async Promise.all (index 0)
    at async Promise.all (index 0)
- error TypeError [ERR_INVALID_URL]: Invalid URL
    at memoryContainer (./features/common/cosmos.ts:15:20)
    at FindAllChatThreadForCurrentUser (./features/chat/chat-services/chat-thread-service.ts:29:92)
    at ChatMenu (./features/chat/chat-menu/chat-menu.tsx:19:138)
    at stringify (<anonymous>)

Consider renaming because this project isn't ChatGPT

ChatGPT is a specific application made up several ML models and lots of features that are different from this application.

This application is a langchain "chat over data" app, that while perhaps quite useful, is not ChatGPT.

The name of this project is not only confusing, but you're actively misleading people in the README by saying things like this:

Azure ChatGPT is our enterprise option. This is the exact same service but offered as your private ChatGPT.

This is not true. This project is not the exact same service as ChatGPT. It is an alternative kind of application that uses the /chat API endpoints.

Understanding the model switch between GPT 3.5 and 4

As the end user I have to create a deployment inside Azure and specify a specific model. In my case I am trying out gpt-4.
However, the Azure ChatGPT UI indicates that I can switch between GPT 3.5 and 4. I investigated the request made to Azure OpenAI, and indeed "model": "gpt-3.5-turbo",. is passed in the request body. This seems like a hidden parameter for the Chat Completions API, not mentioned in the regular documentation.

The main thing I wonder is, since the deployment on the Azure OpenAI side is set to gpt-4 and I still observe gpt-4 in the intercepted streaming output, am I still paying the gpt-4 pricing in this case?

:( Application Error

:( Application Error
If you are the application administrator, you can access the diagnostic resources.

I recently tried deploying a project on Azure App Service through a one-click deployment from GitHub. However, I'm encountering an error during the startup of the service:

2023-08-07T05:17:04.709273528Z _____
2023-08-07T05:17:04.712456057Z / _ \ __________ _________ ____
2023-08-07T05:17:04.712468257Z / /\ \__ / | _ __ _/ __
2023-08-07T05:17:04.712473857Z / | / /| | /| | /\ /
2023-08-07T05:17:04.712477957Z _
|__ /_____ _/ || __ >
2023-08-07T05:17:04.712482057Z / / /
2023-08-07T05:17:04.712486157Z A P P S E R V I C E O N L I N U X
2023-08-07T05:17:04.712490257Z
2023-08-07T05:17:04.712494357Z Documentation: http://aka.ms/webapp-linux
2023-08-07T05:17:04.712498557Z NodeJS quickstart: https://aka.ms/node-qs
2023-08-07T05:17:04.712502257Z NodeJS Version : v18.16.0
2023-08-07T05:17:04.712505957Z Note: Any data outside '/home' is not persisted
2023-08-07T05:17:04.712509757Z
2023-08-07T05:17:04.913114427Z Starting OpenBSD Secure Shell server: sshd.
2023-08-07T05:17:04.947974835Z Starting periodic command scheduler: cron.
2023-08-07T05:17:04.954004788Z Cound not find build manifest file at '/home/site/wwwroot/oryx-manifest.toml'
2023-08-07T05:17:04.954215690Z Could not find operation ID in manifest. Generating an operation id...
2023-08-07T05:17:04.954432492Z Build Operation ID: a3c3cf80-71c0-4bc2-ae4e-c0e57fa9d32c
2023-08-07T05:17:05.107466342Z Environment Variables for Application Insight's IPA Codeless Configuration exists..
2023-08-07T05:17:05.158724795Z Writing output script to '/opt/startup/startup.sh'
2023-08-07T05:17:05.241667726Z Running #!/bin/sh
2023-08-07T05:17:05.241858328Z
2023-08-07T05:17:05.241872128Z # Enter the source directory to make sure the script runs where the user expects
2023-08-07T05:17:05.241878628Z cd "/home/site/wwwroot"
2023-08-07T05:17:05.241883828Z
2023-08-07T05:17:05.241888728Z export NODE_PATH=/usr/local/lib/node_modules:$NODE_PATH
2023-08-07T05:17:05.241893528Z if [ -z "$PORT" ]; then
2023-08-07T05:17:05.241898428Z export PORT=8080
2023-08-07T05:17:05.241904129Z fi
2023-08-07T05:17:05.241908229Z
2023-08-07T05:17:05.251246511Z PATH="$PATH:/home/site/wwwroot" node server.js
2023-08-07T05:17:05.343407024Z node:internal/modules/cjs/loader:1078
2023-08-07T05:17:05.343467825Z throw err;
2023-08-07T05:17:05.343477025Z ^
2023-08-07T05:17:05.343482325Z
2023-08-07T05:17:05.343487225Z Error: Cannot find module '/home/site/wwwroot/server.js'
2023-08-07T05:17:05.343491725Z at Module._resolveFilename (node:internal/modules/cjs/loader:1075:15)
2023-08-07T05:17:05.343496025Z at Module._load (node:internal/modules/cjs/loader:920:27)
2023-08-07T05:17:05.343500125Z at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
2023-08-07T05:17:05.343517225Z at node:internal/main/run_main_module:23:47 {
2023-08-07T05:17:05.343532125Z code: 'MODULE_NOT_FOUND',
2023-08-07T05:17:05.343536625Z requireStack: []
2023-08-07T05:17:05.343540925Z }
2023-08-07T05:17:05.343621026Z
2023-08-07T05:17:05.343633926Z Node.js v18.16.0
2023-08-07T05:17:04.326Z INFO - 18-lts_20230502.1.tuxprod Pulling from appsvc/node
2023-08-07T05:17:04.328Z INFO - Digest: sha256:b1dc34abcaac6f00dd945840a5bc6367123b63b56465a5ec20c316eca98e569e
2023-08-07T05:17:04.329Z INFO - Status: Image is up to date for mcr.microsoft.com/appsvc/node:18-lts_20230502.1.tuxprod
2023-08-07T05:17:04.332Z INFO - Pull Image successful, Time taken: 0 Minutes and 0 Seconds
2023-08-07T05:17:04.342Z INFO - Starting container for site
2023-08-07T05:17:04.343Z INFO - docker run -d --expose=8080 --name mmgchatgpt-app-ekefg2g2a57xe_0_5c14d46b -e WEBSITE_SITE_NAME=mmgchatgpt-app-ekefg2g2a57xe -e WEBSITE_AUTH_ENABLED=False -e WEBSITE_ROLE_INSTANCE_ID=0 -e WEBSITE_HOSTNAME=mmgchatgpt-app-ekefg2g2a57xe.azurewebsites.net -e WEBSITE_INSTANCE_ID=0f8bc5d9c5b2341c0b55ca041f95daa510fb3166fa4f873a130341dda37c34af -e HTTP_LOGGING_ENABLED=1 -e WEBSITE_USE_DIAGNOSTIC_SERVER=True appsvc/node:18-lts_20230502.1.tuxprod node server.js
2023-08-07T05:17:04.821Z INFO - Initiating warmup request to container mmgchatgpt-app-ekefg2g2a57xe_0_5c14d46b for site mmgchatgpt-app-ekefg2g2a57xe
2023-08-07T05:17:05.840Z ERROR - Container mmgchatgpt-app-ekefg2g2a57xe_0_5c14d46b for site mmgchatgpt-app-ekefg2g2a57xe has exited, failing site start
2023-08-07T05:17:05.847Z ERROR - Container mmgchatgpt-app-ekefg2g2a57xe_0_5c14d46b didn't respond to HTTP pings on port: 8080, failing site start. See container logs for debugging.
2023-08-07T05:17:05.850Z INFO - Stopping site mmgchatgpt-app-ekefg2g2a57xe because it failed during startup.

One click provisioning not working

I can't get the Azure resources deployed via the one click deployment button. Everytime I run the deployment, I get error messages around database account name:

ERROR DETAILS
The character 'A' at index 0 is not allowed in the DatabaseAccount name
ActivityId: 3300893c-050d-4213-9409-17afe8d43ef0, Microsoft.Azure.Documents.Common/2.14.0 (Code: BadRequest)

I tried already so many different names (different letters to start with, played around with the length of the name, etc...)

Hoping that someone can point me in the right direction.

:( Application Error issue

I tried deploying from on azure and the app did not start.

image

I have also created Azure OpenAI in the same region in the same resource group, is there a mistake in the way I created it?

image

The diagnostic results are normal.

image

Feature request to make the drawer/navbar collapsible and responsive

I'd like the sidebar/drawer/navigation menu (my frontend vocabulary is not up-to-date ๐Ÿ˜…) to be:

  • Collapsible
  • Collapsed by default on mobile devices

Generally speaking, I'd like the UI to be responsive. Right now on mobile, the sidebar is always open and I have to horizontally scroll in order to read/write messages.

Azure OpenAI WestEurope can't make it work

Hello there, I've deployed the following infrastructure (WestEurope): https://github.com/FreddyAyala/AzureAIServicesLandingZone then I've deployed your application inside an Azure WebApp, deployment works and al pre requisites are good.

The particularity is that I'm using a privatelink for Azure OpenAI and the model:

deployment = {
"gpt-35-turbo" = {
name = "gpt-35-turbo2"
model_format = "OpenAI"
model_name = "gpt-35-turbo"
model_version = "0301"
scale_type = "Standard"
}

In order to use privatelink dns, I use the variable AZURE_OPENAI_BASE_PATH=https://azure-openai-582219.privatelink.openai.azure.com so it seems to be hitting the private endpoint correctly.

but it doesn't work at all, the issue is the your application expectes: gpt-35-turbo/chat/completions?api-version=2023-03-15-preview as text/stream

but my azure openai only allows: gpt-35-turbo/completions?api-version=2023-03-15-preview as application/json

Do you have any idea why it is happening?

Details of the error:

2023-08-05T10:58:27.182680497Z: [ERROR] - error Error: Network Error 2023-08-05T10:58:27.182740896Z: [ERROR] at createError (/home/site/wwwroot/.next/server/chunks/370.js:26582:19) 2023-08-05T10:58:27.182750996Z: [ERROR] at getResponse (/home/site/wwwroot/.next/server/chunks/370.js:26442:16) 2023-08-05T10:58:27.182756696Z: [ERROR] at process.processTicksAndRejections (node:internal/process/task_queues:95:5) 2023-08-05T10:58:27.182772596Z: [ERROR] at async fetchAdapter (/home/site/wwwroot/.next/server/chunks/370.js:26418:18) 2023-08-05T10:58:27.182778296Z: [ERROR] at async RetryOperation._fn (/home/site/wwwroot/.next/server/chunks/370.js:6195:25) { 2023-08-05T10:58:27.182783596Z: [ERROR] config: { 2023-08-05T10:58:27.182788596Z: [ERROR] transitional: { 2023-08-05T10:58:27.182793396Z: [ERROR] silentJSONParsing: true, 2023-08-05T10:58:27.182809996Z: [ERROR] forcedJSONParsing: true, 2023-08-05T10:58:27.182815396Z: [ERROR] clarifyTimeoutError: false 2023-08-05T10:58:27.182819896Z: [ERROR] }, 2023-08-05T10:58:27.182824595Z: [ERROR] adapter: [AsyncFunction: fetchAdapter], 2023-08-05T10:58:27.182828795Z: [ERROR] transformRequest: [ [Function: transformRequest] ], 2023-08-05T10:58:27.182833595Z: [ERROR] transformResponse: [ [Function: transformResponse] ], 2023-08-05T10:58:27.182838395Z: [ERROR] timeout: 0, 2023-08-05T10:58:27.182842995Z: [ERROR] xsrfCookieName: 'XSRF-TOKEN', 2023-08-05T10:58:27.182847295Z: [ERROR] xsrfHeaderName: 'X-XSRF-TOKEN', 2023-08-05T10:58:27.182851695Z: [ERROR] maxContentLength: -1, 2023-08-05T10:58:27.182856095Z: [ERROR] maxBodyLength: -1, 2023-08-05T10:58:27.182860495Z: [ERROR] validateStatus: [Function: validateStatus], 2023-08-05T10:58:27.182865395Z: [ERROR] headers: { 2023-08-05T10:58:27.182870195Z: [ERROR] Accept: 'application/json, text/plain, */*', 2023-08-05T10:58:27.182875195Z: [ERROR] 'Content-Type': 'application/json', 2023-08-05T10:58:27.182879695Z: [ERROR] 'User-Agent': 'OpenAI/NodeJS/3.3.0', 2023-08-05T10:58:27.182884495Z: [ERROR] Authorization: 'Bearer undefined', 2023-08-05T10:58:27.182889695Z: [ERROR] 'api-key': '45a211bee1fe4060bc644f02fe75509f' 2023-08-05T10:58:27.182894195Z: [ERROR] }, 2023-08-05T10:58:27.182899695Z: [ERROR] method: 'post', 2023-08-05T10:58:27.182904895Z: [ERROR] responseType: 'stream', 2023-08-05T10:58:27.182909995Z: [ERROR] onmessage: [Function: onmessage], 2023-08-05T10:58:27.182915095Z: [ERROR] params: { 'api-version': '2023-03-15-preview' }, 2023-08-05T10:58:27.182920895Z: [ERROR] data: '{"model":"gpt-3.5-turbo","temperature":0,"top_p":1,"frequency_penalty":0,"presence_penalty":0,"n":1,"stream":true,"messages":[{"role":"system","content":"-You are Azure ChatGPT who is a helpful AI Assistant.\\n - You will provide clear and concise queries, and you will respond with polite and professional answers.\\n - You will answer questions truthfully and accurately."},{"role":"user","content":"hello"}]}', 2023-08-05T10:58:27.182930195Z: [ERROR] url: 'https://azure-openai-582219.privatelink.openai.azure.com/gpt-35-turbo/chat/completions' 2023-08-05T10:58:27.182935395Z: [ERROR] }, 2023-08-05T10:58:27.182940695Z: [ERROR] code: 'ERR_NETWORK', 2023-08-05T10:58:27.182945995Z: [ERROR] request: Request { 2023-08-05T10:58:27.182950794Z: [ERROR] [Symbol(realm)]: { settingsObject: [Object] }, 2023-08-05T10:58:27.182961394Z: [ERROR] [Symbol(state)]: { 2023-08-05T10:58:27.182966394Z: [ERROR] method: 'POST', 2023-08-05T10:58:27.182970994Z: [ERROR] localURLsOnly: false, 2023-08-05T10:58:27.182975694Z: [ERROR] unsafeRequest: false, 2023-08-05T10:58:27.182981694Z: [ERROR] body: [Object], 2023-08-05T10:58:27.182986294Z: [ERROR] client: [Object], 2023-08-05T10:58:27.182990794Z: [ERROR] reservedClient: null, 2023-08-05T10:58:27.182995094Z: [ERROR] replacesClientId: '', 2023-08-05T10:58:27.182999594Z: [ERROR] window: 'client', 2023-08-05T10:58:27.183004094Z: [ERROR] keepalive: false, 2023-08-05T10:58:27.183008194Z: [ERROR] serviceWorkers: 'all', 2023-08-05T10:58:27.183012494Z: [ERROR] initiator: '', 2023-08-05T10:58:27.183017194Z: [ERROR] destination: '', 2023-08-05T10:58:27.183021994Z: [ERROR] priority: null, 2023-08-05T10:58:27.183026494Z: [ERROR] origin: 'client', 2023-08-05T10:58:27.183030794Z: [ERROR] policyContainer: 'client', 2023-08-05T10:58:27.183035594Z: [ERROR] referrer: 'client', 2023-08-05T10:58:27.183039894Z: [ERROR] referrerPolicy: '', 2023-08-05T10:58:27.183044294Z: [ERROR] mode: 'cors', 2023-08-05T10:58:27.183049094Z: [ERROR] useCORSPreflightFlag: false, 2023-08-05T10:58:27.183054194Z: [ERROR] credentials: 'same-origin', 2023-08-05T10:58:27.183059194Z: [ERROR] useCredentials: false, 2023-08-05T10:58:27.183063594Z: [ERROR] cache: 'default', 2023-08-05T10:58:27.183067994Z: [ERROR] redirect: 'follow', 2023-08-05T10:58:27.183072694Z: [ERROR] integrity: '', 2023-08-05T10:58:27.183077593Z: [ERROR] cryptoGraphicsNonceMetadata: '', 2023-08-05T10:58:27.183081993Z: [ERROR] parserMetadata: '', 2023-08-05T10:58:27.183086393Z: [ERROR] reloadNavigation: false, 2023-08-05T10:58:27.183090793Z: [ERROR] historyNavigation: false, 2023-08-05T10:58:27.183095293Z: [ERROR] userActivation: false, 2023-08-05T10:58:27.183099693Z: [ERROR] taintedOrigin: false, 2023-08-05T10:58:27.183103893Z: [ERROR] redirectCount: 0, 2023-08-05T10:58:27.183108293Z: [ERROR] responseTainting: 'basic', 2023-08-05T10:58:27.183112293Z: [ERROR] preventNoCacheCacheControlHeaderModification: false, 2023-08-05T10:58:27.183116293Z: [ERROR] done: false, 2023-08-05T10:58:27.183120193Z: [ERROR] timingAllowFailed: false, 2023-08-05T10:58:27.183125693Z: [ERROR] headersList: [HeadersList], 2023-08-05T10:58:27.183129593Z: [ERROR] urlList: [Array], 2023-08-05T10:58:27.183133393Z: [ERROR] url: [URL] 2023-08-05T10:58:27.183137593Z: [ERROR] }, 2023-08-05T10:58:27.183141393Z: [ERROR] [Symbol(signal)]: AbortSignal { aborted: false }, 2023-08-05T10:58:27.183151093Z: [ERROR] [Symbol(headers)]: HeadersList { 2023-08-05T10:58:27.183155793Z: [ERROR] cookies: null, 2023-08-05T10:58:27.183160693Z: [ERROR] [Symbol(headers map)]: [Map], 2023-08-05T10:58:27.183164993Z: [ERROR] [Symbol(headers map sorted)]: [Array] 2023-08-05T10:58:27.183169493Z: [ERROR] } 2023-08-05T10:58:27.183174393Z: [ERROR] }, 2023-08-05T10:58:27.183178893Z: [ERROR] response: undefined, 2023-08-05T10:58:27.183183393Z: [ERROR] isAxiosError: true, 2023-08-05T10:58:27.183187893Z: [ERROR] toJSON: [Function: toJSON], 2023-08-05T10:58:27.183192493Z: [ERROR] attemptNumber: 7, 2023-08-05T10:58:27.183196993Z: [ERROR] retriesLeft: 0 2023-08-05T10:58:27.183201293Z: [ERROR] } 2023-08-05T10:58:27.183205792Z: [ERROR] Error in handler Handler, handleChainError: Error: Network Error 2023-08-05T10:58:27.193209513Z: [ERROR] node:internal/process/promises:288 2023-08-05T10:58:27.193224213Z: [ERROR] triggerUncaughtException(err, true /* fromPromise */); 2023-08-05T10:58:27.193230213Z: [ERROR] ^ 2023-08-05T10:58:27.193234813Z: [ERROR] 2023-08-05T10:58:27.193239613Z: [ERROR] Error: Network Error 2023-08-05T10:58:27.193244013Z: [ERROR] at createError (/home/site/wwwroot/.next/server/chunks/370.js:26582:19) 2023-08-05T10:58:27.193535211Z: [ERROR] at getResponse (/home/site/wwwroot/.next/server/chunks/370.js:26442:16) 2023-08-05T10:58:27.193543811Z: [ERROR] at process.processTicksAndRejections (node:internal/process/task_queues:95:5) 2023-08-05T10:58:27.193548711Z: [ERROR] at async fetchAdapter (/home/site/wwwroot/.next/server/chunks/370.js:26418:18) 2023-08-05T10:58:27.193553510Z: [ERROR] at async RetryOperation._fn (/home/site/wwwroot/.next/server/chunks/370.js:6195:25) { 2023-08-05T10:58:27.193558110Z: [ERROR] config: { 2023-08-05T10:58:27.193562510Z: [ERROR] transitional: { 2023-08-05T10:58:27.193567010Z: [ERROR] silentJSONParsing: true, 2023-08-05T10:58:27.193571410Z: [ERROR] forcedJSONParsing: true, 2023-08-05T10:58:27.193575810Z: [ERROR] clarifyTimeoutError: false 2023-08-05T10:58:27.193580310Z: [ERROR] }, 2023-08-05T10:58:27.193584910Z: [ERROR] adapter: [AsyncFunction: fetchAdapter], 2023-08-05T10:58:27.193589610Z: [ERROR] transformRequest: [ [Function: transformRequest] ], 2023-08-05T10:58:27.193594210Z: [ERROR] transformResponse: [ [Function: transformResponse] ], 2023-08-05T10:58:27.193869408Z: [ERROR] timeout: 0, 2023-08-05T10:58:27.193880408Z: [ERROR] xsrfCookieName: 'XSRF-TOKEN', 2023-08-05T10:58:27.193890908Z: [ERROR] xsrfHeaderName: 'X-XSRF-TOKEN', 2023-08-05T10:58:27.193896608Z: [ERROR] maxContentLength: -1, 2023-08-05T10:58:27.193901408Z: [ERROR] maxBodyLength: -1, 2023-08-05T10:58:27.193905908Z: [ERROR] validateStatus: [Function: validateStatus], 2023-08-05T10:58:27.193910408Z: [ERROR] headers: { 2023-08-05T10:58:27.193921308Z: [ERROR] Accept: 'application/json, text/plain, */*', 2023-08-05T10:58:27.193926008Z: [ERROR] 'Content-Type': 'application/json', 2023-08-05T10:58:27.193930707Z: [ERROR] 'User-Agent': 'OpenAI/NodeJS/3.3.0', 2023-08-05T10:58:27.193935307Z: [ERROR] Authorization: 'Bearer undefined', 2023-08-05T10:58:27.193939807Z: [ERROR] 'api-key': '45a211bee1fe4060bc644f02fe75509f' 2023-08-05T10:58:27.193944307Z: [ERROR] }, 2023-08-05T10:58:27.193948607Z: [ERROR] method: 'post', 2023-08-05T10:58:27.193952907Z: [ERROR] responseType: 'stream', 2023-08-05T10:58:27.193957407Z: [ERROR] onmessage: [Function: onmessage], 2023-08-05T10:58:27.193961807Z: [ERROR] params: { 'api-version': '2023-03-15-preview' }, 2023-08-05T10:58:27.193967007Z: [ERROR] data: '{"model":"gpt-3.5-turbo","temperature":0,"top_p":1,"frequency_penalty":0,"presence_penalty":0,"n":1,"stream":true,"messages":[{"role":"system","content":"-You are Azure ChatGPT who is a helpful AI Assistant.\\n - You will provide clear and concise queries, and you will respond with polite and professional answers.\\n - You will answer questions truthfully and accurately."},{"role":"user","content":"hello"}]}', 2023-08-05T10:58:27.193974207Z: [ERROR] url: 'https://azure-openai-582219.privatelink.openai.azure.com/gpt-35-turbo/chat/completions' 2023-08-05T10:58:27.193978907Z: [ERROR] }, 2023-08-05T10:58:27.193983207Z: [ERROR] code: 'ERR_NETWORK', 2023-08-05T10:58:27.193987707Z: [ERROR] request: Request { 2023-08-05T10:58:27.193992007Z: [ERROR] [Symbol(realm)]: { 2023-08-05T10:58:27.193996507Z: [ERROR] settingsObject: { 2023-08-05T10:58:27.194002207Z: [ERROR] baseUrl: undefined, 2023-08-05T10:58:27.194006707Z: [ERROR] origin: [Getter], 2023-08-05T10:58:27.194011107Z: [ERROR] policyContainer: { referrerPolicy: 'strict-origin-when-cross-origin' } 2023-08-05T10:58:27.194015907Z: [ERROR] } 2023-08-05T10:58:27.194020207Z: [ERROR] }, 2023-08-05T10:58:27.194024507Z: [ERROR] [Symbol(state)]: { 2023-08-05T10:58:27.194028607Z: [ERROR] method: 'POST', 2023-08-05T10:58:27.194032707Z: [ERROR] localURLsOnly: false, 2023-08-05T10:58:27.194036907Z: [ERROR] unsafeRequest: false, 2023-08-05T10:58:27.194041207Z: [ERROR] body: { 2023-08-05T10:58:27.194045907Z: [ERROR] stream: ReadableStream { 2023-08-05T10:58:27.194050507Z: [ERROR] [Symbol(kType)]: 'ReadableStream', 2023-08-05T10:58:27.194055106Z: [ERROR] [Symbol(kState)]: { 2023-08-05T10:58:27.194059406Z: [ERROR] disturbed: true, 2023-08-05T10:58:27.194063806Z: [ERROR] reader: [ReadableStreamDefaultReader], 2023-08-05T10:58:27.194068206Z: [ERROR] state: 'closed', 2023-08-05T10:58:27.194072506Z: [ERROR] storedError: undefined, 2023-08-05T10:58:27.194077006Z: [ERROR] stream: undefined, 2023-08-05T10:58:27.194081506Z: [ERROR] transfer: [Object], 2023-08-05T10:58:27.194089606Z: [ERROR] controller: [ReadableStreamDefaultController] 2023-08-05T10:58:27.194094206Z: [ERROR] }, 2023-08-05T10:58:27.194098406Z: [ERROR] [Symbol(nodejs.webstream.isClosedPromise)]: { 2023-08-05T10:58:27.194102806Z: [ERROR] promise: [Promise], 2023-08-05T10:58:27.194107206Z: [ERROR] resolve: [Function (anonymous)], 2023-08-05T10:58:27.194111706Z: [ERROR] reject: [Function (anonymous)] 2023-08-05T10:58:27.194116306Z: [ERROR] }, 2023-08-05T10:58:27.194120606Z: [ERROR] [Symbol(nodejs.webstream.controllerErrorFunction)]: [Function: bound error] 2023-08-05T10:58:27.194125106Z: [ERROR] }, 2023-08-05T10:58:27.194129206Z: [ERROR] source: Uint8Array(419) [ 2023-08-05T10:58:27.194133506Z: [ERROR] 123, 34, 109, 111, 100, 101, 108, 34, 58, 34, 103, 112, 2023-08-05T10:58:27.194137806Z: [ERROR] 116, 45, 51, 46, 53, 45, 116, 117, 114, 98, 111, 34, 2023-08-05T10:58:27.194142406Z: [ERROR] 44, 34, 116, 101, 109, 112, 101, 114, 97, 116, 117, 114, 2023-08-05T10:58:27.194147006Z: [ERROR] 101, 34, 58, 48, 44, 34, 116, 111, 112, 95, 112, 34, 2023-08-05T10:58:27.194151806Z: [ERROR] 58, 49, 44, 34, 102, 114, 101, 113, 117, 101, 110, 99, 2023-08-05T10:58:27.194156306Z: [ERROR] 121, 95, 112, 101, 110, 97, 108, 116, 121, 34, 58, 48, 2023-08-05T10:58:27.194160806Z: [ERROR] 44, 34, 112, 114, 101, 115, 101, 110, 99, 101, 95, 112, 2023-08-05T10:58:27.194165406Z: [ERROR] 101, 110, 97, 108, 116, 121, 34, 58, 48, 44, 34, 110, 2023-08-05T10:58:27.194169906Z: [ERROR] 34, 58, 49, 44, 2023-08-05T10:58:27.194174106Z: [ERROR] ... 319 more items 2023-08-05T10:58:27.194178606Z: [ERROR] ], 2023-08-05T10:58:27.194183605Z: [ERROR] length: 419 2023-08-05T10:58:27.194188005Z: [ERROR] }, 2023-08-05T10:58:27.194192405Z: [ERROR] client: { 2023-08-05T10:58:27.194196705Z: [ERROR] baseUrl: undefined, 2023-08-05T10:58:27.194201205Z: [ERROR] origin: [Getter], 2023-08-05T10:58:27.194205605Z: [ERROR] policyContainer: { referrerPolicy: 'strict-origin-when-cross-origin' } 2023-08-05T10:58:27.194210105Z: [ERROR] }, 2023-08-05T10:58:27.194214605Z: [ERROR] reservedClient: null, 2023-08-05T10:58:27.194219105Z: [ERROR] replacesClientId: '', 2023-08-05T10:58:27.194223705Z: [ERROR] window: 'client', 2023-08-05T10:58:27.194228005Z: [ERROR] keepalive: false, 2023-08-05T10:58:27.194232405Z: [ERROR] serviceWorkers: 'all', 2023-08-05T10:58:27.194236705Z: [ERROR] initiator: '', 2023-08-05T10:58:27.194241205Z: [ERROR] destination: '', 2023-08-05T10:58:27.194245805Z: [ERROR] priority: null, 2023-08-05T10:58:27.194250105Z: [ERROR] origin: 'client', 2023-08-05T10:58:27.194254405Z: [ERROR] policyContainer: 'client', 2023-08-05T10:58:27.194262505Z: [ERROR] referrer: 'client', 2023-08-05T10:58:27.194267005Z: [ERROR] referrerPolicy: '', 2023-08-05T10:58:27.194271405Z: [ERROR] mode: 'cors', 2023-08-05T10:58:27.194275605Z: [ERROR] useCORSPreflightFlag: false, 2023-08-05T10:58:27.194280005Z: [ERROR] credentials: 'same-origin', 2023-08-05T10:58:27.194284705Z: [ERROR] useCredentials: false, 2023-08-05T10:58:27.194288905Z: [ERROR] cache: 'default', 2023-08-05T10:58:27.194293105Z: [ERROR] redirect: 'follow', 2023-08-05T10:58:27.194297605Z: [ERROR] integrity: '', 2023-08-05T10:58:27.194302005Z: [ERROR] cryptoGraphicsNonceMetadata: '', 2023-08-05T10:58:27.194306405Z: [ERROR] parserMetadata: '', 2023-08-05T10:58:27.194310604Z: [ERROR] reloadNavigation: false, 2023-08-05T10:58:27.194315304Z: [ERROR] historyNavigation: false, 2023-08-05T10:58:27.194319704Z: [ERROR] userActivation: false, 2023-08-05T10:58:27.194324204Z: [ERROR] taintedOrigin: false, 2023-08-05T10:58:27.194329604Z: [ERROR] redirectCount: 0, 2023-08-05T10:58:27.194334404Z: [ERROR] responseTainting: 'basic', 2023-08-05T10:58:27.194339204Z: [ERROR] preventNoCacheCacheControlHeaderModification: false, 2023-08-05T10:58:27.194344004Z: [ERROR] done: false, 2023-08-05T10:58:27.194348204Z: [ERROR] timingAllowFailed: false, 2023-08-05T10:58:27.194353204Z: [ERROR] headersList: HeadersList { 2023-08-05T10:58:27.194357504Z: [ERROR] cookies: null, 2023-08-05T10:58:27.194362204Z: [ERROR] [Symbol(headers map)]: Map(5) { 2023-08-05T10:58:27.194366504Z: [ERROR] 'accept' => { name: 'accept', value: 'text/event-stream' }, 2023-08-05T10:58:27.194371104Z: [ERROR] 'api-key' => { 2023-08-05T10:58:27.194375504Z: [ERROR] name: 'api-key', 2023-08-05T10:58:27.194379704Z: [ERROR] value: '45a211bee1fe4060bc644f02fe75509f' 2023-08-05T10:58:27.194384204Z: [ERROR] }, 2023-08-05T10:58:27.194388404Z: [ERROR] 'authorization' => { name: 'authorization', value: 'Bearer undefined' }, 2023-08-05T10:58:27.194392804Z: [ERROR] 'content-type' => { name: 'content-type', value: 'application/json' }, 2023-08-05T10:58:27.194397804Z: [ERROR] 'user-agent' => { name: 'user-agent', value: 'OpenAI/NodeJS/3.3.0' } 2023-08-05T10:58:27.194403004Z: [ERROR] }, 2023-08-05T10:58:27.194407704Z: [ERROR] [Symbol(headers map sorted)]: [ 2023-08-05T10:58:27.194411904Z: [ERROR] [ 'accept', 'text/event-stream' ], 2023-08-05T10:58:27.194416204Z: [ERROR] [ 'api-key', '45a211bee1fe4060bc644f02fe75509f' ], 2023-08-05T10:58:27.194420504Z: [ERROR] [ 'authorization', 'Bearer undefined' ], 2023-08-05T10:58:27.194424904Z: [ERROR] [ 'content-type', 'application/json' ], 2023-08-05T10:58:27.194429104Z: [ERROR] [ 'user-agent', 'OpenAI/NodeJS/3.3.0' ] 2023-08-05T10:58:27.194438003Z: [ERROR] ] 2023-08-05T10:58:27.194442203Z: [ERROR] }, 2023-08-05T10:58:27.194446803Z: [ERROR] urlList: [ 2023-08-05T10:58:27.194451703Z: [ERROR] <ref *1> URL { 2023-08-05T10:58:27.194457103Z: [ERROR] [Symbol(context)]: URLContext { 2023-08-05T10:58:27.194462203Z: [ERROR] href: 'https://azure-openai-582219.privatelink.openai.azure.com/gpt-35-turbo/chat/completions?api-version=2023-03-15-preview', 2023-08-05T10:58:27.194467803Z: [ERROR] origin: 'https://azure-openai-582219.privatelink.openai.azure.com', 2023-08-05T10:58:27.194473803Z: [ERROR] protocol: 'https:', 2023-08-05T10:58:27.194478803Z: [ERROR] hostname: 'azure-openai-582219.privatelink.openai.azure.com', 2023-08-05T10:58:27.194483903Z: [ERROR] pathname: '/gpt-35-turbo/chat/completions', 2023-08-05T10:58:27.194488903Z: [ERROR] search: '?api-version=2023-03-15-preview', 2023-08-05T10:58:27.194493603Z: [ERROR] username: '', 2023-08-05T10:58:27.194498203Z: [ERROR] password: '', 2023-08-05T10:58:27.194503203Z: [ERROR] port: '', 2023-08-05T10:58:27.194508603Z: [ERROR] hash: '' 2023-08-05T10:58:27.194513303Z: [ERROR] }, 2023-08-05T10:58:27.194517603Z: [ERROR] [Symbol(query)]: URLSearchParams { 2023-08-05T10:58:27.194522003Z: [ERROR] [Symbol(query)]: [Array], 2023-08-05T10:58:27.194526603Z: [ERROR] [Symbol(context)]: [Circular *1] 2023-08-05T10:58:27.194531303Z: [ERROR] } 2023-08-05T10:58:27.194535503Z: [ERROR] } 2023-08-05T10:58:27.194539903Z: [ERROR] ], 2023-08-05T10:58:27.194544203Z: [ERROR] url: <ref *1> URL { 2023-08-05T10:58:27.194548603Z: [ERROR] [Symbol(context)]: URLContext { 2023-08-05T10:58:27.194553103Z: [ERROR] href: 'https://azure-openai-582219.privatelink.openai.azure.com/gpt-35-turbo/chat/completions?api-version=2023-03-15-preview', 2023-08-05T10:58:27.194573002Z: [ERROR] origin: 'https://azure-openai-582219.privatelink.openai.azure.com', 2023-08-05T10:58:27.194580702Z: [ERROR] protocol: 'https:', 2023-08-05T10:58:27.194585302Z: [ERROR] hostname: 'azure-openai-582219.privatelink.openai.azure.com', 2023-08-05T10:58:27.194589902Z: [ERROR] pathname: '/gpt-35-turbo/chat/completions', 2023-08-05T10:58:27.194594302Z: [ERROR] search: '?api-version=2023-03-15-preview', 2023-08-05T10:58:27.194598702Z: [ERROR] username: '', 2023-08-05T10:58:27.194603202Z: [ERROR] password: '', 2023-08-05T10:58:27.194607602Z: [ERROR] port: '', 2023-08-05T10:58:27.194612102Z: [ERROR] hash: '' 2023-08-05T10:58:27.194616402Z: [ERROR] }, 2023-08-05T10:58:27.194621102Z: [ERROR] [Symbol(query)]: URLSearchParams { 2023-08-05T10:58:27.194625502Z: [ERROR] [Symbol(query)]: [ 'api-version', '2023-03-15-preview' ], 2023-08-05T10:58:27.194635102Z: [ERROR] [Symbol(context)]: [Circular *1] 2023-08-05T10:58:27.194639602Z: [ERROR] } 2023-08-05T10:58:27.194643902Z: [ERROR] } 2023-08-05T10:58:27.194648802Z: [ERROR] }, 2023-08-05T10:58:27.194654102Z: [ERROR] [Symbol(signal)]: AbortSignal { 2023-08-05T10:58:27.194658802Z: [ERROR] [Symbol(kEvents)]: SafeMap(1) [Map] { 2023-08-05T10:58:27.194663302Z: [ERROR] 'abort' => <ref *2> { 2023-08-05T10:58:27.194668102Z: [ERROR] size: 1, 2023-08-05T10:58:27.194672502Z: [ERROR] next: Listener { 2023-08-05T10:58:27.194676802Z: [ERROR] next: undefined, 2023-08-05T10:58:27.194681302Z: [ERROR] previous: [Circular *2], 2023-08-05T10:58:27.194685901Z: [ERROR] listener: [Function: abort], 2023-08-05T10:58:27.194690401Z: [ERROR] flags: 1, 2023-08-05T10:58:27.194694701Z: [ERROR] callback: [Function: abort] 2023-08-05T10:58:27.194699001Z: [ERROR] } 2023-08-05T10:58:27.194703301Z: [ERROR] } 2023-08-05T10:58:27.194707401Z: [ERROR] }, 2023-08-05T10:58:27.194711601Z: [ERROR] [Symbol(events.maxEventTargetListeners)]: 10, 2023-08-05T10:58:27.194716001Z: [ERROR] [Symbol(events.maxEventTargetListenersWarned)]: false, 2023-08-05T10:58:27.194720401Z: [ERROR] [Symbol(kAborted)]: false, 2023-08-05T10:58:27.194724901Z: [ERROR] [Symbol(kReason)]: undefined, 2023-08-05T10:58:27.194729201Z: [ERROR] [Symbol(realm)]: { 2023-08-05T10:58:27.194733601Z: [ERROR] settingsObject: { 2023-08-05T10:58:27.194738101Z: [ERROR] baseUrl: undefined, 2023-08-05T10:58:27.194742501Z: [ERROR] origin: [Getter], 2023-08-05T10:58:27.194747001Z: [ERROR] policyContainer: { referrerPolicy: 'strict-origin-when-cross-origin' } 2023-08-05T10:58:27.194751701Z: [ERROR] } 2023-08-05T10:58:27.194756901Z: [ERROR] } 2023-08-05T10:58:27.194761301Z: [ERROR] }, 2023-08-05T10:58:27.194765601Z: [ERROR] [Symbol(headers)]: Headers { 2023-08-05T10:58:27.194770201Z: [ERROR] [Symbol(headers list)]: HeadersList { 2023-08-05T10:58:27.194774601Z: [ERROR] cookies: null, 2023-08-05T10:58:27.194778901Z: [ERROR] [Symbol(headers map)]: Map(5) { 2023-08-05T10:58:27.194783201Z: [ERROR] 'accept' => { name: 'accept', value: 'text/event-stream' }, 2023-08-05T10:58:27.194787901Z: [ERROR] 'api-key' => { 2023-08-05T10:58:27.194792401Z: [ERROR] name: 'api-key', 2023-08-05T10:58:27.194796901Z: [ERROR] value: '45a211bee1fe4060bc644f02fe75509f' 2023-08-05T10:58:27.194801301Z: [ERROR] }, 2023-08-05T10:58:27.194806201Z: [ERROR] 'authorization' => { name: 'authorization', value: 'Bearer undefined' }, 2023-08-05T10:58:27.194814600Z: [ERROR] 'content-type' => { name: 'content-type', value: 'application/json' }, 2023-08-05T10:58:27.194819600Z: [ERROR] 'user-agent' => { name: 'user-agent', value: 'OpenAI/NodeJS/3.3.0' } 2023-08-05T10:58:27.194824400Z: [ERROR] }, 2023-08-05T10:58:27.194828800Z: [ERROR] [Symbol(headers map sorted)]: [ 2023-08-05T10:58:27.194833400Z: [ERROR] [ 'accept', 'text/event-stream' ], 2023-08-05T10:58:27.194837800Z: [ERROR] [ 'api-key', '45a211bee1fe4060bc644f02fe75509f' ], 2023-08-05T10:58:27.194842300Z: [ERROR] [ 'authorization', 'Bearer undefined' ], 2023-08-05T10:58:27.194846900Z: [ERROR] [ 'content-type', 'application/json' ], 2023-08-05T10:58:27.194851200Z: [ERROR] [ 'user-agent', 'OpenAI/NodeJS/3.3.0' ] 2023-08-05T10:58:27.194855900Z: [ERROR] ] 2023-08-05T10:58:27.194860400Z: [ERROR] }, 2023-08-05T10:58:27.194864900Z: [ERROR] [Symbol(guard)]: 'request', 2023-08-05T10:58:27.194869300Z: [ERROR] [Symbol(realm)]: { 2023-08-05T10:58:27.194873600Z: [ERROR] settingsObject: { 2023-08-05T10:58:27.194878100Z: [ERROR] baseUrl: undefined, 2023-08-05T10:58:27.194882500Z: [ERROR] origin: [Getter], 2023-08-05T10:58:27.194886800Z: [ERROR] policyContainer: { referrerPolicy: 'strict-origin-when-cross-origin' } 2023-08-05T10:58:27.194891400Z: [ERROR] } 2023-08-05T10:58:27.194895800Z: [ERROR] } 2023-08-05T10:58:27.194900100Z: [ERROR] } 2023-08-05T10:58:27.194904500Z: [ERROR] }, 2023-08-05T10:58:27.194908900Z: [ERROR] response: undefined, 2023-08-05T10:58:27.194913400Z: [ERROR] isAxiosError: true, 2023-08-05T10:58:27.194917700Z: [ERROR] toJSON: [Function: toJSON], 2023-08-05T10:58:27.194922100Z: [ERROR] attemptNumber: 7, 2023-08-05T10:58:27.194926400Z: [ERROR] retriesLeft: 0 2023-08-05T10:58:27.194930700Z: [ERROR] } 2023-08-05T10:58:27.194934800Z: [ERROR] 2023-08-05T10:58:27.194939299Z: [ERROR] Node.js v18.16.0 2023-08-05T10:58:27.218800110Z: [ERROR] Error: socket hang up 2023-08-05T10:58:27.218852410Z: [ERROR] at connResetException (node:internal/errors:717:14) 2023-08-05T10:58:27.218861010Z: [ERROR] at Socket.socketOnEnd (node:_http_client:526:23) 2023-08-05T10:58:27.218866110Z: [ERROR] at Socket.emit (node:events:525:35) 2023-08-05T10:58:27.218870610Z: [ERROR] at endReadableNT (node:internal/streams/readable:1359:12) 2023-08-05T10:58:27.218875510Z: [ERROR] at process.processTicksAndRejections (node:internal/process/task_queues:82:21) { 2023-08-05T10:58:27.218880610Z: [ERROR] code: 'ECONNRESET' 2023-08-05T10:58:27.218885010Z: [ERROR] } 2023-08-05T10:58:27.222285883Z: [ERROR] Error: socket hang up 2023-08-05T10:58:27.222300783Z: [ERROR] at connResetException (node:internal/errors:717:14) 2023-08-05T10:58:27.222307083Z: [ERROR] at Socket.socketOnEnd (node:_http_client:526:23) 2023-08-05T10:58:27.222321482Z: [ERROR] at Socket.emit (node:events:525:35) 2023-08-05T10:58:27.222325982Z: [ERROR] at endReadableNT (node:internal/streams/readable:1359:12) 2023-08-05T10:58:27.222330482Z: [ERROR] at process.processTicksAndRejections (node:internal/process/task_queues:82:21) { 2023-08-05T10:58:27.222334882Z: [ERROR] code: 'ECONNRESET' 2023-08-05T10:58:27.222339482Z: [ERROR]

Repo to use releases for Nextjs site

As an alternative deployment method, could you maintain use GitHub releases to host the ./site-deploy/Nextjs-site.zip file?
This would provide a much easier way for a App Service Zip Deploy to run, and would more easily support targeted versioning of the app.

Guidance on cost/cost estimate

This is an exciting project, thank you for sharing.

I used this sample project in the past: https://github.com/Azure-Samples/azure-search-openai-demo

It includes this warning:

AZURE RESOURCE COSTS by default this sample will create Azure App Service and Azure Cognitive Search resources that have a monthly cost, as well as Form Recognizer resource that has cost per document page. You can switch them to free versions of each of them if you want to avoid this cost by changing the parameters file under the infra folder (though there are some limits to consider; for example, you can have up to 1 free Cognitive Search resource per subscription, and the free Form Recognizer resource only analyzes the first 2 pages of each document.)

I had experimented with a lot of "chat with my documents" apps using the official OpenAI API and it only ever amounted to costs under $1. So I went ahead and ran the demo, deployed it, and ingested about 100 PDFs. It racked up over $200 in costs in less than 12 hours.

So my question is: Could you provide some cost estimates and guidance for this sample project? Could you possibly even provide a link to a pre-configured price estimate using the Azure Pricing Calculator tool: https://azure.microsoft.com/en-us/pricing/calculator/ ? That would be extremely useful! Thank you!

Extend README with info about AAD app consent

Hi

I would like to suggest extending the instructions in the README to include information about the need to grant the EntraID app consent. You will need your AAD admin to grant consent (depending on how your tenant was configured, but these days, it's usual to require an admin to give apps the permissions they request).

I did not find any information about these in the docs (maybe I missed something?)

Thx

Mobile Use

Hello, Thank you for providing this codebase, we've just started using it and love it so far.

We have some users that'll want to use it from their mobile devices such as smart phones. The site works on these devices with small screens but is a bit hard to use. Is there any plans to make this more small mobile device friendly?

It might be nice to be able to collapse the new chat navigation side, to get more of a full screen view of the contents of the current chat. Maybe the ability to change the size of the fonts to fit more on the screen.

Thank you!

i have few queries

Anyone please advise me the correct answer?
Question: What are some limitations of Github copilot:
a.it can be difficult to customize based on developers preferences.
b. it can sometimes generate incorrect or buggy code
c. it can only generate code snippets and not entire functions
d. it does not support most of the modern programming languages

Provide Documentation to Deploy to Azure without GitHub Action

I've noticed that the current documentation focuses solely on deploying ChatGPT to Azure using GitHub Actions. While GitHub Actions is a powerful tool, some users may prefer different deployment methods or may not have access to GitHub for various reasons.

I kindly request that you consider creating documentation that outlines alternative methods for deploying ChatGPT to Azure without relying on GitHub Actions. This would provide more flexibility and accessibility to a wider audience of users who may have different workflows or preferences.

Just providing some feedback about my experience with Azure ChatGPT

So this is not an actual request, feel free to close it.

Just want to say thanks for this project, it works quite well. At some point I wanted to build my own ChatGPT clone (for personal use) in .NET but I'm glad you guys did it for me already. I was able to:

  • Fork it
  • Use OpenAI API key instead of Azure OpenAI Service because my Azure subscription is not whitelisted (haven't made the request yet)
  • Use Google auth instead of GitHub/Azure AD
  • Publish the docker image to Docker Hub
  • Deploy it on Azure with Azure CosmosDB free tier + cheap Azure App Service
  • Put Cloudflare DNS/TLS on top of it so it's incredibly fast and secure

Works like a charm, only took me ~4 hours hours to do all this. I did open some issues for improvements/feature parity with ChatGPT.

Thanks again.

Feature request to allow a user message to be edited

In ChatGPT, one can edit a submitted message. This is very useful when you made a mistake and don't want to increase the amount of tokens being sent for a conversation. I believe that ChatGPT preserve the conversation hierarchy as some kind of tree.

I'd like Azure ChatGPT to offer the same user message editing and "message threads" feature.

Not able to run the code

Tried it on running on Windows 10 based system, latest lts node etc. I am getting error ./node_modules/lucide-react/dist/cjs/lucide-react.js:2:0
Module not found: Can't resolve '/workspaces/azurechatgpt/src/node_modules/lucide-react/dist/cjs/icons/x'

tried it in devcontainer in linux as well. same error. Is there any steps that I need to take to run the code.
image

Deployment via Deploy to Azure results in MODULE_NOT_FOUND

Deployed to Azure using the Azure deploy button, which worked flawlessly.

However, the webapp does not boot up, because of an MODULE_NOT_FOUND error:

2023-08-03T08:56:05.959839753Z # Enter the source directory to make sure the script runs where the user expects
2023-08-03T08:56:05.959844653Z cd "/home/site/wwwroot"
2023-08-03T08:56:05.959878853Z
2023-08-03T08:56:05.959885353Z export NODE_PATH=/usr/local/lib/node_modules:$NODE_PATH
2023-08-03T08:56:05.959889553Z if [ -z "$PORT" ]; then
2023-08-03T08:56:05.959893653Z 		export PORT=8080
2023-08-03T08:56:05.959898453Z fi
2023-08-03T08:56:05.959902753Z
2023-08-03T08:56:05.959967353Z PATH="$PATH:/home/site/wwwroot" node server.js
2023-08-03T08:56:06.009684581Z node:internal/modules/cjs/loader:1078
2023-08-03T08:56:06.009740981Z   throw err;
2023-08-03T08:56:06.009745881Z   ^
2023-08-03T08:56:06.009749581Z
2023-08-03T08:56:06.009753381Z Error: Cannot find module '/home/site/wwwroot/server.js'
2023-08-03T08:56:06.009757181Z     at Module._resolveFilename (node:internal/modules/cjs/loader:1075:15)
2023-08-03T08:56:06.009761181Z     at Module._load (node:internal/modules/cjs/loader:920:27)
2023-08-03T08:56:06.009765681Z     at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
2023-08-03T08:56:06.009788681Z     at node:internal/main/run_main_module:23:47 {
2023-08-03T08:56:06.009792581Z   code: 'MODULE_NOT_FOUND',
2023-08-03T08:56:06.009795981Z   requireStack: []
2023-08-03T08:56:06.009799181Z }
2023-08-03T08:56:06.009865182Z
2023-08-03T08:56:06.009874782Z Node.js v18.16.0

Could I bring my Own Data?

Hi, Thanks for contributing to this project. I was wondering if I could bring my own data (a bunch of pdfs) to build a chatbot that interacts only based on the knowledge base say Azure Cognitive Search? Currently the Azure OpenAI "bring your own data" feature does not allow much flexibility on the pipeline and the UI is quite minimal so I was wondering if this project also has the "bring your data" feature ready?

Setup Guide

Hey everyone, to make things easier and more clear for some of you, I've put together an comprehensive yet short, step-by-step guide on setting up the cloud version of azurechatgpt. For the repo admins out there (@thivy , @vyasdev ), if you think this guide could boost the usage of this repo (and Azure resources), please feel free to include a link in the README. Of course, if you'd like, modifications can be made to better align with the project's.

https://www.linkedin.com/feed/update/urn:li:activity:7094269426161577985/

Trouble Signing into the Azure application

Hello,

First of all, thank you for your contribution I am really looking forward to testing the application :D but I am having some issues when logging into the application. I managed to make the application run in Azure in a webapp:

image

And I configured both methods of authentication as described in the guide. However, when I clicked in any of them I receive the following error:

image

Do you have any ideas why could this happen?

Thank you so much!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.