@sjcrh/proteinpaint-rust 2.157.0 → 2.166.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -5,19 +5,17 @@ This directory holds the source code for rust-compiled utilities.
5
5
 
6
6
  ## Rust version
7
7
 
8
- Current rust version is 1.89.0. TODO introduce `rust-toolchain` file, and pin the rust version there.
8
+ The current rust version is defined in `rust/rust-toolchain.toml`. When updating the rust version inside the rust docker image the `container/rust/build.sh` script parses the rust version from `rust-toolchain.toml` into `container/rust/Dockerfile` at runtime. This ensures consistency between local PP builds and the docker container in CI and production.
9
9
 
10
- Currently the version is hardcoded in:
10
+ The Github Actions workflow file `.github/workflows/CD-rust-build.yml` and `.github/workflows/CI-unit.yml` also parses the rust version from the `rust-toolchain.toml` to ensure the correct rust version is used for compiling the current rust code.
11
11
 
12
- the Github Actions workflow file `.github/workflows/CD-rust-build.yml`.
12
+ When bumping the rust version and publish the new rust build env image using:
13
13
 
14
- The Github Actions workflow file `.github/workflows/CI-unit.yml`.
15
-
16
- The rust build docker file `container/rust/Dockerfile`.
14
+ https://github.com/stjude/proteinpaint/actions/workflows/CD-publish-rust-bookworm-env-image.yml
17
15
 
18
- When bumping the rust version, please update these files accordingly, and publish the new rust build env image using:
16
+ For publishing updated rust binaries, use this workflow.
19
17
 
20
- https://github.com/stjude/proteinpaint/actions/workflows/CD-publish-rust-bookworm-env-image.yml
18
+ https://github.com/stjude/proteinpaint/actions/workflows/CD-publish-rust-binaries.yml
21
19
 
22
20
  ## Code layout
23
21
 
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "2.157.0",
2
+ "version": "2.166.0",
3
3
  "name": "@sjcrh/proteinpaint-rust",
4
4
  "type": "module",
5
5
  "description": "Rust-based utilities for proteinpaint",
package/src/bigwig.rs CHANGED
@@ -158,19 +158,11 @@ fn main() {
158
158
  }
159
159
 
160
160
  fn determine_max(n1: f64, n2: f64) -> f64 {
161
- if n1 >= n2 {
162
- n1
163
- } else {
164
- n2
165
- }
161
+ if n1 >= n2 { n1 } else { n2 }
166
162
  }
167
163
 
168
164
  fn determine_min(n1: f64, n2: f64) -> f64 {
169
- if n1 < n2 {
170
- n1
171
- } else {
172
- n2
173
- }
165
+ if n1 < n2 { n1 } else { n2 }
174
166
  }
175
167
 
176
168
  #[allow(dead_code)]
