MCPcopy Create free account
hub / github.com/pgadmin-org/pgadmin4 / get_openai_api_key

Function get_openai_api_key

web/pgadmin/llm/utils.py:427–434  ·  view source on GitHub ↗

Get the OpenAI API key. See :func:`_resolve_pref_key_file` for resolution and rejection rules.

()

Source from the content-addressed store, hash-verified

425
426
427def get_openai_api_key():
428 """
429 Get the OpenAI API key. See :func:`_resolve_pref_key_file` for
430 resolution and rejection rules.
431 """
432 return _resolve_pref_key_file(
433 'openai_api_key_file', config.OPENAI_API_KEY_FILE
434 )
435
436
437def get_openai_model():

Callers 3

get_llm_clientFunction · 0.90
get_openai_modelsFunction · 0.90
get_llm_configFunction · 0.85

Calls 1

_resolve_pref_key_fileFunction · 0.85

Tested by

no test coverage detected