from importlib.metadata import version

from . import llm, metrics, templating, tracing, utils
from .evaluators import (
    ClassificationEvaluator,
    EvalInput,
    Evaluator,
    KindType,
    LLMEvaluator,
    Score,
    ToolSchema,
    async_evaluate_dataframe,
    bind_evaluator,
    create_classifier,
    create_evaluator,
    evaluate_dataframe,
)
from .legacy import (
    CODE_FUNCTIONALITY_PROMPT_BASE_TEMPLATE,
    CODE_FUNCTIONALITY_PROMPT_RAILS_MAP,
    CODE_FUNCTIONALITY_PROMPT_TEMPLATE,
    CODE_FUNCTIONALITY_PROMPT_TEMPLATE_WITH_EXPLANATION,
    CODE_READABILITY_PROMPT_BASE_TEMPLATE,
    CODE_READABILITY_PROMPT_RAILS_MAP,
    CODE_READABILITY_PROMPT_TEMPLATE,
    CODE_READABILITY_PROMPT_TEMPLATE_WITH_EXPLANATION,
    HALLUCINATION_PROMPT_BASE_TEMPLATE,
    HALLUCINATION_PROMPT_RAILS_MAP,
    HALLUCINATION_PROMPT_TEMPLATE,
    HALLUCINATION_PROMPT_TEMPLATE_WITH_EXPLANATION,
    HALLUCINATION_SPAN_PROMPT_TEMPLATE,
    HUMAN_VS_AI_PROMPT_BASE_TEMPLATE,
    HUMAN_VS_AI_PROMPT_RAILS_MAP,
    HUMAN_VS_AI_PROMPT_TEMPLATE,
    HUMAN_VS_AI_PROMPT_TEMPLATE_WITH_EXPLANATION,
    NOT_PARSABLE,
    QA_PROMPT_BASE_TEMPLATE,
    QA_PROMPT_RAILS_MAP,
    QA_PROMPT_TEMPLATE,
    QA_PROMPT_TEMPLATE_WITH_EXPLANATION,
    QA_SPAN_PROMPT_TEMPLATE,
    RAG_RELEVANCY_PROMPT_BASE_TEMPLATE,
    RAG_RELEVANCY_PROMPT_RAILS_MAP,
    RAG_RELEVANCY_PROMPT_TEMPLATE,
    RAG_RELEVANCY_PROMPT_TEMPLATE_WITH_EXPLANATION,
    REFERENCE_LINK_CORRECTNESS_PROMPT_BASE_TEMPLATE,
    REFERENCE_LINK_CORRECTNESS_PROMPT_RAILS_MAP,
    REFERENCE_LINK_CORRECTNESS_PROMPT_TEMPLATE,
    REFERENCE_LINK_CORRECTNESS_PROMPT_TEMPLATE_WITH_EXPLANATION,
    SQL_GEN_EVAL_PROMPT_BASE_TEMPLATE,
    SQL_GEN_EVAL_PROMPT_RAILS_MAP,
    SQL_GEN_EVAL_PROMPT_TEMPLATE,
    SQL_GEN_EVAL_PROMPT_TEMPLATE_WITH_EXPLANATION,
    TOOL_CALLING_BASE_TEMPLATE,
    TOOL_CALLING_PROMPT_RAILS_MAP,
    TOOL_CALLING_PROMPT_TEMPLATE,
    TOOL_CALLING_SPAN_PROMPT_TEMPLATE,
    TOOL_CALLING_TEMPLATE_WITH_EXPLANATION,
    TOXICITY_PROMPT_RAILS_MAP,
    TOXICITY_PROMPT_TEMPLATE,
    TOXICITY_PROMPT_TEMPLATE_BASE_TEMPLATE,
    TOXICITY_PROMPT_TEMPLATE_WITH_EXPLANATION,
    USER_FRUSTRATION_PROMPT_BASE_TEMPLATE,
    USER_FRUSTRATION_PROMPT_RAILS_MAP,
    USER_FRUSTRATION_PROMPT_TEMPLATE,
    USER_FRUSTRATION_PROMPT_TEMPLATE_WITH_EXPLANATION,
    AnthropicModel,
    BedrockModel,
    ClassificationTemplate,
    GeminiModel,
    GoogleGenAIModel,
    HallucinationEvaluator,
    LiteLLMModel,
    MistralAIModel,
    OpenAIModel,
    PromptTemplate,
    QAEvaluator,
    RelevanceEvaluator,
    SQLEvaluator,
    SummarizationEvaluator,
    ToxicityEvaluator,
    VertexAIModel,
    compute_precisions_at_k,
    download_benchmark_dataset,
    llm_classify,
    llm_generate,
    run_evals,
)
from .llm import LLM

__version__ = version("arize-phoenix-evals")


