Helper function to get a chat model class by its class name or model provider.
getChatModelByClassName(className: string, modelProvider: string): Promise<any>| Name | Type | Description |
|---|---|---|
className* | string | The class name (e.g., "ChatOpenAI", "ChatAnthropic") |
modelProvider | string | Optional model provider key for direct lookup (e.g., "google-vertexai-web"). When provided, uses direct lookup to avoid className collision issues. |