Skip to content

Commit fdab644

Browse files
committed
Feature: Enable programmatically pass in api_key besides reading from env
1 parent 0be9125 commit fdab644

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

rust/cocoindex/src/llm/gemini.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,9 @@ impl VertexAiClient {
264264
api_bail!("VertexAi API address is not supported for VertexAi API type");
265265
}
266266
if api_key.is_some() {
267-
api_bail!("VertexAi API key is not supported for VertexAi API type. Vertex AI uses Application Default Credentials (ADC) for authentication. Please set up ADC using 'gcloud auth application-default login' instead.");
267+
api_bail!(
268+
"VertexAi API key is not supported for VertexAi API type. Vertex AI uses Application Default Credentials (ADC) for authentication. Please set up ADC using 'gcloud auth application-default login' instead."
269+
);
268270
}
269271
let Some(super::LlmApiConfig::VertexAi(config)) = api_config else {
270272
api_bail!("VertexAi API config is required for VertexAi API type");

0 commit comments

Comments
 (0)