-
-
Notifications
You must be signed in to change notification settings - Fork 25
add Gemini LLM integration #55
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
base: master
Are you sure you want to change the base?
Conversation
lecheel
commented
Feb 28, 2025
- Implements the `Xai` struct and `LLM` trait for interacting with the X.AI API. - Includes error handling for missing API key. - Supports streaming responses and termination.
- Implements the `Gemini` struct and `LLM` trait for interacting with the Gemini API. - Includes error handling for missing API key. - Supports streaming responses and termination.
- Remove Xai LLM backend - Remove xai config
- Uncomment release profile settings - Enable LTO, stripping, and single codegen unit
src/gemini.rs
Outdated
// Configuration file example | ||
// | ||
// [gemini] | ||
// base_url = "https://generativelanguage.googleapis.com/v1beta/models" | ||
// model = "gemini-2.0-flash" | ||
// |
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.
this can be removed
src/gemini.rs
Outdated
let body: Value = json!({ | ||
"contents": contents, | ||
"generationConfig": { | ||
"temperature": 0.7, | ||
"topK": 32, | ||
"topP": 0.95, | ||
"maxOutputTokens": 8192 |
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.
maybe we should put that somewhere where it can be configured 🤔 what do you think ?
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.
i think which depend on entire proj to provide the configured option, in gemini without this also work fine. yes the comment can be removed just the reference for correct url in config.toml
@lecheel |
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.
fixed using just build.