mirror of
https://github.com/mudler/LocalAI.git
synced 2026-09-28 09:05:05 -04:00
fix(kokoros): add missing animate3_d stub to Backend trait impl (#12301)
* fix(kokoros): add missing animate3_d stub to Backend trait impl #12095 added the Animate3D RPC to backend.proto, but the kokoros service never got a matching method. The tonic-generated Backend trait now requires it, so kokoros fails to build with E0046 whenever the full backend matrix runs. Return Unimplemented, as the other unsupported RPCs do. Signed-off-by: Ettore Di Giacinto <mudler@localai.io> Assisted-by: Claude:claude-opus-5-5 [Claude Code] * fix(kokoros): fill new Result fields with defaults backend.proto added a metadata field to Result, so the struct literals in the kokoros service no longer name every field and fail to compile. Spread Default::default() into them, so later additive proto fields do not break the build again. Signed-off-by: Ettore Di Giacinto <mudler@localai.io> Assisted-by: Claude:claude-opus-5-5 [Claude Code] --------- Signed-off-by: Ettore Di Giacinto <mudler@localai.io> Co-authored-by: Ettore Di Giacinto <mudler@localai.io>
This commit is contained in:
1 parent
490b952d06
commit
6bda88cc88
1 file changed
+12
@@ -132,6 +132,7 @@ impl Backend for KokorosService {
|
||||
Ok(Response::new(backend::Result {
|
||||
success: true,
|
||||
message: "Kokoros TTS model loaded".into(),
|
||||
..Default::default()
|
||||
}))
|
||||
}
|
||||
|
||||
@@ -180,11 +181,13 @@ impl Backend for KokorosService {
|
||||
return Ok(Response::new(backend::Result {
|
||||
success: false,
|
||||
message: format!("Failed to write WAV: {}", e),
|
||||
..Default::default()
|
||||
}));
|
||||
}
|
||||
Ok(Response::new(backend::Result {
|
||||
success: true,
|
||||
message: String::new(),
|
||||
..Default::default()
|
||||
}))
|
||||
}
|
||||
Err(e) => {
|
||||
@@ -192,6 +195,7 @@ impl Backend for KokorosService {
|
||||
Ok(Response::new(backend::Result {
|
||||
success: false,
|
||||
message: format!("TTS error: {}", e),
|
||||
..Default::default()
|
||||
}))
|
||||
}
|
||||
}
|
||||
@@ -292,6 +296,7 @@ impl Backend for KokorosService {
|
||||
Ok(Response::new(backend::Result {
|
||||
success: true,
|
||||
message: "Model freed".into(),
|
||||
..Default::default()
|
||||
}))
|
||||
}
|
||||
|
||||
@@ -348,6 +353,13 @@ impl Backend for KokorosService {
|
||||
Err(Status::unimplemented("Not supported"))
|
||||
}
|
||||
|
||||
async fn animate3_d(
|
||||
&self,
|
||||
_: Request<backend::Animate3DRequest>,
|
||||
) -> Result<Response<backend::Result>, Status> {
|
||||
Err(Status::unimplemented("Not supported"))
|
||||
}
|
||||
|
||||
async fn audio_transcription(
|
||||
&self,
|
||||
_: Request<backend::TranscriptRequest>,
|
||||
|
||||
Reference in new issue
Block a user