跳至主要内容
版本:PrivStation 2.4.0
Markdown 原文

取得所有提示詞列表

取得所有提示詞列表​

此 API 用於取得目前系統中所有已建立的 Prompt 清單。

每筆 Prompt 包含內容、描述資訊等。

curl -X 'GET' \
'https://127.0.0.1:8000/v1/prompt?limit=20&order=desc' \
-H 'accept: application/json' \
-H 'Authorization: Bearer <your-api-key>'

Request Headers​

KeyValue
Request MethodGET
acceptapplication/json
AuthorizationBearer <your-api-key>

Query Parameters​

FieldTypeNoteRequired
limitint1 - 1000,預設為 20false
orderstringasc or desc,預設為 descfalse
afterstringuuidfalse
beforestringuuidfalse

Response Body​

{
"object": "list",
"data": [
{
"id": "9efad107-c9af-4cb2-9c79-7e926bc5d07e",
"name": "Antibiotics Explanation",
"metadata": {
"title": "Antibiotics Explanation",
"derived_from": "a1db95a9-1d40-44ee-9cba-69dcc82e0ec6"
},
"created_at": "2025-01-01T00:10:00.000Z"
}
],
"first_id": "9efad107-c9af-4cb2-9c79-7e926bc5d07e",
"last_id": "29519a8a-8561-4451-9083-9cc6c21de04a",
"has_more": true
}

Field Explanation

FieldDetail
data[]請參考「提示詞物件」章節列表內容
first_id第一個提示詞的 ID
last_id最後一個提示詞的 ID
has_more是否有更多的提示詞