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
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
139
138
140
139
## Install the prompt flow SDK
141
140
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.
143
142
144
143
Use pip to install the prompt flow SDK into the virtual environment that you created.
145
144
```
@@ -161,24 +160,24 @@ Your AI services endpoint and deployment name are required to call the Azure Ope
161
160
1. Create a ```.env``` file, and paste the following code:
162
161
```
163
162
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
166
165
```
167
166
168
167
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.
169
168
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**.
170
169
171
170
:::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":::
172
171
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.
175
174
176
175
:::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":::
177
176
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").
179
178
180
179
> [!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.
182
181
183
182
## Create a basic chat prompt and app
184
183
@@ -231,7 +230,7 @@ load_dotenv()
231
230
from promptflow.core import Prompty, AzureOpenAIModelConfiguration
0 commit comments