mirror of
https://github.com/perstarkse/minne.git
synced 2026-11-23 23:04:06 +01:00
refactor: replace Box<dyn Error> with anyhow::Result
- ingestion_pipeline::run_worker_loop returns anyhow::Result<()> - api_router::ApiState::new returns anyhow::Result<Self> - html_router::HtmlState::new_with_resources is infallible, returns Self - main/server/worker binary entry points return anyhow::Result<()>
This commit is contained in:
1 parent
79e46e9c09
commit
b965c5a2e6
6 files changed
+11
-12
No files matched your search
@@ -49,12 +49,12 @@ impl HtmlState {
|
||||
reranker_pool: Option<Arc<RerankerPool>>,
|
||||
embedding_provider: Arc<EmbeddingProvider>,
|
||||
template_engine: Option<Arc<TemplateEngine>>,
|
||||
) -> Result<Self, Box<dyn std::error::Error>> {
|
||||
) -> Self {
|
||||
let templates =
|
||||
template_engine.unwrap_or_else(|| Arc::new(create_template_engine!("templates")));
|
||||
debug!("Template engine configured for html_router.");
|
||||
|
||||
Ok(Self {
|
||||
Self {
|
||||
db,
|
||||
openai_client,
|
||||
session_store,
|
||||
@@ -65,7 +65,7 @@ impl HtmlState {
|
||||
embedding_provider,
|
||||
conversation_archive_cache: Arc::new(RwLock::new(HashMap::new())),
|
||||
conversation_archive_cache_writes: Arc::new(AtomicUsize::new(0)),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
pub fn retrieval_strategy(&self) -> RetrievalStrategy {
|
||||
|
||||
Reference in new issue
Block a user