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

Add ollama backend #86

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Add ollama backend #86

wants to merge 1 commit into from

Conversation

usey11
Copy link

@usey11 usey11 commented Feb 4, 2024

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.

@ghost
Copy link

ghost commented Feb 4, 2024

👇 Click on the image for a new way to code review

Review these changes using an interactive CodeSee Map

Legend

CodeSee Map legend

@ido50
Copy link
Collaborator

ido50 commented Feb 6, 2024

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.

@usey11
Copy link
Author

usey11 commented Feb 6, 2024

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

@ido50
Copy link
Collaborator

ido50 commented Feb 6, 2024

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.

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

Successfully merging this pull request may close these issues.

None yet

2 participants