Skip to content

Commit ba01297

Browse files
authored
Python: Use correct env var for AOAI Responses Deployment Name in README, Fix Responses config checks (#11379)
### Motivation and Context Use correct env var for AOAI Responses Deployment Name - `AZURE_OPENAI_RESPONSES_DEPLOYMENT_NAME` in README. Similarly check for `.responses_deployment_name` as none, instead of `.chat_deployment_name`. <!-- Thank you for your contribution to the semantic-kernel repo! Please help reviewers and future users, providing the following information: 1. Why is this change required? 2. What problem does it solve? 3. What scenario does it contribute to? 4. If it fixes an open issue, please link to the issue here. --> ### Description Use correct env var for AOAI Responses Deployment Name <!-- Describe your changes, the overall approach, the underlying design. These notes will help understanding how your code works. Thanks! --> ### Contribution Checklist <!-- Before submitting this PR, please make sure: --> - [X] The code builds clean without any errors or warnings - [X] The PR follows the [SK Contribution Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts) raises no violations - [X] All unit tests pass, and I have added new tests where possible - [X] I didn't break anyone 😄
1 parent dc0a434 commit ba01297

File tree

4 files changed

+8
-5
lines changed

4 files changed

+8
-5
lines changed

python/samples/getting_started_with_agents/openai_responses/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,6 @@ Please visit the following [link](https://learn.microsoft.com/en-us/azure/ai-ser
3030

3131
#### Environment Variables / Config
3232

33-
`AZURE_OPENAI_RESPONSES_MODEL_ID=""`
33+
`AZURE_OPENAI_RESPONSES_DEPLOYMENT_NAME=""`
3434

3535
The other Azure OpenAI config values used for AzureAssistantAgent or AzureChatCompletion, like `AZURE_OPENAI_API_VERSION` or `AZURE_OPENAI_ENDPOINT` are still valid for the `AzureResponsesAgent`.

python/samples/getting_started_with_agents/openai_responses/step1_responses_agent.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
Azure OpenAI or OpenAI. The sample shows how to have the agent answer
99
questions about the world.
1010
11+
Note, in this sample, a thread is not used. This creates a stateless agent. It will
12+
not be able to recall previous messages, which is expected behavior.
13+
1114
The interaction with the agent is via the `get_response` method, which sends a
1215
user input to the agent and receives a response from the agent. The conversation
1316
history is maintained by the agent service, i.e. the responses are automatically

python/semantic_kernel/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from semantic_kernel.kernel import Kernel
44

5-
__version__ = "1.27.0"
5+
__version__ = "1.27.1"
66

77
DEFAULT_RC_VERSION = f"{__version__}-rc6"
88

python/semantic_kernel/agents/open_ai/azure_responses_agent.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,8 @@ def setup_resources(
102102
if not azure_openai_settings.endpoint:
103103
raise AgentInitializationException("Please provide an Azure OpenAI endpoint")
104104

105-
if not azure_openai_settings.chat_deployment_name:
106-
raise AgentInitializationException("Please provide an Azure OpenAI deployment name")
105+
if not azure_openai_settings.responses_deployment_name:
106+
raise AgentInitializationException("Please provide an Azure OpenAI Responses deployment name")
107107

108108
client = AsyncAzureOpenAI(
109109
azure_endpoint=str(azure_openai_settings.endpoint),
@@ -115,4 +115,4 @@ def setup_resources(
115115
**kwargs,
116116
)
117117

118-
return client, azure_openai_settings.chat_deployment_name
118+
return client, azure_openai_settings.responses_deployment_name

0 commit comments

Comments
 (0)