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
/*
* langfuse
*
* ## 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
*
* The version of the OpenAPI document:
*
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize, bon::Builder)]
pub struct PromptMeta {
#[serde(rename = "name")]
pub name: String,
#[serde(rename = "type")]
pub r#type: models::PromptType,
#[serde(rename = "versions")]
pub versions: Vec<i32>,
#[serde(rename = "labels")]
pub labels: Vec<String>,
#[serde(rename = "tags")]
pub tags: Vec<String>,
#[serde(rename = "lastUpdatedAt")]
pub last_updated_at: String,
/// Config object of the most recent prompt version that matches the filters (if any are provided)
#[serde(rename = "lastConfig", deserialize_with = "Option::deserialize")]
pub last_config: Option<serde_json::Value>,
}
impl PromptMeta {
pub fn new(
name: String,
r#type: models::PromptType,
versions: Vec<i32>,
labels: Vec<String>,
tags: Vec<String>,
last_updated_at: String,
last_config: Option<serde_json::Value>,
) -> PromptMeta {
PromptMeta {
name,
r#type,
versions,
labels,
tags,
last_updated_at,
last_config,
}
}
}