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

錯誤代碼說明-傳遞參數驗證類

本頁列出 PrivAI 自行檢查參數組合時回傳的錯誤代碼。欄位型別、必填、enum 值等基本格式驗證失敗時,回傳的是不帶 error_code 的 422 {"detail": [...]},請見 例外狀況處理。

Error CodeHTTP StatusScenarioError MessageInherent Payload
VAL_001422列表 API 同時提供 before 與 afterCannot provide both 'before' and 'after' simultaneously.
VAL_002404列表 API 的 before 或 after 所指定的 ID 不存在ID not found from 'before' or 'after': {cursor_id}.
VAL_003422Chat Completions 同時提供 prompt 與 prompt_idCannot provide both 'prompt' and 'prompt_id' simultaneously.
VAL_004422Chat Completions 的 messages 順序不符合規則(不含 system 訊息):user 與 assistant 必須交替,且必須以 user 開頭、以 user 結尾Messages sequence must alternate between 'user' and 'assistant' roles, starting with 'user' and end with 'user'.
VAL_005400Chat Completions 同時提供 fileset_id 與 fileset_idsCannot provide both 'fileset_id' and 'fileset_ids' simultaneously.

各錯誤代碼可能出現在哪些端點,請見 錯誤代碼說明-API Endpoint 特定錯誤情境。