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

Function is_llm_enabled

web/pgadmin/llm/utils.py:556–566  ·  view source on GitHub ↗

Check if LLM features are enabled for the current user. This checks both the system-level config (LLM_ENABLED) and whether a valid provider is configured in user preferences. Returns: True if LLM is enabled and a provider is configured, False otherwise.

()

Source from the content-addressed store, hash-verified

554
555
556def is_llm_enabled():
557 """
558 Check if LLM features are enabled for the current user.
559
560 This checks both the system-level config (LLM_ENABLED) and
561 whether a valid provider is configured in user preferences.
562
563 Returns:
564 True if LLM is enabled and a provider is configured, False otherwise.
565 """
566 return get_default_provider() is not None
567
568
569def get_max_tool_iterations():

Calls 1

get_default_providerFunction · 0.85

Tested by

no test coverage detected