Add Gemini API support as alternative to OpenAI in edamize()#12
Open
Divya1205 wants to merge 2 commits intoBioconductor:mainfrom
Open
Add Gemini API support as alternative to OpenAI in edamize()#12Divya1205 wants to merge 2 commits intoBioconductor:mainfrom
Divya1205 wants to merge 2 commits intoBioconductor:mainfrom
Conversation
Collaborator
|
Thanks for this. There are a few changes needed. First, please bump the version in DESCRIPTION whenever new code is submitted. Second, please add yourself as a contributor in DESCRIPTION. Third, it was my impression that the changes are to accommodate users who do not have OPENAI_API_KEY available. But a nontrivial amount of code still checks for that specifically instead of branching when GEMINI_API_KEY (?) is found set instead. I can help with these changes but let me know if you want to tackle them. |
vjcitn
requested changes
Aug 8, 2025
Collaborator
There was a problem hiding this comment.
See the comment I added above. Additionally
> content2 = readRDS(system.file("rds/IRangesOVdata.rds", package="biocEDAM"))
> lk2 = edamize(content2$focus)
Loading required namespace: reticulate
Error in py_module_import(module, convert = convert) :
openai.OpenAIError: The api_key client option must be set either by passing api_key to the client or by setting the OPENAI_API_KEY environment variable
Run `reticulate::py_last_error()` for details.
Enter a frame number, or 0 to exit
1: edamize(content2$focus)
2: reticulate::import_from_path("curbioc.curbioc", path = tempdir(), convert =
3: import_from_path_immediate(module, path, convert)
4: import(module, convert = convert)
5: py_module_import(module, convert = convert)
even though I have GEMINI_API_KEY set. Let me know how you want to proceed.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Enable Gemini Integration for edamize()
We’re adding support for Gemini via ellmer, selectable with provider="gemini" or "openai"(default).
Here are the key references:
📘 chat_google_gemini() documentation
🔑 How to get and use a Gemini API key