Closed daulet closed 1 month ago
@daulet wow, this is amazing. I am currently traveling but should have time to dive into this either on Sunday or Monday. Thanks!!
@kardolus the integration tests are failing due to this addition. To set provider we need to write to config file, so I added creating config directory on demand, but that fails the expectation in the tests. What would you recommend as the right fix here?
@daulet thanks for your patience. Had a very busy week. Will look at the PR as a whole before diving into the integration tests. Will have time today.
Had to do some refactoring to plug in another provider, reviewing individual commits might be easier than the whole thing, but at high level:
OpenAIProvider
type;stdout
writes out ofhttp.Caller
- that way other providers don't have to duplicate behavior embedded intohttp.Caller
, which is currently used for making OpenAI calls;CohereProvider
that could be plugged in based on newprovider
field in configuration;I don't know if you are open to supporting other providers at all, so publishing bigger PR than ideal to get initial buy in, can break it down into more consumable chunks if necessary.
If accepted it would probably require adding defaults per provider, such as default model, to make switching easier on user.