渲染
获取提示模板
路径参数
名称
类型
描述
请求主体
名称
类型
描述
示例用法
curl -X POST "https://api.portkey.ai/v1/prompts/$PROMPT_ID/render" \
-H "Content-Type: application/json" \
-H "x-portkey-api-key: $PORTKEY_API_KEY" \
-d '{
"variables": {"movie":"Dune 2"}
}'{
"success": true,
"data": {
"model": "gpt-4",
"n": 1,
"top_p": 1,
"max_tokens": 256,
"temperature": 0,
"presence_penalty": 0,
"frequency_penalty": 0,
"messages": [
{
"role": "system",
"content": "You're a helpful assistant."
},
{
"role": "user",
"content": "Who directed Dune 2?"
}
]
}
}详细示例:
检索提示Last updated