-
Notifications
You must be signed in to change notification settings - Fork 56
/
open_api_spec.json
1 lines (1 loc) · 2.3 KB
/
open_api_spec.json
1
{"openapi": "3.0.2", "info": {"title": "FastAPI", "version": "0.1.0"}, "paths": {"/process": {"post": {"summary": "Process Request", "operationId": "process_request_process_post", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/ProcessRequest"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/tokenize": {"post": {"summary": "Tokenize", "operationId": "tokenize_tokenize_post", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/TokenizeRequest"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}}, "components": {"schemas": {"HTTPValidationError": {"title": "HTTPValidationError", "type": "object", "properties": {"detail": {"title": "Detail", "type": "array", "items": {"$ref": "#/components/schemas/ValidationError"}}}}, "ProcessRequest": {"title": "ProcessRequest", "required": ["prompt"], "type": "object", "properties": {"prompt": {"title": "Prompt", "type": "string"}, "num_samples": {"title": "Num Samples", "type": "integer", "default": 1}, "max_new_tokens": {"title": "Max New Tokens", "type": "integer", "default": 50}, "top_k": {"title": "Top K", "type": "integer", "default": 200}, "temperature": {"title": "Temperature", "type": "number", "default": 0.8}, "seed": {"title": "Seed", "type": "integer"}}}, "TokenizeRequest": {"title": "TokenizeRequest", "required": ["text"], "type": "object", "properties": {"text": {"title": "Text", "type": "string"}, "truncation": {"title": "Truncation", "type": "boolean", "default": true}, "max_length": {"title": "Max Length", "type": "integer", "default": 2048}}}, "ValidationError": {"title": "ValidationError", "required": ["loc", "msg", "type"], "type": "object", "properties": {"loc": {"title": "Location", "type": "array", "items": {"type": "string"}}, "msg": {"title": "Message", "type": "string"}, "type": {"title": "Error Type", "type": "string"}}}}}}