OllamaGenerateRequestSpecification

Specification for matching generate completion requests.

This class is used to specify the criteria for matching requests to the generate endpoint. It allows specifying the model, prompt, system message, template, and stream flag.

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Whether to match streaming requests

Link copied to clipboard
Link copied to clipboard

The template to match in the request

Link copied to clipboard
var topK: Long?
Link copied to clipboard
var topP: Double?

Functions

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun requestMatches(matcher: Matcher<GenerateRequest?>)
Link copied to clipboard
Link copied to clipboard
fun requestSatisfies(description: String?, call: (GenerateRequest?) -> Unit)
Link copied to clipboard

Sets the stream flag to indicate whether to match streaming requests.

Link copied to clipboard
inline fun systemMessageContains(builderAction: StringBuilder.() -> Unit)

open override fun systemMessageContains(substring: String)

Specifies that the system message in the request must contain the given substring.

Link copied to clipboard
Link copied to clipboard

Sets the template to match in the generate request.

Link copied to clipboard
inline fun userMessageContains(builderAction: StringBuilder.() -> Unit)

open override fun userMessageContains(substring: String)

Specifies that the request's prompt must contain the given substring.