# call the local ollama model using the OpenAI client
chat_completion = client.chat.completions.create(
    messages=[
        {
            'role': 'user',
            'content': 'Say this is a test',
        }
    ],
    model='llama3.1',
)

print(chat_completion.choices[0].message.content)
```

The local LLM call is now traced and logged to Opik.

## Tracking Ollama calls made with LangChain

In order to trace Ollama calls made with LangChain, you will need to first install the `langchain-ollama` package:

```bash
pip install --quiet --upgrade langchain-ollama langchain
```

You will now be able to use the `OpikTracer` class to log all your Ollama calls made with LangChain to Opik:

```python
from langchain_ollama import ChatOllama
from opik.integrations.langchain import OpikTracer