Skip to content

Commit 3724d5e

Browse files
Merge pull request #78 from Portkey-AI/fix-prompt-changes-delete-config
Delete Config API & Prompt API Fixes
2 parents d1c5334 + 3df3bd1 commit 3724d5e

1 file changed

Lines changed: 79 additions & 1 deletion

File tree

openapi.yaml

Lines changed: 79 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ tags:
2424
description: Create, List, Retrieve, Update, and Delete collections of prompts.
2525
- name: Labels
2626
description: Create, List, Retrieve, Update, and Delete labels.
27-
- name: Prompts
27+
- name: Prompt Collections
2828
description: Create, List, Retrieve, Update, and Delete prompt collections.
2929
- name: PromptPartials
3030
description: Create, List, Retrieve, Update, and Delete prompt partials.
@@ -877,9 +877,13 @@ paths:
877877
functions:
878878
type: array
879879
description: Functions for the prompt
880+
items:
881+
type: object
880882
tools:
881883
type: array
882884
description: Tools for the prompt
885+
items:
886+
type: object
883887
tool_choice:
884888
type: object
885889
description: Tool Choice for the prompt
@@ -9068,6 +9072,80 @@ paths:
90689072
console.log(config);
90699073

90709074
/configs/{slug}:
9075+
delete:
9076+
servers:
9077+
- url: https://api.portkey.ai/v1
9078+
- url: SELF_HOSTED_CONTROL_PLANE_URL/v1
9079+
summary: Delete a config
9080+
tags:
9081+
- Configs
9082+
operationId: deleteConfig
9083+
parameters:
9084+
- name: slug
9085+
in: path
9086+
required: true
9087+
schema:
9088+
type: string
9089+
responses:
9090+
"200":
9091+
description: Config deleted successfully
9092+
content:
9093+
application/json:
9094+
schema:
9095+
type: object
9096+
examples:
9097+
example-1:
9098+
value:
9099+
{}
9100+
x-code-samples:
9101+
- lang: python
9102+
label: Default
9103+
source: |
9104+
portkey = Portkey(
9105+
api_key="PORTKEY_API_KEY",
9106+
)
9107+
9108+
portkey.configs.delete(
9109+
id="CONFIG_SLUG"
9110+
)
9111+
- lang: javascript
9112+
label: Default
9113+
source: |
9114+
import { Portkey } from "portkey-ai";
9115+
9116+
const portkey = new Portkey({
9117+
apiKey:"PORTKEY_API_KEY",
9118+
})
9119+
9120+
await portkey.configs.delete({
9121+
id:"CONFIG_SLUG"
9122+
})
9123+
- lang: python
9124+
label: Self-Hosted
9125+
source: |
9126+
from portkey_ai import Portkey
9127+
9128+
portkey = Portkey(
9129+
api_key="PORTKEY_API_KEY",
9130+
base_url="SELF_HOSTED_CONTROL_PLANE_URL"
9131+
)
9132+
9133+
portkey.configs.delete(
9134+
id="CONFIG_SLUG"
9135+
)
9136+
- lang: javascript
9137+
label: Self-Hosted
9138+
source: |
9139+
import { Portkey } from "portkey-ai";
9140+
9141+
const portkey = new Portkey({
9142+
apiKey:"PORTKEY_API_KEY",
9143+
baseUrl: "SELF_HOSTED_CONTROL_PLANE_URL"
9144+
})
9145+
9146+
await portkey.configs.delete({
9147+
id:"CONFIG_SLUG"
9148+
})
90719149
get:
90729150
servers:
90739151
- url: https://api.portkey.ai/v1

0 commit comments

Comments
 (0)