async_openai/types/
common.rs1use std::path::PathBuf;
2
3use bytes::Bytes;
4use serde::{Deserialize, Serialize};
5
6#[derive(Debug, Clone, PartialEq)]
7pub enum InputSource {
8 Path { path: PathBuf },
9 Bytes { filename: String, bytes: Bytes },
10 VecU8 { filename: String, vec: Vec<u8> },
11}
12
13#[derive(Debug, Serialize, Deserialize, Clone, PartialEq, Default)]
20#[serde(transparent)]
21pub struct Metadata(serde_json::Value);
22
23impl From<serde_json::Value> for Metadata {
24 fn from(value: serde_json::Value) -> Self {
25 Self(value)
26 }
27}