GeminiContentRequestSpecification

open class GeminiContentRequestSpecification(var project: String? = null, var location: String? = null, var apiVersion: String = "v1", var path: String? = null, var seed: Number? = null, maxOutputTokens: Int? = null) : AbstractInferenceRequestSpecification<GenerateContentRequest> (source)

Represents the specification for a Gemini content generation request.

Extends ModelRequestSpecification specifically for configuring and validating parameters related to GenerateContentRequest objects. This includes overriding methods to add matchers for specific conditions, such as ensuring messages from the system or user contain specified substrings.

Author

Konstantin Pavlov

Constructors

Link copied to clipboard
constructor(project: String? = null, location: String? = null, apiVersion: String = "v1", path: String? = null, seed: Number? = null, maxOutputTokens: Int? = null)

Creates an instance with optional parameters for initializing configuration.

Properties

Link copied to clipboard

Either v1 or v1beta1. Default is v1. See API versions explained

Link copied to clipboard

Google location

Link copied to clipboard

An optional maximum number of tokens to generate.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
var path: String?

full request path

Link copied to clipboard

Google project ID

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

Functions

Link copied to clipboard
Link copied to clipboard

Configures the API version to "v1beta1" for Gemini content-related requests.

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

Configures the API version to "v1" for Gemini content-related requests.

Link copied to clipboard
inline fun systemMessageContains(builderAction: StringBuilder.() -> Unit)
open override fun systemMessageContains(substring: String)
Link copied to clipboard
inline fun userMessageContains(builderAction: StringBuilder.() -> Unit)
open override fun userMessageContains(substring: String)