Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Start with Semantic Kernel VS code C# SK-csharp-chatpgt-plugin doesn't work #584

Closed
liarjo opened this issue Nov 8, 2023 · 2 comments
Closed
Assignees
Labels
needs input question Further information is requested

Comments

@liarjo
Copy link

liarjo commented Nov 8, 2023

Describe the bug

I encountered an issue while using the Visual Studio Code (VSCode) and the SK VSCode extension. I followed the wizard and the steps outlined in the README.md file to create the SK-csharp-plugin. However, when I attempted to run the sample app as described in the documentation, it failed.

I executed the following four commands:

cd azure-function
dotnet build
cd bin/Debug/net6.0
func host start

The last command resulted in an error.

The error:

PS C:\LocalCode\ChatGPTPlugIns\sk-csharp-chatgpt-plugin\azure-function\bin\Debug\net6.0> func host start --csharp

Azure Functions Core Tools
Core Tools Version:       4.0.5441 Commit hash: N/A  (64-bit)
Function Runtime Version: 4.25.3.21264

[2023-11-08T18:49:55.449Z] Found C:\LocalCode\ChatGPTPlugIns\sk-csharp-chatgpt-plugin\azure-function\sk-chatgpt-azure-function.csproj. Using for user secrets file configuration.
[2023-11-08T18:49:57.744Z] You must install or update .NET to run this application.
[2023-11-08T18:49:57.750Z] App: C:\LocalCode\ChatGPTPlugIns\sk-csharp-chatgpt-plugin\azure-function\bin\Debug\net6.0\sk-chatgpt-azure-function.dll
[2023-11-08T18:49:57.751Z] Architecture: x64
[2023-11-08T18:49:57.753Z] Language Worker Process exited. Pid=15256.
[2023-11-08T18:49:57.753Z] Framework: 'Microsoft.AspNetCore.App', version '6.0.0' (x64)
[2023-11-08T18:49:57.755Z] C:\Program Files\dotnet\dotnet.exe exited with code -2147450730 (0x80008096). https://aka.ms/dotnet/app-launch-failed.
[2023-11-08T18:49:57.756Z] .NET location: C:\Program Files\dotnet\
[2023-11-08T18:49:57.760Z] The following frameworks were found:
[2023-11-08T18:49:57.761Z]   7.0.13 at [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
[2023-11-08T18:49:57.763Z] Learn about framework resolution:
[2023-11-08T18:49:57.765Z] https://aka.ms/dotnet/app-launch-failed
[2023-11-08T18:49:57.767Z] To install missing framework, download:
[2023-11-08T18:49:57.769Z] https://aka.ms/dotnet-core-applaunch?framework=Microsoft.AspNetCore.App&framework_version=6.0.0&arch=x64&rid=win10-x64
[2023-11-08T18:49:57.780Z] Failed to start a new language worker for runtime: dotnet-isolated.
[2023-11-08T18:49:57.782Z] System.Private.CoreLib: A task was canceled.

Functions:

        GetAIPluginJson: [GET] http://localhost:7071/.well-known/ai-plugin.json

        Joke: [POST] http://localhost:7071/Joke

        RenderOAuth2Redirect: [GET] http://localhost:7071/oauth2-redirect.html

        RenderOpenApiDocument: [GET] http://localhost:7071/openapi/{version}.{extension}

        RenderSwaggerDocument: [GET] http://localhost:7071/swagger.{extension}

        RenderSwaggerUI: [GET] http://localhost:7071/swagger/ui

For detailed output, run func with --verbose flag.
[2023-11-08T18:49:57.925Z] You must install or update .NET to run this application.
[2023-11-08T18:49:57.932Z] App: C:\LocalCode\ChatGPTPlugIns\sk-csharp-chatgpt-plugin\azure-function\bin\Debug\net6.0\sk-chatgpt-azure-function.dll
[2023-11-08T18:49:57.932Z] Language Worker Process exited. Pid=15488.
[2023-11-08T18:49:57.936Z] Architecture: x64
[2023-11-08T18:49:57.939Z] C:\Program Files\dotnet\dotnet.exe exited with code -2147450730 (0x80008096). https://aka.ms/dotnet/app-launch-failed.
[2023-11-08T18:49:57.942Z] Framework: 'Microsoft.AspNetCore.App', version '6.0.0' (x64)
[2023-11-08T18:49:57.946Z] .NET location: C:\Program Files\dotnet\
[2023-11-08T18:49:57.949Z] The following frameworks were found:
[2023-11-08T18:49:57.953Z]   7.0.13 at [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
[2023-11-08T18:49:57.955Z] Learn about framework resolution:
[2023-11-08T18:49:57.957Z] https://aka.ms/dotnet/app-launch-failed
[2023-11-08T18:49:57.959Z] To install missing framework, download:
[2023-11-08T18:49:57.961Z] https://aka.ms/dotnet-core-applaunch?framework=Microsoft.AspNetCore.App&framework_version=6.0.0&arch=x64&rid=win10-x64
[2023-11-08T18:50:02.562Z] Host lock lease acquired by instance ID '0000000000000000000000004B46EB36'.
[2023-11-08T18:50:08.014Z] You must install or update .NET to run this application.
[2023-11-08T18:50:08.017Z] App: C:\LocalCode\ChatGPTPlugIns\sk-csharp-chatgpt-plugin\azure-function\bin\Debug\net6.0\sk-chatgpt-azure-function.dll
[2023-11-08T18:50:08.017Z] Language Worker Process exited. Pid=15476.
[2023-11-08T18:50:08.036Z] C:\Program Files\dotnet\dotnet.exe exited with code -2147450730 (0x80008096). https://aka.ms/dotnet/app-launch-failed.
[2023-11-08T18:50:08.034Z] Architecture: x64
[2023-11-08T18:50:08.039Z] Exceeded language worker restart retry count for runtime:dotnet-isolated. Shutting down and proactively recycling the Functions Host to recover
[2023-11-08T18:50:08.039Z] Framework: 'Microsoft.AspNetCore.App', version '6.0.0' (x64)
[2023-11-08T18:50:08.043Z] .NET location: C:\Program Files\dotnet\
[2023-11-08T18:50:08.045Z] The following frameworks were found:
[2023-11-08T18:50:08.047Z]   7.0.13 at [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
[2023-11-08T18:50:08.049Z] Learn about framework resolution:
[2023-11-08T18:50:08.052Z] https://aka.ms/dotnet/app-launch-failed
[2023-11-08T18:50:08.053Z] To install missing framework, download:
[2023-11-08T18:50:08.055Z] https://aka.ms/dotnet-core-applaunch?framework=Microsoft.AspNetCore.App&framework_version=6.0.0&arch=x64&rid=win10-x64

To Reproduce
Steps to reproduce the behavior:

  1. Go to SK extension and click Create new App
  2. Select option C# ChatGPT Plugin
  3. Select the folder for the code
  4. Folow configuration steps in README.md
  5. Running the starter with this commands
    cd azure-function
    dotnet build
    cd bin/Debug/net6.0
    func host start

Expected behavior
Azure function running.

Platform

  • IDE: VSCODE
  • Language: C#
  • .NET SDK:
    Version: 7.0.403
    Commit: 142776d834

Runtime Environment:
OS Name: Windows
OS Version: 10.0.22621
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\7.0.403\

Host:
Version: 7.0.13
Architecture: x64
Commit: 3f73a2f186

.NET SDKs installed:
7.0.310 [C:\Program Files\dotnet\sdk]
7.0.403 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
Microsoft.AspNetCore.App 7.0.13 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 6.0.24 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 7.0.13 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 7.0.13 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

@crickman
Copy link
Contributor

crickman commented Nov 8, 2023

I believe you may need to install dotnet 6.0 due to a requirement from azure functions.

@crickman crickman self-assigned this Nov 8, 2023
@crickman crickman added question Further information is requested needs input labels Nov 8, 2023
@liarjo
Copy link
Author

liarjo commented Nov 10, 2023

Installed dotnet 6.0 and problem solved, thanks!

@liarjo liarjo closed this as completed Nov 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs input question Further information is requested
Projects
No open projects
Development

No branches or pull requests

2 participants