Skip to content

Commit

Permalink
Hack to fix cache
Browse files Browse the repository at this point in the history
Signed-off-by: JonahSussman <[email protected]>
  • Loading branch information
JonahSussman committed Jan 10, 2025
1 parent f603b9d commit bb63cc8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions kai/llm_interfacing/model_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ def __init__(
self.llm_retry_delay: float = config.llm_retry_delay
self.demo_mode: bool = demo_mode
self.cache_dir = cache_dir
LOG.info("using cache dir: %s", self.cache_dir)

model_class: type[BaseChatModel]
defaults: dict[str, Any]
Expand Down
5 changes: 4 additions & 1 deletion kai/rpc_server/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class KaiRpcApplicationConfig(CamelCaseBaseModel):
log_config: KaiLogConfig

demo_mode: bool = False
cache_dir: Optional[AutoAbsPath] = PATH_LLM_CACHE
cache_dir: Optional[AutoAbsPath] = None
enable_reflection: bool = True

analyzer_lsp_lsp_path: AutoAbsPathExists
Expand Down Expand Up @@ -174,6 +174,9 @@ def initialize(
try:
app.config = params

if app.config.cache_dir is None:
app.config.cache_dir = PATH_LLM_CACHE

try:
model_provider = ModelProvider(
app.config.model_provider, app.config.demo_mode, app.config.cache_dir
Expand Down

0 comments on commit bb63cc8

Please sign in to comment.