3.1 Create a New Prompty¶
Prompty is an open-source generative AI templating framework that makes it easy to experiment with prompts, context, parameters, and other ways to change the behavior of language models. The prompty file spec describes the sections of a Prompty file in detail, but we'll explore Prompty now by changing sections step by step.
1. Create Sandbox Folder¶
- Return to the GitHub Codespaces tab and open the VS Code terminal.
-
Create an empty directory in root of your filesytem. From the Terminal:
1. Switch to the new directory1
mkdir sandbox
1
cd sandbox
2. Create New Prompty¶
- In the VS Code Explorer (left pane), right-click on the new
sandbox
folder - Select
New Prompty
from the drop-down menu. - This will create the new file
basic.prompty
and open it in VS Code.
3. Run The Prompty¶
This step will fail with an error. Don't worry, that's expected.
- Make sure the
basic.prompty
file is open in the editor pane. - Click the "play" button in the top-left corner (or press F5).
- You will be prompted to sign in. Click
Allow
- Select your Azure account in the follow-up dialog.
Result: The Visual Studio Code console will switch to the "Output" tab.
- You will get an Error in the Output pane as shown below.
- ❌ |
Error: 404 The API deployment for this resource does not exist.
- ❌ |
- This is expected. It is because we haven't yet configured a model for Prompty to use.
CONGRATULATIONS. You created and ran your first Prompty!