Skip to content

Commit c64b0d9

Browse files
author
Eric Camplin
committed
Semantic Kernel - format zone pivot
1 parent 73f8768 commit c64b0d9

File tree

9 files changed

+840
-832
lines changed

9 files changed

+840
-832
lines changed

learn-pr/wwl-azure/build-your-kernel/includes/4-how-build-your-kernel.md

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -18,45 +18,45 @@ The steps to get started using the Semantic Kernel SDK are:
1818

1919
::: zone pivot="csharp"
2020

21-
```c#
22-
using Microsoft.SemanticKernel;
21+
```c#
22+
using Microsoft.SemanticKernel;
2323

24-
// Populate values from your OpenAI deployment
25-
var modelId = "";
26-
var endpoint = "";
27-
var apiKey = "";
24+
// Populate values from your OpenAI deployment
25+
var modelId = "";
26+
var endpoint = "";
27+
var apiKey = "";
2828

29-
// Create a kernel with Azure OpenAI chat completion
30-
var builder = Kernel.CreateBuilder().AddAzureOpenAIChatCompletion(modelId, endpoint, apiKey);
29+
// Create a kernel with Azure OpenAI chat completion
30+
var builder = Kernel.CreateBuilder().AddAzureOpenAIChatCompletion(modelId, endpoint, apiKey);
3131

32-
// Build the kernel
33-
Kernel kernel = builder.Build();
34-
```
32+
// Build the kernel
33+
Kernel kernel = builder.Build();
34+
```
3535

3636
::: zone-end
3737

3838
::: zone pivot="python"
3939

40-
```python
41-
from semantic_kernel import Kernel
42-
from semantic_kernel.connectors.ai.open_ai import AzureChatCompletion
43-
44-
# Populate values from your OpenAI deployment
45-
model_id = ""
46-
endpoint = ""
47-
api_key = ""
48-
49-
# Create a kernel and add Azure OpenAI chat completion
50-
kernel = Kernel()
51-
kernel.add_service(
52-
AzureChatCompletion(
53-
deployment_name=model_id,
54-
endpoint=endpoint,
55-
api_key=api_key
56-
)
40+
```python
41+
from semantic_kernel import Kernel
42+
from semantic_kernel.connectors.ai.open_ai import AzureChatCompletion
43+
44+
# Populate values from your OpenAI deployment
45+
model_id = ""
46+
endpoint = ""
47+
api_key = ""
48+
49+
# Create a kernel and add Azure OpenAI chat completion
50+
kernel = Kernel()
51+
kernel.add_service(
52+
AzureChatCompletion(
53+
deployment_name=model_id,
54+
endpoint=endpoint,
55+
api_key=api_key
5756
)
58-
kernel.add_service(chatcompletion)
59-
```
57+
)
58+
kernel.add_service(chatcompletion)
59+
```
6060

6161
::: zone-end
6262

0 commit comments

Comments
 (0)