@@ -179,12 +171,8 @@ fn calculate_appropriate_zoom_level(zoom_headers: Vec<ZoomHeader>, difference: f
179
171
  let mut closest_level = Option::<u32>::None; // Zoom level will be none at base-pair resolution
180
172
  let mut unity_added = false;
181
173
  let max_entries_parsed_limit = 100000; // Maximum number of entries that should be parsed from bigwig file. A very high number will lead to better accuracy as this will lead to selection of a lower zoom level. In contrast, a lower value will decrease run time at the cost of accuracy.
182
- // Parsing out various zoom levels from bigwig file
183
- for reduction_level in zoom_headers
184
- .into_iter()
185
- .map(|entry| (entry.reduction_level))
186
- .rev()
187
- {
174
+ // Parsing out various zoom levels from bigwig file
175
+ for reduction_level in zoom_headers.into_iter().map(|entry| entry.reduction_level).rev() {
188
176
  reduction_levels.push(reduction_level as u32);
189
177
  }
190
178
  if reduction_levels.contains(&1) == false {
@@ -206,21 +194,14 @@ fn calculate_appropriate_zoom_level(zoom_headers: Vec<ZoomHeader>, difference: f
206
194
  closest_level
207
195
  }
208
196
 
209
- fn calculate_appropriate_zoom_level_ucsc(
210
- zoom_headers: Vec<ZoomHeader>,
211
- exact_offset: f64,
212
- ) -> Option<u32> {
197
+ fn calculate_appropriate_zoom_level_ucsc(zoom_headers: Vec<ZoomHeader>, exact_offset: f64) -> Option<u32> {
213
198
  let mut reduction_levels = Vec::<u32>::new();
214
199
  let mut closest_level = Option::<u32>::None; // Zoom level will be none at base-pair resolution
215
200
  let desired_reduction: u32 = ((exact_offset as f64) / 2.0).floor() as u32;
216
201
  let mut unity_added = false;
217
202
  if desired_reduction > 1 {
218
203
  // Parsing out various zoom levels from bigwig file
219
- for reduction_level in zoom_headers
220
- .into_iter()
221
- .map(|entry| (entry.reduction_level))
222
- .rev()
223
- {
204
+ for reduction_level in zoom_headers.into_iter().map(|entry| entry.reduction_level).rev() {
224
205
  reduction_levels.push(reduction_level as u32);
225
206
  }
226
207
  if reduction_levels.contains(&1) == false {
@@ -304,11 +285,9 @@ fn calculate_datapoints<
304
285
  continue;
305
286
  } else {
306
287
  if (v.start as f64 <= start_region && end_region < v.end as f64)
307
- || (v.start as f64 >= start_region
308
- && (v.start as f64) < end_region)
288
+ || (v.start as f64 >= start_region && (v.start as f64) < end_region)
309
289
  || (v.end as f64 >= start_region && (v.end as f64) < end_region)
310
- || (start_region >= v.start as f64
311
- && (v.end as f64) < end_region)
290
+ || (start_region >= v.start as f64 && (v.end as f64) < end_region)
312
291
  {
313
292
  // Calculate sum and number for this region
314
293
  //println!("i:{}", i);
@@ -316,16 +295,10 @@ fn calculate_datapoints<
316
295
  //println!("v.end:{}", v.end);
317
296
  //println!("start_region:{}", start_region);
318
297
  //println!("end_region:{}", end_region);
319
- let start_entry_within_region =
320
- determine_max(v.start as f64, start_region);
321
- let stop_entry_within_region =
322
- determine_min(v.end as f64, end_region);
323
- datapoints_num[i] += (stop_entry_within_region
324
- - start_entry_within_region)
325
- as f64;
326
- datapoints_sum[i] += (stop_entry_within_region
327
- - start_entry_within_region)
328
- as f64
298
+ let start_entry_within_region = determine_max(v.start as f64, start_region);
299
+ let stop_entry_within_region = determine_min(v.end as f64, end_region);
300
+ datapoints_num[i] += (stop_entry_within_region - start_entry_within_region) as f64;
301
+ datapoints_sum[i] += (stop_entry_within_region - start_entry_within_region) as f64
329
302
  * ((v.summary.sum as f64) / v.summary.bases_covered as f64);
330
303
  //println!(
331
304
  // "start_entry_within_region:{}",
@@ -346,30 +319,21 @@ fn calculate_datapoints<
346
319
  //println!("v.end:{}", v.end);
347
320
  //println!("start_region:{}", start_region);
348
321
  //println!("end_region:{}", end_region);
349
- if ((v.start as f64 <= start_region
350
- && end_region < v.end as f64)
351
- || (v.start as f64 >= start_region
352
- && (v.start as f64) < end_region)
353
- || (v.end as f64 >= start_region
354
- && (v.end as f64) < end_region)
355
- || (start_region >= v.start as f64
356
- && (v.end as f64) < end_region))
322
+ if ((v.start as f64 <= start_region && end_region < v.end as f64)
323
+ || (v.start as f64 >= start_region && (v.start as f64) < end_region)
324
+ || (v.end as f64 >= start_region && (v.end as f64) < end_region)
325
+ || (start_region >= v.start as f64 && (v.end as f64) < end_region))
357
326
  && iter > 1
358
327
  {
359
328
  // Calculate sum and number for this region
360
329
  //println!("Hello");
361
- let start_entry_within_region =
362
- determine_max(v.start as f64, start_region);
363
- let stop_entry_within_region =
364
- determine_min(v.end as f64, end_region);
365
- datapoints_num[i] += (stop_entry_within_region
366
- - start_entry_within_region)
367
- as f64;
368
- datapoints_sum[i] += (stop_entry_within_region
369
- - start_entry_within_region)
330
+ let start_entry_within_region = determine_max(v.start as f64, start_region);
331
+ let stop_entry_within_region = determine_min(v.end as f64, end_region);
332
+ datapoints_num[i] +=
333
+ (stop_entry_within_region - start_entry_within_region) as f64;
334
+ datapoints_sum[i] += (stop_entry_within_region - start_entry_within_region)
370
335
  as f64
371
- * ((v.summary.sum as f64)
372
- / v.summary.bases_covered as f64);
336
+ * ((v.summary.sum as f64) / v.summary.bases_covered as f64);
373
337
  //println!(
374
338
  // "start_entry_within_region inside:{}",
375
339
  // start_entry_within_region
@@ -401,9 +365,7 @@ fn calculate_datapoints<
401
365
  }
402
366
  None => {
403
367
  // To be used in nucleotide resolution
404
- let bigwig_output = reader
405
- .get_interval(&chrom, start_pos as u32, stop_pos as u32)
406
- .unwrap();
368
+ let bigwig_output = reader.get_interval(&chrom, start_pos as u32, stop_pos as u32).unwrap();
407
369
  let mut i = 0;
408
370
  let mut start_region = datapoints_list[i];
409
371
  let mut end_region = datapoints_list[i + 1];
@@ -415,11 +377,9 @@ fn calculate_datapoints<
415
377
  continue;
416
378
  } else {
417
379
  if (v.start as f64 <= start_region && end_region < v.end as f64)
418
- || (v.start as f64 >= start_region
419
- && (v.start as f64) < end_region)
380
+ || (v.start as f64 >= start_region && (v.start as f64) < end_region)
420
381
  || (v.end as f64 >= start_region && (v.end as f64) < end_region)
421
- || (start_region >= v.start as f64
422
- && (v.end as f64) < end_region)
382
+ || (start_region >= v.start as f64 && (v.end as f64) < end_region)
423
383
  {
424
384
  // Calculate sum and number for this region
425
385
  //println!("i:{}", i);
@@ -427,17 +387,11 @@ fn calculate_datapoints<
427
387
  //println!("v.end:{}", v.end);
428
388
  //println!("start_region:{}", start_region);
429
389
  //println!("end_region:{}", end_region);
430
- let start_entry_within_region =
431
- determine_max(v.start as f64, start_region);
432
- let stop_entry_within_region =
433
- determine_min(v.end as f64, end_region);
434
- datapoints_num[i] += (stop_entry_within_region
435
- - start_entry_within_region)
436
- as f64;
437
- datapoints_sum[i] += (stop_entry_within_region
438
- - start_entry_within_region)
439
- as f64
440
- * v.value as f64;
390
+ let start_entry_within_region = determine_max(v.start as f64, start_region);
391
+ let stop_entry_within_region = determine_min(v.end as f64, end_region);
392
+ datapoints_num[i] += (stop_entry_within_region - start_entry_within_region) as f64;
393
+ datapoints_sum[i] +=
394
+ (stop_entry_within_region - start_entry_within_region) as f64 * v.value as f64;
441
395
  //println!(
442
396
  // "start_entry_within_region:{}",
443
397
  // start_entry_within_region
@@ -457,27 +411,19 @@ fn calculate_datapoints<
457
411
  //println!("v.end:{}", v.end);
458
412
  //println!("start_region:{}", start_region);
459
413
  //println!("end_region:{}", end_region);
460
- if ((v.start as f64 <= start_region
461
- && end_region < v.end as f64)
462
- || (v.start as f64 >= start_region
463
- && (v.start as f64) < end_region)
464
- || (v.end as f64 >= start_region
465
- && (v.end as f64) < end_region)
466
- || (start_region >= v.start as f64
467
- && (v.end as f64) < end_region))
414
+ if ((v.start as f64 <= start_region && end_region < v.end as f64)
415
+ || (v.start as f64 >= start_region && (v.start as f64) < end_region)
416
+ || (v.end as f64 >= start_region && (v.end as f64) < end_region)
417
+ || (start_region >= v.start as f64 && (v.end as f64) < end_region))
468
418
  && iter > 1
469
419
  {
470
420
  // Calculate sum and number for this region
471
421
  //println!("Hello");
472
- let start_entry_within_region =
473
- determine_max(v.start as f64, start_region);
474
- let stop_entry_within_region =
475
- determine_min(v.end as f64, end_region);
476
- datapoints_num[i] += (stop_entry_within_region
477
- - start_entry_within_region)
478
- as f64;
479
- datapoints_sum[i] += (stop_entry_within_region
480
- - start_entry_within_region)
422
+ let start_entry_within_region = determine_max(v.start as f64, start_region);
423
+ let stop_entry_within_region = determine_min(v.end as f64, end_region);
424
+ datapoints_num[i] +=
425
+ (stop_entry_within_region - start_entry_within_region) as f64;
426
+ datapoints_sum[i] += (stop_entry_within_region - start_entry_within_region)
481
427
  as f64
482
428
  * v.value as f64;
483
429
  //println!(
@@ -536,11 +482,9 @@ fn calculate_datapoints<
536
482
  continue;
537
483
  } else {
538
484
  if (v.start as f64 <= start_region && end_region < v.end as f64)
539
- || (v.start as f64 >= start_region
540
- && (v.start as f64) < end_region)
485
+ || (v.start as f64 >= start_region && (v.start as f64) < end_region)
541
486
  || (v.end as f64 >= start_region && (v.end as f64) < end_region)
542
- || (start_region >= v.start as f64
543
- && (v.end as f64) < end_region)
487
+ || (start_region >= v.start as f64 && (v.end as f64) < end_region)
544
488
  {
545
489
  // Calculate sum and number for this region
546
490
  //println!("i:{}", i);
@@ -548,16 +492,10 @@ fn calculate_datapoints<
548
492
  //println!("v.end:{}", v.end);
549
493
  //println!("start_region:{}", start_region);
550
494
  //println!("end_region:{}", end_region);
551
- let start_entry_within_region =
552
- determine_max(v.start as f64, start_region);
553
- let stop_entry_within_region =
554
- determine_min(v.end as f64, end_region);
555
- datapoints_num[i] += (stop_entry_within_region
556
- - start_entry_within_region)
557
- as f64;
558
- datapoints_sum[i] += (stop_entry_within_region
559
- - start_entry_within_region)
560
- as f64
495
+ let start_entry_within_region = determine_max(v.start as f64, start_region);
496
+ let stop_entry_within_region = determine_min(v.end as f64, end_region);
497
+ datapoints_num[i] += (stop_entry_within_region - start_entry_within_region) as f64;
498
+ datapoints_sum[i] += (stop_entry_within_region - start_entry_within_region) as f64
561
499
  * ((v.summary.sum as f64) / v.summary.bases_covered as f64);
562
500
  //println!(
563
501
  // "start_entry_within_region:{}",
@@ -578,29 +516,20 @@ fn calculate_datapoints<
578
516
  //println!("v.end:{}", v.end);
579
517
  //println!("start_region:{}", start_region);
580
518
  //println!("end_region:{}", end_region);
581
- if ((v.start as f64 <= start_region
582
- && end_region < v.end as f64)
583
- || (v.start as f64 >= start_region
584
- && (v.start as f64) < end_region)
585
- || (v.end as f64 >= start_region
586
- && (v.end as f64) < end_region)
587
- || (start_region >= v.start as f64
588
- && (v.end as f64) < end_region))
519
+ if ((v.start as f64 <= start_region && end_region < v.end as f64)
520
+ || (v.start as f64 >= start_region && (v.start as f64) < end_region)
521
+ || (v.end as f64 >= start_region && (v.end as f64) < end_region)
522
+ || (start_region >= v.start as f64 && (v.end as f64) < end_region))
589
523
  && iter > 1
590
524
  {
591
525
  // Calculate sum and number for this region
592
- let start_entry_within_region =
593
- determine_max(v.start as f64, start_region);
594
- let stop_entry_within_region =
595
- determine_min(v.end as f64, end_region);
596
- datapoints_num[i] += (stop_entry_within_region
597
- - start_entry_within_region)
598
- as f64;
599
- datapoints_sum[i] += (stop_entry_within_region
600
- - start_entry_within_region)
526
+ let start_entry_within_region = determine_max(v.start as f64, start_region);
527
+ let stop_entry_within_region = determine_min(v.end as f64, end_region);
528
+ datapoints_num[i] +=
529
+ (stop_entry_within_region - start_entry_within_region) as f64;
530
+ datapoints_sum[i] += (stop_entry_within_region - start_entry_within_region)
601
531
  as f64
602
- * ((v.summary.sum as f64)
603
- / v.summary.bases_covered as f64);
532
+ * ((v.summary.sum as f64) / v.summary.bases_covered as f64);
604
533
  //println!(
605
534
  // "start_entry_within_region inside:{}",
606
535
  // start_entry_within_region
@@ -634,9 +563,7 @@ fn calculate_datapoints<
634
563
  }
635
564
  None => {
636
565
  // To be used in nucleotide resolution
637
- let bigwig_output = reader
638
- .get_interval(&chrom, start_pos as u32, stop_pos as u32)
639
- .unwrap();
566
+ let bigwig_output = reader.get_interval(&chrom, start_pos as u32, stop_pos as u32).unwrap();
640
567
  let mut i = 0;
641
568
  let mut start_region = datapoints_list[i];
642
569
  let mut end_region = datapoints_list[i + 1];
@@ -648,11 +575,9 @@ fn calculate_datapoints<
648
575
  continue;
649
576
  } else {
650
577
  if (v.start as f64 <= start_region && end_region < v.end as f64)
651
- || (v.start as f64 >= start_region
652
- && (v.start as f64) < end_region)
578
+ || (v.start as f64 >= start_region && (v.start as f64) < end_region)
653
579
  || (v.end as f64 >= start_region && (v.end as f64) < end_region)
654
- || (start_region >= v.start as f64
655
- && (v.end as f64) < end_region)
580
+ || (start_region >= v.start as f64 && (v.end as f64) < end_region)
656
581
  {
657
582
  // Calculate sum and number for this region
658
583
  //println!("i:{}", i);
@@ -660,17 +585,11 @@ fn calculate_datapoints<
660
585
  //println!("v.end:{}", v.end);
661
586
  //println!("start_region:{}", start_region);
662
587
  //println!("end_region:{}", end_region);
663
- let start_entry_within_region =
664
- determine_max(v.start as f64, start_region);
665
- let stop_entry_within_region =
666
- determine_min(v.end as f64, end_region);
667
- datapoints_num[i] += (stop_entry_within_region
668
- - start_entry_within_region)
669
- as f64;
670
- datapoints_sum[i] += (stop_entry_within_region
671
- - start_entry_within_region)
672
- as f64
673
- * v.value as f64;
588
+ let start_entry_within_region = determine_max(v.start as f64, start_region);
589
+ let stop_entry_within_region = determine_min(v.end as f64, end_region);
590
+ datapoints_num[i] += (stop_entry_within_region - start_entry_within_region) as f64;
591
+ datapoints_sum[i] +=
592
+ (stop_entry_within_region - start_entry_within_region) as f64 * v.value as f64;
674
593
  //println!(
675
594
  // "start_entry_within_region:{}",
676
595
  // start_entry_within_region
@@ -690,27 +609,19 @@ fn calculate_datapoints<
690
609
  //println!("v.end:{}", v.end);
691
610
  //println!("start_region:{}", start_region);
692
611
  //println!("end_region:{}", end_region);
693
- if ((v.start as f64 <= start_region
694
- && end_region < v.end as f64)
695
- || (v.start as f64 >= start_region
696
- && (v.start as f64) < end_region)
697
- || (v.end as f64 >= start_region
698
- && (v.end as f64) < end_region)
699
- || (start_region >= v.start as f64
700
- && (v.end as f64) < end_region))
612
+ if ((v.start as f64 <= start_region && end_region < v.end as f64)
613
+ || (v.start as f64 >= start_region && (v.start as f64) < end_region)
614
+ || (v.end as f64 >= start_region && (v.end as f64) < end_region)
615
+ || (start_region >= v.start as f64 && (v.end as f64) < end_region))
701
616
  && iter > 1
702
617
  {
703
618
  // Calculate sum and number for this region
704
619
  //println!("Hello");
705
- let start_entry_within_region =
706
- determine_max(v.start as f64, start_region);
707
- let stop_entry_within_region =
708
- determine_min(v.end as f64, end_region);
709
- datapoints_num[i] += (stop_entry_within_region
710
- - start_entry_within_region)
711
- as f64;
712
- datapoints_sum[i] += (stop_entry_within_region
713
- - start_entry_within_region)
620
+ let start_entry_within_region = determine_max(v.start as f64, start_region);
621
+ let stop_entry_within_region = determine_min(v.end as f64, end_region);
622
+ datapoints_num[i] +=
623
+ (stop_entry_within_region - start_entry_within_region) as f64;
624
+ datapoints_sum[i] += (stop_entry_within_region - start_entry_within_region)
714
625
  as f64
715
626
  * v.value as f64;
716
627
  //println!(
@@ -762,4 +673,4 @@ fn calculate_datapoints<
762
673
  }
763
674
  output_vec.pop();
764
675
  println!("{}", output_vec);
765
- }
676
+ }
package/src/ollama.rs CHANGED
@@ -663,6 +663,7 @@ impl From<rig::completion::ToolDefinition> for ToolDefinition {
663
663
  }
664
664
 
665
665
  #[derive(Debug, Serialize, Deserialize, PartialEq, Clone)]
666
+ #[allow(dead_code)]
666
667
  pub struct ToolCall {
667
668
  // pub id: String,
668
669
  #[serde(default, rename = "type")]
@@ -872,6 +873,7 @@ impl From<rig::message::ToolCall> for ToolCall {
872
873
  }
873
874
 
874
875
  #[derive(Debug, Serialize, Deserialize, PartialEq, Clone)]
876
+ #[allow(dead_code)]
875
877
  pub struct SystemContent {
876
878
  #[serde(default)]
877
879
  r#type: SystemContentType,
@@ -880,6 +882,7 @@ pub struct SystemContent {
880
882
 
881
883
  #[derive(Default, Debug, Serialize, Deserialize, PartialEq, Clone)]
882
884
  #[serde(rename_all = "lowercase")]
885
+ #[allow(dead_code)]
883
886
  pub enum SystemContentType {
884
887
  #[default]
885
888
  Text,
@@ -905,6 +908,7 @@ impl FromStr for SystemContent {
905
908
  }
906
909
 
907
910
  #[derive(Debug, Serialize, Deserialize, PartialEq, Clone)]
911
+ #[allow(dead_code)]
908
912
  pub struct AssistantContent {
909
913
  pub text: String,
910
914
  }
@@ -918,6 +922,7 @@ impl FromStr for AssistantContent {
918
922
 
919
923
  #[derive(Debug, Serialize, Deserialize, PartialEq, Clone)]
920
924
  #[serde(tag = "type", rename_all = "lowercase")]
925
+ #[allow(dead_code)]
921
926
  pub enum UserContent {
922
927
  Text { text: String },
923
928
  Image { image_url: ImageUrl },
@@ -932,6 +937,7 @@ impl FromStr for UserContent {
932
937
  }
933
938
 
934
939
  #[derive(Debug, Serialize, Deserialize, PartialEq, Clone)]
940
+ #[allow(dead_code)]
935
941
  pub struct ImageUrl {
936
942
  pub url: String,
937
943
  #[serde(default)]
package/src/sjprovider.rs CHANGED
@@ -729,6 +729,7 @@ impl From<rig::completion::ToolDefinition> for ToolDefinition {
729
729
  }
730
730
 
731
731
  #[derive(Debug, Serialize, Deserialize, PartialEq, Clone)]
732
+ #[allow(dead_code)]
732
733
  pub struct ToolCall {
733
734
  // pub id: String,
734
735
  #[serde(default, rename = "type")]
@@ -737,11 +738,13 @@ pub struct ToolCall {
737
738
  }
738
739
  #[derive(Default, Debug, Serialize, Deserialize, PartialEq, Clone)]
739
740
  #[serde(rename_all = "lowercase")]
741
+ #[allow(dead_code)]
740
742
  pub enum ToolType {
741
743
  #[default]
742
744
  Function,
743
745
  }
744
746
  #[derive(Debug, Serialize, Deserialize, PartialEq, Clone)]
747
+ #[allow(dead_code)]
745
748
  pub struct Function {
746
749
  pub name: String,
747
750
  pub arguments: Value,
@@ -938,6 +941,7 @@ impl From<rig::message::ToolCall> for ToolCall {
938
941
  }
939
942
 
940
943
  #[derive(Debug, Serialize, Deserialize, PartialEq, Clone)]
944
+ #[allow(dead_code)]
941
945
  pub struct SystemContent {
942
946
  #[serde(default)]
943
947
  r#type: SystemContentType,
@@ -971,6 +975,7 @@ impl FromStr for SystemContent {
971
975
  }
972
976
 
973
977
  #[derive(Debug, Serialize, Deserialize, PartialEq, Clone)]
978
+ #[allow(dead_code)]
974
979
  pub struct AssistantContent {
975
980
  pub text: String,
976
981
  }
@@ -984,6 +989,7 @@ impl FromStr for AssistantContent {
984
989
 
985
990
  #[derive(Debug, Serialize, Deserialize, PartialEq, Clone)]
986
991
  #[serde(tag = "type", rename_all = "lowercase")]
992
+ #[allow(dead_code)]
987
993
  pub enum UserContent {
988
994
  Text { text: String },
989
995
  Image { image_url: ImageUrl },
@@ -998,6 +1004,7 @@ impl FromStr for UserContent {
998
1004
  }
999
1005
 
1000
1006
  #[derive(Debug, Serialize, Deserialize, PartialEq, Clone)]
1007
+ #[allow(dead_code)]
1001
1008
  pub struct ImageUrl {
1002
1009
  pub url: String,
1003
1010
  #[serde(default)]