Start work on more clean client.

This commit is contained in:
2023-04-22 16:32:54 -07:00
parent 1c0fbe02db
commit 4430bdcdd7
9 changed files with 69 additions and 26 deletions

View File

@ -23,9 +23,7 @@ class ModelServiceProvider: SdModelServiceAsyncProvider {
}
func loadModel(request: SdLoadModelRequest, context _: GRPCAsyncServerCallContext) async throws -> SdLoadModelResponse {
guard let state = await modelManager.getModelState(name: request.modelName) else {
throw SdCoreError.modelNotFound
}
let state = try await modelManager.createModelState(name: request.modelName)
try await state.load()
return SdLoadModelResponse()
}