async_openai/types/
input_source.rs1#[derive(Debug, Clone, PartialEq)]
2pub enum InputSource {
3 #[cfg(not(target_family = "wasm"))]
4 Path {
5 path: std::path::PathBuf,
6 },
7 Bytes {
8 filename: String,
9 bytes: bytes::Bytes,
10 },
11 VecU8 {
12 filename: String,
13 vec: Vec<u8>,
14 },
15}
16
17#[cfg(not(target_family = "wasm"))]
18impl Default for InputSource {
19 fn default() -> Self {
20 InputSource::Path {
21 path: std::path::PathBuf::new(),
22 }
23 }
24}
25
26#[cfg(target_family = "wasm")]
27impl Default for InputSource {
28 fn default() -> Self {
29 InputSource::Bytes {
30 filename: String::new(),
31 bytes: bytes::Bytes::new(),
32 }
33 }
34}