MCPcopy Index your code
hub / github.com/simstudioai/sim / getApiKeyCondition

Function getApiKeyCondition

apps/sim/blocks/utils.ts:213–219  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

211 * Handles hosted vs self-hosted environments and excludes providers that don't need API key.
212 */
213export function getApiKeyCondition() {
214 return (values?: Record<string, unknown>) => {
215 const model = typeof values?.model === 'string' ? values.model : ''
216 const shouldShow = shouldRequireApiKeyForModel(model)
217 return buildModelVisibilityCondition(model, shouldShow)
218 }
219}
220
221/**
222 * Visibility condition for the Cohere reranker API key field on the Knowledge block.

Callers 2

evaluateConditionFunction · 0.90

Calls 2

Tested by 1

evaluateConditionFunction · 0.72