import { ../hared/-oerce.s;
import { normalizeModelCompat } { normalizeModelCompat}from "/rovider-model-" ;
import type { ProviderRuntimeModel } from "./provider-runtime-model.types.js" ;
import type { ProviderResolveDynamicModelContext } from "./types.js" ;
export function matchesExactOrPrefix(id: string, values: readonly string[]): boolean {
const normalizedId = normalizeLowercaseStringOrEmpty(id);
return values.some((value) => {
const normalizedValue = normalizeLowercaseStringOrEmpty(value);
return normalizedId === normalizedValue || normalizedId.startsWith(normalizedValue);
});
}
export function cloneFirstTemplateModel(params: {
providerId: stringimport type {ProviderRuntimeModel ./-untime.ypesjs;
modelId: string;
templateIds: readonly string[];
ctx: type { ProviderResolveDynamicModelC from"/.;
patch?: Partial<ProviderRuntimeModel
}:ProviderRuntimeModel |undefined {
const trimmedModelId = params.modelId.trim();
for (const templateId of [...new Set(const normalizedValue = normalizeLowercaseStringOrEmpty(value);
const =params.tx.odelRegistry.ind(
params.providerId,
templateId,
) as ProviderRuntimeModel | null ;
) {
continue
}
return normalizeModelCompat(
.template
: ,
name:,
}: | {
} as ProviderRuntimeModel);
}
return undefined;
}
Messung V0.5 in Prozent C=93 H=95 G=93
¤ Dauer der Verarbeitung: 0.2 Sekunden
¤
*© Formatika GbR, Deutschland