generate
fun generate(name: String? = null, block: OllamaGenerateRequestSpecification.() -> Unit): OllamaGenerateBuildingStep(source)
Sets up a mock handler for the Ollama /api/generate completion endpoint.
Allows configuration of request matching criteria such as model, prompt, etc. Returns a builder step for specifying the mock response.
Return
An OllamaGenerateBuildingStep for configuring the mock response.
Parameters
name
Optional identifier for the mock endpoint.
block
Configuration block for defining request matching rules via OllamaGenerateRequestSpecification.