Repository: explodinggradients/ragas
Issue: Evaluate function throws Mistral has no attribute set_run_config
Root cause: Interface Contract Mismatch

```python
from langchain_community.chat_models import ChatOllama
from langchain_community.embeddings import OllamaEmbeddings
from ragas import evaluate
from ragas.metrics import answer_relevancy
from datasets import Dataset
import json

req_llm = ChatOllama(model_name="mistral")  

embeddings = OllamaEmbeddings()

data = [
    {
        'question': 'Which is the most popular global sport?',
        'contexts': [
            "The popularity of sports can be measured in various ways, including TV viewership, social media presence, number of participants, and economic impact.",
            "Football is undoubtedly the world's most popular sport with major events like the FIFA World Cup.",
            "Sports personalities like Ronaldo and Messi draw a followership of more than 4 billion people."
        ],
        'response': 'Football is the most popular sport with around 4 billion followers worldwide',
        'answer': 'Football is the most popular sport with around 4 billion followers worldwide'
    }
]

# Convert the list to a Hugging Face Dataset object
dataset = Dataset.from_list(data)

# Step 3: Run the evaluation
results = evaluate(
    dataset=dataset,  # Use the Hugging Face Dataset object
    metrics=[answer_relevancy],
    llm=req_llm,
    embeddings=embeddings,
)

# Step 4: Print the results
print(json.dumps(results, indent=3))
```

Tried this and it gives
```python
AttributeError: 'Mistral' object has no attribute 'set_run_config'
```
Any suggestions will be highly appreiciated, need this to work urgently. Thanks!

<!-- Greeting -->
Hey there, @Sohammhatre10! 👋 I'm here to help you with any bugs, questions, or contributions you have in mind. Let's tackle this together!

<!-- Answer -->
A similar issue was discussed in a closed thread where the solution involved removing any manual patching of models in your code. Specifically, ensure you are not using code like:

```python
# patch the models in all the metrics
for m in metrics:
    m.__setattr__("llm", ragas_model)
    m.__setattr__("embeddings", embed_model)
```

Additionally, make sure you are using the latest versions of the relevant libraries, as upgrading resolved the issue for others <sup>[[1]](https://github.com/explodinggradients/ragas/issues/595)</sup>.


<!-- Dosu Comment Footer -->
*To continue talking to [Dosu](https://dosu.dev), mention @dosu.*


No i'm not using anything like this @dosu

This is the Traceback
```python
AttributeError                            Traceback (most recent call last)
<ipython-input-155-30d7c30fba2f> in <cell line: 34>()
     32 
     33 # Step 3: Run the evaluation
---> 34 results = evaluate(
     35     dataset=dataset,  # Use the Hugging Face Dataset object
     36     metrics=[answer_relevancy],

2 frames
/usr/local/lib/python3.10/dist-packages/ragas/_analytics.py in wrapper(*args, **kwargs)
    127     def wrapper(*args: P.args, **kwargs: P.kwargs) -> t.Any:
    128         track(IsCompleteEvent(event_type=func.__name__, is_completed=False))
--> 129         result = func(*args, **kwargs)
    130         track(IsCompleteEvent(event_type=func.__name__, is_completed=True))
    131 

/usr/local/lib/python3.10/dist-packages/ragas/evaluation.py in evaluate(dataset, metrics, llm, embeddings, callbacks, in_ci, run_config, token_usage_parser, raise_exceptions, column_map)
    204 
    205         # init all the models
--> 206         metric.init(run_config)
    207 
    208     executor = Executor(

/usr/local/lib/python3.10/dist-packages/ragas/metrics/base.py in init(self, run_config)
    151                 f"Metric '{self.name}' has no valid LLM provided (self.llm is None). Please initantiate a the metric with an LLM to run."  # noqa
    152             )
--> 153         self.llm.set_run_config(run_config)
    154 
    155 

AttributeError: 'Mistral' object has no attribute 'set_run_config'
```

<!-- Answer -->
Ensure that the `Mistral` object is an instance of a class that inherits from `BaseRagasEmbeddings` or another class implementing the `set_run_config` method. If `Mistral` is supposed to be a subclass, it should be structured like this:

```python
class Mistral(BaseRagasEmbeddings):
    def __init__(self, embeddings, run_config=None):
        self.embeddings = embeddings
        if run_config is None:
            run_config = RunConfig()
        self.set_run_config(run_config)
```

If `Mistral` isn't meant to be a subclass, it shouldn't be expected to have `set_run_config` <sup>[[1]](https://github.com/explodinggradients/ragas/blob/main/src/ragas/embeddings/base.py)</sup>.


<!-- Dosu Comment Footer -->
*To continue talking to [Dosu](https://dosu.dev), mention @dosu.*


Turns out wrapping it in `LangchainLLMWrapper` works but ChatOllama support isnt active for ragas currently.

```python
from langchain_ollama.chat_models import ChatOllama
from langchain_ollama.embeddings import OllamaEmbeddings
import ragas
from ragas import evaluate
from ragas.metrics import answer_relevancy
from ragas.llms import LangchainLLMWrapper
from ragas.embeddings import LangchainEmbeddingsWrapper
from datasets import Dataset
import json

# The model should be specified using the `model` parameter
req_llm = ChatOllama(model="mistral")
wrapper = LangchainLLMWrapper(req_llm)
embeddings = OllamaEmbeddings(model="mistral")
wrapper_embedding = LangchainEmbeddingsWrapper(embeddings)

metrics=[answer_relevancy]

for m in metrics:
    m.__setattr__("llm", wrapper)
    if hasattr(m, "embeddings"):
      m.__setattr__("embeddings", wrapper_embedding)

# Step 3: Run the evaluation
results = evaluate(
    dataset=amnesty_qa["eval"].select(range(2)),
    metrics=[answer_relevancy],
    llm=wrapper,
    embeddings=wrapper_embedding,
)

# Step 4: Print the results
print(json.dumps(results, indent=3))
```