OllamaChatRequestSpecification

Specification for matching chat completion requests.

This class is used to specify the criteria for matching requests to the chat endpoint. It allows specifying the model, messages, tools, and stream flag.

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
Link copied to clipboard

The messages to match in the request

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
var seed: Int?
Link copied to clipboard

Whether to match streaming requests

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

Functions

Link copied to clipboard

Sets the list of messages to match in the chat request.

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

Sets the streaming flag for the request specification.

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

open override fun systemMessageContains(substring: String)

Adds a predicate to match requests where any system message contains the specified substring.

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

open override fun userMessageContains(substring: String)

Adds a predicate to match requests where any user message contains the specified substring.