OllamaGenerateResponseSpecification

class OllamaGenerateResponseSpecification(var responseContent: String = "This is a mock response from Ollama.", var doneReason: String? = "stop", delay: Duration = 0.seconds) : AbstractResponseSpecification<GenerateRequest, GenerateResponse> (source)

Specification for configuring generate completion responses.

This class is used to specify the content and behavior of responses to generate completion requests. It allows specifying the response content, done reason, and delay.

Constructors

Link copied to clipboard
constructor(responseContent: String = "This is a mock response from Ollama.", doneReason: String? = "stop", delay: Duration = 0.seconds)

Properties

Link copied to clipboard
Link copied to clipboard

The reason why the generation completed (e.g., "stop", "length")

Link copied to clipboard

The content of the response

Functions

Link copied to clipboard

Sets the response content for the generate completion specification.

Link copied to clipboard
open override fun delayMillis(value: Long)
Link copied to clipboard

Sets the reason for completion of the generated response.