feat: Pos処理の非同期化・Busy状態の削除
This commit is contained in:
@@ -74,6 +74,12 @@ pub trait LlmClient: Send + Sync {
|
||||
}
|
||||
}
|
||||
|
||||
impl Clone for Box<dyn LlmClient> {
|
||||
fn clone(&self) -> Self {
|
||||
self.clone_boxed()
|
||||
}
|
||||
}
|
||||
|
||||
/// `Box<dyn LlmClient>` に対する `LlmClient` の実装
|
||||
///
|
||||
/// これにより、動的ディスパッチを使用するクライアントも `Worker` で利用可能になる。
|
||||
|
||||
@@ -45,7 +45,9 @@ impl Scheme for DummyScheme {
|
||||
}
|
||||
fn parse_sse(&self, _: &str, _: &str, _: &mut ()) -> Result<Vec<Event>, ClientError> {
|
||||
if self.parse_fail {
|
||||
Err(ClientError::Sse("simulated mid-stream parse failure".into()))
|
||||
Err(ClientError::Sse(
|
||||
"simulated mid-stream parse failure".into(),
|
||||
))
|
||||
} else {
|
||||
Ok(vec![])
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user