Hello
I encountered an issue with API call confusion when using both the interpret_agent and fanyi packages simultaneously. The specific code is as follows:
library(fanyi)
set_translate_option("xxxxxxxxxxxxxxxxx","xxxxxxxxxxxxxxxxxxxxxxxxxx",
source = "baidu")
library(clusterProfiler)
library(aisdk)
Sys.setenv(deepseek_API_KEY = "sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx")
model <- create_deepseek()$language_model("deepseek-chat")
When I run
res <- interpret_agent(ego_mutated,
context = "Psoriasis",
add_ppi = TRUE,
model = model,
gene_fold_change = mutated_genes)
The following error occurred:
Error in value[3L]: Failed to call fanyi::chat_request. Error: cannot coerce type 'environment' to vector of type 'character'
When I restarted R and only set the API in interpret_agent, the same error occurred.
I would like to ask what methods I can use to solve this problem.
Regards
Hello
I encountered an issue with API call confusion when using both the
interpret_agentandfanyipackages simultaneously. The specific code is as follows:library(fanyi)
set_translate_option("xxxxxxxxxxxxxxxxx","xxxxxxxxxxxxxxxxxxxxxxxxxx",
source = "baidu")
library(clusterProfiler)
library(aisdk)
Sys.setenv(deepseek_API_KEY = "sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx")
model <- create_deepseek()$language_model("deepseek-chat")
When I run
res <- interpret_agent(ego_mutated,
context = "Psoriasis",
add_ppi = TRUE,
model = model,
gene_fold_change = mutated_genes)
The following error occurred:
Error in value[3L]: Failed to call fanyi::chat_request. Error: cannot coerce type 'environment' to vector of type 'character'
When I restarted R and only set the API in interpret_agent, the same error occurred.
I would like to ask what methods I can use to solve this problem.
Regards