mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-01 02:50:47 +00:00
Make this issue more clearly exposed to developers
This commit is contained in:
@@ -196,7 +196,9 @@ class _OllamaCommon(BaseLanguageModel):
|
|||||||
if response.status_code != 200:
|
if response.status_code != 200:
|
||||||
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")
|
||||||
|
Reference in New Issue
Block a user