langfuse_client/models/
prompt_meta.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 - Postman collection: https://cloud.langfuse.com/generated/postman/collection.json
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#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct PromptMeta {
16    #[serde(rename = "name")]
17    pub name: String,
18    #[serde(rename = "versions")]
19    pub versions: Vec<i32>,
20    #[serde(rename = "labels")]
21    pub labels: Vec<String>,
22    #[serde(rename = "tags")]
23    pub tags: Vec<String>,
24    #[serde(rename = "lastUpdatedAt")]
25    pub last_updated_at: String,
26    /// Config object of the most recent prompt version that matches the filters (if any are provided)
27    #[serde(rename = "lastConfig", deserialize_with = "Option::deserialize")]
28    pub last_config: Option<serde_json::Value>,
29}
30
31impl PromptMeta {
32    pub fn new(name: String, versions: Vec<i32>, labels: Vec<String>, tags: Vec<String>, last_updated_at: String, last_config: Option<serde_json::Value>) -> PromptMeta {
33        PromptMeta {
34            name,
35            versions,
36            labels,
37            tags,
38            last_updated_at,
39            last_config,
40        }
41    }
42}
43