responds

open infix override fun responds(block: suspend OpenaiEmbedResponseSpecification.() -> Unit)(source)

Configures the mock embedding response for an OpenAI embedding request using the provided specification block.

The block allows customization of the embedding response, including embeddings, model name, and response delay. If embeddings are not explicitly set, they are automatically generated for each input string in the request. The response follows the OpenAI embeddings API format to simulate realistic API behavior.

Parameters

block

Lambda to customize the embedding response specification.

See also