MCPcopy
hub / github.com/anomalyco/models.dev / boolFromParams

Function boolFromParams

packages/core/script/generate-helicone.ts:80–84  ·  view source on GitHub ↗
(params: string[] | undefined, keys: string[])

Source from the content-addressed store, hash-verified

78}
79
80function boolFromParams(params: string[] | undefined, keys: string[]): boolean {
81 if (!params) return false;
82 const set = new Set(params.map((p) => p.toLowerCase()));
83 return keys.some((k) => set.has(k.toLowerCase()));
84}
85
86function sanitizeModalities(values: string[] | undefined): string[] {
87 if (!values) return ["text"]; // default to text

Callers 1

formatTomlFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected