JSON Completion
POST/complete/json
Will complete a prompt using a specific model.
In contrast to the /complete endpoint, some guardrails are applied which steer the model towards generating a completion of valid JSON format, even if not requested explicitly.
This is achieved by appending a builtin helper prompt to the user prompt and by using a specialized sampling method that favors JSON-compatible tokens.
To obtain a valid model, use GET /models_available.
Request
Responses
- 200
OK