Repository: explodinggradients/ragas
Issue: pydantic.error_wrappers.ValidationError: 1 validation error for Generation text   none is not an allowed value (type=type_error.none.not_allowed)
Root cause: External Dependency Breakage

[ Y] I have checked the [documentation](https://docs.ragas.io/) and related resources and couldn't resolve my bug.

**Describe the bug**
* I am unable to run Ragas due to the following exception. All the metrics are coming out empty. I last run it two months ago, so i believe ragas changed drastically in the meantime.

Ragas version: 0.1.4
Python version: 3.10.12
pydantic   version:   2.6.4
**Code to Reproduce**
My csv contains index, question, ground_truths, contexts, answer, time, total_time as columns
```import ast
from ragas import evaluate
from ragas.llms import LangchainLLMWrapper
from ragas.metrics import (
    context_precision,
    faithfulness,
    context_recall,
    answer_relevancy,
)
from datasets import load_dataset
# from langchain_community.chat_models import BedrockChat
from langchain.llms import Bedrock
from langchain_community.embeddings import BedrockEmbeddings
# from clients.bedrock_llms import get_bedrock_client, get_text_gen_llm, get_embedding_llm
import boto3

class RagasEvaluator:
    def __init__(self, dataset_path):
        self.dataset_path = dataset_path
    
    def evaluate(self):
        metrics = [
            faithfulness,
            answer_relevancy,
            context_recall,
            context_precision,
        ]

        converters = {
            "contexts" : ast.literal_eval,
            "ground_truths" : ast.literal_eval,
        } 
        bedrock_client = boto3.client('bedrock-runtime', <region>, endpoint_url='https://<bedrock-url>')
        model = Bedrock(
            
            region_name="us-east-1",
            
            model_id="anthropic.claude-v2" ,
            model_kwargs={'temperature': 0},
            client = bedrock_client,
            )

        # init the embeddings
        embeddings = BedrockEmbeddings(
            model_id="amazon.titan-embed-text-v1",
            client = bedrock_client,
        )
        bedrock_model = LangchainLLMWrapper(model)
        # answer_relevancy.embeddings = embeddings
        # for m in metrics:
        #     m.__setattr__("llm", bedrock_model)

        # init the embeddings
        bedrock_embeddings = embeddings
        
        eval_dataset = load_dataset('csv', data_files = self.dataset_path, converters = converters)
        evaluation_result = evaluate(eval_dataset["train"], metrics=metrics, llm=bedrock_model, embeddings=embeddings)```

**Error trace**

```2024-03-14 23:11:11,669 Found credentials in shared credentials file: ~/.aws/credentials
2024-03-14 23:11:12,185 passing column names as 'ground_truths' is deprecated and will be removed in the next version, please use 'ground_truth' instead. Note that `ground_truth` should be of type string and not Sequence[string] like `ground_truths`
Evaluating:   0%|                                                                                                         | 0/12 [01:13<?, ?it/s]
Exception in thread Thread-1:
Traceback (most recent call last):
  File "/Users/username/.pyenv/versions/3.10.12/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
    self.run()
  File "/Users/username/.pyenv/versions/3.10.12/lib/python3.10/site-packages/ragas/executor.py", line 96, in run
    results = self.loop.run_until_complete(self._aresults())
  File "/Users/username/.pyenv/versions/3.10.12/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete
    return future.result()
  File "/Users/username/.pyenv/versions/3.10.12/lib/python3.10/site-packages/ragas/executor.py", line 84, in _aresults
    raise e
  File "/Users/username/.pyenv/versions/3.10.12/lib/python3.10/site-packages/ragas/executor.py", line 79, in _aresults
    r = await future
  File "/Users/username/.pyenv/versions/3.10.12/lib/python3.10/asyncio/tasks.py", line 571, in _wait_for_one
    return f.result()  # May raise f.exception().
  File "/Users/username/.pyenv/versions/3.10.12/lib/python3.10/site-packages/ragas/executor.py", line 38, in sema_coro
    return await coro
  File "/Users/username/.pyenv/versions/3.10.12/lib/python3.10/site-packages/ragas/executor.py", line 112, in wrapped_callable_async
    return counter, await callable(*args, **kwargs)
  File "/Users/username/.pyenv/versions/3.10.12/lib/python3.10/site-packages/ragas/metrics/base.py", line 93, in ascore
    raise e
  File "/Users/username/.pyenv/versions/3.10.12/lib/python3.10/site-packages/ragas/metrics/base.py", line 89, in ascore
    score = await self._ascore(row=row, callbacks=group_cm, is_async=is_async)
  File "/Users/username/.pyenv/versions/3.10.12/lib/python3.10/site-packages/ragas/metrics/_answer_relevance.py", line 136, in _ascore
    result = await self.llm.generate(
  File "/Users/username/.pyenv/versions/3.10.12/lib/python3.10/site-packages/ragas/llms/base.py", line 110, in generate
    return await loop.run_in_executor(None, generate_text)
  File "/Users/username/.pyenv/versions/3.10.12/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/Users/username/.pyenv/versions/3.10.12/lib/python3.10/site-packages/tenacity/__init__.py", line 289, in wrapped_f
    return self(f, *args, **kw)
  File "/Users/username/.pyenv/versions/3.10.12/lib/python3.10/site-packages/tenacity/__init__.py", line 379, in __call__
    do = self.iter(retry_state=retry_state)
  File "/Users/username/.pyenv/versions/3.10.12/lib/python3.10/site-packages/tenacity/__init__.py", line 325, in iter
    raise retry_exc.reraise()
  File "/Users/username/.pyenv/versions/3.10.12/lib/python3.10/site-packages/tenacity/__init__.py", line 158, in reraise
    raise self.last_attempt.result()
  File "/Users/username/.pyenv/versions/3.10.12/lib/python3.10/concurrent/futures/_base.py", line 451, in result
    return self.__get_result()
  File "/Users/username/.pyenv/versions/3.10.12/lib/python3.10/concurrent/futures/_base.py", line 403, in __get_result
    raise self._exception
  File "/Users/username/.pyenv/versions/3.10.12/lib/python3.10/site-packages/tenacity/__init__.py", line 382, in __call__
    result = fn(*args, **kwargs)
  File "/Users/username/.pyenv/versions/3.10.12/lib/python3.10/site-packages/ragas/llms/base.py", line 147, in generate_text
    result = self.langchain_llm.generate_prompt(
  File "/Users/username/.pyenv/versions/3.10.12/lib/python3.10/site-packages/langchain/llms/base.py", line 497, in generate_prompt
    return self.generate(prompt_strings, stop=stop, callbacks=callbacks, **kwargs)
  File "/Users/username/.pyenv/versions/3.10.12/lib/python3.10/site-packages/langchain/llms/base.py", line 646, in generate
    output = self._generate_helper(
  File "/Users/username/.pyenv/versions/3.10.12/lib/python3.10/site-packages/langchain/llms/base.py", line 534, in _generate_helper
    raise e
  File "/Users/username/.pyenv/versions/3.10.12/lib/python3.10/site-packages/langchain/llms/base.py", line 521, in _generate_helper
    self._generate(
  File "/Users/username/.pyenv/versions/3.10.12/lib/python3.10/site-packages/langchain/llms/base.py", line 1051, in _generate
    generations.append([Generation(text=text)])
  File "/Users/username/.pyenv/versions/3.10.12/lib/python3.10/site-packages/langchain/load/serializable.py", line 97, in __init__
    super().__init__(**kwargs)
  File "pydantic/main.py", line 341, in pydantic.main.BaseModel.__init__
pydantic.error_wrappers.ValidationError: 1 validation error for Generation
text
  none is not an allowed value (type=type_error.none.not_allowed)
Traceback (most recent call last):
  File "/Users/username/Documents/workplace/PeccysBM/src/PeccysBenchmarking/src/peccys_benchmarking/./peccy_evaluator.py", line 27, in <module>
    eval_results, eval_summary = ragas_evaluator.evaluate()
  File "/Users/username/Documents/workplace/PeccysBM/src/PeccysBenchmarking/src/peccys_benchmarking/evaluators/ragas_evaluator.py", line 57, in evaluate
    pt_evaluation_result = evaluate(pt_eval_dataset["train"], metrics=metrics, llm=bedrock_model, embeddings=embeddings)
  File "/Users/username/.pyenv/versions/3.10.12/lib/python3.10/site-packages/ragas/evaluation.py", line 231, in evaluate
    raise e
  File "/Users/username/.pyenv/versions/3.10.12/lib/python3.10/site-packages/ragas/evaluation.py", line 213, in evaluate
    raise ExceptionInRunner()
ragas.exceptions.ExceptionInRunner: The runner thread which was running the jobs raised an exeception. Read the traceback above to debug it. You can also pass `raise_exceptions=False` incase you want to show only a warning message instead.```

**Expected behavior**
Metrics should have the values.



**Additional context**
Add any other context about the problem here.

<!-- PS: bugs suck but is also part of the process. We sincerely apologies for breaking your flow because of it, but don't worry, we got your back ❤️. We will get this fixed as fast as we can and thanks for helping us out by reporting it 🙏. -->


@jjmachan Can you suggest any path forward on this one?