Skip to content

Conversation

@Divya1205
Copy link

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

@vjcitn
Copy link
Collaborator

vjcitn commented Aug 8, 2025

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.

Copy link
Collaborator

@vjcitn vjcitn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants