MCPcopy Create free account
hub / github.com/RightNow-AI/rightnow-cli / has_api_key

Method has_api_key

rightnow_cli/cache.py:83–88  ·  view source on GitHub ↗

Check if API key is configured and valid (not a placeholder).

(self)

Source from the content-addressed store, hash-verified

81 json.dump(config, f, indent=2)
82
83 def has_api_key(self) -> bool:
84 """Check if API key is configured and valid (not a placeholder)."""
85 config = self.get_config()
86 api_key = config.get('openrouter_api_key')
87 # Check if API key exists and is not the placeholder value
88 return bool(api_key) and api_key != "sk-temp-placeholder"
89
90 def get_api_key(self) -> Optional[str]:
91 """Get the stored API key if it's valid (not a placeholder)."""

Callers 3

_optimize_workflowMethod · 0.80
test_has_api_key_trueMethod · 0.80

Calls 2

get_configMethod · 0.95
getMethod · 0.45

Tested by 2

test_has_api_key_trueMethod · 0.64