Stevenic / alphawave

AlphaWave is a very opinionated client for interfacing with Large Language Models.
MIT License
98 stars 9 forks source link

Add PromptSelector plugin to dynamically select the prompt & options to use based on context #3

Open Stevenic opened 1 year ago

Stevenic commented 1 year ago

There are a cases where you might want to change the model (or even prompt) used for a given request based on the current context. Adding a new PromptSelector plugin will let a wave evaluate the current context and select the appropriate prompt and model to use. Here are a few scenarios this would enable:

There would be 2 default implementations provided: The DefaultPromptSelector would just select the configured prompt every time. The FeedbackPromptSelector would chose an alternate prompt when giving the model feedback.

rmolinamir commented 1 year ago

Hi @Stevenic, this project is awesome. I've been using it at work for a little R&D, the appliance is in the media industry so I've been using it to generate automated translations of SRT files, it's been a great first step, the idea is to increase output and automate the operational workflow as much as possible. I've been thinking of using it for some side projects as well, I was wondering if you were open to contributors, I'd love to pitch in.

Stevenic commented 1 year ago

Of course @rmolinamir... I'd love contributors... Let me setup discussions for the project and I'll invite you as a collaborator. I'm in the middle of adding support for OpenAI functions so quite a few moving pieces right now.