pub trait ThreadConfigSource<M: InputSender, H: HttpClient> {
// Required method
fn resolve<'life0, 'life1, 'async_trait>(
&'life0 self,
thread_id: &'life1 ThreadId<str>,
) -> Pin<Box<dyn Future<Output = Result<ThreadConfig<M, H>, Box<dyn Error + Send + Sync>>> + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
Resolves the configuration for each thread as it is loaded.
Like ModelSource, resolution happens per thread
load rather than once at system construction, which is what lets a single
long-lived system serve many differently-configured conversations.
Required Methods§
fn resolve<'life0, 'life1, 'async_trait>(
&'life0 self,
thread_id: &'life1 ThreadId<str>,
) -> Pin<Box<dyn Future<Output = Result<ThreadConfig<M, H>, Box<dyn Error + Send + Sync>>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".