forked from 0xWheatyz/SPARC
Make LLM model and SERP cache TTL configurable via environment variables #124
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
llm.pyhardcodes the modelanthropic/claude-3.5-sonnet.config.pyhardcodes the SERP cache TTL at 24 hours. Both should be configurable without code changes.Work
config.py, addLLM_MODEL(defaultanthropic/claude-3.5-sonnet) andSERP_CACHE_TTL_HOURS(default24) settings.llm.py, read the model fromconfig.LLM_MODELinstead of a literal string.serp_api.py(or wherever the TTL is used), read fromconfig.SERP_CACHE_TTL_HOURS..env.examplewith both variables.Acceptance Criteria
LLM_MODEL=openai/gpt-4ocauses the LLM client to use that model.SERP_CACHE_TTL_HOURS=48doubles the cache TTL.References
Roadmap: P2 — Backend — Make LLM model configurable; SERP cache TTL hardcoded.
This issue has already been resolved. LLM model and SERP cache TTL are configurable via environment variables in
SPARC/config.py.Resolved by PR #29. Closing.