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

Function get_llm_config

web/pgadmin/llm/utils.py:593–641  ·  view source on GitHub ↗

Get complete LLM configuration for all providers. Returns: A dictionary containing configuration for all providers: { 'default_provider': str or None, 'enabled': bool, 'anthropic': { 'api_key': str or None,

()

Source from the content-addressed store, hash-verified

591
592
593def get_llm_config():
594 """
595 Get complete LLM configuration for all providers.
596
597 Returns:
598 A dictionary containing configuration for all providers:
599 {
600 'default_provider': str or None,
601 'enabled': bool,
602 'anthropic': {
603 'api_key': str or None,
604 'model': str
605 },
606 'openai': {
607 'api_key': str or None,
608 'model': str
609 },
610 'ollama': {
611 'api_url': str,
612 'model': str
613 },
614 'docker': {
615 'api_url': str,
616 'model': str
617 }
618 }
619 """
620 return {
621 'default_provider': get_default_provider(),
622 'enabled': is_llm_enabled(),
623 'anthropic': {
624 'api_url': get_anthropic_api_url(),
625 'api_key': get_anthropic_api_key(),
626 'model': get_anthropic_model()
627 },
628 'openai': {
629 'api_url': get_openai_api_url(),
630 'api_key': get_openai_api_key(),
631 'model': get_openai_model()
632 },
633 'ollama': {
634 'api_url': get_ollama_api_url(),
635 'model': get_ollama_model()
636 },
637 'docker': {
638 'api_url': get_docker_api_url(),
639 'model': get_docker_model()
640 }
641 }

Callers

nothing calls this directly

Calls 12

get_default_providerFunction · 0.85
is_llm_enabledFunction · 0.85
get_anthropic_api_urlFunction · 0.85
get_anthropic_api_keyFunction · 0.85
get_anthropic_modelFunction · 0.85
get_openai_api_urlFunction · 0.85
get_openai_api_keyFunction · 0.85
get_openai_modelFunction · 0.85
get_ollama_api_urlFunction · 0.85
get_ollama_modelFunction · 0.85
get_docker_api_urlFunction · 0.85
get_docker_modelFunction · 0.85

Tested by

no test coverage detected