Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/ragas/embeddings/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@
BaseRagasEmbeddings,
HuggingfaceEmbeddings,
LangchainEmbeddingsWrapper,
embedding_factory,
)

__all__ = [
"HuggingfaceEmbeddings",
"BaseRagasEmbeddings",
"LangchainEmbeddingsWrapper",
"embedding_factory",
]
12 changes: 8 additions & 4 deletions src/ragas/evaluation.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@

from ragas._analytics import EvaluationEvent, track
from ragas.callbacks import new_group
from ragas.embeddings.base import BaseRagasEmbeddings, LangchainEmbeddingsWrapper, embedding_factory
from ragas.embeddings.base import (
BaseRagasEmbeddings,
LangchainEmbeddingsWrapper,
embedding_factory,
)
from ragas.llms import llm_factory
from ragas.exceptions import ExceptionInRunner
from ragas.executor import Executor
Expand All @@ -36,8 +40,8 @@
def evaluate(
dataset: Dataset,
metrics: list[Metric] | None = None,
llm: t.Optional[BaseRagasLLM] = None,
embeddings: t.Optional[BaseRagasEmbeddings] = None,
llm: t.Optional[BaseRagasLLM | LangchainLLM] = None,
embeddings: t.Optional[BaseRagasEmbeddings | LangchainEmbeddings] = None,
callbacks: Callbacks = [],
is_async: bool = False,
max_workers: t.Optional[int] = None,
Expand Down Expand Up @@ -79,7 +83,7 @@ def evaluate(
run_config: RunConfig, optional
Configuration for runtime settings like timeout and retries. If not provided,
default values are used.
raise_exceptions: bool, optional
raise_exceptions: True
Whether to raise exceptions or not. If set to True then the evaluation will
raise an exception if any of the metrics fail. If set to False then the
evaluation will return `np.nan` for the row that failed. Default is True.
Expand Down