API · 6 operationer
eval-api
Genererad ur services/eval-api/openapi.json, kontraktsversion 0.1.0. Auth-modell och anropare står i atlasen.
GET /health
Health
| Svar | Beskrivning | Kropp |
|---|---|---|
200 | Successful Response | { [nyckel]: string } application/json |
GET /v1/assistants/{assistant_id}/eval-set
Get Eval Set
| Parameter | I | Typ | Krävs |
|---|---|---|---|
assistant_id | path | string (uuid) | ja |
authorization | header | string | null | nej |
| Svar | Beskrivning | Kropp |
|---|---|---|
200 | Successful Response | EvalSet application/json |
422 | Validation Error | HTTPValidationError application/json |
PUT /v1/assistants/{assistant_id}/eval-set
Put Eval Set
| Parameter | I | Typ | Krävs |
|---|---|---|---|
assistant_id | path | string (uuid) | ja |
If-Match | header | string | null | nej |
authorization | header | string | null | nej |
Kropp: EvalSetPut application/json
| Svar | Beskrivning | Kropp |
|---|---|---|
200 | Successful Response | EvalSet application/json |
422 | Validation Error | HTTPValidationError application/json |
GET /v1/assistants/{assistant_id}/runs
List Runs
| Parameter | I | Typ | Krävs |
|---|---|---|---|
assistant_id | path | string (uuid) | ja |
authorization | header | string | null | nej |
| Svar | Beskrivning | Kropp |
|---|---|---|
200 | Successful Response | EvalRun[] application/json |
422 | Validation Error | HTTPValidationError application/json |
POST /v1/assistants/{assistant_id}/runs
Post Run
| Parameter | I | Typ | Krävs |
|---|---|---|---|
assistant_id | path | string (uuid) | ja |
authorization | header | string | null | nej |
Kropp: RunCreate application/json
| Svar | Beskrivning | Kropp |
|---|---|---|
201 | Successful Response | EvalRun application/json |
422 | Validation Error | HTTPValidationError application/json |
GET /v1/eval-status
Get Eval Status
| Parameter | I | Typ | Krävs |
|---|---|---|---|
assistant_id | query | string (uuid) | null | nej |
authorization | header | string | null | nej |
| Svar | Beskrivning | Kropp |
|---|---|---|
200 | Successful Response | EvalStatusSummary[] application/json |
422 | Validation Error | HTTPValidationError application/json |
Scheman
EvalQuestion
| Fält | Typ | Krävs |
|---|---|---|
expected | string | null | nej |
expected_behavior | "refuse" | "no_pii" | "no_decision" | "abstain" | null | nej |
id | string | ja |
kind | "facit" | "adversarial" | ja |
prompt | string | ja |
requires_citation | boolean | nej |
source | QuestionSource | null | nej |
EvalResult
| Fält | Typ | Krävs |
|---|---|---|
decision_id | string | null | nej |
note | string | null | nej |
passed | boolean | ja |
question_id | string | ja |
trace_id | string | null | nej |
EvalRun
| Fält | Typ | Krävs |
|---|---|---|
assistant_id | string (uuid) | ja |
error_code | string | null | nej |
eval_set_version | integer | ja |
finished_at | string (date-time) | null | ja |
id | string (uuid) | ja |
results | EvalResult[] | ja |
score | number | null | ja |
started_at | string (date-time) | ja |
status | "running" | "passed" | "failed" | "error" | ja |
threshold | number | ja |
trigger | "manual" | "assistant_changed" | "knowledge_published" | ja |
EvalSet
| Fält | Typ | Krävs |
|---|---|---|
assistant_id | string (uuid) | ja |
id | string (uuid) | ja |
questions | EvalQuestion[] | ja |
threshold | number | ja |
updated_at | string (date-time) | ja |
version | integer | ja |
EvalSetPut
| Fält | Typ | Krävs |
|---|---|---|
questions | EvalQuestion[] | ja |
threshold | number | ja |
EvalStatusSummary
| Fält | Typ | Krävs |
|---|---|---|
assistant_id | string (uuid) | ja |
eval_set_exists | boolean | ja |
latest_run | EvalRun | null | ja |
HTTPValidationError
| Fält | Typ | Krävs |
|---|---|---|
detail | ValidationError[] | nej |
QuestionSource
| Fält | Typ | Krävs |
|---|---|---|
collection_id | string | ja |
document_id | string | ja |
section_anchor | string | ja |
RunCreate
| Fält | Typ | Krävs |
|---|---|---|
trigger | "manual" | "assistant_changed" | "knowledge_published" | ja |
ValidationError
| Fält | Typ | Krävs |
|---|---|---|
ctx | object | nej |
input | any | nej |
loc | string | integer[] | ja |
msg | string | ja |
type | string | ja |