Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(python): show properties and values in TypeBuilder string representation #1260

Open
wants to merge 7 commits into
base: canary
Choose a base branch
from
9 changes: 9 additions & 0 deletions engine/baml-lib/baml-types/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,12 @@ pub use map::Map as BamlMap;
pub use media::{BamlMedia, BamlMediaContent, BamlMediaType, MediaBase64, MediaUrl};
pub use minijinja::JinjaExpression;
pub use value_expr::{EvaluationContext, GetEnvVar, ResolvedValue, StringOr, UnresolvedValue};

impl BamlValue {
pub fn as_string(&self) -> Option<&str> {
match self {
BamlValue::String(s) => Some(s),
_ => None,
}
}
}
Loading
Loading