MockGemini
Mock implementation of Google Gemini API for testing purposes.
This class provides an HTTP mock server to simulate the Google Gemini API, specifically for content generation and streaming. It is designed to mimic the behavior of the Gemini API locally and facilitate integration testing and development.
Extends AbstractMockLlm to provide Gemini-specific functionality.
Author
Konstantin Pavlov
Parameters
The port on which the mock server will run. Defaults to 0, which allows the server to select an available port.
Controls whether the mock server's operations are logged in detail. Defaults to true.
See also
Functions
Java-friendly overload that accepts a Consumer for configuring the chat request.
Generates a streaming content response specification for a Gemini content generation request. This method provides a Java-friendly overload that accepts a Consumer for configuring the content request.