GithubHelp home page GithubHelp logo

microsoft / chat-copilot Goto Github PK

View Code? Open in Web Editor NEW
2.0K 42.0 668.0 7.35 MB

License: MIT License

JavaScript 0.21% PowerShell 3.65% Shell 4.49% Bicep 3.34% C# 42.83% TypeScript 45.01% HTML 0.03% CSS 0.05% Dockerfile 0.40% Smalltalk 0.01%

chat-copilot's Issues

Expose token settings for document embeddings

Exposing DocumentLineSplitMaxTokens and DocumentParagraphSplitMaxLines these paramteres for override in the API and App provides customer with an avenue to tune these on a per document basis.

  • Ben

serviceOptions 404 error

Describe the bug
After deploying the package to Azure, the api/serviceOptions endpoint returns a 404. If I run it from local files it works, but when using the package that is deployed to azure, it gives that error

image

To Reproduce
Steps to reproduce the behavior:

  1. Deploy application using Azure 1 click deploy from the /deploy page
  2. wait for webapi to deploy and build
  3. go to webapi/healthz endpoint and it returns "healthy"
  4. try to access webapi/serviceOptions endpoint and it returns a 404 error. leads to error messages on client side

Expected behavior
Expect 200 response as when it is run locally

Screenshots
image

Platform

  • Azure

Additional context
Add any other context about the problem here.

document import not extracting knowledge

after importing a pdf document and asking it questions about the document it has no knowledge of the content in the pdf . Is this still under development ? I am using qdrant for embeddings and no errors appear in console.

Update webapi routes

  • Change routes to better align with Microsoft's API guidelines, per the suggestions in microsoft/semantic-kernel#1090. This will be a breaking change.
  • Routes that access a particular chat session should include the chatId in the route so that we can leverage the "RequireChatParticipant" authorization policy.

Improve documentation on how to set up AAD with Chat Copilot

When setting up the app for the first time with AAD authentication, a new AAD application is required. This needs to be documented, including the required settings.

The setup instructions should document all necessary steps to get the application running.

Configuration file not accepting aiservice

While running the ./Configure.sh on my terminal with values for each element. The output keeps printing even when I enter the value for --aiservice
Please specify an AI service (AzureOpenAI or OpenAI) for --aiservice.

