Warn on deprecated LLMDetector use and stop writing a default cache file
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 48/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- python
- Área
- backend-api-design
Línea de trabajo
Start with lettucedetect/detectors/llm.py and run uv run --extra dev pytest tests/test_llm_detector_pytest.py tests/test_factory_pytest.py -q. Trace how LLMDetector is constructed directly and through HallucinationDetector(method="llm", ...), then review the related configuration tests. Done means deprecated direct uses warn as specified, invalid options raise the stated configuration error, and a run without cache_file writes no cache file.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Parent: #166 · Epic: #126 · Blocked by: #161, #165, #135
Branch from stateless_core; open the PR against it.
Problem
LLMDetector builds a client from provider and environment variables, writes a cache file inside the installed package directory when no cache_file is passed, and reports bad arguments as ValueError. Users get no signal about what to change.
Current behavior
lettucedetect/detectors/llm.py:63-82constructor arguments (provider,client,cache_file,native, …); client built fromprovider/**client_kwargswhen none is passed.llm.py:109unknown language and:123native conflicts raiseValueError;:164missing few-shot file only warns (becomesConfigurationErrorthroughLLMJudgeConfig).llm.py:183-194default cache filelettucedetect/cache/cache_<model>_<lang>.json.
Steps
- Mark
LLMDetectordeprecated namingLLMJudgeDetectorandGenerativeDetector; in-package construction doesn't warn. - Keep choosing the delegate by
_looks_native(model)ornative=. native(or a matching name) withzero_shot,fewshot_pathorprompt_path→ConfigurationError(native_options_conflict,param).- Without
client, build one fromproviderand**client_kwargsas today and warn that the client should be passed; passingproviderorclient_kwargswarns as a deprecated argument (sentinel defaults). cache_filebuilds aFileCacheand warns namingcache=; with nocache_filethere is no cache and no file anywhere.- Invalid language /
batch_sizemap toConfigurationErrorwithcodeandparamthrough the configs.
Acceptance criteria
- Each deprecated use warns once with the standard message;
HallucinationDetector(method="llm", ...)stays silent. - Name rule and
native=override tested; conflict raises withnative_options_conflict. - A run in an empty cwd with no
cache_filewrites nothing, including under the package directory. - Existing tests pass unchanged (modules marked in #136).
Start here
uv run --extra dev pytest tests/test_llm_detector_pytest.py tests/test_factory_pytest.py -q
- Lenguaje dominante
- Python
- Estrellas
- 615
- Forks
- 60
- Merge medio
- 2 d 18 h
- PR fusionados (30 d)
- 12
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de KRLabsOrg/LettuceDetect
-
enhancement
Dificultad 1/5 Menos de una hora Aptitud para principiantes 85/100
KRLabsOrg/LettuceDetect#108 ·
Los mantenedores suelen responder en 1 día
-
documentation
Dificultad 2/5 Medio día Aptitud para principiantes 70/100
KRLabsOrg/LettuceDetect#104 ·
Los mantenedores suelen responder en 1 día
-
Bugs: One typed detect interface for the detectors packagePosiblemente ocupada @hslev la tomó hace 1 día. Abierto
KRLabsOrg/LettuceDetect#192 · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
ready-for-agent
Dificultad 3/5 1-2 días Aptitud para principiantes 68/100
KRLabsOrg/LettuceDetect#181 ·
Los mantenedores suelen responder en 1 día
-
ready-for-agent
Dificultad 5/5 Más de una semana Aptitud para principiantes 22/100
KRLabsOrg/LettuceDetect#180 ·
Los mantenedores suelen responder en 1 día
Todos los issues de KRLabsOrg/LettuceDetect
Issues similares
-
Wayback LinksAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
chnm/teachinghistory-hugo#53 ·
-
gpt-oss "Forcing a tool call" row no longer reproduces: tool_choice is now honoured on every surfaceAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
aws-samples/sample-per-model-bedrock#840 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 85/100
521xueweihan/HelloGitHub#4318 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
DiamondLightSource/eiger-correction#2 · 1 comentario ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
django-cms/djangocms-frontend#413 ·