The agent engineering platform.
Python agentsaiai-agentsanthropicchatgptdeepagentsenterpriseframeworkgeminigenerative-ailangchainlanggraphllmmultiagentopen-sourceopenaipydanticpythonragtypescript
change to type checking (#5062)
Harrison Chase8c661baefb9b
diff --git a/langchain/utilities/powerbi.py b/langchain/utilities/powerbi.pyindex 9af8cb66ee..f542c2d04c 100644--- a/langchain/utilities/powerbi.py+++ b/langchain/utilities/powerbi.py@@ -4,7 +4,7 @@ from __future__ import annotationsimport loggingimport osfrom copy import deepcopy-from typing import Any, Dict, Iterable, List, Optional, Union+from typing import TYPE_CHECKING, Any, Dict, Iterable, List, Optional, Unionimport aiohttpimport requests@@ -16,13 +16,8 @@ _LOGGER = logging.getLogger(__name__)BASE_URL = os.getenv("POWERBI_BASE_URL", "https://api.powerbi.com/v1.0/myorg")-try:+if TYPE_CHECKING:from azure.core.credentials import TokenCredential-except ImportError:- _LOGGER.log(- logging.WARNING,- "Could not import azure.core python package.",- )class PowerBIDataset(BaseModel):