Update to use Microsoft.Extensions.AI.Abstractions#42
Closed
jongalloway wants to merge 1 commit intodotnet:mainfrom
Closed
Update to use Microsoft.Extensions.AI.Abstractions#42jongalloway wants to merge 1 commit intodotnet:mainfrom
jongalloway wants to merge 1 commit intodotnet:mainfrom
Conversation
Fixes dotnet#38 Replace `IInferenceBackend` with `IChatClient` and remove `SmartComponents.Inference.OpenAI`. * **Project Files:** - Add a package reference to `Microsoft.Extensions.AI.Abstractions` in `samples/ExampleBlazorApp/ExampleBlazorApp.csproj` and `samples/ExampleMvcRazorPagesApp/ExampleMvcRazorPagesApp.csproj`. - Remove the `SmartComponents.Inference.OpenAI` project reference from both project files. * **Program Files:** - Replace the usage of `IInferenceBackend` with `IChatClient` in `samples/ExampleBlazorApp/Program.cs` and `samples/ExampleMvcRazorPagesApp/Program.cs`. - Remove the `WithInferenceBackend<OpenAIInferenceBackend>` method call from both program files. * **ASP.NET Core Files:** - Replace the usage of `IInferenceBackend` with `IChatClient` in `src/SmartComponents.AspNetCore/DefaultSmartComponentsBuilder.cs`, `src/SmartComponents.AspNetCore/ISmartComponentsBuilder.cs`, and `src/SmartComponents.AspNetCore/SmartComponentsServiceCollectionExtensions.cs`. * **Remove Files:** - Delete `src/SmartComponents.Inference/IInferenceBackend.cs`. - Delete `src/SmartComponents.Inference.OpenAI/ApiConfig.cs`, `src/SmartComponents.Inference.OpenAI/OpenAIInferenceBackend.cs`, `src/SmartComponents.Inference.OpenAI/ResponseCache.cs`, `src/SmartComponents.Inference.OpenAI/SelfHostedLlmTransport.cs`, and `src/SmartComponents.Inference.OpenAI/SmartComponents.Inference.OpenAI.csproj`. --- For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/dotnet/smartcomponents/issues/38?shareId=XXXX-XXXX-XXXX-XXXX).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #38
Replace
IInferenceBackendwithIChatClientand removeSmartComponents.Inference.OpenAI.Project Files:
Microsoft.Extensions.AI.Abstractionsinsamples/ExampleBlazorApp/ExampleBlazorApp.csprojandsamples/ExampleMvcRazorPagesApp/ExampleMvcRazorPagesApp.csproj.SmartComponents.Inference.OpenAIproject reference from both project files.Program Files:
IInferenceBackendwithIChatClientinsamples/ExampleBlazorApp/Program.csandsamples/ExampleMvcRazorPagesApp/Program.cs.WithInferenceBackend<OpenAIInferenceBackend>method call from both program files.ASP.NET Core Files:
IInferenceBackendwithIChatClientinsrc/SmartComponents.AspNetCore/DefaultSmartComponentsBuilder.cs,src/SmartComponents.AspNetCore/ISmartComponentsBuilder.cs, andsrc/SmartComponents.AspNetCore/SmartComponentsServiceCollectionExtensions.cs.Remove Files:
src/SmartComponents.Inference/IInferenceBackend.cs.src/SmartComponents.Inference.OpenAI/ApiConfig.cs,src/SmartComponents.Inference.OpenAI/OpenAIInferenceBackend.cs,src/SmartComponents.Inference.OpenAI/ResponseCache.cs,src/SmartComponents.Inference.OpenAI/SelfHostedLlmTransport.cs, andsrc/SmartComponents.Inference.OpenAI/SmartComponents.Inference.OpenAI.csproj.For more details, open the Copilot Workspace session.