import PromptFoundry from '@prompt-foundry/typescript-sdk';
const client = new PromptFoundry({
apiKey: process.env['PROMPT_FOUNDRY_API_KEY'], // This is the default and can be omitted
});
async function main() {
const promptConfiguration = await client.prompts.get('1212121');
console.log(promptConfiguration.id);
}
main();
{
"id": "<string>",
"name": "<string>",
"parameters": {
"provider": "ANTHROPIC",
"name": "<string>",
"responseFormat": "JSON",
"temperature": 123,
"topP": 123,
"topK": 2,
"frequencyPenalty": 123,
"presencePenalty": 123,
"maxTokens": 123,
"seed": 123,
"toolChoice": "<string>",
"stream": true,
"parallelToolCalls": true
},
"messages": [
{
"content": [
{
"type": "TEXT",
"text": "<string>"
}
],
"role": "assistant"
}
],
"tools": [
{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"parameters": {}
}
]
}
Get the configuration of an existing prompt.
import PromptFoundry from '@prompt-foundry/typescript-sdk';
const client = new PromptFoundry({
apiKey: process.env['PROMPT_FOUNDRY_API_KEY'], // This is the default and can be omitted
});
async function main() {
const promptConfiguration = await client.prompts.get('1212121');
console.log(promptConfiguration.id);
}
main();
{
"id": "<string>",
"name": "<string>",
"parameters": {
"provider": "ANTHROPIC",
"name": "<string>",
"responseFormat": "JSON",
"temperature": 123,
"topP": 123,
"topK": 2,
"frequencyPenalty": 123,
"presencePenalty": 123,
"maxTokens": 123,
"seed": 123,
"toolChoice": "<string>",
"stream": true,
"parallelToolCalls": true
},
"messages": [
{
"content": [
{
"type": "TEXT",
"text": "<string>"
}
],
"role": "assistant"
}
],
"tools": [
{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"parameters": {}
}
]
}
"1212121"
Successful operation
The response is of type object
.
Was this page helpful?