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

Method _generate_kernel_id

rightnow_cli/cache.py:116–119  ·  view source on GitHub ↗

Generate unique ID for a kernel.

(self, model_name: str, operation: str, code: str)

Source from the content-addressed store, hash-verified

114 self.save_config(config)
115
116 def _generate_kernel_id(self, model_name: str, operation: str, code: str) -> str:
117 """Generate unique ID for a kernel."""
118 content = f"{model_name}:{operation}:{code}"
119 return hashlib.sha256(content.encode()).hexdigest()[:16]
120
121 def cache_kernel(self, model_name: str, operation: str, kernel_data: Dict[str, Any]):
122 """Cache a kernel and its metadata."""

Callers 2

cache_kernelMethod · 0.95

Calls

no outgoing calls

Tested by 1