langchain_community.llms.ollama.OllamaEndpointNotFoundError: Ollama call failed with status code 404
Labels: name: auto:bug, name: area: models

### System Info

Langchain Version: 0.0.352
Langchain experimental Version: 0.0.47
Python : 3.10
Ubuntu : 22.04

Poetry is being used 

**Code: `test.py`**

```python
import json

from langchain.schema import HumanMessage
from langchain.callbacks.manager import CallbackManager
from langchain.callbacks.streaming_stdout import StreamingStdOutCallbackHandler
from langchain.chat_models import ChatOllama

chat_model = ChatOllama(model="mistral:instruct")
json_schema = {
    "title": "Person",
    "description": "Identifying information about a person.",
    "type": "object",
    "properties": {
        "name": {"title": "Name", "description": "The person's name", "type": "string"},
        "age": {"title": "Age", "description": "The person's age", "type": "integer"},
        "fav_food": {
            "title": "Fav Food",
            "description": "The person's favorite food",
            "type": "string",
        },
    },
    "required": ["name", "age"],
}

messages = [
    HumanMessage(
        content="Please tell me about a person using the following JSON schema:"
    ),
    HumanMessage(content=json.dumps(json_schema, indent=2)),
    HumanMessage(
        content="Now, considering the schema, tell me about a person named John who is 35 years old and loves pizza."
    ),
]

chat_model_response = chat_model(messages)
```
**Error:**

```sh
Traceback (most recent call last):
  File "test.py", line 35, in <module>
    chat_model_response = chat_model(messages)
  File ".venv/lib/python3.10/site-packages/langchain_core/language_models/chat_models.py", line 636, in __call__
    generation = self.generate(
  File ".venv/lib/python3.10/site-packages/langchain_core/language_models/chat_models.py", line 382, in generate
    raise e
  File ".venv/lib/python3.10/site-packages/langchain_core/language_models/chat_models.py", line 372, in generate
    self._generate_with_cache(
  File ".venv/lib/python3.10/site-packages/langchain_core/language_models/chat_models.py", line 528, in _generate_with_cache
    return self._generate(
  File ".venv/lib/python3.10/site-packages/langchain_community/chat_models/ollama.py", line 209, in _generate
    final_chunk = self._chat_stream_with_aggregation(
  File ".venv/lib/python3.10/site-packages/langchain_community/chat_models/ollama.py", line 168, in _chat_stream_with_aggregation
    for stream_resp in self._create_chat_stream(messages, stop, **kwargs):
  File ".venv/lib/python3.10/site-packages/langchain_community/chat_models/ollama.py", line 155, in _create_chat_stream
    yield from self._create_stream(
  File ".venv/lib/python3.10/site-packages/langchain_community/llms/ollama.py", line 198, in _create_stream
    raise OllamaEndpointNotFoundError(
langchain_community.llms.ollama.OllamaEndpointNotFoundError: Ollama call failed with status code 404.
```
checked if ollama is running on port 11434 it is working fine, but still seeing the issue.

@hwchase17 @agola11 
Need some help on this. 



### Who can help?

_No response_

### Information

- [ ] The official example notebooks/scripts
- [x] My own modified scripts

### Related Components

- [X] LLMs/Chat Models
- [ ] Embedding Models
- [ ] Prompts / Prompt Templates / Prompt Selectors
- [ ] Output Parsers
- [ ] Document Loaders
- [ ] Vector Stores / Retrievers
- [ ] Memory
- [ ] Agents / Agent Executors
- [ ] Tools / Toolkits
- [ ] Chains
- [ ] Callbacks/Tracing
- [ ] Async

### Reproduction

run the file `test.py` 

### Expected behavior

model should complete the predication without any issue