1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
/*
* Vapi API
*
* Voice AI for developers.
*
* The version of the OpenAPI document: 1.0
*
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct LangfuseCredential {
#[serde(rename = "provider")]
pub provider: ProviderTrue,
/// The public key for Langfuse project. Eg: pk-lf-...
#[serde(rename = "publicKey")]
pub public_key: String,
/// The secret key for Langfuse project. Eg: sk-lf-... .This is not returned in the API.
#[serde(rename = "apiKey")]
pub api_key: String,
/// The host URL for Langfuse project. Eg: https://cloud.langfuse.com
#[serde(rename = "apiUrl")]
pub api_url: String,
/// This is the unique identifier for the credential.
#[serde(rename = "id")]
pub id: String,
/// This is the unique identifier for the org that this credential belongs to.
#[serde(rename = "orgId")]
pub org_id: String,
/// This is the ISO 8601 date-time string of when the credential was created.
#[serde(rename = "createdAt")]
pub created_at: String,
/// This is the ISO 8601 date-time string of when the assistant was last updated.
#[serde(rename = "updatedAt")]
pub updated_at: String,
/// This is the name of credential. This is just for your reference.
#[serde(rename = "name", skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
}
impl LangfuseCredential {
pub fn new(
provider: ProviderTrue,
public_key: String,
api_key: String,
api_url: String,
id: String,
org_id: String,
created_at: String,
updated_at: String,
) -> LangfuseCredential {
LangfuseCredential {
provider,
public_key,
api_key,
api_url,
id,
org_id,
created_at,
updated_at,
name: None,
}
}
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum ProviderTrue {
#[serde(rename = "langfuse")]
Langfuse,
}
impl Default for ProviderTrue {
fn default() -> ProviderTrue {
Self::Langfuse
}
}