GeminiContentResponseSpecification
class GeminiContentResponseSpecification(var content: String = "This is a mock response from Gemini API.", var finishReason: String = "STOP", var role: String = "model", delay: Duration = Duration.ZERO) : AbstractResponseSpecification<GenerateContentRequest, GenerateContentResponse> (source)
Specification for configuring a Gemini content generation response.
This class provides a fluent API for configuring the response that will be returned by the mock Gemini API when a content generation request is made.
Functions
Link copied to clipboard
Link copied to clipboard
Builds a GenerateContentResponse based on the current specification.
Link copied to clipboard
Sets the content of the response.
Link copied to clipboard
Link copied to clipboard
Sets the finish reason for the response.
Link copied to clipboard
Sets the role for the response content.