diff --git a/schemas/openapi.json b/schemas/openapi.json index d8d6bd594d..8b4c12ebd5 100644 --- a/schemas/openapi.json +++ b/schemas/openapi.json @@ -1029,6 +1029,168 @@ } } } + }, + "/v1/evaluations": { + "post": { + "tags": [ + "traces" + ], + "summary": "Add span, trace, or document evaluations", + "operationId": "addEvaluations", + "parameters": [ + { + "name": "content-type", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Content-Type" + } + }, + { + "name": "content-encoding", + "in": "header", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Content-Encoding" + } + } + ], + "responses": { + "204": { + "description": "Successful Response" + }, + "403": { + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + }, + "description": "Forbidden" + }, + "415": { + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + }, + "description": "Unsupported content type, only gzipped protobuf and pandas-arrow are supported" + }, + "422": { + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + }, + "description": "Unprocessable Entity" + } + }, + "requestBody": { + "required": true, + "content": { + "application/x-protobuf": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "application/x-pandas-arrow": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + }, + "get": { + "tags": [ + "traces" + ], + "summary": "Get span, trace, or document evaluations from a project", + "operationId": "getEvaluations", + "parameters": [ + { + "name": "project_name", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "The name of the project to get evaluations from (if omitted, evaluations will be drawn from the `default` project)", + "title": "Project Name" + }, + "description": "The name of the project to get evaluations from (if omitted, evaluations will be drawn from the `default` project)" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "403": { + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + }, + "description": "Not Found" + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } } }, "components": { diff --git a/src/phoenix/server/api/routers/v1/evaluations.py b/src/phoenix/server/api/routers/v1/evaluations.py index 7c144dc77b..b514831df5 100644 --- a/src/phoenix/server/api/routers/v1/evaluations.py +++ b/src/phoenix/server/api/routers/v1/evaluations.py @@ -40,7 +40,7 @@ EvaluationName: TypeAlias = str -router = APIRouter(tags=["traces"], include_in_schema=False) +router = APIRouter(tags=["traces"], include_in_schema=True) @router.post(