AnthropicBuildingStep

A specialized implementation of AbstractBuildingStep for constructing Anthropic Messages API responses.

This class provides methods to configure both single-blocked responses and streaming responses for Anthropic's Messages API.

Author

Konstantin Pavlov

Parameters

mokksy

The MokksyServer instance used for handling mock request and response lifecycle.

buildingStep

The underlying BuildingStep for managing response configurations.

Constructors

Link copied to clipboard
constructor(mokksy: MokksyServer, buildingStep: BuildingStep<MessageCreateParams>)

Functions

Link copied to clipboard
open infix override fun responds(block: suspend AnthropicMessagesResponseSpecification.() -> Unit)
Link copied to clipboard
open infix fun <R : Any> respondsError(block: Consumer<ResponseDefinitionBuilder<MessageCreateParams, R>>)
open infix fun <T : Any> respondsError(block: suspend ResponseDefinitionBuilder<MessageCreateParams, T>.() -> Unit)
open fun <T : Any> respondsError(responseType: KClass<T>, block: suspend ResponseDefinitionBuilder<MessageCreateParams, T>.() -> Unit)
Link copied to clipboard

Configures a streaming response for a chat completions request by applying the provided specifications.