mirror of
https://github.com/hwchase17/langchain.git
synced 2025-07-04 04:07:54 +00:00
Make this issue more clearly exposed to developers
This commit is contained in:
parent
e52a734818
commit
3a3f880e5a
@ -197,6 +197,8 @@ class _OllamaCommon(BaseLanguageModel):
|
|||||||
if response.status_code == 404:
|
if response.status_code == 404:
|
||||||
raise OllamaEndpointNotFoundError(
|
raise OllamaEndpointNotFoundError(
|
||||||
"Ollama call failed with status code 404. "
|
"Ollama call failed with status code 404. "
|
||||||
|
"Maybe your model is not found "
|
||||||
|
f"and you should pull the model with `ollama pull {self.model}`."
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
optional_detail = response.json().get("error")
|
optional_detail = response.json().get("error")
|
||||||
|
Loading…
Reference in New Issue
Block a user