You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: Added support for Azure OpenAI and other LLMs in Semantic Kernel (#51)
* refactored the chat service configuration to use an enum-based approach for support of other LLMs
* feat: refactored the chat service configuration to use an enum-based approach for support of other LLMs
* formatting changes for Notes for markdown
Copy file name to clipboardExpand all lines: samples/python/agents/semantickernel/README.md
+27-2Lines changed: 27 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -53,16 +53,39 @@ sequenceDiagram
53
53
cd samples/python/agents/semantickernel
54
54
```
55
55
56
-
2.**Create an environment file (.env) with your API key and the model ID (e.g., "gpt-4.1"):**:
56
+
2.**Configure environment variables**:
57
+
58
+
Create a `.env` file based on `.envexample` file. The agent automatically detects whether to use Azure OpenAI or standard OpenAI based on which environment variables are set.
> The agent will use Azure OpenAI if all four Azure variables are set, otherwise it will use standard OpenAI if both OpenAI variables are set.
78
+
79
+
> [!NOTE]
80
+
> Other LLMs can be used as well, but you will need to modify the code to use the appropriate AI connector via the chat completion service method. See Semantic Kernel [documentation](https://learn.microsoft.com/en-us/semantic-kernel/concepts/ai-services/chat-completion/?tabs=csharp-AzureOpenAI%2Cpython-AzureOpenAI%2Cjava-AzureOpenAI&pivots=programming-language-python#creating-a-chat-completion-service) for more details on how to configure other AI services.
81
+
82
+
> [!NOTE]
83
+
> For details on environment variables, refer to the [Semantic Kernel AI Service Settings](https://github.com/microsoft/semantic-kernel/blob/main/python/samples/concepts/setup/ALL_SETTINGS.md#semantic-kernel-settings) document.
84
+
63
85
3.**Set up the Python Environment**:
64
86
65
-
> Note: pin the Python version to your desired version (3.10+)
87
+
> [!NOTE]
88
+
> pin the Python version to your desired version (3.10+)
66
89
67
90
```bash
68
91
uv python pin 3.12
@@ -73,6 +96,7 @@ source .venv/bin/activate
73
96
74
97
Choose one of the following options:
75
98
99
+
> [!NOTE]
76
100
> Make sure you run `uv run .` from the following directory: `samples/python/agents/semantickernel`
0 commit comments