Skip to content

Commit 6302577

Browse files
Merge pull request #341 from Portkey-AI/chore/update-gateway-to-other-api-page
multi-prompt labels
2 parents 7b4ba2e + 04e3d1a commit 6302577

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

product/prompt-engineering-studio/prompt-versioning.mdx

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -116,10 +116,11 @@ response = portkey.prompts.completions.create(
116116

117117
## Prompt Labels
118118

119-
Labels provide a more flexible and meaningful way to reference prompt versions compared to version numbers. You can add version tags/labels like `staging`, `production` to any prompt version to track changes and call them directly:
119+
Labels provide a more flexible and meaningful way to reference prompt versions compared to version numbers. You can add version tags/labels like `platform-team`, `gpt-model-prompt` to any prompt version to track changes and call them directly:
120120

121121
<Frame><img width="200" src="/images/changelog/prompt-labels.gif" /></Frame>
122122

123+
123124
### Using Labels in Your Code
124125

125126
<CodeGroup>
@@ -129,15 +130,21 @@ Labels provide a more flexible and meaningful way to reference prompt versions c
129130
variables: {"":""}
130131
})
131132
```
132-
```ts @dev {2}
133+
```ts @develpoment {2}
134+
const promptCompletion = portkey.prompts.completions.create({
135+
promptID: "pp-article-xx@development",
136+
variables: {"":""}
137+
})
138+
```
139+
```ts @production {2}
133140
const promptCompletion = portkey.prompts.completions.create({
134-
promptID: "pp-article-xx@dev",
141+
promptID: "pp-article-xx@production",
135142
variables: {"":""}
136143
})
137144
```
138-
```ts @prod {2}
145+
```ts @lorem-ipsum {2}
139146
const promptCompletion = portkey.prompts.completions.create({
140-
promptID: "pp-article-xx@prod",
147+
promptID: "pp-article-xx@lorem-ipsum",
141148
variables: {"":""}
142149
})
143150
```
@@ -152,6 +159,9 @@ To create or manage labels:
152159
3. Select a version and apply the desired label
153160
4. You can move labels between versions as needed
154161

162+
<Note>
163+
You can now assign multiple custom labels to a single prompt version in Portkey. This makes it easier to promote a prompt version in it's developemtn cycle.
164+
</Note>
155165
<Info>
156166
- There are 3 default labels: `production`, `staging`, `development` which cannot be removed.
157167
- Custom labels are unique to the workspace where they are created.

0 commit comments

Comments
 (0)