-
Notifications
You must be signed in to change notification settings - Fork 1k
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 support for Gemini models #75
base: main
Are you sure you want to change the base?
Conversation
- Add support for Gemini-1.5-flash and Gemini-1.5-pro. Author: Harsh Pare
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.
Thank you! Would you also be able to add a note in the README describing what keys are needed?
Do these work out of the box with the Aider API?
@@ -199,6 +214,17 @@ def get_response_from_llm( | |||
) | |||
content = response.choices[0].message.content | |||
new_msg_history = new_msg_history + [{"role": "assistant", "content": content}] | |||
elif "gemini" in model: | |||
new_msg_history = msg_history + [{"role": "user", "parts": msg}] | |||
response = client.generate_content( |
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.
No system message!
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.
Yes, looks like Gemini doesn't have support for system messages as of now. This is what I found online:
Discussion1, Discussion2
Hi @conglu1997, are these changes good to merge? |
I think we will need a solution for the system messages, the code won't work without them. |
Author: Harsh Pare