Closed usey11 closed 4 months ago
Oh damn, I just opened a PR for this, didn't notice this one...
My version has the benefit of not importing the ollama codebase, so we're not taking a large hit on dependencies. Your version has the benefit of returning actual supported models in ListModels (mine are hardcoded). Only problem is that it panics in case of errors, but I guess you had no choice, the interface doesn't call for errors.
I'll keep this open and perhaps rebase the model-related code on top of mine. I just need to figure out if and how to change the interface so that we don't panic.
Thanks a lot for your contribution, regardless.
Nice! I think for Ollama having the actual models is more important in comparison to OpenAI and Bedrock due to how many models are available and ollama also allows users to add customized models
Yep, it's kinda how Bedrock works too, by the way. I've been rethinking whether hard coding the list of supported models makes sense since Bedrock support was added. On the one hand, it allows us to cherry-pick models, those that are actually geared towards code generation so we can maintain a high quality of results. On the other hand, it forces us to release new versions of aiac
when models are added and it removes a potentially beneficial flexibility.
I haven't made up my mind yet, but a combination of both might be the way to go.
Since version 5.0.0, we finally no longer hardcode the list of models, and the ListModels method actually contacts the provider API to query for supported models. Thanks for your contribution despite this not getting in, it was helpful.
For some use-cases using an external API may be too expensive or unsafe. Using Ollama as a backend allows you to run use aiac completely locally.