Conversation
9c7e6ca to
e13d813
Compare
|
Sorry, I find it hard to understand what the goal of this code is. If you want to contribute, I recommend reading the Contributing guidelines and looking at Contributions wanted. |
|
@udbhav4 I missed providing more context to anakin87 yesterday. I'll take over the review and see how we can align this PR with the other work on the DSPy integration that is going on in parallel. This will most likely take another week. Thank you for your patience. |
Thanks @julian-risch ! Please have a look. |
Related Issues
Proposed Changes:
Added the PromptTemplate Adaptor that wraps the user prompt under the custom model templates. This makes the job of the DSPy model better at making the prompts LLM ready.
This is not a component but a helper class that may be used by the DSPyChatGenerator and the DSPyProgramRunner.
Additional models can be internally added with the templates into the dictionary using a function whenever required.
How did you test it?
Ran test for every part of the code and checked for the working functionality. Added the test file to the branch.
Notes for the reviewer
Although I understand the earlier raised concern: "since it still requires users to understand DSPy's optimization concepts, I am not sure it adds much value on top of DSPy," I think this is still relevant since the user never really interacts with this like a component, but the algorithm extracts the model used by the user (which they were already mentioning), and uses the same model internally to wrap the prompt. This removes the concern of the user needing to understand DSPy's optimization concepts.
Checklist
fix:,feat:,build:,chore:,ci:,docs:,style:,refactor:,perf:,test:.