Skip to content
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

Open
simonpcouch opened this issue Nov 25, 2024 · 1 comment
Open

package option for elmer extensions #175

simonpcouch opened this issue Nov 25, 2024 · 1 comment
Milestone

Comments

@simonpcouch
Copy link
Contributor

simonpcouch commented Nov 25, 2024

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:

options(
  .pal_fn = "chat_openai",
  .pal_args = list(model = "gpt-4o-mini")
)

or:

options(
  .ensure_fn = "chat_openai",
  .ensure_args = list(model = "gpt-4o-mini")
)

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?

@hadley
Copy link
Member

hadley commented Nov 26, 2024

Maybe we could have a chat_default() that used a user-supplied default? (Or maybe picked automatically based on presence of env vars?)

@jcheng5 what do you think?

@hadley hadley added this to the 0.1.1 milestone Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants