AbstractMockLlm
Abstract class representing a mock Language Model (LLM) server. This serves as a base class for creating a mock server used for testing Language Model interactions. It is built upon the MokksyServer framework for configuring and managing mock servers.
Author
Konstantin Pavlov
Parameters
The port number to use for the server. Defaults to 0, which allows the system to select an available port automatically.
The ServerConfiguration instance providing details such as verbosity, server name, and content negotiation settings.
An optional function to further customize the server application configuration. Default is an empty configuration.
Constructors
Initializes the mock server with the specified configuration.
Functions
Resets the match state of all stubs and clears the request journal.
Stops the mock LLM server and releases its resources with the specified grace period and timeout.
Verifies that all requests received by the mock server were expected. Throws an exception if any unexpected requests were made.