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

Simplified OpenAI Provisioning #47174

Merged
merged 5 commits into from
Nov 15, 2024
Merged

Conversation

KrzysztofCwalina
Copy link
Member

Now, a full chat starter app looks like the following:

using Azure.CloudMachine;
using Azure.CloudMachine.OpenAI;
using OpenAI.Chat;

CloudMachineCommands.Execute(args, configure: (CloudMachineInfrastructure infrastructure) => {
    infrastructure.AddFeature(new OpenAIModel("gpt-4o-mini", "2024-07-18"));
});
CloudMachineClient client = new();

var builder = WebApplication.CreateBuilder(args);
var app = builder.Build();

app.MapGet("/", () => {
    ChatClient chat = client.GetOpenAIChatClient();
    return chat.CompleteChat("list noble gases").Value.AsText();
});

Console.WriteLine("Hello, World!");
app.Run();

@azure-sdk
Copy link
Collaborator

azure-sdk commented Nov 15, 2024

API change check

APIView has identified API level changes in this PR and created following API reviews.

Azure.CloudMachine
Azure.Provisioning.CloudMachine

@KrzysztofCwalina KrzysztofCwalina enabled auto-merge (squash) November 15, 2024 21:24
@KrzysztofCwalina KrzysztofCwalina merged commit 3f77ddb into Azure:main Nov 15, 2024
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants