-
Notifications
You must be signed in to change notification settings - Fork 30
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
feature: Add gemini backend #52
feature: Add gemini backend #52
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey there! Sorry for the late reply, weekends are generally my time for looking at open source. I'll try to get back to this one ASAP!
Thanks for the PR, this is really exciting. I haven't had the chance to play with Gemini yet, and it'll be sick for my first experience to be in Oatmeal.
Just got a few comments and questions, mostly around getting tests fixed up.
let url = format!( | ||
"{url}/v1beta/{model}?key={key}", | ||
url = self.url, | ||
model = Config::get(ConfigKey::Model), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚓 Health checks are failing due to this. I admit configuration should be injected in the backend interface rather than pulled in from a global repository, but I haven't gotten around to doing it. As this is a health check, you could hardcode the default model here and that'd be enough.
Alternatively, you could call Config::set
right before calling the healthcheck function in your test and set it to model-1
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a possibility to get more info on the test? I am doing the Config::set in the test exactly as you mentioned:
https://github.com/aislasq/oatmeal/blob/5f4fd4f89b0634060e456ef9b3e4144167ddfeee/src/infrastructure/backends/gemini_test.rs#L54
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The github actions test suite is using nextest
, this runs tests in parallel process' where memory will be different for each test. You have Config:set
being used in one test, but it's gotta be use in all your healthcheck tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, let me check the linter so you can re-run the tests. Thanks!
The lint is failing because my formatter is changing it on save, I am using rustfmt 1.6.0-stable (79e9716c 2023-11-13). Should I use a different one? |
The project is using a nightly version of rustfmt to gain access to other features I wanted. You can run |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really appreciate this, code looks great and I'm excited to play with it more. Great job!
This is the implementation of the Gemini API.
I've been using for general questions outside neovim and it works well, I think it would greatly benefit from the custom system prompts.