|
6931 | 6931 | } |
6932 | 6932 | } |
6933 | 6933 | }, |
| 6934 | + "/v1/saved-prompts/config": { |
| 6935 | + "get": { |
| 6936 | + "tags": [ |
| 6937 | + "saved-prompts" |
| 6938 | + ], |
| 6939 | + "summary": "Get Saved Prompts Config Handler", |
| 6940 | + "description": "Handle requests to the GET /saved-prompts/config endpoint.\n\nProcess GET requests that return saved prompts configuration limits so\nconsuming services can provide limits consistent with what the server\nwill enforce. For example:\n\n curl http://localhost:8080/v1/saved-prompts/config\n\n### Parameters:\n- request: The incoming HTTP request (used by middleware).\n- auth: Authentication tuple from the auth dependency (used by middleware).\n\n### Raises:\n- HTTPException: with status 401 for unauthorized access.\n- HTTPException: with status 403 if permission is denied.\n- HTTPException: with status 500 and a detail object containing `response`\n and `cause` when service configuration is wrong or incomplete.\n- HTTPException: with status 503 and a detail object containing `response`\n and `cause` when unable to connect to backend services.\n\n### Returns:\n- SavedPromptsConfigResponse: Saved prompts configuration limits.", |
| 6941 | + "operationId": "get_saved_prompts_config_handler_v1_saved_prompts_config_get", |
| 6942 | + "responses": { |
| 6943 | + "200": { |
| 6944 | + "description": "Successful response", |
| 6945 | + "content": { |
| 6946 | + "application/json": { |
| 6947 | + "schema": { |
| 6948 | + "$ref": "#/components/schemas/SavedPromptsConfigResponse" |
| 6949 | + }, |
| 6950 | + "example": { |
| 6951 | + "max_content_length": 10000, |
| 6952 | + "max_display_name_length": 255, |
| 6953 | + "max_prompts_per_user": 50 |
| 6954 | + } |
| 6955 | + } |
| 6956 | + } |
| 6957 | + }, |
| 6958 | + "401": { |
| 6959 | + "description": "Unauthorized", |
| 6960 | + "content": { |
| 6961 | + "application/json": { |
| 6962 | + "schema": { |
| 6963 | + "$ref": "#/components/schemas/UnauthorizedResponse" |
| 6964 | + }, |
| 6965 | + "examples": { |
| 6966 | + "missing header": { |
| 6967 | + "value": { |
| 6968 | + "detail": { |
| 6969 | + "cause": "No Authorization header found", |
| 6970 | + "response": "Missing or invalid credentials provided by client" |
| 6971 | + } |
| 6972 | + } |
| 6973 | + }, |
| 6974 | + "missing token": { |
| 6975 | + "value": { |
| 6976 | + "detail": { |
| 6977 | + "cause": "No token found in Authorization header", |
| 6978 | + "response": "Missing or invalid credentials provided by client" |
| 6979 | + } |
| 6980 | + } |
| 6981 | + }, |
| 6982 | + "expired token": { |
| 6983 | + "value": { |
| 6984 | + "detail": { |
| 6985 | + "cause": "Token has expired", |
| 6986 | + "response": "Missing or invalid credentials provided by client" |
| 6987 | + } |
| 6988 | + } |
| 6989 | + }, |
| 6990 | + "invalid signature": { |
| 6991 | + "value": { |
| 6992 | + "detail": { |
| 6993 | + "cause": "Invalid token signature", |
| 6994 | + "response": "Missing or invalid credentials provided by client" |
| 6995 | + } |
| 6996 | + } |
| 6997 | + }, |
| 6998 | + "invalid key": { |
| 6999 | + "value": { |
| 7000 | + "detail": { |
| 7001 | + "cause": "Token signed by unknown key", |
| 7002 | + "response": "Missing or invalid credentials provided by client" |
| 7003 | + } |
| 7004 | + } |
| 7005 | + }, |
| 7006 | + "missing claim": { |
| 7007 | + "value": { |
| 7008 | + "detail": { |
| 7009 | + "cause": "Token missing claim: user_id", |
| 7010 | + "response": "Missing or invalid credentials provided by client" |
| 7011 | + } |
| 7012 | + } |
| 7013 | + }, |
| 7014 | + "invalid k8s token": { |
| 7015 | + "value": { |
| 7016 | + "detail": { |
| 7017 | + "cause": "Invalid or expired Kubernetes token", |
| 7018 | + "response": "Missing or invalid credentials provided by client" |
| 7019 | + } |
| 7020 | + } |
| 7021 | + }, |
| 7022 | + "invalid jwk token": { |
| 7023 | + "value": { |
| 7024 | + "detail": { |
| 7025 | + "cause": "Authentication key server returned invalid data", |
| 7026 | + "response": "Missing or invalid credentials provided by client" |
| 7027 | + } |
| 7028 | + } |
| 7029 | + } |
| 7030 | + } |
| 7031 | + } |
| 7032 | + } |
| 7033 | + }, |
| 7034 | + "403": { |
| 7035 | + "description": "Permission denied", |
| 7036 | + "content": { |
| 7037 | + "application/json": { |
| 7038 | + "schema": { |
| 7039 | + "$ref": "#/components/schemas/ForbiddenResponse" |
| 7040 | + }, |
| 7041 | + "examples": { |
| 7042 | + "endpoint": { |
| 7043 | + "value": { |
| 7044 | + "detail": { |
| 7045 | + "cause": "User 6789 is not authorized to access this endpoint.", |
| 7046 | + "response": "User does not have permission to access this endpoint" |
| 7047 | + } |
| 7048 | + } |
| 7049 | + } |
| 7050 | + } |
| 7051 | + } |
| 7052 | + } |
| 7053 | + }, |
| 7054 | + "500": { |
| 7055 | + "description": "Internal server error", |
| 7056 | + "content": { |
| 7057 | + "application/json": { |
| 7058 | + "schema": { |
| 7059 | + "$ref": "#/components/schemas/InternalServerErrorResponse" |
| 7060 | + }, |
| 7061 | + "examples": { |
| 7062 | + "configuration": { |
| 7063 | + "value": { |
| 7064 | + "detail": { |
| 7065 | + "cause": "Lightspeed Stack configuration has not been initialized.", |
| 7066 | + "response": "Configuration is not loaded" |
| 7067 | + } |
| 7068 | + } |
| 7069 | + } |
| 7070 | + } |
| 7071 | + } |
| 7072 | + } |
| 7073 | + }, |
| 7074 | + "503": { |
| 7075 | + "description": "Service unavailable", |
| 7076 | + "content": { |
| 7077 | + "application/json": { |
| 7078 | + "schema": { |
| 7079 | + "$ref": "#/components/schemas/ServiceUnavailableResponse" |
| 7080 | + }, |
| 7081 | + "examples": { |
| 7082 | + "kubernetes api": { |
| 7083 | + "value": { |
| 7084 | + "detail": { |
| 7085 | + "cause": "Failed to connect to Kubernetes API: Service Unavailable (status 503)", |
| 7086 | + "response": "Unable to connect to Kubernetes API" |
| 7087 | + } |
| 7088 | + } |
| 7089 | + } |
| 7090 | + } |
| 7091 | + } |
| 7092 | + } |
| 7093 | + } |
| 7094 | + } |
| 7095 | + } |
| 7096 | + }, |
6934 | 7097 | "/v1/feedback": { |
6935 | 7098 | "post": { |
6936 | 7099 | "tags": [ |
|
19271 | 19434 | "title": "SQLiteDatabaseConfiguration", |
19272 | 19435 | "description": "SQLite database configuration." |
19273 | 19436 | }, |
| 19437 | + "SavedPromptsConfigResponse": { |
| 19438 | + "properties": { |
| 19439 | + "max_prompts_per_user": { |
| 19440 | + "type": "integer", |
| 19441 | + "title": "Max Prompts Per User", |
| 19442 | + "description": "Maximum number of saved prompts allowed per user", |
| 19443 | + "examples": [ |
| 19444 | + 50 |
| 19445 | + ] |
| 19446 | + }, |
| 19447 | + "max_display_name_length": { |
| 19448 | + "type": "integer", |
| 19449 | + "title": "Max Display Name Length", |
| 19450 | + "description": "Maximum character length for prompt display name", |
| 19451 | + "examples": [ |
| 19452 | + 255 |
| 19453 | + ] |
| 19454 | + }, |
| 19455 | + "max_content_length": { |
| 19456 | + "type": "integer", |
| 19457 | + "title": "Max Content Length", |
| 19458 | + "description": "Maximum character length for prompt content body", |
| 19459 | + "examples": [ |
| 19460 | + 10000 |
| 19461 | + ] |
| 19462 | + } |
| 19463 | + }, |
| 19464 | + "additionalProperties": false, |
| 19465 | + "type": "object", |
| 19466 | + "required": [ |
| 19467 | + "max_prompts_per_user", |
| 19468 | + "max_display_name_length", |
| 19469 | + "max_content_length" |
| 19470 | + ], |
| 19471 | + "title": "SavedPromptsConfigResponse", |
| 19472 | + "description": "Saved prompts configuration limits returned to consuming services.\n\nAttributes:\n max_prompts_per_user: Maximum number of saved prompts allowed per user.\n max_display_name_length: Maximum character length for prompt display name.\n max_content_length: Maximum character length for prompt content body.", |
| 19473 | + "examples": [ |
| 19474 | + { |
| 19475 | + "max_content_length": 10000, |
| 19476 | + "max_display_name_length": 255, |
| 19477 | + "max_prompts_per_user": 50 |
| 19478 | + } |
| 19479 | + ] |
| 19480 | + }, |
19274 | 19481 | "SavedPromptsConfiguration": { |
19275 | 19482 | "properties": { |
19276 | 19483 | "max_prompts_per_user": { |
|
21085 | 21292 | "name": "root", |
21086 | 21293 | "description": "Service root." |
21087 | 21294 | }, |
| 21295 | + { |
| 21296 | + "name": "saved-prompts", |
| 21297 | + "description": "Saved prompts configuration and management." |
| 21298 | + }, |
21088 | 21299 | { |
21089 | 21300 | "name": "shields", |
21090 | 21301 | "description": "Safety shields." |
|
0 commit comments