async_openai/types/
common.rs1use std::{collections::HashMap, 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, Copy, PartialEq)]
14#[serde(rename_all = "lowercase")]
15pub enum OrganizationRole {
16 Owner,
17 Reader,
18}
19
20#[derive(Debug, Serialize, Deserialize, Clone, PartialEq, Default)]
27#[serde(transparent)]
28pub struct Metadata(HashMap<String, String>);
29
30impl From<HashMap<String, String>> for Metadata {
31 fn from(value: HashMap<String, String>) -> Self {
32 Self(value)
33 }
34}