OllamaEmbedBuildingStep
class OllamaEmbedBuildingStep(mokksy: MokksyServer, buildingStep: BuildingStep<EmbeddingsRequest>) : AbstractBuildingStep<EmbeddingsRequest, OllamaEmbedResponseSpecification> (source)
OllamaEmbedBuildingStep is a specialized implementation of AbstractBuildingStep intended for constructing and managing embedding responses as part of the Ollama Mock Server setup.
The class provides features to create responses for simulated embedding requests. It extends the functionality of AbstractBuildingStep by applying specific logic for generating fake responses compliant with Ollama's embedding API.
Parameters
mokksy
The mock server instance used for handling mock request and response lifecycle.
buildingStep
The underlying building step for managing and supporting response configurations for Ollama Embedding requests.
Constructors
Functions
Link copied to clipboard
Configures the mock embedding response for an embedding request using the provided specification block.
Link copied to clipboard
open infix fun <R : Any> respondsError(block: Consumer<ResponseDefinitionBuilder<EmbeddingsRequest, R>>)
open infix fun <T : Any> respondsError(block: suspend ResponseDefinitionBuilder<EmbeddingsRequest, T>.() -> Unit)
open fun <T : Any> respondsError(responseType: KClass<T>, block: suspend ResponseDefinitionBuilder<EmbeddingsRequest, T>.() -> Unit)