MCPcopy Create free account
hub / github.com/devflowinc/trieve / new_with_chunkr

Method new_with_chunkr

pdf2md/server/src/models.rs:304–320  ·  view source on GitHub ↗
(task: FileTaskClickhouse, chunkr_task: TaskResponse)

Source from the content-addressed store, hash-verified

302 }
303
304 pub fn new_with_chunkr(task: FileTaskClickhouse, chunkr_task: TaskResponse) -> Self {
305 let pages = Vec::from(chunkr_task.clone());
306 Self {
307 id: task.id.clone(),
308 file_name: task.file_name.clone(),
309 file_url: Some(chunkr_task.pdf_url.unwrap_or_default()),
310 total_document_pages: task.pages,
311 pages_processed: match chunkr_task.status {
312 Status::Succeeded => task.pages,
313 _ => 0,
314 },
315 status: format!("{}", chunkr_task.status),
316 created_at: task.created_at.to_string(),
317 pagination_token: None,
318 pages: Some(pages),
319 }
320 }
321}
322
323#[derive(Debug, serde::Serialize, serde::Deserialize, Display, Clone, PartialEq, Eq, ToSchema)]

Callers

nothing calls this directly

Calls 1

to_stringMethod · 0.80

Tested by

no test coverage detected