batch_mode_batch_workspace/
interface.rs

1// ---------------- [ File: src/interface.rs ]
2crate::ix!();
3
4impl BatchWorkspaceInterface for BatchWorkspace {}
5
6impl GetDoneDirectory for BatchWorkspace {
7
8    fn get_done_directory(&self) -> &PathBuf {
9        self.done_dir()
10    }
11}
12
13impl GetInputFilenameAtIndex for BatchWorkspace {
14
15    fn input_filename(&self, batch_idx: &BatchIndex) -> PathBuf {
16        self.workdir().join(format!("batch_input_{}.jsonl", batch_idx))
17    }
18}
19
20impl GetOutputFilenameAtIndex for BatchWorkspace {
21
22    fn output_filename(&self, batch_idx: &BatchIndex) -> PathBuf {
23        self.workdir().join(format!("batch_output_{}.jsonl", batch_idx))
24    }
25}
26
27impl GetErrorFilenameAtIndex for BatchWorkspace {
28
29    fn error_filename(&self, batch_idx: &BatchIndex) -> PathBuf {
30        self.workdir().join(format!("batch_error_{}.jsonl", batch_idx))
31    }
32}
33
34impl GetMetadataFilenameAtIndex for BatchWorkspace {
35
36    fn metadata_filename(&self, batch_idx: &BatchIndex) -> PathBuf {
37        self.workdir().join(format!("batch_metadata_{}.jsonl", batch_idx))
38    }
39}
40
41impl GetTokenExpansionPath for BatchWorkspace {
42    fn token_expansion_path(&self,token_name: &CamelCaseTokenWithComment) -> PathBuf {
43        token_name.target_path_for_ai_json_expansion(&self.target_dir())
44    }
45}
46
47impl GetFailedJsonRepairsDir for BatchWorkspace {
48
49    fn failed_json_repairs_dir(&self) -> PathBuf {
50        self.failed_json_repairs_dir().to_path_buf()
51    }
52}
53
54impl GetFailedItemsDir for BatchWorkspace {
55
56    fn failed_items_dir(&self) -> PathBuf {
57        self.failed_items_dir().to_path_buf()
58    }
59}
60
61impl GetTextStoragePath for BatchWorkspace {
62
63    fn text_storage_path(&self, batch_idx: &BatchIndex) -> PathBuf {
64        self.text_storage_path(batch_idx).to_path_buf()
65    }
66}