dynamo_async_openai/types/common.rs
1// SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2// SPDX-License-Identifier: Apache-2.0
3//
4// Based on https://github.com/64bit/async-openai/ by Himanshu Neema
5// Original Copyright (c) 2022 Himanshu Neema
6// Licensed under MIT License (see ATTRIBUTIONS-Rust.md)
7//
8// Modifications Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES.
9// Licensed under Apache 2.0
10
11use std::path::PathBuf;
12
13use bytes::Bytes;
14use serde::{Deserialize, Serialize};
15
16#[derive(Debug, Clone, PartialEq)]
17pub enum InputSource {
18 Path { path: PathBuf },
19 Bytes { filename: String, bytes: Bytes },
20 VecU8 { filename: String, vec: Vec<u8> },
21}
22
23#[derive(Debug, Serialize, Deserialize, Clone, Copy, PartialEq)]
24#[serde(rename_all = "lowercase")]
25pub enum OrganizationRole {
26 Owner,
27 Reader,
28}