buildClientFromRegistry
이 콘텐츠는 아직 번역되지 않았습니다.
function buildClientFromRegistry( registry, aliasOrRef, onProviderSelected?): { client: ModelClient; contextWindowTokens?: number; maxOutputTokens?: number; model: ResolvedModel;};registry + 别名 → fallback 链 client 与解析结果(setModel 热切换复用)。
链装配由 @tansr/providers buildAliasClient 单源承载;本函数保留 SDK 专属职责:错误包装
(TansrSdkError assembly_failed)与 ResolvedModel / contextWindowTokens 投影。
registry
Section titled “registry”ProviderRegistry
aliasOrRef
Section titled “aliasOrRef”string
onProviderSelected?
Section titled “onProviderSelected?”(selection) => void
{ client: ModelClient; contextWindowTokens?: number; maxOutputTokens?: number; model: ResolvedModel;}client
Section titled “client”client: ModelClient;contextWindowTokens?
Section titled “contextWindowTokens?”optional contextWindowTokens?: number;maxOutputTokens?
Section titled “maxOutputTokens?”optional maxOutputTokens?: number;model: ResolvedModel;이 페이지가 도움이 되었나요?
피드백 감사합니다. 이 문서를 계속 개선하겠습니다.