docs: Update Flash local testing docs with request format and docstring feature#564
docs: Update Flash local testing docs with request format and docstring feature#564promptless[bot] wants to merge 2 commits intomainfrom
Conversation
flash/apps/local-testing.mdx
Outdated
| curl -X POST http://localhost:8888/gpu_worker/runsync \ | ||
| -H "Content-Type: application/json" \ | ||
| -d '{"message": "Hello from Flash"}' | ||
| -d '{"input": {"message": "Hello from Flash"}}' |
There was a problem hiding this comment.
Citation: PR #215 changed queue-based endpoint request format to use {"input": {...}} wrapper. See changes in src/runpod_flash/cli/commands/run.py where body.input is extracted from the request body.
View source
|
|
||
| Open [http://localhost:8888/docs](http://localhost:8888/docs) in your browser to access the interactive Swagger UI. You can test all endpoints directly from the browser. | ||
|
|
||
| Flash extracts the first line of each function's docstring and displays it as the endpoint description in the API explorer. Add docstrings to your `@Endpoint` functions to make your API self-documenting: |
There was a problem hiding this comment.
Citation: PR #215 adds docstring extraction via RemoteFunctionMetadata.docstring in scanner.py and displays it in run.py's startup table and Swagger UI summary using _escape_summary() helper.
View source
| Auto-provision all Serverless endpoints on startup instead of lazily on first call. Eliminates cold-start delays during development. | ||
| </ResponseField> | ||
|
|
||
| ## Endpoint descriptions from docstrings |
There was a problem hiding this comment.
Citation: PR #215 introduces function_docstrings in WorkerInfo dataclass and displays docstrings in the startup table's "Description" column and as Swagger UI summary via the summary= parameter.
View source
| curl -X POST http://localhost:8888/gpu_worker/runsync \ | ||
| -H "Content-Type: application/json" \ | ||
| -d '{"message": "Hello from GPU!"}' | ||
| -d '{"input": {"message": "Hello from GPU!"}}' |
There was a problem hiding this comment.
Citation: PR #215 introduces make_wrapped_model() helper that wraps request body in an input envelope for queue-based endpoints, changing the request format from direct JSON to {"input": {...}}.
View source
|
Preview deployment for your docs. Learn more about Mintlify Previews.
|
flash/apps/local-testing.mdx
Outdated
| ``` | ||
|
|
||
| <Note> | ||
| Queue-based endpoints require the `{"input": {...}}` wrapper format to match the deployed endpoint behavior. Load-balanced endpoints accept direct JSON payloads. |
There was a problem hiding this comment.
Citation: Request format examples updated to match the corrections in PR #222. The QA report verified: QB routes use make_wrapped_model requiring the {"input": <inner>} envelope, and functions with input_data: dict parameter need {"input_data": {...}} as the inner payload. LB routes use make_input_model directly without the input wrapper.
View source
flash/apps/local-testing.mdx
Outdated
| curl -X POST http://localhost:8888/gpu_worker/runsync \ | ||
| -H "Content-Type: application/json" \ | ||
| -d '{"message": "Hello from Flash"}' | ||
| -d '{"input": {"message": "Hello from Flash"}}' |
There was a problem hiding this comment.
Citation: Queue-based endpoint request format corrected based on PR #222 fix to skeleton_template/README.md. The format {"input": {"input_data": {...}}} matches the skeleton template's gpu_hello(input_data: dict) function signature.
View source
flash/apps/local-testing.mdx
Outdated
| # Call a load-balanced endpoint (lb_worker.py) | ||
| curl -X POST http://localhost:8888/lb_worker/process \ | ||
| -H "Content-Type: application/json" \ | ||
| -d '{"data": "test"}' |
There was a problem hiding this comment.
Citation: Load-balanced endpoint request format corrected based on PR #222 fix to skeleton_template/README.md. LB routes don't use the {"input": ...} wrapper—the payload maps directly to function parameters.
View source
Open this suggestion in Promptless to view citations and reasoning process
Updates Flash local development documentation to reflect recent changes from PR #215: corrects queue-based endpoint request format to use
{"input": {...}}wrapper, and documents the new docstring surfacing feature that shows function docstrings in the startup table and Swagger UI.Trigger Events
runpod/flash PR #215: feat: fully deployed environment
Promptless Research (11 files, 1 GitHub PR)
.long_term_context/product_knowledge/product_overview.md.long_term_context/doc_workflow/client_instructions.mdflash/apps/apps-and-environments.mdxflash/apps/deploy-apps.mdxflash/cli/deploy.mdxflash/apps/local-testing.mdxflash/cli/run.mdxflash/create-endpoints.mdxflash/apps/requests.mdx.long_term_context/style/client_style_guide.mdflash/quickstart.mdxAgent Response
Tip: Use labels in the Promptless dashboard to categorize suggestions by release or team 🏷️