Revision control
Copy as Markdown
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
import LLMKit
import MLPAKit
import Shared
@testable import QuickAnswersKit
final class MockLLMClientCreator: LiteLLMCreating {
var clientToReturn: LiteLLMClientProtocol?
var shouldReturnNil = false
var createAppAttestLiteLLMCallCount = 0
var lastServiceType: MLPAServiceType?
func createAppAttestLiteLLM(
using prefs: Prefs,
serviceType: MLPAServiceType
) -> LiteLLMClientProtocol? {
createAppAttestLiteLLMCallCount += 1
lastServiceType = serviceType
return shouldReturnNil ? nil : clientToReturn
}
}