Skip to main content

has_llm_access

Function has_llm_access 

Source
pub fn has_llm_access(api_key: &Option<String>, provider: &Provider) -> bool
Expand description

Checks if LLM access is available.

Determines whether LLM analysis can be performed based on the provider type and API key availability. Ollama doesn’t require an API key, while cloud providers do.

§Arguments

  • api_key - Optional API key
  • provider - The LLM provider type

§Returns

true if LLM access is available, false otherwise.