mirror of
https://github.com/hwchase17/langchain.git
synced 2025-07-17 18:23:59 +00:00
Update rwkv.py import error (#10293)
I have updated the code to ensure consistent error handling for ImportError. Instead of relying on ValueError as before, I've followed the standard practice of raising ImportError while also including detailed error messages. This modification improves code clarity and explicitly indicates that any issues are related to module imports.
This commit is contained in:
parent
bce38b7163
commit
3cc242b591
@ -121,7 +121,7 @@ class RWKV(LLM, BaseModel):
|
||||
values["pipeline"] = PIPELINE(values["client"], values["tokens_path"])
|
||||
|
||||
except ImportError:
|
||||
raise ValueError(
|
||||
raise ImportError(
|
||||
"Could not import rwkv python package. "
|
||||
"Please install it with `pip install rwkv`."
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user