dynamo_llm/
endpoint_type.rs1use serde::{Deserialize, Serialize};
5use strum::Display;
6
7#[derive(Copy, Debug, Clone, Display, Serialize, Deserialize, Eq, PartialEq, Hash)]
8pub enum EndpointType {
9 Chat,
11 Completion,
13 Embedding,
15 Responses,
17}
18
19impl EndpointType {
20 pub fn as_str(&self) -> &str {
21 match self {
22 Self::Chat => "chat",
23 Self::Completion => "completion",
24 Self::Embedding => "embedding",
25 Self::Responses => "responses",
26 }
27 }
28
29 pub fn all() -> Vec<Self> {
30 vec![
31 Self::Chat,
32 Self::Completion,
33 Self::Embedding,
34 Self::Responses,
35 ]
36 }
37}