-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
package option for elmer extensions #175
Comments
Maybe we could have a @jcheng5 what do you think? |
@simonpcouch I think I'll probably export the provider classes, and then some generic way to create a chat object from a provider. Then we could possibly have |
Ooo I do like this interface. The hesitancy re: spending money without user consent definitely makes sense and I'm happy to work with that acknowledgement workflow; even if a user of pal/ensure/gander has to respond to a y/n prompt, this is an easier setup workflow than setting those package options in |
BTW I realised that probably this should be a single option that creates a chat object: options(
pal_chat = function(...) {
ellmer::chat_openai(..., model = "gpt-4o-mini")
}
) |
Gave this a go for pal and gander and I generally do prefer this over the pair of arguments. I don't actually need to pass anything through options(pal_chat = ellmer::chat_openai(..., model = "gpt-4o-mini")) ...instead of a function that returns the Chat: options(pal_chat = function() ellmer::chat_openai(..., model = "gpt-4o-mini")) I can imagine some side effects of executing e.g. Feel like I might be missing something here, so I implemented it as you suggest in my first go. Neither of those PRs are merged yet, though—certainly curious to hear your thoughts. |
Yeah if you only need an existing chat object the first should be fine. You’ll just need to make sure to clone it so you don’t end up with all the history in one chat. |
Been working on a couple BYO-key elmer extensions that aim to support any of the
chat_*()
backends from elmer, like this one or this one. For each of them, I assume that folks are likely to use the same provider and model most of the time, so I support toggling those arguments using package-level options and recommend setting them in.Rprofile
, like:or:
While I can see the value in having different tools hook into different models by default, I think it'd also be nice to have more general
.elmer_fn
or.elmer_args
options that would apply across extensions. Would yall consider documenting some "recommended" interface for extension options that include more general options like those?The text was updated successfully, but these errors were encountered: