https://www.boundaryml.com logo
Get `model_json_schema` of a parameter created in ...
# help
s
Im having an issue with this setup:
Copy code
js
class Response {
    @@dynamic
}
Copy code
py
from baml_client.type_builder import TypeBuilder
from baml_client.types import Response

baml_schema = """dynamic class Response {
    title string @description("abcd...")
}"""
def baml_to_schema(baml_schema:str)->dict:
    tb = TypeBuilder()
    tb.add_baml(baml_schema)
    return Response.model_json_schema(by_alias=False)
Here since parameters are added to Response in runtime, they aren't visible when
Response.model_json_schema()
is called.
v
Thanks for the feedback here. We have an internal pr to make type builder fully reflective and work with this kind of feature. Sadly not yet possible in the released version ๐Ÿ™
s
Is there a GitHub issue that i can subscribe to in order to get notified when this is done?
b
Not yet, I donโ€™t think- if you file one we can make sure it gets tagged when we release it!
v
howhttps://discord.com/channels/1119368998161752075/1455114830490108060/1455130996331511829 about
2 Views