Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
hub
/
github.com/langchain-ai/langchain
/ _check_pkg
Function
_check_pkg
libs/langchain/langchain/chat_models/base.py:196–202 ·
view source on GitHub ↗
(pkg: str)
Source
from the content-addressed store, hash-verified
194
195
196
def
_check_pkg(pkg: str) -> None:
197
if
not util.find_spec(pkg):
198
pkg_kebab = pkg.replace(
"_"
,
"-"
)
199
raise
ImportError(
200
f
"Unable to import {pkg_kebab}. Please install with "
201
f
"`pip install -U {pkg_kebab}`"
202
)
Callers
1
init_chat_model
Function · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected