-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Open
Labels
Feature requestNew feature requestNew feature request
Description
Description
Our system prompt and tool descriptions are in markdown. However, when pydantic-ai creates the tool description strings that are passed in, the only option is to wrap it in xml.
So I'm wondering if we could specify an option to allow the tool descriptions to instead be in markdown format.
In pydantic_ai_slim/pydantic_ai/_griffe.py:
type_tag = f'<type>{return_type}</type>\n' if return_type else ''
return_xml = f'<returns>\n{type_tag}<description>{return_desc}</description>\n</returns>'
if main_desc:
main_desc = f'<summary>{main_desc}</summary>\n{return_xml}'
else:
main_desc = return_xmlBut instead of this, with the .md option, this could be:
type_line = f'**Type:** `{return_type}`\n\n' if return_type else ''
return_md = f'### Returns\n\n{type_line}{return_desc}'
if main_desc:
main_desc = f'## Summary\n\n{main_desc}\n\n{return_md}'
else:
main_desc = return_mdReferences
No response
MichaelMartinskyTR
Metadata
Metadata
Assignees
Labels
Feature requestNew feature requestNew feature request