Skip to content

Add remove_property and list_properties methods to TypeBuilder #2057

Open
@antoniosarosi

Description

@antoniosarosi
Contributor

Product

BAML

Problem Statement / Use Case

There's no way to remove properties from a type builder or to list added properties.

Proposed Solution

tb = TypeBuilder()
tb.Example.add_property("example", tb.string())

# Remove single property
tb.remove_property("example")

# Loop through properties
for prop in tb.list_properties():
    tb.remove_property(prop)
    
# Clear type builder
tb.clear() # Empty

Alternative Solutions

No response

Additional Context

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @antoniosarosi

        Issue actions

          Add `remove_property` and `list_properties` methods to `TypeBuilder` · Issue #2057 · BoundaryML/baml