Skip to content

Commit 72a3d8b

Browse files
Merge pull request #278299 from eric-urban/eur/sdk-qs-leah-update
sdk qs update
2 parents 5775b8c + 48a500b commit 72a3d8b

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

articles/ai-studio/quickstarts/get-started-code.md

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ author: eric-urban
1313
---
1414

1515
# Build a custom chat app in Python using the prompt flow SDK
16-
1716
[!INCLUDE [Feature preview](~/reusable-content/ce-skilling/azure/includes/ai-studio/includes/feature-preview.md)]
1817

1918
In this quickstart, we walk you through setting up your local development environment with the prompt flow SDK. We write a prompt, run it as part of your app code, trace the LLM calls being made, and run a basic evaluation on the outputs of the LLM.
@@ -139,7 +138,7 @@ Activating the Python environment means that when you run ```python``` or ```pip
139138
140139
## Install the prompt flow SDK
141140

142-
In this section, we use prompt flow to build our application. [Prompt flow](https://microsoft.github.io/promptflow/) is a suite of development tools designed to streamline the end-to-end development cycle of LLM-based AI applications, from ideation, prototyping, testing, evaluation to production deployment and monitoring.
141+
In this section, we use prompt flow to build our application. [Prompt flow](https://microsoft.github.io/promptflow) is a suite of development tools designed to streamline the end-to-end development cycle of LLM-based AI applications, from ideation, prototyping, testing, evaluation to production deployment and monitoring.
143142

144143
Use pip to install the prompt flow SDK into the virtual environment that you created.
145144
```
@@ -161,24 +160,24 @@ Your AI services endpoint and deployment name are required to call the Azure Ope
161160
1. Create a ```.env``` file, and paste the following code:
162161
```
163162
AZURE_OPENAI_ENDPOINT=endpoint_value
164-
AZURE_OPENAI_DEPLOYMENT_NAME=deployment_name
165-
AZURE_OPENAI_API_VERSION=2024-02-15-preview
163+
AZURE_OPENAI_CHAT_DEPLOYMENT=chat_deployment_name
164+
AZURE_OPENAI_API_VERSION=api_version
166165
```
167166
168167
1. Navigate to the [chat playground inside of your AI Studio project](./get-started-playground.md#chat-in-the-playground-without-your-data). First validate that chat is working with your model by sending a message to the LLM.
169168
1. Find the Azure OpenAI deployment name in the chat playground. Select the deployment in the dropdown and hover over the deployment name to view it. In this example, the deployment name is **gpt-35-turbo-16k**.
170169
171170
:::image type="content" source="../media/quickstarts/promptflow-sdk/playground-deployment-view-code.png" alt-text="Screenshot of the AI Studio chat playground opened, highlighting the deployment name and the view code button." lightbox="../media/quickstarts/promptflow-sdk/playground-deployment-view-code.png":::
172171
173-
1. In the ```.env``` file, replace ```deployment_name``` with the name of the deployment from the previous step. In this example, we're using the deployment name ```gpt-35-turbo-16k```.
174-
1. Select the **<\> View Code** button and copy the endpoint value.
172+
1. In the ```.env``` file, replace ```chat_deployment_name``` with the name of the deployment from the previous step. In this example, we're using the deployment name ```gpt-35-turbo-16k```.
173+
1. Select the **<\> View Code** button and copy the endpoint value and API version value.
175174
176175
:::image type="content" source="../media/quickstarts/promptflow-sdk/playground-copy-endpoint.png" alt-text="Screenshot of the view code popup highlighting the button to copy the endpoint value." lightbox="../media/quickstarts/promptflow-sdk/playground-copy-endpoint.png":::
177176
178-
1. In the ```.env``` file, replace ```endpoint_value``` with the endpoint value copied from the dialog in the previous step.
177+
1. In the ```.env``` file, replace ```endpoint_value``` with the endpoint value and replace ```api_version``` with the API version copied from the dialog in the previous step (such as "2024-02-15-preview").
179178
180179
> [!WARNING]
181-
> Key based authentication is supported but isn't recommended by Microsoft. If you want to use keys you can add your key to the ```.env```, but please ensure that your ```.env``` is in your ```.gitignore``` file so that you don't accidentally checked into your git repository.
180+
> Key based authentication is supported but isn't recommended by Microsoft. If you want to use keys you can add your key to the ```.env```, but please ensure that your ```.env``` is in your ```.gitignore``` file so that you don't accidentally check it into your git repository.
182181
183182
## Create a basic chat prompt and app
184183
@@ -231,7 +230,7 @@ load_dotenv()
231230
from promptflow.core import Prompty, AzureOpenAIModelConfiguration
232231

233232
model_config = AzureOpenAIModelConfiguration(
234-
azure_deployment=os.getenv("AZURE_OPENAI_DEPLOYMENT_NAME"),
233+
azure_deployment=os.getenv("AZURE_OPENAI_CHAT_DEPLOYMENT"),
235234
api_version=os.getenv("AZURE_OPENAI_API_VERSION"),
236235
azure_endpoint=os.getenv("AZURE_OPENAI_ENDPOINT")
237236
)
@@ -307,7 +306,7 @@ from promptflow.core import Prompty, AzureOpenAIModelConfiguration
307306
from promptflow.evals.evaluators import ChatEvaluator
308307

309308
model_config = AzureOpenAIModelConfiguration(
310-
azure_deployment=os.getenv("AZURE_OPENAI_DEPLOYMENT_NAME"),
309+
azure_deployment=os.getenv("AZURE_OPENAI_CHAT_DEPLOYMENT"),
311310
api_version=os.getenv("AZURE_OPENAI_API_VERSION"),
312311
azure_endpoint=os.getenv("AZURE_OPENAI_ENDPOINT")
313312
)
@@ -352,4 +351,4 @@ For more information on how to use prompt flow evaluators, including how to make
352351

353352
- [Quickstart: Create a project and use the chat playground in Azure AI Studio](./get-started-playground.md)
354353
- [Work with projects in VS Code](../how-to/develop/vscode.md)
355-
- [Overview of the Azure AI SDKs](../how-to/develop/sdk-overview.md)
354+
- [Overview of the Azure AI SDKs](../how-to/develop/sdk-overview.md)

0 commit comments

Comments
 (0)