Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Mock ¶
type Mock struct {
Server *httptest.Server
// LLMResponse is the NDJSON response returned by the model endpoint.
LLMResponse []byte
// BeforeLLMResponse, when set, runs after the request is recorded and before
// response headers or events are written.
BeforeLLMResponse func()
// EnqueueJobResponse and GetJobResponse override the default job responses.
EnqueueJobResponse *wire.EnqueueJobResponse
EnqueueJobError *wire.EnqueueJobErrorResponse
GetJobResponse *wire.GetJobResponse
RunCompleteStatus int
JobProgressStatus int
// contains filtered or unexported fields
}
Mock is an httptest server that implements the Airlock agent API.
func NewWithLLMResponse ¶
NewWithLLMResponse creates a mock whose model response is supplied per call.
func (*Mock) RequestsByPath ¶
RequestsByPath returns requests matching the path prefix.
Click to show internal directories.
Click to hide internal directories.