訊息與角色
messages 陣列會以有序序列承載脈絡。system 設定任務規則,user 加入請求,assistant 與 tool 則保留執行記錄。
請勿串接字串來建立記錄;應保留每則訊息的角色與原始順序。
聊天完成
bash
curl --request POST https://cicora.ai/api/v1/chat/completions \
--header "Authorization: Bearer $CICORA_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"model": "openai/gpt-5.6-sol",
"messages": [
{"role": "system", "content": "Be concise and cite assumptions."},
{"role": "user", "content": "Draft a release checklist."}
],
"temperature": 0.2
}'控制輸出
- model 用來識別模型系列與版本。
- temperature、top_p 與輸出上限可控制回覆的變異程度與長度。
- 只傳送所選模型列為支援的參數。
可靠的迴圈
使用 finish_reason 區分傳輸失敗與模型回覆。拒絕回覆或脈絡邊界屬於介面資料,不應因此替換結果。
若資料保留規則允許,請儲存不含憑證的來源請求本文與標準化回覆。