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;このページは役に立ちましたか?
フィードバックありがとうございます。この記事の改善に活かします。