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

Mechanism to use a different model from the same provider #19

Open
swerner opened this issue Apr 23, 2024 · 3 comments
Open

Mechanism to use a different model from the same provider #19

swerner opened this issue Apr 23, 2024 · 3 comments

Comments

@swerner
Copy link
Contributor

swerner commented Apr 23, 2024

For example, being able to optionally choose between using gpt-3.5 for something, using gpt-4-turbo for others, or between using claude-haiku for some and claude-opus for others if you want, but for the majority of cases being able to mostly rely on the defaults.

@swerner swerner added this to Roadmap Apr 23, 2024
@swerner swerner converted this from a draft issue Apr 23, 2024
@swerner swerner added this to the 0.1.0 milestone Apr 23, 2024
@swerner
Copy link
Contributor Author

swerner commented Apr 23, 2024

Maybe this makes sense to put in the output adapter rather than the generator? Some other thing? It seems tied to the output and/or input to figure out which model (and maybe) which provider to use?

@swerner swerner removed this from the 0.1.0 milestone Aug 13, 2024
@swerner
Copy link
Contributor Author

swerner commented Aug 30, 2024

Thinking maybe there's a pattern similar to how activerecord models have overloaded find methods. If we overloaded the generate method with being able to accept some parameters we could expand the functionality of it...thinking something like:

Sublayer.configuration.ai_model = "claude-3-5-sonnet-20240620"

claude_results = MyGenerator.new(my_param: my_param).generate
gemini_flash_results = MyGenerator.new(my_param: my_param).generate(model: "gemini-1.5-flash-latest")
gpt4o_results = MyGenerator.new(my_param: my_param).generate(model: "gpt-4o")

It would probably make sense to have default mappings of models to providers like we're discussing in #85 to make this cleaner while still allowing you to override the default provider class if needed.

@AndrewBKang
Copy link
Contributor

this is very cool. all the control and a nice optional named param off of a convention that can be expanded for other kinds of provider configs in the future)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

2 participants