dspy
dspy copied to clipboard
added adapters for DSPy
-adapters for general LMs (DavinciAdapter), chat LMs (TurboAdapter) and Llama models (LlamaAdapter)
just a reminder to revoke that key if you haven't already!
Hi @arnavsinghvi11, this looks pretty neat as it would allow a lot of flexibility for prompting for different models (or even the same model but using different ways to state your instructions). I wonder what is holding you back from merging it?
If there are issues regarding merging the entire thing, then would you consider a more immediate but less drastic change:
As signature_to_template()
in
https://github.com/stanfordnlp/dspy/blob/d8b8909773fc31e72cec093db2f26109590e524e/dspy/predict/predict.py#L137-L140
has an optional adapter
parameter, which actually takes a template as opposed your adapter, I propose that we can add a setting to change the default template, so that the behavior of the template could still be customized to some extent (albeit a bit less modularized).
Additionally, I still see a bit of inflexibility with TemplateV2.guidelines()
, which could be addressed in the future, though. I believe that adapters should also have the ability to customize the format of the guidelines.