Zefr Safe Chat
Zefr Safe Chat · Ações GPT
Responsible AI
GET /healthcheckGet HealthcheckGet application health
POST /suitabilitySuitabilityGet the suitability of the content. Parameters ---------- - content (ContentPayload): The content to check for violations. Returns ------- - ContentViolations: An object containing a list of violations found in the content.
Esquema API original
{
"openapi": "3.0.2",
"info": {
"title": "Responsible AI",
"version": "0.1.0"
},
"servers": [
{
"url": "https://api.zefr.com/ai/v1",
"description": "Responsible AI Prod"
}
],
"paths": {
"/healthcheck": {
"get": {
"summary": "Get Healthcheck",
"description": "Get application health",
"operationId": "get_healthcheck",
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Status"
}
}
}
}
}
}
},
"/suitability": {
"post": {
"security": [
{
"ApiKeyAuth": []
}
],
"summary": "Suitability",
"description": "Get the suitability of the content.\n\nParameters\n----------\n- content (ContentPayload): The content to check for violations.\n\nReturns\n-------\n- ContentViolations: An object containing a list of violations found in the content.",
"operationId": "suitability",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ContentPayload"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ContentViolations"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
}
},
"components": {
"securitySchemes": {
"ApiKeyAuth": {
"type": "apiKey",
"in": "header",
"name": "apikey"
}
},
"schemas": {
"ContentPayload": {
"properties": {
"messages": {
"items": {
"type": "string"
},
"type": "array",
"title": "Messages"
}
},
"type": "object",
"required": [
"messages"
],
"title": "ContentPayload",
"description": "Represents the payload for content data.\n\nAttributes\n----------\n messages (List[str]): A list of messages."
},
"ContentViolations": {
"properties": {
"violations": {
"items": {
"type": "string"
},
"type": "array",
"title": "Violations"
}
},
"type": "object",
"required": [
"violations"
],
"title": "ContentViolations",
"description": "Represents the violations for content data.\n\nAttributes\n----------\n violations (List[str]): A list of violations."
},
"HTTPValidationError": {
"properties": {
"detail": {
"items": {
"$ref": "#/components/schemas/ValidationError"
},
"type": "array",
"title": "Detail"
}
},
"type": "object",
"title": "HTTPValidationError"
},
"Status": {
"properties": {
"status": {
"type": "string",
"title": "Application Status",
"example": "healthy"
}
},
"type": "object",
"required": [
"status"
],
"title": "Status",
"description": "Application Status"
},
"ValidationError": {
"properties": {
"loc": {
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
},
"type": "array",
"title": "Location"
},
"msg": {
"type": "string",
"title": "Message"
},
"type": {
"type": "string",
"title": "Error Type"
}
},
"type": "object",
"required": [
"loc",
"msg",
"type"
],
"title": "ValidationError"
}
}
}
}