dspy icon indicating copy to clipboard operation
dspy copied to clipboard

added adapters for DSPy

Open arnavsinghvi11 opened this issue 1 year ago • 2 comments

-adapters for general LMs (DavinciAdapter), chat LMs (TurboAdapter) and Llama models (LlamaAdapter)

arnavsinghvi11 avatar Sep 23 '23 21:09 arnavsinghvi11

just a reminder to revoke that key if you haven't already!

darinkishore avatar Nov 09 '23 01:11 darinkishore

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.

theta-lin avatar Aug 05 '24 13:08 theta-lin