TokenLab

텍스트

의사결정 평가

네이티브 의사결정 모델을 사용하여 명명된 확률, 선택 및 점수 질문을 평가합니다.

POST
/v1/systemone

state와 명명된 questions를 의사결정 모델로 전송합니다. 현재 가용성을 확인하려면 GET /v1/models?category=decision을 사용하고, 게시된 계약을 확인하려면 GET /v1/models/{model}을 사용하십시오.

state 및 각 질문의 instructions는 문자열, JSON 객체 또는 JSON 배열을 허용합니다. 이 엔드포인트는 동기식 JSON을 반환합니다.

질문 유형기준결과
noultrue 및 false 지침이 모두 포함된 선택적 객체noul, 0에서 1 사이의 확률
choice지침 또는 null에 매핑된 1~255개의 옵션 이름 객체choice, 선택적으로 probabilities 및 confidence
score2~10개의 설명으로 구성된 순서가 있는 배열0부터 마지막 인덱스까지의 score; 소수점 단위일 수 있으며, 선택적으로 legend, probabilities, confidence 포함

응답은 answers 하위에 질문 이름을 유지합니다. usage.input_tokens 및 usage.output_tokens는 사용 가능한 경우 관찰된 사용량을 보고합니다. 가격은 모델의 현재 요금제를 따릅니다. 무료 출력이라고 해서 출력 토큰이 0인 것은 아닙니다.

채팅 메시지, 도구, 스트리밍 및 Batch는 이 엔드포인트 계약의 일부가 아닙니다.

curl https://api.tokenlab.sh/v1/systemone \
  -H "Authorization: Bearer $TOKENLAB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "jev-1.13",
    "state": "I was charged twice. Please refund the duplicate payment.",
    "questions": {
      "refund_requested": {"type": "noul", "instructions": "Is a refund requested?"},
      "department": {
        "type": "choice", "instructions": "Which team should handle this?",
        "criteria": {"billing": "Charges and refunds", "technical": "Software bugs"}
      },
      "urgency": {
        "type": "score", "instructions": "Rate urgency",
        "criteria": ["Routine enquiry", "Money affected", "Safety emergency"]
      }
    }
  }'

이 HTTP 요청은 표준 fetch 또는 requests 클라이언트에서도 사용할 수 있습니다. 의사결정 응답은 생성된 텍스트 설명이 아닌 구조화된 데이터입니다.

curl -X POST "https://example.com/v1/systemone" \  -H "Content-Type: application/json" \  -d '{    "model": "string",    "state": "string",    "questions": {      "property1": {        "type": "noul",        "instructions": "string"      },      "property2": {        "type": "noul",        "instructions": "string"      }    }  }'
{  "id": "string",  "model": "string",  "answers": {    "property1": {      "type": "noul",      "noul": 0    },    "property2": {      "type": "noul",      "noul": 0    }  },  "usage": {    "input_tokens": 0,    "output_tokens": 0  }}

인증

BearerAuth
AuthorizationBearer <token>

API 키 인증입니다. Dashboard > API > API Keys에서 API 키를 생성하거나 관리하십시오.

위치: header

헤더

X-TokenLab-Delivery-Policy?string

요청별 전송 정책입니다. API 키 및 Workspace 기본값을 재정의합니다. 자동으로 TokenLab Verified를 먼저 시도하며, 출력, 요청 수락 또는 영구 리소스 생성 전에 Official 전용으로 한 번 전환될 수 있습니다.

허용 값

  • "auto"
  • "verified"
  • "official"

요청 본문

application/json

응답

application/json

application/json

application/json

application/json