Skip to content

Commit c30953e

Browse files
committed
feature: update fileworker to receive the correct response type
1 parent da7d930 commit c30953e

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

server/src/bin/file-worker.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -297,20 +297,23 @@ pub enum FileTaskStatus {
297297
#[derive(Debug, serde::Serialize, serde::Deserialize, Clone)]
298298
pub struct PollTaskResponse {
299299
pub id: String,
300+
pub file_name: String,
301+
pub file_url: Option<String>,
300302
pub total_document_pages: u32,
301303
pub pages_processed: u32,
302304
pub status: String,
303305
pub created_at: String,
304-
pub pages: Option<Vec<PdfToMdChunk>>,
306+
pub pages: Option<Vec<PdfToMdPage>>,
305307
pub pagination_token: Option<String>,
306308
}
307309

308310
#[derive(Debug, serde::Serialize, serde::Deserialize, Clone)]
309-
pub struct PdfToMdChunk {
311+
pub struct PdfToMdPage {
310312
pub id: String,
311313
pub task_id: String,
312314
pub content: String,
313-
pub metadata: serde_json::Value,
315+
pub page_num: u32,
316+
pub usage: serde_json::Value,
314317
pub created_at: String,
315318
}
316319

0 commit comments

Comments
 (0)