Files
confident-ai--deepeval/deepeval/constants.py
T
2026-07-13 13:32:05 +08:00

51 lines
1.6 KiB
Python

from enum import Enum
from typing import Union
import os
KEY_FILE: str = ".deepeval"
HIDDEN_DIR: str = os.getenv("DEEPEVAL_CACHE_FOLDER", ".deepeval")
PYTEST_RUN_TEST_NAME: str = "CONFIDENT_AI_RUN_TEST_NAME"
PYTEST_TRACE_TEST_WRAPPER_SPAN_NAME: str = (
"__deepeval_internal_pytest_test_wrapper__"
)
LOGIN_PROMPT = "\n✨👀 Looking for a place for your LLM test data to live 🏡❤️ ? Use [rgb(106,0,255)]Confident AI[/rgb(106,0,255)] to get & share testing reports, experiment with models/prompts, and catch regressions for your LLM system. Just run [cyan]'deepeval login'[/cyan] in the CLI."
CONFIDENT_TRACE_VERBOSE = "CONFIDENT_TRACE_VERBOSE"
CONFIDENT_TRACE_FLUSH = "CONFIDENT_TRACE_FLUSH"
CONFIDENT_TRACE_SAMPLE_RATE = "CONFIDENT_TRACE_SAMPLE_RATE"
CONFIDENT_TRACE_ENVIRONMENT = "CONFIDENT_TRACE_ENVIRONMENT"
CONFIDENT_TRACING_ENABLED = "CONFIDENT_TRACING_ENABLED"
CONFIDENT_TRACE_INTERNAL = "CONFIDENT_TRACE_INTERNAL"
CONFIDENT_OPEN_BROWSER = "CONFIDENT_OPEN_BROWSER"
CONFIDENT_TEST_CASE_BATCH_SIZE = "CONFIDENT_TEST_CASE_BATCH_SIZE"
class ProviderSlug(str, Enum):
OPENAI = "openai"
AZURE = "azure"
ANTHROPIC = "anthropic"
BEDROCK = "bedrock"
DEEPSEEK = "deepseek"
GOOGLE = "google"
GROK = "grok"
KIMI = "kimi"
LITELLM = "litellm"
LOCAL = "local"
OLLAMA = "ollama"
OPENROUTER = "openrouter"
PORTKEY = "portkey"
def slugify(value: Union[str, ProviderSlug]) -> str:
return (
value.value
if isinstance(value, ProviderSlug)
else str(value).strip().lower()
)
SUPPORTED_PROVIDER_SLUGS = frozenset(s.value for s in ProviderSlug)