-
Notifications
You must be signed in to change notification settings - Fork 608
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
feat: add support for gemini #5235
Merged
Merged
+85
−21
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Deploying windmill with
|
Latest commit: |
884cce4
|
Status: | ✅ Deploy successful! |
Preview URL: | https://9436a1dd.windmill.pages.dev |
Branch Preview URL: | https://hc-add-gemini.windmill.pages.dev |
30f0807
to
9c57565
Compare
0d0ada6
to
1ef482e
Compare
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.
👍 Looks good to me! Reviewed everything up to 884cce4 in 2 minutes and 26 seconds
More details
- Looked at
223
lines of code in5
files - Skipped
0
files when reviewing. - Skipped posting
13
drafted comments based on config settings.
1. frontend/src/routes/(root)/(logged)/workspace_settings/+page.svelte:1077
- Draft comment:
New ToggleButton for 'googleai' has been added. Verify that the value 'googleai' correctly maps to the appropriate AI defaults and resource type elsewhere in the code. - Reason this comment was not posted:
Comment did not seem useful. Confidence is useful =0%
<= threshold50%
This comment is asking the PR author to verify something, which violates the rule against asking for confirmation or verification. It does not provide a specific suggestion or point out a clear issue.
2. frontend/src/lib/components/copilot/lib.ts:95
- Draft comment:
Added support for the 'googleai' provider via a new base URL. Please verify that the endpoint 'https://generativelanguage.googleapis.com/v1beta/openai' is the correct API endpoint for Gemini and that its behavior (e.g. message formatting) is fully compatible. - Reason this comment was not posted:
Comment did not seem useful. Confidence is useful =0%
<= threshold50%
This comment is asking the PR author to verify the correctness and compatibility of an API endpoint, which falls under the rule of not asking the author to confirm or ensure behavior. It doesn't provide a specific suggestion or point out a clear issue.
3. frontend/src/lib/script_helpers.ts:913
- Draft comment:
Refactored 'isInitialCode' to use nested for-of loops instead of forEach. This allows early return and improves clarity. Consider commenting the rationale for future maintainers. - Reason this comment was not posted:
Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 30% vs. threshold = 50%
The change from forEach to for-of is a clear improvement in code quality since it allows early return instead of unnecessarily continuing iteration after finding a match. While documenting this rationale could be helpful, the code change is fairly straightforward and the benefit of for-of loops for early returns is a common pattern that experienced developers would recognize. The comment is suggesting something nice-to-have but not critical.
The performance and readability benefits of for-of with early return may not be immediately obvious to all developers, especially junior ones. Documentation could help with maintainability.
While documentation could be helpful, the change is following a standard pattern and the benefits are evident from the code itself. We should avoid requesting documentation for common patterns.
Delete the comment. While documentation could be nice, the code change follows a common pattern and the benefits are clear from the code itself.
4. frontend/src/routes/(root)/(logged)/workspace_settings/+page.svelte:1073
- Draft comment:
New ToggleButton for 'Google AI' is added in the AI provider selection. Ensure that the UI update correctly resets associated settings (resource path, models) and that the backend correctly handles the 'googleai' provider. - Reason this comment was not posted:
Comment was not on a location in the diff, so it can't be submitted as a review comment.
5. frontend/src/routes/(root)/(logged)/workspace_settings/+page.svelte:1090
- Draft comment:
The ResourcePicker updates in the keyed block use the current aiProvider to set the resource type. Please double-check that for providers like 'googleai', no special handling is needed beyond using the provider name directly. - Reason this comment was not posted:
Comment was not on a location in the diff, so it can't be submitted as a review comment.
6. backend/windmill-api/openapi.yaml:691
- Draft comment:
Typographical error: The operationId 'getJob logs' contains an unexpected space. Please update it to 'getJobLogs'. - Reason this comment was not posted:
Comment was not on a location in the diff, so it can't be submitted as a review comment.
7. backend/windmill-api/openapi.yaml:9570
- Draft comment:
Typographical error: The summary for '/w/{workspace}/apps/exists/{path}' uses 'exisst' instead of 'exists'. Please correct the spelling. - Reason this comment was not posted:
Comment was not on a location in the diff, so it can't be submitted as a review comment.
8. frontend/src/lib/components/copilot/lib.ts:300
- Draft comment:
Typo: The interface name 'FixScriptOpions' appears to be misspelled. It should likely be 'FixScriptOptions'. - Reason this comment was not posted:
Comment was not on a location in the diff, so it can't be submitted as a review comment.
9. frontend/src/lib/components/copilot/lib.ts:399
- Draft comment:
Typo: The function name 'addDBSChema' appears to have a typographical error. Consider renaming it to 'addDBSchema'. - Reason this comment was not posted:
Comment was not on a location in the diff, so it can't be submitted as a review comment.
10. frontend/src/lib/script_helpers.ts:80
- Draft comment:
Typo: The comment uses "overriden" but the correct spelling is "overridden". - Reason this comment was not posted:
Comment was not on a location in the diff, so it can't be submitted as a review comment.
11. frontend/src/lib/script_helpers.ts:444
- Draft comment:
Typo: The error message text has 'occured' which should be spelled as 'occurred'. - Reason this comment was not posted:
Comment was not on a location in the diff, so it can't be submitted as a review comment.
12. frontend/src/lib/script_helpers.ts:686
- Draft comment:
Typo: The word "clude" should be "include" in the comment describing how to return the resume URL. - Reason this comment was not posted:
Comment was not on a location in the diff, so it can't be submitted as a review comment.
13. frontend/src/lib/script_helpers.ts:564
- Draft comment:
Typo: The word "clude" should be "include" in the approval comment. - Reason this comment was not posted:
Comment was not on a location in the diff, so it can't be submitted as a review comment.
Workflow ID: wflow_W0cd5JphKNonkQCu
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Important
Add support for Google AI (Gemini) as a new AI provider, updating backend and frontend to integrate it into existing systems.
GoogleAI
toAIProvider
enum inai.rs
.get_openai_compatible_base_url()
inai.rs
to return Google AI's base URL.proxy()
inai.rs
to handleGoogleAI
.googleai
toAIProvider
enum inlib.ts
.AI_DEFAULT_MODELS
andOPENAI_COMPATIBLE_BASE_URLS
inlib.ts
to include Google AI models and URL.prepareOpenaiCompatibleMessages()
inlib.ts
to handle Google AI's message format.getNonStreamingCompletion()
andgetCompletion()
inlib.ts
to supportgoogleai
.Google AI
toggle button in+page.svelte
for workspace settings.This description was created by
for 884cce4. It will automatically update as commits are pushed.