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

Function is_llm_available

web/pgadmin/llm/client.py:276–287  ·  view source on GitHub ↗

Check if an LLM client is available and properly configured. Returns: True if an LLM client can be created, False otherwise.

()

Source from the content-addressed store, hash-verified

274
275
276def is_llm_available() -> bool:
277 """
278 Check if an LLM client is available and properly configured.
279
280 Returns:
281 True if an LLM client can be created, False otherwise.
282 """
283 try:
284 client = get_llm_client()
285 return client is not None and client.is_available()
286 except (LLMClientError, ValueError):
287 return False

Callers 2

chat_with_databaseFunction · 0.90

Calls 2

get_llm_clientFunction · 0.85
is_availableMethod · 0.45

Tested by

no test coverage detected