fix: add types removed after rebase

This commit is contained in:
Bartosz Sypytkowski 2024-06-24 07:45:56 +02:00
parent a706c312b3
commit 95912e266c
3 changed files with 9 additions and 2 deletions

View File

@ -822,6 +822,12 @@ pub struct PublishCollabMetadata<Metadata> {
pub metadata: Metadata,
}
#[derive(Debug)]
pub struct PublishCollabItem<Meta, Data> {
pub meta: PublishCollabMetadata<Meta>,
pub data: Data,
}
/// Indexing status of a document.
#[derive(Debug, Clone, Copy, Eq, PartialEq)]
pub enum IndexingStatus {

View File

@ -64,7 +64,8 @@ impl Indexer for DocumentIndexer {
encoding_format: EmbeddingEncodingFormat::Float,
dimensions: 1536,
})
.await?;
.await
.map_err(|e| AppError::Internal(e.into()))?;
for embedding in resp.data {
let param = &mut params[embedding.index as usize];

View File

@ -49,7 +49,7 @@ impl IndexerProvider {
let uuid = Uuid::parse_str(workspace_id)?;
let settings = select_workspace_settings(&self.db, &uuid).await?;
match settings {
Some(settings) if settings.disable_indexing => Ok(None),
Some(settings) if settings.disable_search_indexing => Ok(None),
_ => Ok(indexer),
}
}