-
Notifications
You must be signed in to change notification settings - Fork 286
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
Jinja support? #82
Comments
Worth saying that Jinja is inherently not type-safe, and you can often get the same result with type safe code, e.g. ...
return f"""
blah
blah blah
{'\n'.join(thing.foo for thing in deps.things}
...
""" |
I'm exiting to find your work so that I can get rid of other tedious agent frameworks! And I'd like to introduce my work Prompt-Bottle which do the same as the Instructor proposal. However it can render not only string, but the whole message history! And it also supports multimodal message by using placeholder to put them in string text. looking forward to hearing from you 😉 |
Would be really interested in some form of templating feature in pydantic-ai. I have also had an attempt at something like this with typed-prompt. It tries to tie your template and the data that populates the template together. This is my interpretation of the problem, but any support for templating in pydantic-ai would be greatly appreciated! |
Honestly I think #93 should cover 99% of cases. |
Instructor (and other libraries) support jinja templates for system prompt building, see here.
It would be pretty easily for us to support, then again it doesn't need to be build into the library, it just be implemented by the user.
We should at least add an example of how to do this.
Should we add formal support for it? If so what should the API be?
The text was updated successfully, but these errors were encountered: