Open swerner opened 7 months ago
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?
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.
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)
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.