To Reproduce
For MacOS
Download co-pilot chat repo
Run ./Install-brew.sh
Run ./Configure.sh --aiservice {AzureOpenAI} --apikey {XXXXXXXXXXXXXXX} --endpoint {https://xxxx.openai.azure.com/} --clientid {XXXX}
Output: Please specify an AI service (AzureOpenAI or OpenAI) for --aiservice.

Expected behavior
It should either accept the config or throw an error. It always says "Please specify an AI service (AzureOpenAI or OpenAI) for --aiservice." Even when specified

Platform

  • OS: [Mac]
  • IDE: [VS Code]

Additional context
The app still launches but gives invalid URL error. Might be a different bug. But this is what my server says:

Failed: memory not established

In the documents tab I upload a PDF file and shows in the list.
But on the Chat tab, there is a message from the bot with the file name
To Reproduce
Steps to reproduce the behavior:

  1. Go to 'Documents'
  2. Click on 'Upload'
  3. Upload PDF file
  4. Go to 'Chat'
  5. Ask "write a summary of the file"
  6. Bot answers: I apologize, but I don't have access to the content of the file you mentioned. Is there anything else I can help you with?

Expected behavior
A clear and concise description of what you expected to happen.
The file should be in the list and the chat should suggest what to do with it.
I should be able to ask about the file. No?

Screenshots
If applicable, add screenshots to help explain your problem.

image

Platform

  • OS: Windows
  • IDE: N/A

Help fixing it please
Thank you

Error: 401 Unauthorized with AzureAD Authorization on Backend

After adjusting the Authorization section of appsettings.json for Copilot Chat to use AzureAd I receive a 401 Unauthorized error with the following www-authenticate response header:
Bearer error="invalid_token", error_description="The signature is invalid"

[Custom Plugins] Validate OpenAPI spec on entry

In the Custom Plugin flow on the webapp, we need to form validation to verify the Open API spec once it's parsed from the manifest file.

Image

I'm thinking we expose an API from the webapi that calls the OpenAPI parser to validate the form and then call that from the webapp

Tasks

Deploy webapi package that matches memories selection in ARM template

Currently the Deploy to Azure buttons use an ARM template that defaults the memories selection to "Volatile" but does allow the user to change this to Qdrant or ACS. The problem is that the webapi package that is deployed is configured to use volatile memories and so changing this in the ARM deployment results in a resource that is deployed but is not being used.

One option to fix this is to publish webapi artifacts with all configurations in the pipeline, and then use the memories selection in the ARM template to pick the correct one.

Planner Enhancements

Need to re-evaluate our ExternalInformationSkill to better support SequentialPlanner inputs and outputs

Tasks

Copilot Chat: add dotnet 6.0 SDK to devcontainer

Currently the provided devcontainer does not support dotnet 6, which is required for samples/apps/copilot-chat-app. When you try to install the dotnet sdk following the instructions, you will face an error. This can block adoption for first time users that want to develop via GH CodeSpaces or VSCode devcontainer.

E: Conflicting values set for option Signed-By regarding source https://packages.microsoft.com/ubuntu/20.04/prod/ focal: /usr/share/keyrings/microsoft-archive-keyring.gpg != E: The list of sources could not be read.

I haven't been able to resolve it yet, but I will do a PR otherwise ๐Ÿ˜‰.

Tasks

No tasks being tracked yet.

Fix typing TODOs

Code mixes strings and Guid without being explicit about the serialization format

Tasks

BrowserAuthError when launching chat-copilot

Describe the bug
Often when launching chat-copilot a red screen with errors is shown. This appears to be an issue related to authentication and pop-up windows.

Running in Private mode seems to fix the issue.

image

image

Expected behavior
The app should launch and authenticate without error.

Plugins enabled are not saved when you refresh page

Describe the bug
Plugins are not saved when you refresh the page

To Reproduce
Steps to reproduce the behavior:

  1. in the copilot front end click on plugins, and add any plugin
  2. refresh the page, and notice the plugin in question is no longer activated

ServiceOptionsController return all service options from a single request

Currently the ServiceOptionsController has separate APIs for each option. It'd be nice to have one API that returns all the options, reducing the number of requests required.

Note: the current implementation only has memories store type because that is the only requested option to show in the webapp. In the future if we desire to show more options, we should combine things in a single API and a single response model.

Handle TODOs for upload/download bot

Tasks

Documentation about AAD config is confusing

Section "(Optional) Enable backend authorization via Azure AD" of readme says "Ensure you created the required application registration mentioned in Start the WebApp FrontEnd application" and links to the #start-the-webapp-frontend-application anchor which doesn't exist.

tenant ID not documented or used in configure script

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'configure.sh' step in setup
  2. the script accepts --tenantid as a parameter for setting up with Azure AD on a single enterprise. It's in the script though not documented in readme. on line 105 it then sets tenant ID to a default value if none is given (env_tenant_id). on line 156 it should be using the tenant_id variable, not ENV_TENANT_ID. this way if one is passed it, it is passed to the env file.

Readme should get updated for single tenant deployment as an option as well.

Custom Plugin in Chat-Copilot Fetching Outdated Data Instead of Up-to-Date Results

Describe the bug
When enabling my custom plugin through Chat-Copilot and running it, the plugin doesn't provide up-to-date results. Specifically, I've created a custom plugin named "Grocery App Plugin," allowing users to add, list, and remove items. While using Swagger to add items to the list, I can retrieve the complete list of items. However, when running the same plugin through Chat-Copilot, it seems to fetch outdated data, appearing as if the planner is providing historical details. I'm utilizing the "Action" Planner /"Sequential" Planner with the gpt-35-turbo model.

To Reproduce
Steps to reproduce the behavior:
1.Enable custom plugin -"Grocery App Plugin"
2.List the grocery items using "Grocery App Plugin."
3.Attempt to add an item using the plugin or Swagger
4.Run the plugin to list the items.
5.Compare the listed items with the actual up-to-date list.

Expected behavior
I expected the plugin to fetch and display the most recent data when using Chat-Copilot, similar to the behavior when interacting with Swagger directly. This would ensure that users receive accurate and current information from the plugin.

Screenshots
Please find the screenshots of the outdated results from Chat-Copilot and the expected up-to-date results from Swagger.

ChatCopilot-CustomPlugin-ErrorScreenshot
FastAPI-Swagger UI-Data Response

Platform

Additional context
I noticed that this issue is specific to Chat-Copilot's interaction with my custom plugin. Swagger integration seems to work correctly and provides real-time updates. This context could potentially help in identifying whether the problem lies within my plugin's implementation or Chat-Copilot's integration with both "Action"/ "Sequential" Planner along with the gpt-35-turbo model.

Getting exception when retrieving records from volatile memory

Describe the bug
Hi Im getting folwing error in Chat Copilot app with volatile memory on line 81 in webapi\CopilotChat\Skills\ChatSkills\DocumentMemorySkill.cs file.
inner exception is:

To Reproduce
Steps to reproduce the behavior:

  1. Register a plugin.
  2. Ask a question that plugin solves
  3. Ask another question.'

Expected behavior
Retrieve similar records from volatile memory.

Screenshots
image

Platform

  • OS: [Windows]
  • IDE: [Visual Studio 2022]
  • Language: [C#]
  • Source: [e.g. NuGet package version 0.1.0, pip package version 0.1.0, main branch of repository]

Additional context
InnerException {"The API deployment for this resource does not exist. If you created the deployment within the last 5 minutes, please wait a moment and try again.\r\nStatus: 404 (Not Found)\r\nErrorCode: DeploymentNotFound\r\n\r\nContent:\r\n{"error":{"code":"DeploymentNotFound", "message":"The API deployment for this resource does not exist. If you created the deployment within the last 5 minutes, please wait a moment and try again."}}\r\n\r\nHeaders:\r\nOpenAI-Processing-Ms: REDACTED\r\nx-ms-client-request-id: 1652580f-151c-46c0-a75b-bc71e7b8a4b5\r\napim-request-id: REDACTED\r\nStrict-Transport-Security: REDACTED\r\nX-Content-Type-Options: REDACTED\r\nx-ms-region: REDACTED\r\nDate: Tue, 08 Aug 2023 09:19:46 GMT\r\nContent-Length: 198\r\nContent-Type: application/json\r\n"} System.Exception {Azure.RequestFailedException}

Stack trace:
at Microsoft.SemanticKernel.Connectors.AI.OpenAI.AzureSdk.ClientBase.d__251.MoveNext() at Microsoft.SemanticKernel.Connectors.AI.OpenAI.AzureSdk.ClientBase.<InternalGetEmbeddingsAsync>d__14.MoveNext() at Microsoft.SemanticKernel.AI.Embeddings.EmbeddingGenerationExtensions.<GenerateEmbeddingAsync>d__02.MoveNext()
at Microsoft.SemanticKernel.Memory.SemanticTextMemory.d__7.MoveNext()
at Microsoft.SemanticKernel.Memory.SemanticTextMemory.d__7.System.Threading.Tasks.Sources.IValueTaskSource<System.Boolean>.GetResult(Int16 token)
at SemanticKernel.Service.CopilotChat.Skills.ChatSkills.DocumentMemorySkill.d__4.MoveNext() in C:\Work\chat-copilot-main\webapi\CopilotChat\Skills\ChatSkills\DocumentMemorySkill.cs:line 81

CC: Create architecture diagrams for Authentication

We will create diagrams explaining how authentication works within copilot chat. These diagrams will be shared with the community via docs and used internally to ramp new engineers onto the project and to perform a Microsoft security review.

How can I disable Microsoft account authentication?

Hi Everyone,

Love what you've done with chat-copilot web app. I am going to use this internally for testing and would like to turn off the Microsoft Azure Directory authentication as using Microsoft accounts is overkill and unnecessary.

I see that the webapp/.env.example file has some configuration options that are used to define 2 users that can login without a Microsoft account. It looks like the unit tests leverage these to bypass the Microsoft login.

REACT_APP_TEST_USER_ACCOUNT1=
REACT_APP_TEST_USER_PASSWORD1=
REACT_APP_TEST_USER_ACCOUNT2=
REACT_APP_TEST_USER_PASSWORD2=

How can I enable these hardcoded accounts to be the only authorized users who can sign in while also disabling the Microsoft authentication altogether?

Thanks for your help in advance.

Enable Deploy to specify region of Static Web App

  • As a: Engineer deploying Chat Copilot
  • I want: To the Static Web App resource to be deployed into the same region as all the other resources.
  • So that: I can reduce latency to load the static web app.

The Bicep defaults to deploying the Static Web App to westus2 and neither the deploy-azure.sh or deploy-azure.ps1 pass this parameter in during deployment. Therefore, it will always deploy to westus2 regardless.

Possible solutions:

  1. Default the deployment location of the Static Web App to be the same as the location if not specified.
  2. Add a parameter to deploy-azure.ps1 and deploy-azure.sh to allow setting this value.
  3. Remove the parameter entirely and always deploy the Static Web App to the same location as the other resources.

I'm happy to submit a PR to resolve this if one of the options is preferrable. It is a minor issue, but I prefer all my resources in the same region if possible.

Prompt View - Add Dependency context details

Much like we're able to show the full context when a stepwise planner returns some result, we should show at least the prompt template that was used in each semantic dependency of ChatSkill

See: #149

Tasks

Use PostgresSQL as MemoryStore

Current Memory store options are:

  • volatile
  • qdrant
  • azure cognitive search
  • chroma

While deploying to Azure, the only PaaS available directly on Azure is Azure Cognitive Search.
However this is limited to 50 indexes, that might limit the usage when adding more users to the chat...

I'ld like to add CosmosDB as vector database (using PostgreSQL connector).

ActionPlanner stabilization

Action Planner intermittently returns a 400 error

In scenario test:
If a plugin has been enabled, the action planner is invoked to perform the evaluation. This leads to a weird json exception and crash. To workaround this im performing the evaluation after disabling the plugin.

Error: Invalid request: The request is not valid, HTTP status: 404. Details: The API deployment for this resource does not exist. If you created the deployment within the last 5 minutes, please wait a moment and try again.

Describe the bug
A clear and concise description of what the bug is.
I am trying to run the project with my AzureOpenAI credentials. However, it leads the the error

Error: Invalid request: The request is not valid, HTTP status: 404. Details: The API deployment for this resource does not exist. If you created the deployment within the last 5 minutes, please wait a moment and try again.

I have already created the deployment on AzureOpenAI, it is up and running.

To Reproduce
Steps to reproduce the behavior:

  1. start up the server and frontend with dotnet run and yarn start

Expected behavior
A clear and concise description of what you expected to happen.
The chatbot should return a response.

Screenshots
If applicable, add screenshots to help explain your problem.
This is the error trace

Microsoft.AspNetCore.Server.Kestrel[0]
      Overriding address(es) 'http://localhost:37240'. Binding to endpoints defined via IConfiguration and/or UseKestrel() instead.
info: Microsoft.Hosting.Lifetime[14]
      Now listening on: https://localhost:40443
info: Microsoft.Hosting.Lifetime[0]
      Application started. Press Ctrl+C to shut down.
info: Microsoft.Hosting.Lifetime[0]
      Hosting environment: Development
info: Microsoft.Hosting.Lifetime[0]
      Content root path: /Users/ekdnam/Projects/copilot-chat-app/webapi
info: SemanticKernel.Service.Program[0]
      Health probe: https://localhost:40443/healthz
info: Microsoft.AspNetCore.Hosting.Diagnostics[1]
      Request starting HTTP/1.1 GET https://localhost:40443/messageRelayHub - -
info: SemanticKernel.Service.Auth.PassThroughAuthenticationHandler[0]
      Allowing request to pass through
info: Microsoft.AspNetCore.Hosting.Diagnostics[1]
      Request starting HTTP/1.1 GET https://localhost:40443/healthz - -
info: SemanticKernel.Service.Auth.PassThroughAuthenticationHandler[0]
      Allowing request to pass through
info: Microsoft.AspNetCore.Hosting.Diagnostics[2]
      Request finished HTTP/1.1 GET https://localhost:40443/healthz - - - 200 - text/plain 13.6845ms
info: Microsoft.AspNetCore.Hosting.Diagnostics[1]
      Request starting HTTP/1.1 GET https://localhost:40443/messageRelayHub - -
info: SemanticKernel.Service.Auth.PassThroughAuthenticationHandler[0]
      Allowing request to pass through
info: Microsoft.AspNetCore.Hosting.Diagnostics[2]
      Request finished HTTP/1.1 GET https://localhost:40443/messageRelayHub - - - 101 - - 714.8757ms
info: Microsoft.AspNetCore.Hosting.Diagnostics[1]
      Request starting HTTP/1.1 OPTIONS https://localhost:40443/chatSession/getAllChats/4cd0f668-8aa0-46f8-99f5-bbd098cd0494.b5a078fe-4334-4ee6-9122-352bf41674ec - -
info: Microsoft.AspNetCore.Hosting.Diagnostics[2]
      Request finished HTTP/1.1 OPTIONS https://localhost:40443/chatSession/getAllChats/4cd0f668-8aa0-46f8-99f5-bbd098cd0494.b5a078fe-4334-4ee6-9122-352bf41674ec - - - 204 - - 1.7864ms
info: Microsoft.AspNetCore.Hosting.Diagnostics[1]
      Request starting HTTP/1.1 GET https://localhost:40443/chatSession/getAllChats/4cd0f668-8aa0-46f8-99f5-bbd098cd0494.b5a078fe-4334-4ee6-9122-352bf41674ec application/json -
info: SemanticKernel.Service.Auth.PassThroughAuthenticationHandler[0]
      Allowing request to pass through
info: Microsoft.AspNetCore.Hosting.Diagnostics[2]
      Request finished HTTP/1.1 GET https://localhost:40443/chatSession/getAllChats/4cd0f668-8aa0-46f8-99f5-bbd098cd0494.b5a078fe-4334-4ee6-9122-352bf41674ec application/json - - 200 - application/json;+charset=utf-8 39.2631ms
info: Microsoft.AspNetCore.Hosting.Diagnostics[1]
      Request starting HTTP/1.1 OPTIONS https://localhost:40443/chatSession/create - -
info: Microsoft.AspNetCore.Hosting.Diagnostics[2]
      Request finished HTTP/1.1 OPTIONS https://localhost:40443/chatSession/create - - - 204 - - 0.6206ms
info: Microsoft.AspNetCore.Hosting.Diagnostics[1]
      Request starting HTTP/1.1 POST https://localhost:40443/chatSession/create application/json 127
info: SemanticKernel.Service.Auth.PassThroughAuthenticationHandler[0]
      Allowing request to pass through
info: Microsoft.AspNetCore.Hosting.Diagnostics[2]
      Request finished HTTP/1.1 POST https://localhost:40443/chatSession/create application/json 127 - 201 - application/json;+charset=utf-8 38.1543ms
info: Microsoft.AspNetCore.Hosting.Diagnostics[1]
      Request starting HTTP/1.1 OPTIONS https://localhost:40443/chatSession/getChatMessages/73d94922-f2be-43a8-b3ed-769fc4f96add?startIdx=0&count=1 - -
info: Microsoft.AspNetCore.Hosting.Diagnostics[2]
      Request finished HTTP/1.1 OPTIONS https://localhost:40443/chatSession/getChatMessages/73d94922-f2be-43a8-b3ed-769fc4f96add?startIdx=0&count=1 - - - 204 - - 0.2834ms
info: Microsoft.AspNetCore.Hosting.Diagnostics[1]
      Request starting HTTP/1.1 GET https://localhost:40443/chatSession/getChatMessages/73d94922-f2be-43a8-b3ed-769fc4f96add?startIdx=0&count=1 application/json -
info: SemanticKernel.Service.Auth.PassThroughAuthenticationHandler[0]
      Allowing request to pass through
info: Microsoft.AspNetCore.Hosting.Diagnostics[2]
      Request finished HTTP/1.1 GET https://localhost:40443/chatSession/getChatMessages/73d94922-f2be-43a8-b3ed-769fc4f96add?startIdx=0&count=1 application/json - - 200 - application/json;+charset=utf-8 19.2040ms
info: Microsoft.AspNetCore.Hosting.Diagnostics[1]
      Request starting HTTP/1.1 OPTIONS https://localhost:40443/speechToken - -
info: Microsoft.AspNetCore.Hosting.Diagnostics[2]
      Request finished HTTP/1.1 OPTIONS https://localhost:40443/speechToken - - - 204 - - 0.1704ms
info: Microsoft.AspNetCore.Hosting.Diagnostics[1]
      Request starting HTTP/1.1 OPTIONS https://localhost:40443/speechToken - -
info: Microsoft.AspNetCore.Hosting.Diagnostics[2]
      Request finished HTTP/1.1 OPTIONS https://localhost:40443/speechToken - - - 204 - - 0.0550ms
info: Microsoft.AspNetCore.Hosting.Diagnostics[1]
      Request starting HTTP/1.1 GET https://localhost:40443/speechToken application/json -
info: SemanticKernel.Service.Auth.PassThroughAuthenticationHandler[0]
      Allowing request to pass through
info: Microsoft.AspNetCore.Hosting.Diagnostics[2]
      Request finished HTTP/1.1 GET https://localhost:40443/speechToken application/json - - 200 - application/json;+charset=utf-8 5.7146ms
info: Microsoft.AspNetCore.Hosting.Diagnostics[1]
      Request starting HTTP/1.1 GET https://localhost:40443/speechToken application/json -
info: SemanticKernel.Service.Auth.PassThroughAuthenticationHandler[0]
      Allowing request to pass through
info: Microsoft.AspNetCore.Hosting.Diagnostics[2]
      Request finished HTTP/1.1 GET https://localhost:40443/speechToken application/json - - 200 - application/json;+charset=utf-8 0.2466ms
info: Microsoft.AspNetCore.Hosting.Diagnostics[1]
      Request starting HTTP/1.1 OPTIONS https://localhost:40443/chat - -
info: Microsoft.AspNetCore.Hosting.Diagnostics[2]
      Request finished HTTP/1.1 OPTIONS https://localhost:40443/chat - - - 204 - - 0.4357ms
info: Microsoft.AspNetCore.Hosting.Diagnostics[1]
      Request starting HTTP/1.1 POST https://localhost:40443/chat application/json 270
info: SemanticKernel.Service.Auth.PassThroughAuthenticationHandler[0]
      Allowing request to pass through
fail: Microsoft.SemanticKernel.IKernel[0]
      Something went wrong while rendering the semantic function or while executing the text completion. Function: ChatSkill.funcf7c0625a835e4d588e88223f37c30a42. Error: Invalid request: The request is not valid, HTTP status: 404. Details: The API deployment for this resource does not exist. If you created the deployment within the last 5 minutes, please wait a moment and try again.
      Status: 404 (Not Found)
      ErrorCode: DeploymentNotFound
      
      Content:
      {"error":{"code":"DeploymentNotFound", "message":"The API deployment for this resource does not exist. If you created the deployment within the last 5 minutes, please wait a moment and try again."}}
      
      Headers:
      OpenAI-Processing-Ms: REDACTED
      x-ms-client-request-id: 71fb1aa3-6d1b-411c-89bc-34de587346be
      apim-request-id: REDACTED
      Strict-Transport-Security: REDACTED
      X-Content-Type-Options: REDACTED
      x-ms-region: REDACTED
      Date: Mon, 07 Aug 2023 05:07:51 GMT
      Content-Length: 198
      Content-Type: application/json
      
      Microsoft.SemanticKernel.AI.AIException: Invalid request: The request is not valid, HTTP status: 404
       ---> Azure.RequestFailedException: The API deployment for this resource does not exist. If you created the deployment within the last 5 minutes, please wait a moment and try again.
      Status: 404 (Not Found)
      ErrorCode: DeploymentNotFound
      
      Content:
      {"error":{"code":"DeploymentNotFound", "message":"The API deployment for this resource does not exist. If you created the deployment within the last 5 minutes, please wait a moment and try again."}}
      
      Headers:
      OpenAI-Processing-Ms: REDACTED
      x-ms-client-request-id: 71fb1aa3-6d1b-411c-89bc-34de587346be
      apim-request-id: REDACTED
      Strict-Transport-Security: REDACTED
      X-Content-Type-Options: REDACTED
      x-ms-region: REDACTED
      Date: Mon, 07 Aug 2023 05:07:51 GMT
      Content-Length: 198
      Content-Type: application/json
      
         at Azure.Core.HttpPipelineExtensions.ProcessMessageAsync(HttpPipeline pipeline, HttpMessage message, RequestContext requestContext, CancellationToken cancellationToken)
         at Azure.AI.OpenAI.OpenAIClient.GetChatCompletionsAsync(String deploymentOrModelName, ChatCompletionsOptions chatCompletionsOptions, CancellationToken cancellationToken)
         at Microsoft.SemanticKernel.Connectors.AI.OpenAI.AzureSdk.ClientBase.RunRequestAsync[T](Func`1 request)
         --- End of inner exception stack trace ---
         at Microsoft.SemanticKernel.Connectors.AI.OpenAI.AzureSdk.ClientBase.RunRequestAsync[T](Func`1 request)
         at Microsoft.SemanticKernel.Connectors.AI.OpenAI.AzureSdk.ClientBase.InternalGetChatResultsAsync(ChatHistory chat, ChatRequestSettings chatSettings, CancellationToken cancellationToken)
         at Microsoft.SemanticKernel.Connectors.AI.OpenAI.AzureSdk.ClientBase.InternalGetChatResultsAsTextAsync(String text, CompleteRequestSettings textSettings, CancellationToken cancellationToken)
         at Microsoft.SemanticKernel.SkillDefinition.SKFunction.<>c__DisplayClass19_0.<<FromSemanticConfig>g__LocalFunc|1>d.MoveNext()
fail: Microsoft.SemanticKernel.IKernel[0]
      Invalid request: The request is not valid, HTTP status: 404: Microsoft.SemanticKernel.AI.AIException: Invalid request: The request is not valid, HTTP status: 404
       ---> Azure.RequestFailedException: The API deployment for this resource does not exist. If you created the deployment within the last 5 minutes, please wait a moment and try again.
      Status: 404 (Not Found)
      ErrorCode: DeploymentNotFound
      
      Content:
      {"error":{"code":"DeploymentNotFound", "message":"The API deployment for this resource does not exist. If you created the deployment within the last 5 minutes, please wait a moment and try again."}}
      
      Headers:
      OpenAI-Processing-Ms: REDACTED
      x-ms-client-request-id: 71fb1aa3-6d1b-411c-89bc-34de587346be
      apim-request-id: REDACTED
      Strict-Transport-Security: REDACTED
      X-Content-Type-Options: REDACTED
      x-ms-region: REDACTED
      Date: Mon, 07 Aug 2023 05:07:51 GMT
      Content-Length: 198
      Content-Type: application/json
      
         at Azure.Core.HttpPipelineExtensions.ProcessMessageAsync(HttpPipeline pipeline, HttpMessage message, RequestContext requestContext, CancellationToken cancellationToken)
         at Azure.AI.OpenAI.OpenAIClient.GetChatCompletionsAsync(String deploymentOrModelName, ChatCompletionsOptions chatCompletionsOptions, CancellationToken cancellationToken)
         at Microsoft.SemanticKernel.Connectors.AI.OpenAI.AzureSdk.ClientBase.RunRequestAsync[T](Func`1 request)
         --- End of inner exception stack trace ---
         at Microsoft.SemanticKernel.Connectors.AI.OpenAI.AzureSdk.ClientBase.RunRequestAsync[T](Func`1 request)
         at Microsoft.SemanticKernel.Connectors.AI.OpenAI.AzureSdk.ClientBase.InternalGetChatResultsAsync(ChatHistory chat, ChatRequestSettings chatSettings, CancellationToken cancellationToken)
         at Microsoft.SemanticKernel.Connectors.AI.OpenAI.AzureSdk.ClientBase.InternalGetChatResultsAsTextAsync(String text, CompleteRequestSettings textSettings, CancellationToken cancellationToken)
         at Microsoft.SemanticKernel.SkillDefinition.SKFunction.<>c__DisplayClass19_0.<<FromSemanticConfig>g__LocalFunc|1>d.MoveNext()
fail: Microsoft.SemanticKernel.IKernel[0]
      Function call fail during pipeline step 0: ChatSkill.Chat. Error: Invalid request: The request is not valid, HTTP status: 404
Hello, world!
info: Microsoft.AspNetCore.Hosting.Diagnostics[2]
      Request finished HTTP/1.1 POST https://localhost:40443/chat application/json 270 - 400 - text/plain;+charset=utf-8 2070.9510ms

Platform

  • OS: Mac
  • IDE: VS Code
  • Language:C#
  • Source: main branch of the repo

Additional context
Add any other context about the problem here.

Persistent RLHF

Currently RLHF is only implemented on the front end for demonstration purposes, need to pass feedback to model somehow (few shot?) or save in chat message for persistence

It's disabled so not actually shown in webapp

Getting 500s from Azure.AI.OpenAI.OpenAIClient.GetEmbeddingsAsync

Describe the bug

I'm trying to chat with the bot locally, however, this doesn't go anywhere and in web API logs I'm seeing a lot of errors that look like below. How do I debug this?

fail: SemanticKernel.Service.CopilotChat.Skills.ChatSkills.ChatSkill[0]
Cannot search collection f375dd31-e341-4ab0-a2c6-dc5087cb3aa6-LongTermMemory
Microsoft.SemanticKernel.AI.AIException: Service error: The service failed to process the request, HTTP status:500
---> Azure.RequestFailedException: Internal server error
Status: 500 (Internal Server Error)

  Content:
  { "statusCode": 500, "message": "Internal server error", "activityId": "19ccf22c-8e3d-4a93-8eb9-028cef52fd3a" }

  Headers:
  x-ms-client-request-id: 29beecdc-e4bc-4929-b5be-28594a1db6e1
  apim-request-id: REDACTED
  Strict-Transport-Security: REDACTED
  X-Content-Type-Options: REDACTED
  x-ms-region: REDACTED
  Date: Tue, 08 Aug 2023 00:13:25 GMT
  Content-Length: 111
  Content-Type: application/json

     at Azure.Core.HttpPipelineExtensions.ProcessMessageAsync(HttpPipeline pipeline, HttpMessage message, RequestContext requestContext, CancellationToken cancellationToken)
     at Azure.AI.OpenAI.OpenAIClient.GetEmbeddingsAsync(String deploymentOrModelName, EmbeddingsOptions embeddingsOptions, CancellationToken cancellationToken)
     at Microsoft.SemanticKernel.Connectors.AI.OpenAI.AzureSdk.ClientBase.RunRequestAsync[T](Func`1 request)
     --- End of inner exception stack trace ---
     at Microsoft.SemanticKernel.Connectors.AI.OpenAI.AzureSdk.ClientBase.RunRequestAsync[T](Func`1 request)
     at Microsoft.SemanticKernel.Connectors.AI.OpenAI.AzureSdk.ClientBase.InternalGetEmbeddingsAsync(IList`1 data, CancellationToken cancellationToken)
     at Microsoft.SemanticKernel.AI.Embeddings.EmbeddingGenerationExtensions.GenerateEmbeddingAsync[TValue,TEmbedding](IEmbeddingGeneration`2 generator, TValue value, CancellationToken cancellationToken)
     at Microsoft.SemanticKernel.Memory.SemanticTextMemory.SearchAsync(String collection, String query, Int32 limit, Double minRelevanceScore, Boolean withEmbeddings, CancellationToken cancellationToken)+MoveNext()

or

fail: SemanticKernel.Service.CopilotChat.Skills.ChatSkills.ChatSkill[0]
Cannot search collection f375dd31-e341-4ab0-a2c6-dc5087cb3aa6-WorkingMemory
Microsoft.SemanticKernel.AI.AIException: Service error: The service failed to process the request, HTTP status:500
---> Azure.RequestFailedException: Internal server error
Status: 500 (Internal Server Error)

  Content:
  { "statusCode": 500, "message": "Internal server error", "activityId": "95f34a4a-c52c-4121-a0e5-d58ab0d6a6e3" }

  Headers:
  x-ms-client-request-id: 8647cf4a-e191-4fa7-8480-b58c37977d0b
  apim-request-id: REDACTED
  Strict-Transport-Security: REDACTED
  X-Content-Type-Options: REDACTED
  x-ms-region: REDACTED
  Date: Tue, 08 Aug 2023 00:12:21 GMT
  Content-Length: 111
  Content-Type: application/json

To Reproduce
Steps to reproduce the behavior:

  1. Completed local devbox setup.
  2. Started the app.
  3. Typing questions and not getting responses reliably.

Expected behavior

Get responses reliably.

Platform

  • OS: Windows
  • IDE: VS Code
  • Language: C#
  • Source: main branch of the repo.

Rename everything from Skills -> Plugins

Since MS aligned on Plugins, we need to rename everything with "Skill" in it to "Plugin"

No dependency on core team but here's an item to track the work on their side: microsoft/semantic-kernel#2119

Tasks

Disable Application Insights Telemetry logs

Describe the bug
Application Insights Telemetry create quite verbose logs and it does not filter "Authorization: Bearer" headers. I tried to disable it but I still see it in my logs:

To Reproduce
Steps to reproduce the behavior:

  1. Setup and run Copilot using Linux/macOS instruction https://github.com/microsoft/chat-copilot#linuxmacos
  2. Write and submit any prompt in UI http://localhost:3000/
  3. See Debug Console in VS Code

Expected behavior
No logs from Application Insights Telemetry

Screenshots
My appsettings.json
image

My launch.json:
image

Platform

  • OS: Mac
  • IDE: VS Code
  • Language: C#
  • Source: main branch of repository

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.