__all__ = [
    # evals 1.0
    "compute_precisions_at_k",
    "download_benchmark_dataset",
    "llm_classify",
    "llm_generate",
    "OpenAIModel",
    "AnthropicModel",
    "GeminiModel",
    "GoogleGenAIModel",
    "VertexAIModel",
    "BedrockModel",
    "LiteLLMModel",
    "MistralAIModel",
    "PromptTemplate",
    "ClassificationTemplate",
    "CODE_FUNCTIONALITY_PROMPT_RAILS_MAP",
    "CODE_FUNCTIONALITY_PROMPT_BASE_TEMPLATE",
    "CODE_FUNCTIONALITY_PROMPT_TEMPLATE_WITH_EXPLANATION",
    "CODE_FUNCTIONALITY_PROMPT_TEMPLATE",
    "CODE_READABILITY_PROMPT_RAILS_MAP",
    "CODE_READABILITY_PROMPT_BASE_TEMPLATE",
    "CODE_READABILITY_PROMPT_TEMPLATE_WITH_EXPLANATION",
    "CODE_READABILITY_PROMPT_TEMPLATE",
    "HALLUCINATION_PROMPT_RAILS_MAP",
    "HALLUCINATION_PROMPT_BASE_TEMPLATE",
    "HALLUCINATION_PROMPT_TEMPLATE_WITH_EXPLANATION",
    "HALLUCINATION_PROMPT_TEMPLATE",
    "HUMAN_VS_AI_PROMPT_RAILS_MAP",
    "HUMAN_VS_AI_PROMPT_BASE_TEMPLATE",
    "HUMAN_VS_AI_PROMPT_TEMPLATE_WITH_EXPLANATION",
    "HUMAN_VS_AI_PROMPT_TEMPLATE",
    "QA_PROMPT_RAILS_MAP",
    "QA_PROMPT_BASE_TEMPLATE",
    "QA_PROMPT_TEMPLATE_WITH_EXPLANATION",
    "QA_PROMPT_TEMPLATE",
    "RAG_RELEVANCY_PROMPT_RAILS_MAP",
    "RAG_RELEVANCY_PROMPT_BASE_TEMPLATE",
    "RAG_RELEVANCY_PROMPT_TEMPLATE_WITH_EXPLANATION",
    "RAG_RELEVANCY_PROMPT_TEMPLATE",
    "REFERENCE_LINK_CORRECTNESS_PROMPT_RAILS_MAP",
    "REFERENCE_LINK_CORRECTNESS_PROMPT_BASE_TEMPLATE",
    "REFERENCE_LINK_CORRECTNESS_PROMPT_TEMPLATE_WITH_EXPLANATION",
    "REFERENCE_LINK_CORRECTNESS_PROMPT_TEMPLATE",
    "SQL_GEN_EVAL_PROMPT_RAILS_MAP",
    "SQL_GEN_EVAL_PROMPT_BASE_TEMPLATE",
    "SQL_GEN_EVAL_PROMPT_TEMPLATE_WITH_EXPLANATION",
    "SQL_GEN_EVAL_PROMPT_TEMPLATE",
    "TOOL_CALLING_PROMPT_RAILS_MAP",
    "TOOL_CALLING_BASE_TEMPLATE",
    "TOOL_CALLING_TEMPLATE_WITH_EXPLANATION",
    "TOOL_CALLING_PROMPT_TEMPLATE",
    "TOXICITY_PROMPT_RAILS_MAP",
    "TOXICITY_PROMPT_TEMPLATE_BASE_TEMPLATE",
    "TOXICITY_PROMPT_TEMPLATE_WITH_EXPLANATION",
    "TOXICITY_PROMPT_TEMPLATE",
    "USER_FRUSTRATION_PROMPT_RAILS_MAP",
    "USER_FRUSTRATION_PROMPT_BASE_TEMPLATE",
    "USER_FRUSTRATION_PROMPT_TEMPLATE_WITH_EXPLANATION",
    "USER_FRUSTRATION_PROMPT_TEMPLATE",
    "NOT_PARSABLE",
    "run_evals",
    "HallucinationEvaluator",
    "QAEvaluator",
    "RelevanceEvaluator",
    "SQLEvaluator",
    "SummarizationEvaluator",
    "ToxicityEvaluator",
    "HALLUCINATION_SPAN_PROMPT_TEMPLATE",
    "QA_SPAN_PROMPT_TEMPLATE",
    "TOOL_CALLING_SPAN_PROMPT_TEMPLATE",
    # evals 2.0
    "ClassificationEvaluator",
    "EvalInput",
    "Evaluator",
    "LLMEvaluator",
    "Score",
    "ToolSchema",
    "KindType",
    "create_classifier",
    "create_evaluator",
    "async_evaluate_dataframe",
    "evaluate_dataframe",
    "metrics",
    "templating",
    "llm",
    "LLM",
    "bind_evaluator",
    "tracing",
    "utils",
]
