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

Phi Silica - LanguageModel.CreateAsync() throws Exception #5156

Open
harvinders opened this issue Feb 14, 2025 · 2 comments
Open

Phi Silica - LanguageModel.CreateAsync() throws Exception #5156

harvinders opened this issue Feb 14, 2025 · 2 comments

Comments

@harvinders
Copy link

Describe the bug

I am on X Plus, with dev channel OS (26120.3073), WinUI packaged app

I am getting exception whilst creating the model LanguageModel.CreateAsync();

           if (!LanguageModel.IsAvailable())
           {
               var op2 = await LanguageModel.MakeAvailableAsync();
           }

           try
           {
               using LanguageModel languageModel = await LanguageModel.CreateAsync();

               string prompt = "Provide the molecular formula for glucose.";

               var result = await languageModel.GenerateResponseAsync(prompt);

               Console.WriteLine(result.Response);
           }
           catch (Exception e)
           {
           }

csproj settings

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <OutputType>WinExe</OutputType>
    <TargetFramework>net9.0-windows10.0.22621.0</TargetFramework>
    <TargetPlatformMinVersion>10.0.19041.0</TargetPlatformMinVersion>
    <RootNamespace>BlankCard</RootNamespace>
    <ApplicationManifest>app.manifest</ApplicationManifest>
    <Platforms>x86;x64;ARM64</Platforms>
    <RuntimeIdentifiers>win-x86;win-x64;win-arm64</RuntimeIdentifiers>
    <PublishProfile>win-$(Platform).pubxml</PublishProfile>
    <UseWinUI>true</UseWinUI>
    <EnableMsixTooling>true</EnableMsixTooling>
    <Nullable>enable</Nullable>
  </PropertyGroup>
  ...

Image

Steps to reproduce the bug

  1. Create a default WinUI project
  2. Update it for 1.7 and latest OS support
  3. add the above code in a event handler

Expected behavior

No response

Screenshots

No response

NuGet package version

Windows App SDK 1.7 Experimental 3: 1.7.250127003-experimental3

Packaging type

Packaged (MSIX)

Windows version

Insider Build (xxxxx)

IDE

Visual Studio 2022

Additional context

No response

@harvinders
Copy link
Author

Running the Sample App also not working, Create Session fails

Image

@adrastogi
Copy link

@harvinders I at least can't immediately spot what's going wrong. Would you mind grabbing a repro mode Feedback Hub trace of the problem? You can use "Developer Platform -> Windows Copilot Runtime" as the category. It should have a 'Share' option for you to grab an aka.ms link to the item.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants