-
Notifications
You must be signed in to change notification settings - Fork 384
Closed
Labels
Description
Product
BAML
Describe the bug
Text written inside of @description is not included in the Pydantic type generated by baml. Therefore when using model_json_schema() the generated schema doesn't contain the description.
This is how types are currently generated:
class Resume(BaseModel):
name: str
email: str
experience: typing.List[str]
skills: typing.List[str]Resume.model_json_schema()
# {"properties": {"name": {"title": "Name", "type": "string"}, "email": {"title": "Email", "type": "string"}, "experience": {"items": {"type": "string"}, "title": "Experience", "type": "array"}, "skills": {"items": {"type": "string"}, "title": "Skills", "type": "array"}}, "required": ["name", "email", "experience", "skills"], "title": "Resume", "type": "object"}Reproduction Steps
Run baml-cli init, baml-cli generate and run
from baml_client.types import Resume
print(Resume.model_json_schema())BAML Version
0.215.2
Language/Framework
Python
LLM Provider
None
LLM Model
No response
Operating System
None
Browser
None
Code Editor
None
Reactions are currently unavailable