Skip to main content

langfuse_client_base/models/
llm_adapter.rs

1/*
2 * langfuse
3 *
4 * ## Authentication  Authenticate with the API using [Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication), get API keys in the project settings:  - username: Langfuse Public Key - password: Langfuse Secret Key  ## Exports  - OpenAPI spec: https://cloud.langfuse.com/generated/api/openapi.yml
5 *
6 * The version of the OpenAPI document:
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14///
15#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
16pub enum LlmAdapter {
17    #[serde(rename = "anthropic")]
18    Anthropic,
19    #[serde(rename = "openai")]
20    Openai,
21    #[serde(rename = "azure")]
22    Azure,
23    #[serde(rename = "bedrock")]
24    Bedrock,
25    #[serde(rename = "google-vertex-ai")]
26    GoogleVertexAi,
27    #[serde(rename = "google-ai-studio")]
28    GoogleAiStudio,
29}
30
31impl std::fmt::Display for LlmAdapter {
32    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
33        match self {
34            Self::Anthropic => write!(f, "anthropic"),
35            Self::Openai => write!(f, "openai"),
36            Self::Azure => write!(f, "azure"),
37            Self::Bedrock => write!(f, "bedrock"),
38            Self::GoogleVertexAi => write!(f, "google-vertex-ai"),
39            Self::GoogleAiStudio => write!(f, "google-ai-studio"),
40        }
41    }
42}
43
44impl Default for LlmAdapter {
45    fn default() -> LlmAdapter {
46        Self::Anthropic
47    }
48}