fix: add types removed after rebase
This commit is contained in:
parent
a706c312b3
commit
95912e266c
|
|
@ -822,6 +822,12 @@ pub struct PublishCollabMetadata<Metadata> {
|
||||||
pub metadata: Metadata,
|
pub metadata: Metadata,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(Debug)]
|
||||||
|
pub struct PublishCollabItem<Meta, Data> {
|
||||||
|
pub meta: PublishCollabMetadata<Meta>,
|
||||||
|
pub data: Data,
|
||||||
|
}
|
||||||
|
|
||||||
/// Indexing status of a document.
|
/// Indexing status of a document.
|
||||||
#[derive(Debug, Clone, Copy, Eq, PartialEq)]
|
#[derive(Debug, Clone, Copy, Eq, PartialEq)]
|
||||||
pub enum IndexingStatus {
|
pub enum IndexingStatus {
|
||||||
|
|
|
||||||
|
|
@ -64,7 +64,8 @@ impl Indexer for DocumentIndexer {
|
||||||
encoding_format: EmbeddingEncodingFormat::Float,
|
encoding_format: EmbeddingEncodingFormat::Float,
|
||||||
dimensions: 1536,
|
dimensions: 1536,
|
||||||
})
|
})
|
||||||
.await?;
|
.await
|
||||||
|
.map_err(|e| AppError::Internal(e.into()))?;
|
||||||
|
|
||||||
for embedding in resp.data {
|
for embedding in resp.data {
|
||||||
let param = &mut params[embedding.index as usize];
|
let param = &mut params[embedding.index as usize];
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,7 @@ impl IndexerProvider {
|
||||||
let uuid = Uuid::parse_str(workspace_id)?;
|
let uuid = Uuid::parse_str(workspace_id)?;
|
||||||
let settings = select_workspace_settings(&self.db, &uuid).await?;
|
let settings = select_workspace_settings(&self.db, &uuid).await?;
|
||||||
match settings {
|
match settings {
|
||||||
Some(settings) if settings.disable_indexing => Ok(None),
|
Some(settings) if settings.disable_search_indexing => Ok(None),
|
||||||
_ => Ok(indexer),
|
_ => Ok(indexer),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue