kasperjunge / toucans Goto Github PK
View Code? Open in Web Editor NEWPrompt templating and versioning using jinja2 and litellm ๐ฅ
Prompt templating and versioning using jinja2 and litellm ๐ฅ
Task: handle that!
Template:
"Answer this question: {question}"
When you init a prompt with that template, it should auto-suggest "question" when you open the instantiated objects call method.
A little unconventional python trick, but it would really provide a nice developer exeperience.
Currently, the "push_to_dir()" method in the PromptFunction pushes a JSON file with the completion config to a specified directory. If a new or modified version of the PromptFunction is pushed to the same directory, it simply overwrites the existing file.
However, to enhance the ability to track prompt experiments, it would be beneficial to incorporate built-in versioning into the push/pull functionality. This could be achieved by utilizing the value generated by "CompletionConfig().unique_hash()".
The DirectoryPushPullMixin controls the directory push/pull logic.
I'd appreciate any suggestions on how this could be implemented.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.