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

Method new_with_pages

pdf2md/server/src/models.rs:286–302  ·  view source on GitHub ↗
(
        task: FileTaskClickhouse,
        pages: Vec<ChunkClickhouse>,
        file_url: String,
    )

Source from the content-addressed store, hash-verified

284 }
285
286 pub fn new_with_pages(
287 task: FileTaskClickhouse,
288 pages: Vec<ChunkClickhouse>,
289 file_url: String,
290 ) -> Self {
291 Self {
292 id: task.id.clone(),
293 file_name: task.file_name.clone(),
294 file_url: Some(file_url),
295 total_document_pages: task.pages,
296 pages_processed: task.pages_processed,
297 status: task.status,
298 created_at: task.created_at.to_string(),
299 pagination_token: pages.last().map(|c| c.id.clone()),
300 pages: Some(pages.into_iter().map(Chunk::from).collect()),
301 }
302 }
303
304 pub fn new_with_chunkr(task: FileTaskClickhouse, chunkr_task: TaskResponse) -> Self {
305 let pages = Vec::from(chunkr_task.clone());

Callers

nothing calls this directly

Calls 1

to_stringMethod · 0.80

Tested by

no test coverage detected