Skip to content

.Net - After update RC.1 , can not run in WithAzureOpenAIChatCompletion #3962

Closed

Description

@kinfey

Describe the bug

I upgrade RC1 , run

`
Kernel kernel = new KernelBuilder()
.WithAzureOpenAIChatCompletion("dp","modelid","endpoint","key")
.Build();

'

To Reproduce
Steps to reproduce the behavior:

  1. run it in polyglot
  2. See error

Error: System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Bcl.AsyncInterfaces, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. The system cannot find the file specified.

File name: 'Microsoft.Bcl.AsyncInterfaces, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'
at Submission#5.<>d__0.MoveNext()
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
at Submission#5.()
at Submission#5.(Object[] submissionArray)
at Microsoft.CodeAnalysis.Scripting.ScriptExecutionState.RunSubmissionsAsync[TResult](ImmutableArray1 precedingExecutors, Func2 currentExecutor, StrongBox1 exceptionHolderOpt, Func2 catchExceptionOpt, CancellationToken cancellationToken)

Activity

  1. added
    .NET
    on Dec 5, 2023
  2. changed the title [-].NET - After update RC.1 , can not run in WithAzureOpenAIChatCompletion[/-] [+].Net - After update RC.1 , can not run in WithAzureOpenAIChatCompletion[/+] on Dec 5, 2023
  3. stephentoub commented on Dec 5, 2023

    @stephentoub
    Member

    Steps to reproduce the behavior:
    run it in polyglot

    Can you provide a more detailed repro? What's the complete code you're using? (The repro doesn't include referencing the relevant packages, for example)

    Diego Colombo (@colombod), can you help with this?

    My guess is that however polyglot notebooks is loading things, it's ending up loading something that has a dependency on an older version of Microsoft.Bcl.AsyncInterfaces, then trying to load this code into the same AssemblyLoadContext/AppDomain, failing to then load the new version of the same M.B.AsyncInterfaces assembly into the same context/domain, and then it's failing because of the dependency on the new version.

  4. dmytrostruk commented on Dec 5, 2023

    @dmytrostruk
    Member

    Stephen Toub (@stephentoub) I received the same problem while updating dotnet notebooks, I think it's because C# Polyglot Notebooks don't support .NET 8 yet:
    image

    I found related work regarding .NET 8 support, these PRs were already merged 2 weeks ago but it looks like they are not released yet:
    dotnet/interactive#3336
    dotnet/vscode-dotnet-pack#515

  5. colombod commented on Dec 5, 2023

    @colombod
    Contributor

    we are releasing .NET8 support this week. it is currently available if you switch the extension in pre-release

  6. dmytrostruk commented on Dec 5, 2023

    @dmytrostruk
    Member

    Diego Colombo (@colombod) I tried to switch extension to pre-release:
    image

    But I still receive the same issue:
    image

    Is there anything I'm missing for workaround?

  7. moved this from Sprint: Planned to Sprint: In Progress in Semantic Kernelon Dec 5, 2023
  8. WeihanLi commented on Dec 6, 2023

    @WeihanLi
    Contributor

    There's a new release from dotnet-interactive now

    https://github.com/dotnet/interactive/releases/tag/v1.0.4605020

  9. moved this from Sprint: In Progress to Sprint: In Review in Semantic Kernelon Dec 7, 2023
  10. moved this from Sprint: In Review to Sprint: Done in Semantic Kernelon Dec 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

.NET

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions