Appearance
ema / config / GoogleApiConfig
Class: GoogleApiConfig
Defined in: packages/ema/src/config.ts:153
API Configuration for the Google Generative AI provider.
Examples
yaml
# Configure in config.yaml
llm:
google:
key: "sk-1234567890"
base_url: "https://generativelanguage.googleapis.com"env
# Configure in .env (suggested)
GEMINI_API_KEY=sk-1234567890
GEMINI_API_BASE=https://generativelanguage.googleapis.comImplements
Constructors
Constructor
ts
new GoogleApiConfig(key, base_url): GoogleApiConfig;Defined in: packages/ema/src/config.ts:154
Parameters
key
string = ""
API key for the Google Generative AI provider.
If environment variable GEMINI_API_KEY is set, it will be used first.
base_url
string = "https://generativelanguage.googleapis.com"
Base URL for the Google Generative AI provider.
If environment variable GEMINI_API_BASE is set, it will be used first.
Returns
GoogleApiConfig
Properties
base_url
ts
base_url: string = "https://generativelanguage.googleapis.com";Defined in: packages/ema/src/config.ts:166
Base URL for the Google Generative AI provider.
If environment variable GEMINI_API_BASE is set, it will be used first.
Implementation of
key
ts
key: string = "";Defined in: packages/ema/src/config.ts:160
API key for the Google Generative AI provider.
If environment variable GEMINI_API_KEY is set, it will be used first.